aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/ide/ide.txt5
-rw-r--r--drivers/ide/Kconfig4
-rw-r--r--drivers/ide/ide.c15
-rw-r--r--drivers/ide/legacy/Makefile1
-rw-r--r--drivers/ide/legacy/ide-4drives.c46
5 files changed, 55 insertions, 16 deletions
diff --git a/Documentation/ide/ide.txt b/Documentation/ide/ide.txt
index 18c02df2f78f..486c699f4aea 100644
--- a/Documentation/ide/ide.txt
+++ b/Documentation/ide/ide.txt
@@ -222,8 +222,6 @@ Summary of ide driver parameters for kernel command line
222 both the respective primary and secondary channel 222 both the respective primary and secondary channel
223 to take effect. 223 to take effect.
224 224
225 "idex=four" : four drives on idex and ide(x^1) share same ports
226
227 "idex=reset" : reset interface after probe 225 "idex=reset" : reset interface after probe
228 226
229 "idex=ata66" : informs the interface that it has an 80c cable 227 "idex=ata66" : informs the interface that it has an 80c cable
@@ -250,6 +248,9 @@ Also for legacy CMD640 host driver (cmd640) you need to use "probe_vlb"
250kernel paremeter to enable probing for VLB version of the chipset (PCI ones 248kernel paremeter to enable probing for VLB version of the chipset (PCI ones
251are detected automatically). 249are detected automatically).
252 250
251You also need to use "probe" kernel parameter for ide-4drives driver
252(support for IDE generic chipset with four drives on one port).
253
253================================================================================ 254================================================================================
254 255
255Some Terminology 256Some Terminology
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
index 29dd99caaf50..ec6b4a80e333 100644
--- a/drivers/ide/Kconfig
+++ b/drivers/ide/Kconfig
@@ -1035,8 +1035,8 @@ config BLK_DEV_4DRIVES
1035 Certain older chipsets, including the Tekram 690CD, use a single set 1035 Certain older chipsets, including the Tekram 690CD, use a single set
1036 of I/O ports at 0x1f0 to control up to four drives, instead of the 1036 of I/O ports at 0x1f0 to control up to four drives, instead of the
1037 customary two drives per port. Support for this can be enabled at 1037 customary two drives per port. Support for this can be enabled at
1038 runtime using the "ide0=four" kernel boot parameter if you say Y 1038 runtime using the "ide-4drives.probe" kernel boot parameter if you
1039 here. 1039 say Y here.
1040 1040
1041config BLK_DEV_ALI14XX 1041config BLK_DEV_ALI14XX
1042 tristate "ALI M14xx support" 1042 tristate "ALI M14xx support"
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index adecf45a0849..690b5ff4d88f 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -976,6 +976,7 @@ extern int probe_dtc2278;
976extern int probe_ht6560b; 976extern int probe_ht6560b;
977extern int probe_qd65xx; 977extern int probe_qd65xx;
978extern int cmd640_vlb; 978extern int cmd640_vlb;
979extern int probe_4drives;
979 980
980static int __initdata is_chipset_set; 981static int __initdata is_chipset_set;
981 982
@@ -1187,19 +1188,9 @@ static int __init ide_setup(char *s)
1187#endif 1188#endif
1188#ifdef CONFIG_BLK_DEV_4DRIVES 1189#ifdef CONFIG_BLK_DEV_4DRIVES
1189 case -11: /* "four" drives on one set of ports */ 1190 case -11: /* "four" drives on one set of ports */
1190 { 1191 probe_4drives = 1;
1191 ide_hwif_t *mate = &ide_hwifs[hw^1];
1192 mate->drives[0].select.all ^= 0x20;
1193 mate->drives[1].select.all ^= 0x20;
1194 hwif->chipset = mate->chipset = ide_4drives;
1195 mate->irq = hwif->irq;
1196 memcpy(mate->io_ports, hwif->io_ports, sizeof(hwif->io_ports));
1197 hwif->mate = mate;
1198 mate->mate = hwif;
1199 hwif->serialized = mate->serialized = 1;
1200 goto obsolete_option; 1192 goto obsolete_option;
1201 } 1193#endif
1202#endif /* CONFIG_BLK_DEV_4DRIVES */
1203 case -10: /* minus10 */ 1194 case -10: /* minus10 */
1204 case -9: /* minus9 */ 1195 case -9: /* minus9 */
1205 case -8: /* minus8 */ 1196 case -8: /* minus8 */
diff --git a/drivers/ide/legacy/Makefile b/drivers/ide/legacy/Makefile
index 7043ec7d1e05..6939329f89e8 100644
--- a/drivers/ide/legacy/Makefile
+++ b/drivers/ide/legacy/Makefile
@@ -6,6 +6,7 @@ obj-$(CONFIG_BLK_DEV_UMC8672) += umc8672.o
6obj-$(CONFIG_BLK_DEV_DTC2278) += dtc2278.o 6obj-$(CONFIG_BLK_DEV_DTC2278) += dtc2278.o
7obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o 7obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o
8obj-$(CONFIG_BLK_DEV_QD65XX) += qd65xx.o 8obj-$(CONFIG_BLK_DEV_QD65XX) += qd65xx.o
9obj-$(CONFIG_BLK_DEV_4DRIVES) += ide-4drives.o
9 10
10obj-$(CONFIG_BLK_DEV_GAYLE) += gayle.o 11obj-$(CONFIG_BLK_DEV_GAYLE) += gayle.o
11obj-$(CONFIG_BLK_DEV_FALCON_IDE) += falconide.o 12obj-$(CONFIG_BLK_DEV_FALCON_IDE) += falconide.o
diff --git a/drivers/ide/legacy/ide-4drives.c b/drivers/ide/legacy/ide-4drives.c
new file mode 100644
index 000000000000..5aa7e93cfd31
--- /dev/null
+++ b/drivers/ide/legacy/ide-4drives.c
@@ -0,0 +1,46 @@
1
2#include <linux/kernel.h>
3#include <linux/init.h>
4#include <linux/module.h>
5#include <linux/ide.h>
6
7int probe_4drives = 0;
8
9module_param_named(probe, probe_4drives, bool, 0);
10MODULE_PARM_DESC(probe, "probe for generic IDE chipset with 4 drives/port");
11
12static int __init ide_4drives_init(void)
13{
14 ide_hwif_t *hwif, *mate;
15 u8 idx[4] = { 0, 1, 0xff, 0xff };
16
17 if (probe_4drives == 0)
18 return -ENODEV;
19
20 hwif = &ide_hwifs[0];
21 mate = &ide_hwifs[1];
22
23 memcpy(mate->io_ports, hwif->io_ports, sizeof(hwif->io_ports));
24
25 mate->irq = hwif->irq;
26
27 mate->chipset = hwif->chipset = ide_4drives;
28
29 mate->drives[0].select.all ^= 0x20;
30 mate->drives[1].select.all ^= 0x20;
31
32 hwif->mate = mate;
33 mate->mate = hwif;
34
35 hwif->serialized = mate->serialized = 1;
36
37 ide_device_add(idx, NULL);
38
39 return 0;
40}
41
42module_init(ide_4drives_init);
43
44MODULE_AUTHOR("Bartlomiej Zolnierkiewicz");
45MODULE_DESCRIPTION("generic IDE chipset with 4 drives/port support");
46MODULE_LICENSE("GPL");