diff options
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 41 |
1 files changed, 12 insertions, 29 deletions
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; | |||
1170 | extern int probe_qd65xx; | 1170 | extern int probe_qd65xx; |
1171 | extern int cmd640_vlb; | 1171 | extern int cmd640_vlb; |
1172 | 1172 | ||
1173 | static int __initdata is_chipset_set[MAX_HWIFS]; | 1173 | static 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; |