diff options
author | Sonic Zhang <sonic.adi@gmail.com> | 2007-06-15 05:45:49 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-09 12:17:34 -0400 |
commit | 5f45bc50976ee1f408f7171af155aec646655a37 (patch) | |
tree | e3d258af49914c22172ebcb9abf12914d6635b8f | |
parent | d0e580316e3db9f5cf6a605cc311ffb0372f0a35 (diff) |
Add irq_flags to struct pata_platform_info
On some embedded platforms, such as blackfin, the gpio interrupt for
IDE interface is designed to be triggered with high voltage. The gpio
port should be configured properly by set_irq_type() when register
the irq. This patch enable the generic pata platform driver to
accept platform irq flags data.
Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/ata/pata_platform.c | 6 | ||||
-rw-r--r-- | include/linux/pata_platform.h | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c index cbb7866940d6..79f841bca593 100644 --- a/drivers/ata/pata_platform.c +++ b/drivers/ata/pata_platform.c | |||
@@ -139,6 +139,7 @@ static int __devinit pata_platform_probe(struct platform_device *pdev) | |||
139 | struct resource *io_res, *ctl_res; | 139 | struct resource *io_res, *ctl_res; |
140 | struct ata_host *host; | 140 | struct ata_host *host; |
141 | struct ata_port *ap; | 141 | struct ata_port *ap; |
142 | struct pata_platform_info *pp_info; | ||
142 | unsigned int mmio; | 143 | unsigned int mmio; |
143 | 144 | ||
144 | /* | 145 | /* |
@@ -208,11 +209,12 @@ static int __devinit pata_platform_probe(struct platform_device *pdev) | |||
208 | 209 | ||
209 | ap->ioaddr.altstatus_addr = ap->ioaddr.ctl_addr; | 210 | ap->ioaddr.altstatus_addr = ap->ioaddr.ctl_addr; |
210 | 211 | ||
211 | pata_platform_setup_port(&ap->ioaddr, pdev->dev.platform_data); | 212 | pp_info = (struct pata_platform_info *)(pdev->dev.platform_data); |
213 | pata_platform_setup_port(&ap->ioaddr, pp_info); | ||
212 | 214 | ||
213 | /* activate */ | 215 | /* activate */ |
214 | return ata_host_activate(host, platform_get_irq(pdev, 0), ata_interrupt, | 216 | return ata_host_activate(host, platform_get_irq(pdev, 0), ata_interrupt, |
215 | 0, &pata_platform_sht); | 217 | pp_info->irq_flags, &pata_platform_sht); |
216 | } | 218 | } |
217 | 219 | ||
218 | /** | 220 | /** |
diff --git a/include/linux/pata_platform.h b/include/linux/pata_platform.h index 2d5fd647e0e9..5799e8d50623 100644 --- a/include/linux/pata_platform.h +++ b/include/linux/pata_platform.h | |||
@@ -8,6 +8,11 @@ struct pata_platform_info { | |||
8 | * spacing used by ata_std_ports(). | 8 | * spacing used by ata_std_ports(). |
9 | */ | 9 | */ |
10 | unsigned int ioport_shift; | 10 | unsigned int ioport_shift; |
11 | /* | ||
12 | * Indicate platform specific irq types and initial | ||
13 | * IRQ flags when call request_irq() | ||
14 | */ | ||
15 | unsigned int irq_flags; | ||
11 | }; | 16 | }; |
12 | 17 | ||
13 | #endif /* __LINUX_PATA_PLATFORM_H */ | 18 | #endif /* __LINUX_PATA_PLATFORM_H */ |