aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-27 09:38:24 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-27 09:38:24 -0400
commitef87f8d09639cbe22201c7dfe07586c43b255108 (patch)
tree1fbb1a8a9b749f928a442ca7e1eedd93ce3d625b /drivers/ide/ide.c
parente460a59751a7e53b549c63d4d308ba73582c8def (diff)
ide: remove obsoleted "idex=" kernel parameters
* Remove obsoleted "idex=" kernel parameters. * Make probe_* and cmd640_vlb variables static. Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r--drivers/ide/ide.c115
1 files changed, 1 insertions, 114 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 7ccf99a11fb6..a33840d11770 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -837,16 +837,6 @@ static int __init match_parm (char *s, const char *keywords[], int vals[], int m
837 return 0; /* zero = nothing matched */ 837 return 0; /* zero = nothing matched */
838} 838}
839 839
840extern int probe_ali14xx;
841extern int probe_umc8672;
842extern int probe_dtc2278;
843extern int probe_ht6560b;
844extern int probe_qd65xx;
845extern int cmd640_vlb;
846extern int probe_4drives;
847
848static int __initdata is_chipset_set;
849
850/* 840/*
851 * ide_setup() gets called VERY EARLY during initialization, 841 * ide_setup() gets called VERY EARLY during initialization,
852 * to handle kernel "command line" strings beginning with "hdx=" or "ide". 842 * to handle kernel "command line" strings beginning with "hdx=" or "ide".
@@ -855,14 +845,12 @@ static int __initdata is_chipset_set;
855 */ 845 */
856static int __init ide_setup(char *s) 846static int __init ide_setup(char *s)
857{ 847{
858 int i, vals[3];
859 ide_hwif_t *hwif; 848 ide_hwif_t *hwif;
860 ide_drive_t *drive; 849 ide_drive_t *drive;
861 unsigned int hw, unit; 850 unsigned int hw, unit;
851 int vals[3];
862 const char max_drive = 'a' + ((MAX_HWIFS * MAX_DRIVES) - 1); 852 const char max_drive = 'a' + ((MAX_HWIFS * MAX_DRIVES) - 1);
863 const char max_hwif = '0' + (MAX_HWIFS - 1);
864 853
865
866 if (strncmp(s,"hd",2) == 0 && s[2] == '=') /* hd= is for hd.c */ 854 if (strncmp(s,"hd",2) == 0 && s[2] == '=') /* hd= is for hd.c */
867 return 0; /* driver and not us */ 855 return 0; /* driver and not us */
868 856
@@ -986,114 +974,13 @@ static int __init ide_setup(char *s)
986 printk(" -- BAD BUS SPEED! Expected value from 20 to 66"); 974 printk(" -- BAD BUS SPEED! Expected value from 20 to 66");
987 goto done; 975 goto done;
988 } 976 }
989 /*
990 * Look for interface options: "idex="
991 */
992 if (s[3] >= '0' && s[3] <= max_hwif) {
993 /*
994 * Be VERY CAREFUL changing this: note hardcoded indexes below
995 * (-8, -9, -10) are reserved to ease the hardcoding.
996 */
997 static const char *ide_words[] = {
998 "minus1", "minus2", "minus3", "minus4",
999 "minus5", "minus6", "ata66", "minus8", "minus9",
1000 "minus10", "four", "qd65xx", "ht6560b", "cmd640_vlb",
1001 "dtc2278", "umc8672", "ali14xx", NULL };
1002
1003 hw = s[3] - '0';
1004 hwif = &ide_hwifs[hw];
1005 i = match_parm(&s[4], ide_words, vals, 3);
1006
1007 /*
1008 * Cryptic check to ensure chipset not already set for hwif.
1009 * Note: we can't depend on hwif->chipset here.
1010 */
1011 if (i >= -18 && i <= -11) {
1012 /* chipset already specified */
1013 if (is_chipset_set)
1014 goto bad_option;
1015 /* these drivers are for "ide0=" only */
1016 if (hw != 0)
1017 goto bad_hwif;
1018 is_chipset_set = 1;
1019 printk("\n");
1020 }
1021 977
1022 switch (i) {
1023#ifdef CONFIG_BLK_DEV_ALI14XX
1024 case -17: /* "ali14xx" */
1025 probe_ali14xx = 1;
1026 goto obsolete_option;
1027#endif
1028#ifdef CONFIG_BLK_DEV_UMC8672
1029 case -16: /* "umc8672" */
1030 probe_umc8672 = 1;
1031 goto obsolete_option;
1032#endif
1033#ifdef CONFIG_BLK_DEV_DTC2278
1034 case -15: /* "dtc2278" */
1035 probe_dtc2278 = 1;
1036 goto obsolete_option;
1037#endif
1038#ifdef CONFIG_BLK_DEV_CMD640
1039 case -14: /* "cmd640_vlb" */
1040 cmd640_vlb = 1;
1041 goto obsolete_option;
1042#endif
1043#ifdef CONFIG_BLK_DEV_HT6560B
1044 case -13: /* "ht6560b" */
1045 probe_ht6560b = 1;
1046 goto obsolete_option;
1047#endif
1048#ifdef CONFIG_BLK_DEV_QD65XX
1049 case -12: /* "qd65xx" */
1050 probe_qd65xx = 1;
1051 goto obsolete_option;
1052#endif
1053#ifdef CONFIG_BLK_DEV_4DRIVES
1054 case -11: /* "four" drives on one set of ports */
1055 probe_4drives = 1;
1056 goto obsolete_option;
1057#endif
1058 case -10: /* minus10 */
1059 case -9: /* minus9 */
1060 case -8: /* minus8 */
1061 case -6:
1062 case -4:
1063 case -3:
1064 goto bad_option;
1065 case -7: /* ata66 */
1066#ifdef CONFIG_BLK_DEV_IDEPCI
1067 /*
1068 * Use ATA_CBL_PATA40_SHORT so drive side
1069 * cable detection is also overriden.
1070 */
1071 hwif->cbl = ATA_CBL_PATA40_SHORT;
1072 goto obsolete_option;
1073#else
1074 goto bad_hwif;
1075#endif
1076 case -5:
1077 case -2:
1078 case -1:
1079 case 0:
1080 case 1:
1081 case 2:
1082 case 3:
1083 goto bad_option;
1084 default:
1085 printk(" -- SUPPORT NOT CONFIGURED IN THIS KERNEL\n");
1086 return 1;
1087 }
1088 }
1089bad_option: 978bad_option:
1090 printk(" -- BAD OPTION\n"); 979 printk(" -- BAD OPTION\n");
1091 return 1; 980 return 1;
1092obsolete_option: 981obsolete_option:
1093 printk(" -- OBSOLETE OPTION, WILL BE REMOVED SOON!\n"); 982 printk(" -- OBSOLETE OPTION, WILL BE REMOVED SOON!\n");
1094 return 1; 983 return 1;
1095bad_hwif:
1096 printk("-- NOT SUPPORTED ON ide%d", hw);
1097done: 984done:
1098 printk("\n"); 985 printk("\n");
1099 return 1; 986 return 1;