2 #include <linux/kernel.h>
3 #include <linux/init.h>
4 #include <linux/module.h>
9 module_param_named(probe, probe_4drives, bool, 0);
10 MODULE_PARM_DESC(probe, "probe for generic IDE chipset with 4 drives/port");
12 static int __init ide_4drives_init(void)
14 ide_hwif_t *hwif, *mate;
15 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
18 if (probe_4drives == 0)
21 memset(&hw, 0, sizeof(hw));
23 ide_std_init_ports(&hw, 0x1f0, 0x3f6);
25 hw.chipset = ide_4drives;
27 hwif = ide_find_port();
29 ide_init_port_hw(hwif, &hw);
33 mate = ide_find_port();
35 ide_init_port_hw(mate, &hw);
36 mate->drives[0].select.all ^= 0x20;
37 mate->drives[1].select.all ^= 0x20;
43 hwif->serialized = mate->serialized = 1;
47 ide_device_add(idx, NULL);
52 module_init(ide_4drives_init);
54 MODULE_AUTHOR("Bartlomiej Zolnierkiewicz");
55 MODULE_DESCRIPTION("generic IDE chipset with 4 drives/port support");
56 MODULE_LICENSE("GPL");