aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-sff.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-10-08 22:10:26 -0400
committerJeff Garzik <jeff@garzik.org>2006-12-01 22:40:28 -0500
commit90088bb41200b4da962282dfd45db82544adac3b (patch)
tree84241a4af54715469dd237bd6925f46530f2b5b7 /drivers/ata/libata-sff.c
parentd1adc1bbd6dde3e05a91e2d3e6ab42d202ea61d5 (diff)
[PATCH] libata: move ata_irq_on() into libata-sff.c
ata_irq_on() isn't used outside of libata core layer. The function is TF/SFF interface specific but currently used by core path with some hack too. Move it from include/linux/libata.h to drivers/ata/libata-sff.c. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-sff.c')
-rw-r--r--drivers/ata/libata-sff.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index e178d6ae8b80..37471d3c1c28 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -39,6 +39,35 @@
39#include "libata.h" 39#include "libata.h"
40 40
41/** 41/**
42 * ata_irq_on - Enable interrupts on a port.
43 * @ap: Port on which interrupts are enabled.
44 *
45 * Enable interrupts on a legacy IDE device using MMIO or PIO,
46 * wait for idle, clear any pending interrupts.
47 *
48 * LOCKING:
49 * Inherited from caller.
50 */
51u8 ata_irq_on(struct ata_port *ap)
52{
53 struct ata_ioports *ioaddr = &ap->ioaddr;
54 u8 tmp;
55
56 ap->ctl &= ~ATA_NIEN;
57 ap->last_ctl = ap->ctl;
58
59 if (ap->flags & ATA_FLAG_MMIO)
60 writeb(ap->ctl, (void __iomem *) ioaddr->ctl_addr);
61 else
62 outb(ap->ctl, ioaddr->ctl_addr);
63 tmp = ata_wait_idle(ap);
64
65 ap->ops->irq_clear(ap);
66
67 return tmp;
68}
69
70/**
42 * ata_tf_load_pio - send taskfile registers to host controller 71 * ata_tf_load_pio - send taskfile registers to host controller
43 * @ap: Port to which output is sent 72 * @ap: Port to which output is sent
44 * @tf: ATA taskfile register set 73 * @tf: ATA taskfile register set