diff options
author | Phil Sutter <n0-1@freewrt.org> | 2009-01-27 08:35:50 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-03-24 22:02:39 -0400 |
commit | 96b34ce7cafa0888580698d199b9fac6ad9f9a2e (patch) | |
tree | 8490b5b782e50455637f746ccbd27bdd3aabbe37 /drivers/ata/pata_rb532_cf.c | |
parent | 84bcbeebcfd283c3f4804287ed4610c3a18e1590 (diff) |
pata-rb532-cf: replace rb532_pata_finish_io()
Since the delay used internally is just the same as ata_sff_pause()
uses, rb532_pata_finish_io() does exactly the same as ata_sff_pause()
and thus can be replaced by the later one.
Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_rb532_cf.c')
-rw-r--r-- | drivers/ata/pata_rb532_cf.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c index ebfcda26d639..6fe660b27dc2 100644 --- a/drivers/ata/pata_rb532_cf.c +++ b/drivers/ata/pata_rb532_cf.c | |||
@@ -54,22 +54,11 @@ struct rb532_cf_info { | |||
54 | 54 | ||
55 | /* ------------------------------------------------------------------------ */ | 55 | /* ------------------------------------------------------------------------ */ |
56 | 56 | ||
57 | static inline void rb532_pata_finish_io(struct ata_port *ap) | ||
58 | { | ||
59 | struct ata_host *ah = ap->host; | ||
60 | struct rb532_cf_info *info = ah->private_data; | ||
61 | |||
62 | /* FIXME: Keep previous delay. If this is merely a fence then | ||
63 | ata_sff_sync might be sufficient. */ | ||
64 | ata_sff_dma_pause(ap); | ||
65 | ndelay(RB500_CF_IO_DELAY); | ||
66 | } | ||
67 | |||
68 | static void rb532_pata_exec_command(struct ata_port *ap, | 57 | static void rb532_pata_exec_command(struct ata_port *ap, |
69 | const struct ata_taskfile *tf) | 58 | const struct ata_taskfile *tf) |
70 | { | 59 | { |
71 | writeb(tf->command, ap->ioaddr.command_addr); | 60 | writeb(tf->command, ap->ioaddr.command_addr); |
72 | rb532_pata_finish_io(ap); | 61 | ata_sff_pause(ap); |
73 | } | 62 | } |
74 | 63 | ||
75 | static unsigned int rb532_pata_data_xfer(struct ata_device *adev, unsigned char *buf, | 64 | static unsigned int rb532_pata_data_xfer(struct ata_device *adev, unsigned char *buf, |
@@ -87,7 +76,7 @@ static unsigned int rb532_pata_data_xfer(struct ata_device *adev, unsigned char | |||
87 | *buf = readb(ioaddr); | 76 | *buf = readb(ioaddr); |
88 | } | 77 | } |
89 | 78 | ||
90 | rb532_pata_finish_io(adev->link->ap); | 79 | ata_sff_pause(ap); |
91 | return retlen; | 80 | return retlen; |
92 | } | 81 | } |
93 | 82 | ||