From: Graeme Russ <graeme.russ@gmail.com>
To: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH] Add hook for custom xfer function in PATA Platform driver
Date: Sun, 09 May 2010 21:29:05 +1000 [thread overview]
Message-ID: <4BE69C81.2070703@gmail.com> (raw)
In-Reply-To: <4BE6910D.9070504@ru.mvista.com>
[Added linux-ide back onto distribution list]
Sergei Shtylyov wrote:
> Hello.
>
> Graeme Russ wrote:
>
>> + /*
>> + * Assign custom data transfer function (if defined)
>> + */
>> + if (pp_info)
>> + if (unlikely(pp_info->data_xfer))
>>
>
> Could be folded into a signle *if* statement.
I thought so - I didn't exactly know what the linux coding standards are in
regards to this shortcut though.
>
> You should have also taught the symmetric ide-platfrom driver the same
> trick. However, IDE core's data transfer methods has a different prototype.
I did think about the other drivers (OF Platform etc) but I have no way of
testing them.
> I suggest to rather add a new flag, indicating 8-bit data I/O, and have
> the alternate sff_data_xfer() method defined inside the driver.
>
Well actually it goes beyond simply implementing 8-bit data transfers - On
my particular board, the PATA devices (2x CF slots) are on a General
Purpose Bus with a few other peripherals. The timing requirements for the
bus when accessing the CF cards are very strict (and very slow compared to
other devices on the bus). By overriding the data transfer function I can
arbitrate access to the bus and switch the bus timings based on the
peripheral being accessed. This cannot be done be a generic data transfer
function.
Regards,
Graeme
next prev parent reply other threads:[~2010-05-09 11:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-09 5:21 [PATCH] Add hook for custom xfer function in PATA Platform driver Graeme Russ
[not found] ` <4BE6910D.9070504@ru.mvista.com>
2010-05-09 11:29 ` Graeme Russ [this message]
2010-05-09 13:36 ` Sergei Shtylyov
2010-05-10 0:10 ` Graeme Russ
2010-05-10 9:51 ` Sergei Shtylyov
2010-05-10 10:03 ` Sergei Shtylyov
2010-05-11 0:25 ` Robert Hancock
2010-05-12 20:58 ` Sergei Shtylyov
2010-05-13 4:00 ` Graeme Russ
2010-05-13 21:02 ` Sergei Shtylyov
2010-05-14 4:04 ` Graeme Russ
2010-05-26 14:05 ` Sergei Shtylyov
2010-06-09 12:36 ` Graeme Russ
2010-05-11 9:55 ` Alan Cox
2010-05-12 20:30 ` Sergei Shtylyov
2010-05-12 23:13 ` Alan Cox
2010-05-13 4:09 ` Graeme Russ
2010-05-13 21:22 ` Sergei Shtylyov
2010-05-13 22:30 ` Alan Cox
2010-05-14 4:37 ` Graeme Russ
2010-05-26 14:26 ` Sergei Shtylyov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BE69C81.2070703@gmail.com \
--to=graeme.russ@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=sshtylyov@mvista.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.