23 #include <linux/kernel.h>
24 #include <linux/module.h>
36 #define DRV_NAME "pata-rb532-cf"
37 #define DRV_VERSION "0.1.0"
38 #define DRV_DESC "PATA driver for RouterBOARD 532 Compact Flash"
40 #define RB500_CF_MAXPORTS 1
41 #define RB500_CF_IO_DELAY 400
43 #define RB500_CF_REG_BASE 0x0800
44 #define RB500_CF_REG_ERR 0x080D
45 #define RB500_CF_REG_CTRL 0x080E
47 #define RB500_CF_REG_DBUF32 0x0C00
57 static irqreturn_t rb532_pata_irq_handler(
int irq,
void *dev_instance)
85 static void rb532_pata_setup_ports(
struct ata_host *
ah)
92 ap->
ops = &rb532_pata_port_ops;
116 dev_err(&pdev->
dev,
"no IOMEM resource found\n");
122 dev_err(&pdev->
dev,
"no IRQ resource found\n");
128 dev_err(&pdev->
dev,
"no GPIO found for irq%d\n", irq);
143 platform_set_drvdata(pdev, ah);
160 dev_err(&pdev->
dev,
"unable to set GPIO direction, err=%d\n",
165 rb532_pata_setup_ports(ah);
182 struct ata_host *ah = platform_get_drvdata(pdev);
192 .probe = rb532_pata_driver_probe,
200 #define DRV_INFO DRV_DESC " version " DRV_VERSION