aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/ide/ide.txt33
-rw-r--r--drivers/ide/ide-generic.c3
-rw-r--r--drivers/ide/ide-probe.c3
-rw-r--r--drivers/ide/ide-proc.c3
-rw-r--r--drivers/ide/ide.c41
-rw-r--r--drivers/ide/pci/cmd640.c2
-rw-r--r--drivers/ide/setup-pci.c11
-rw-r--r--include/linux/ide.h2
8 files changed, 17 insertions, 81 deletions
diff --git a/Documentation/ide/ide.txt b/Documentation/ide/ide.txt
index ae4f4f43c25c..18c02df2f78f 100644
--- a/Documentation/ide/ide.txt
+++ b/Documentation/ide/ide.txt
@@ -71,29 +71,6 @@ This driver automatically probes for most IDE interfaces (including all PCI
71ones), for the drives/geometries attached to those interfaces, and for the IRQ 71ones), for the drives/geometries attached to those interfaces, and for the IRQ
72lines being used by the interfaces (normally 14, 15 for ide0/ide1). 72lines being used by the interfaces (normally 14, 15 for ide0/ide1).
73 73
74For special cases, interfaces may be specified using kernel "command line"
75options. For example,
76
77 ide3=0x168,0x36e,10 /* ioports 0x168-0x16f,0x36e, irq 10 */
78
79Normally the irq number need not be specified, as ide.c will probe for it:
80
81 ide3=0x168,0x36e /* ioports 0x168-0x16f,0x36e */
82
83The standard port, and irq values are these:
84
85 ide0=0x1f0,0x3f6,14
86 ide1=0x170,0x376,15
87 ide2=0x1e8,0x3ee,11
88 ide3=0x168,0x36e,10
89
90Note that the first parameter reserves 8 contiguous ioports, whereas the
91second value denotes a single ioport. If in doubt, do a 'cat /proc/ioports'.
92
93In all probability the device uses these ports and IRQs if it is attached
94to the appropriate ide channel. Pass the parameter for the correct ide
95channel to the kernel, as explained above.
96
97Any number of interfaces may share a single IRQ if necessary, at a slight 74Any number of interfaces may share a single IRQ if necessary, at a slight
98performance penalty, whether on separate cards or a single VLB card. 75performance penalty, whether on separate cards or a single VLB card.
99The IDE driver automatically detects and handles this. However, this may 76The IDE driver automatically detects and handles this. However, this may
@@ -199,7 +176,7 @@ When ide.c is used as a module, you can pass command line parameters to the
199driver using the "options=" keyword to insmod, while replacing any ',' with 176driver using the "options=" keyword to insmod, while replacing any ',' with
200';'. For example: 177';'. For example:
201 178
202 insmod ide.o options="ide0=serialize ide1=serialize ide2=0x1e8;0x3ee;11" 179 insmod ide.o options="hda=nodma hdb=nodma"
203 180
204 181
205================================================================================ 182================================================================================
@@ -240,14 +217,6 @@ Summary of ide driver parameters for kernel command line
240 As for VLB, it is safest to not specify it. 217 As for VLB, it is safest to not specify it.
241 Bigger values are safer than smaller ones. 218 Bigger values are safer than smaller ones.
242 219
243 "idex=base" : probe for an interface at the addr specified,
244 where "base" is usually 0x1f0 or 0x170
245 and "ctl" is assumed to be "base"+0x206
246
247 "idex=base,ctl" : specify both base and ctl
248
249 "idex=base,ctl,irq" : specify base, ctl, and irq number
250
251 "idex=serialize" : do not overlap operations on idex. Please note 220 "idex=serialize" : do not overlap operations on idex. Please note
252 that you will have to specify this option for 221 that you will have to specify this option for
253 both the respective primary and secondary channel 222 both the respective primary and secondary channel
diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
index 387574fe4b2b..bae41459192d 100644
--- a/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -93,8 +93,7 @@ static int __init ide_generic_init(void)
93 ide_hwif_t *hwif = &ide_hwifs[i]; 93 ide_hwif_t *hwif = &ide_hwifs[i];
94 94
95 if (hwif->io_ports[IDE_DATA_OFFSET] && 95 if (hwif->io_ports[IDE_DATA_OFFSET] &&
96 (hwif->chipset == ide_unknown || 96 hwif->chipset == ide_unknown)
97 hwif->chipset == ide_forced))
98 idx[i] = i; 97 idx[i] = i;
99 else 98 else
100 idx[i] = 0xff; 99 idx[i] = 0xff;
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 8ef5194f6d47..33cb5e5a249b 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1519,8 +1519,7 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
1519 hwif = &ide_hwifs[idx[i]]; 1519 hwif = &ide_hwifs[idx[i]];
1520 1520
1521 if (hwif->present) { 1521 if (hwif->present) {
1522 if (hwif->chipset == ide_unknown || 1522 if (hwif->chipset == ide_unknown)
1523 hwif->chipset == ide_forced)
1524 hwif->chipset = ide_generic; 1523 hwif->chipset = ide_generic;
1525 hwif_register_devices(hwif); 1524 hwif_register_devices(hwif);
1526 } 1525 }
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index 77025d1057b5..edd7f186dc4d 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -46,9 +46,6 @@ static int proc_ide_read_imodel
46 int len; 46 int len;
47 const char *name; 47 const char *name;
48 48
49 /*
50 * Neither ide_unknown nor ide_forced should be set at this point.
51 */
52 switch (hwif->chipset) { 49 switch (hwif->chipset) {
53 case ide_generic: name = "generic"; break; 50 case ide_generic: name = "generic"; break;
54 case ide_pci: name = "pci"; break; 51 case ide_pci: name = "pci"; break;
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 96126b3b12e9..7e789c97a8b8 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1170,7 +1170,7 @@ extern int probe_ht6560b;
1170extern int probe_qd65xx; 1170extern int probe_qd65xx;
1171extern int cmd640_vlb; 1171extern int cmd640_vlb;
1172 1172
1173static int __initdata is_chipset_set[MAX_HWIFS]; 1173static int __initdata is_chipset_set;
1174 1174
1175/* 1175/*
1176 * ide_setup() gets called VERY EARLY during initialization, 1176 * ide_setup() gets called VERY EARLY during initialization,
@@ -1328,8 +1328,6 @@ static int __init ide_setup(char *s)
1328 "minus10", "four", "qd65xx", "ht6560b", "cmd640_vlb", 1328 "minus10", "four", "qd65xx", "ht6560b", "cmd640_vlb",
1329 "dtc2278", "umc8672", "ali14xx", NULL }; 1329 "dtc2278", "umc8672", "ali14xx", NULL };
1330 1330
1331 hw_regs_t hwregs;
1332
1333 hw = s[3] - '0'; 1331 hw = s[3] - '0';
1334 hwif = &ide_hwifs[hw]; 1332 hwif = &ide_hwifs[hw];
1335 i = match_parm(&s[4], ide_words, vals, 3); 1333 i = match_parm(&s[4], ide_words, vals, 3);
@@ -1338,19 +1336,14 @@ static int __init ide_setup(char *s)
1338 * Cryptic check to ensure chipset not already set for hwif. 1336 * Cryptic check to ensure chipset not already set for hwif.
1339 * Note: we can't depend on hwif->chipset here. 1337 * Note: we can't depend on hwif->chipset here.
1340 */ 1338 */
1341 if ((i >= -18 && i <= -11) || (i > 0 && i <= 3)) { 1339 if (i >= -18 && i <= -11) {
1342 /* chipset already specified */ 1340 /* chipset already specified */
1343 if (is_chipset_set[hw]) 1341 if (is_chipset_set)
1344 goto bad_option; 1342 goto bad_option;
1345 if (i > -18 && i <= -11) { 1343 /* these drivers are for "ide0=" only */
1346 /* these drivers are for "ide0=" only */ 1344 if (hw != 0)
1347 if (hw != 0) 1345 goto bad_hwif;
1348 goto bad_hwif; 1346 is_chipset_set = 1;
1349 /* chipset already specified for 2nd port */
1350 if (is_chipset_set[hw+1])
1351 goto bad_option;
1352 }
1353 is_chipset_set[hw] = 1;
1354 printk("\n"); 1347 printk("\n");
1355 } 1348 }
1356 1349
@@ -1430,21 +1423,11 @@ static int __init ide_setup(char *s)
1430 case -1: /* "noprobe" */ 1423 case -1: /* "noprobe" */
1431 hwif->noprobe = 1; 1424 hwif->noprobe = 1;
1432 goto obsolete_option; 1425 goto obsolete_option;
1433 1426 case 0:
1434 case 1: /* base */ 1427 case 1:
1435 vals[1] = vals[0] + 0x206; /* default ctl */ 1428 case 2:
1436 case 2: /* base,ctl */ 1429 case 3:
1437 vals[2] = 0; /* default irq = probe for it */ 1430 goto bad_option;
1438 case 3: /* base,ctl,irq */
1439 memset(&hwregs, 0, sizeof(hwregs));
1440 ide_init_hwif_ports(&hwregs, vals[0], vals[1], &hwif->irq);
1441 memcpy(hwif->io_ports, hwregs.io_ports, sizeof(hwif->io_ports));
1442 hwif->irq = vals[2];
1443 hwif->noprobe = 0;
1444 hwif->chipset = ide_forced;
1445 goto obsolete_option;
1446
1447 case 0: goto bad_option;
1448 default: 1431 default:
1449 printk(" -- SUPPORT NOT CONFIGURED IN THIS KERNEL\n"); 1432 printk(" -- SUPPORT NOT CONFIGURED IN THIS KERNEL\n");
1450 return 1; 1433 return 1;
diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c
index 29fbc5ead03b..58a95f62e383 100644
--- a/drivers/ide/pci/cmd640.c
+++ b/drivers/ide/pci/cmd640.c
@@ -415,7 +415,7 @@ static void __init setup_device_ptrs (void)
415 cmd_hwif1 = &ide_hwifs[1]; /* default, if not found below */ 415 cmd_hwif1 = &ide_hwifs[1]; /* default, if not found below */
416 for (i = 0; i < MAX_HWIFS; i++) { 416 for (i = 0; i < MAX_HWIFS; i++) {
417 ide_hwif_t *hwif = &ide_hwifs[i]; 417 ide_hwif_t *hwif = &ide_hwifs[i];
418 if (hwif->chipset == ide_unknown || hwif->chipset == ide_forced) { 418 if (hwif->chipset == ide_unknown) {
419 if (hwif->io_ports[IDE_DATA_OFFSET] == 0x1f0) 419 if (hwif->io_ports[IDE_DATA_OFFSET] == 0x1f0)
420 cmd_hwif0 = hwif; 420 cmd_hwif0 = hwif;
421 else if (hwif->io_ports[IDE_DATA_OFFSET] == 0x170) 421 else if (hwif->io_ports[IDE_DATA_OFFSET] == 0x170)
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index 634e3f6a9608..ea66c996e4ec 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -41,17 +41,6 @@ static ide_hwif_t *ide_match_hwif(unsigned long io_base, u8 bootable, const char
41 ide_hwif_t *hwif; 41 ide_hwif_t *hwif;
42 42
43 /* 43 /*
44 * Look for a hwif with matching io_base specified using
45 * parameters to ide_setup().
46 */
47 for (h = 0; h < MAX_HWIFS; ++h) {
48 hwif = &ide_hwifs[h];
49 if (hwif->io_ports[IDE_DATA_OFFSET] == io_base) {
50 if (hwif->chipset == ide_forced)
51 return hwif; /* a perfect match */
52 }
53 }
54 /*
55 * Look for a hwif with matching io_base default value. 44 * Look for a hwif with matching io_base default value.
56 * If chipset is "ide_unknown", then claim that hwif slot. 45 * If chipset is "ide_unknown", then claim that hwif slot.
57 * Otherwise, some other chipset has already claimed it.. :( 46 * Otherwise, some other chipset has already claimed it.. :(
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 9cebf3054080..67f83c60845f 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -169,7 +169,7 @@ enum { ide_unknown, ide_generic, ide_pci,
169 ide_rz1000, ide_trm290, 169 ide_rz1000, ide_trm290,
170 ide_cmd646, ide_cy82c693, ide_4drives, 170 ide_cmd646, ide_cy82c693, ide_4drives,
171 ide_pmac, ide_etrax100, ide_acorn, 171 ide_pmac, ide_etrax100, ide_acorn,
172 ide_au1xxx, ide_palm3710, ide_forced 172 ide_au1xxx, ide_palm3710
173}; 173};
174 174
175typedef u8 hwif_chipset_t; 175typedef u8 hwif_chipset_t;