From: Phil Sutter <n0-1@freewrt.org>
To: Jeff Garzik <jeff@garzik.org>
Cc: linux-ide@vger.kernel.org, bzolnier@gmail.com, florian@openwrt.org
Subject: [PATCH 4/5] pata-rb532-cf: use ata_sff_data_xfer32()
Date: Tue, 27 Jan 2009 14:35:52 +0100 [thread overview]
Message-ID: <20090127133601.B96534CD65@mail.nwl.cc> (raw)
In-Reply-To: <1233063353-12770-2-git-send-email-n0-1@freewrt.org>
The biggest difference between rb532_pata_data_xfer() and
ata_sff_data_xfer32() is the call to ata_sff_pause() at the end of
rb532_pata_data_xfer() which I suppose to be unnecessary since it works
without. I've also tested using ata_sff_data_xfer() as replacement, but
since we know that the driver supports 32bit IO, using the optimised
version should be safe.
Signed-off-by: Phil Sutter <n0-1@freewrt.org>
---
drivers/ata/pata_rb532_cf.c | 21 +--------------------
1 files changed, 1 insertions(+), 20 deletions(-)
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
index 9d61ce5..9fb91e4 100644
--- a/drivers/ata/pata_rb532_cf.c
+++ b/drivers/ata/pata_rb532_cf.c
@@ -54,25 +54,6 @@ struct rb532_cf_info {
/* ------------------------------------------------------------------------ */
-static unsigned int rb532_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
- unsigned int buflen, int write_data)
-{
- struct ata_port *ap = adev->link->ap;
- void __iomem *ioaddr = ap->ioaddr.data_addr;
- int retlen = buflen;
-
- if (write_data) {
- for (; buflen > 0; buflen--, buf++)
- writeb(*buf, ioaddr);
- } else {
- for (; buflen > 0; buflen--, buf++)
- *buf = readb(ioaddr);
- }
-
- ata_sff_pause(ap);
- return retlen;
-}
-
static void rb532_pata_freeze(struct ata_port *ap)
{
struct rb532_cf_info *info = ap->host->private_data;
@@ -105,7 +86,7 @@ static irqreturn_t rb532_pata_irq_handler(int irq, void *dev_instance)
static struct ata_port_operations rb532_pata_port_ops = {
.inherits = &ata_sff_port_ops,
- .sff_data_xfer = rb532_pata_data_xfer,
+ .sff_data_xfer = ata_sff_data_xfer32,
.freeze = rb532_pata_freeze,
.thaw = rb532_pata_thaw,
};
--
1.5.6.4
next prev parent reply other threads:[~2009-01-27 13:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200811202002.16178.david-b@pacbell.net>
2008-11-28 19:35 ` MIPS: RB532: Provide functions for gpio configuration Phil Sutter
2008-11-28 19:48 ` [PATCH] pata-rb532-cf: fix and rename register definitions Phil Sutter
2008-12-01 19:24 ` Jeff Garzik
2008-11-28 19:48 ` [PATCH] pata-rb532-cf: fix signature of the xfer function Phil Sutter
2008-12-01 19:24 ` Jeff Garzik
2008-11-28 19:48 ` [PATCH] pata-rb532-cf: read/write data in 4-byte blocks Phil Sutter
2009-01-20 16:40 ` review of pata-rb532-cf Phil Sutter
2009-01-24 14:12 ` Bartlomiej Zolnierkiewicz
[not found] ` <1232469660-22335-1-git-send-email-n0-1@freewrt.org>
2009-01-20 16:40 ` [PATCH 1/5] pata-rb532-cf: remove set_irq_type from finish_io Phil Sutter
2009-01-27 7:13 ` Jeff Garzik
[not found] ` <1232469660-22335-2-git-send-email-n0-1@freewrt.org>
2009-01-20 16:40 ` [PATCH 2/5] pata-rb532-cf: replace rb532_pata_finish_io() Phil Sutter
2009-01-27 7:14 ` Jeff Garzik
2009-01-27 13:36 ` Phil Sutter
2009-01-27 13:35 ` Phil Sutter
2009-02-03 4:19 ` Jeff Garzik
[not found] ` <1233063353-12770-1-git-send-email-n0-1@freewrt.org>
2009-01-27 13:35 ` [PATCH 3/5] pata-rb532-cf: use ata_sff_exec_command() Phil Sutter
[not found] ` <1233063353-12770-2-git-send-email-n0-1@freewrt.org>
2009-01-27 13:35 ` Phil Sutter [this message]
[not found] ` <1233063353-12770-3-git-send-email-n0-1@freewrt.org>
2009-01-27 13:35 ` [PATCH 5/5] pata-rb532-cf: drop custom freeze and thaw Phil Sutter
[not found] ` <1232469660-22335-3-git-send-email-n0-1@freewrt.org>
2009-01-20 16:40 ` [PATCH 3/5] pata-rb532-cf: use ata_sff_exec_command() Phil Sutter
[not found] ` <1232469660-22335-4-git-send-email-n0-1@freewrt.org>
2009-01-20 16:40 ` [PATCH 4/5] pata-rb532-cf: use ata_sff_data_xfer32() Phil Sutter
[not found] ` <1232469660-22335-5-git-send-email-n0-1@freewrt.org>
2009-01-20 16:41 ` [PATCH 5/5] pata-rb532-cf: drop custom freeze and thaw Phil Sutter
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=20090127133601.B96534CD65@mail.nwl.cc \
--to=n0-1@freewrt.org \
--cc=bzolnier@gmail.com \
--cc=florian@openwrt.org \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).