]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Add irq_flags to struct pata_platform_info
authorSonic Zhang <sonic.adi@gmail.com>
Fri, 15 Jun 2007 09:45:49 +0000 (17:45 +0800)
committerJeff Garzik <jeff@garzik.org>
Mon, 9 Jul 2007 16:17:34 +0000 (12:17 -0400)
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>
drivers/ata/pata_platform.c
include/linux/pata_platform.h

index cbb7866940d6e5eeba77363f54a9ef764c5d9550..79f841bca593defac6f1e1926145f92a36a59d06 100644 (file)
@@ -139,6 +139,7 @@ static int __devinit pata_platform_probe(struct platform_device *pdev)
        struct resource *io_res, *ctl_res;
        struct ata_host *host;
        struct ata_port *ap;
+       struct pata_platform_info *pp_info;
        unsigned int mmio;
 
        /*
@@ -208,11 +209,12 @@ static int __devinit pata_platform_probe(struct platform_device *pdev)
 
        ap->ioaddr.altstatus_addr = ap->ioaddr.ctl_addr;
 
-       pata_platform_setup_port(&ap->ioaddr, pdev->dev.platform_data);
+       pp_info = (struct pata_platform_info *)(pdev->dev.platform_data);
+       pata_platform_setup_port(&ap->ioaddr, pp_info);
 
        /* activate */
        return ata_host_activate(host, platform_get_irq(pdev, 0), ata_interrupt,
-                                0, &pata_platform_sht);
+                                pp_info->irq_flags, &pata_platform_sht);
 }
 
 /**
index 2d5fd647e0e94eff581b2ad4f8a9a4f0395a405a..5799e8d50623fb18af175b7cef1ac968949d2482 100644 (file)
@@ -8,6 +8,11 @@ struct pata_platform_info {
         * spacing used by ata_std_ports().
         */
        unsigned int ioport_shift;
+       /* 
+        * Indicate platform specific irq types and initial
+        * IRQ flags when call request_irq()
+        */
+       unsigned int irq_flags;
 };
 
 #endif /* __LINUX_PATA_PLATFORM_H */