11 #include <linux/types.h>
18 #include <linux/module.h>
21 #include <asm/setup.h>
31 #define GAYLE_CONTROL 0x101a
37 #define GAYLE_IRQ_4000 0xdd3020
38 #define GAYLE_IRQ_1200 0xda9000
46 #define GAYLE_NEXT_PORT 0x1000
48 #define GAYLE_NUM_HWIFS 2
49 #define GAYLE_NUM_PROBE_HWIFS (ide_doubler ? GAYLE_NUM_HWIFS : \
51 #define GAYLE_HAS_CONTROL_REG (!ide_doubler)
53 static bool ide_doubler;
71 static void gayle_a1200_clear_irq(
ide_drive_t *drive)
79 static void __init gayle_setup_ports(
struct ide_hw *
hw,
unsigned long base,
80 unsigned long ctl,
unsigned long irq_port)
84 memset(hw, 0,
sizeof(*hw));
88 for (i = 1; i < 8; i++)
97 static const struct ide_port_ops gayle_a4000_port_ops = {
98 .test_irq = gayle_test_irq,
101 static const struct ide_port_ops gayle_a1200_port_ops = {
102 .clear_irq = gayle_a1200_clear_irq,
103 .test_irq = gayle_test_irq,
135 pdata = pdev->
dev.platform_data;
136 pr_info(
"ide: Gayle IDE controller (A%u style%s)\n",
138 ide_doubler ?
", IDE doubler" :
"");
152 gayle_setup_ports(&hw[i], base, ctrlport, irqport);
160 platform_set_drvdata(pdev, host);
170 struct ide_host *host = platform_get_drvdata(pdev);
179 .remove =
__exit_p(amiga_gayle_ide_remove),
181 .name =
"amiga-gayle-ide",
186 static int __init amiga_gayle_ide_init(
void)
189 amiga_gayle_ide_probe);
194 static void __exit amiga_gayle_ide_exit(
void)