10 #include <linux/kernel.h>
12 #include <linux/module.h>
24 #define DRV_NAME "ide_generic"
26 static int probe_mask;
36 static const u16 legacy_bases[] = { 0x1f0 };
38 #elif defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_MAPPI2) || \
39 defined(CONFIG_PLAT_OPSPUT)
40 static const u16 legacy_bases[] = { 0x1f0 };
42 #elif defined(CONFIG_PLAT_MAPPI3)
43 static const u16 legacy_bases[] = { 0x1f0, 0x170 };
45 #elif defined(CONFIG_ALPHA)
46 static const u16 legacy_bases[] = { 0x1f0, 0x170, 0x1e8, 0x168 };
47 static const int legacy_irqs[] = { 14, 15, 11, 10 };
49 static const u16 legacy_bases[] = { 0x1f0, 0x170, 0x1e8, 0x168, 0x1e0, 0x160 };
50 static const int legacy_irqs[] = { 14, 15, 11, 10, 8, 12 };
53 static void ide_generic_check_pci_legacy_iobases(
int *
primary,
int *secondary)
69 *primary = *secondary = 1;
74 pci_read_config_word(p, 0x6C, &val);
87 static int __init ide_generic_init(
void)
91 int i,
rc = 0, primary = 0, secondary = 0;
93 ide_generic_check_pci_legacy_iobases(&primary, &secondary);
97 "module parameter for probing all legacy ISA IDE ports\n");
106 "upon user request\n");
108 for (i = 0; i <
ARRAY_SIZE(legacy_bases); i++) {
109 io_addr = legacy_bases[
i];
111 if ((probe_mask & (1 << i)) &&
io_addr) {
130 ide_std_init_ports(&
hw, io_addr, io_addr + 0x206);