diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-15 15:21:46 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-15 15:21:46 -0400 |
commit | 30e5ee4d1a651a0c66e86c6612c003034bd20ba2 (patch) | |
tree | 5845b35a16b81f263c18708d45398cc695ac21ed /drivers/ide/ide.c | |
parent | 681a561b7ec7fdcd8f35b68e44ac6d6c70aecc04 (diff) |
ide: remove obsoleted "idebus=" kernel parameter
* Remove obsoleted "idebus=" kernel parameter.
* Remove no longer needed ide_system_bus_speed() and system_bus_clock()
(together with idebus_parameter and system_bus_speed variables).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 71 |
1 files changed, 1 insertions, 70 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 8823df1b8716..f65be738b16a 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -86,9 +86,6 @@ static const u8 ide_hwif_to_major[] = { IDE0_MAJOR, IDE1_MAJOR, | |||
86 | IDE6_MAJOR, IDE7_MAJOR, | 86 | IDE6_MAJOR, IDE7_MAJOR, |
87 | IDE8_MAJOR, IDE9_MAJOR }; | 87 | IDE8_MAJOR, IDE9_MAJOR }; |
88 | 88 | ||
89 | static int idebus_parameter; /* holds the "idebus=" parameter */ | ||
90 | static int system_bus_speed; /* holds what we think is VESA/PCI bus speed */ | ||
91 | |||
92 | DEFINE_MUTEX(ide_cfg_mtx); | 89 | DEFINE_MUTEX(ide_cfg_mtx); |
93 | __cacheline_aligned_in_smp DEFINE_SPINLOCK(ide_lock); | 90 | __cacheline_aligned_in_smp DEFINE_SPINLOCK(ide_lock); |
94 | 91 | ||
@@ -189,38 +186,6 @@ static void __init init_ide_data (void) | |||
189 | } | 186 | } |
190 | } | 187 | } |
191 | 188 | ||
192 | /** | ||
193 | * ide_system_bus_speed - guess bus speed | ||
194 | * | ||
195 | * ide_system_bus_speed() returns what we think is the system VESA/PCI | ||
196 | * bus speed (in MHz). This is used for calculating interface PIO timings. | ||
197 | * The default is 40 for known PCI systems, 50 otherwise. | ||
198 | * The "idebus=xx" parameter can be used to override this value. | ||
199 | * The actual value to be used is computed/displayed the first time | ||
200 | * through. Drivers should only use this as a last resort. | ||
201 | * | ||
202 | * Returns a guessed speed in MHz. | ||
203 | */ | ||
204 | |||
205 | static int ide_system_bus_speed(void) | ||
206 | { | ||
207 | #ifdef CONFIG_PCI | ||
208 | static struct pci_device_id pci_default[] = { | ||
209 | { PCI_DEVICE(PCI_ANY_ID, PCI_ANY_ID) }, | ||
210 | { } | ||
211 | }; | ||
212 | #else | ||
213 | #define pci_default 0 | ||
214 | #endif /* CONFIG_PCI */ | ||
215 | |||
216 | /* user supplied value */ | ||
217 | if (idebus_parameter) | ||
218 | return idebus_parameter; | ||
219 | |||
220 | /* safe default value for PCI or VESA and PCI*/ | ||
221 | return pci_dev_present(pci_default) ? 33 : 50; | ||
222 | } | ||
223 | |||
224 | void ide_remove_port_from_hwgroup(ide_hwif_t *hwif) | 189 | void ide_remove_port_from_hwgroup(ide_hwif_t *hwif) |
225 | { | 190 | { |
226 | ide_hwgroup_t *hwgroup = hwif->hwgroup; | 191 | ide_hwgroup_t *hwgroup = hwif->hwgroup; |
@@ -540,20 +505,6 @@ static int set_unmaskirq(ide_drive_t *drive, int arg) | |||
540 | return 0; | 505 | return 0; |
541 | } | 506 | } |
542 | 507 | ||
543 | /** | ||
544 | * system_bus_clock - clock guess | ||
545 | * | ||
546 | * External version of the bus clock guess used by very old IDE drivers | ||
547 | * for things like VLB timings. Should not be used. | ||
548 | */ | ||
549 | |||
550 | int system_bus_clock (void) | ||
551 | { | ||
552 | return system_bus_speed; | ||
553 | } | ||
554 | |||
555 | EXPORT_SYMBOL(system_bus_clock); | ||
556 | |||
557 | static int generic_ide_suspend(struct device *dev, pm_message_t mesg) | 508 | static int generic_ide_suspend(struct device *dev, pm_message_t mesg) |
558 | { | 509 | { |
559 | ide_drive_t *drive = dev->driver_data; | 510 | ide_drive_t *drive = dev->driver_data; |
@@ -851,7 +802,7 @@ static int __init ide_setup(char *s) | |||
851 | if (strncmp(s,"hd",2) == 0 && s[2] == '=') /* hd= is for hd.c */ | 802 | if (strncmp(s,"hd",2) == 0 && s[2] == '=') /* hd= is for hd.c */ |
852 | return 0; /* driver and not us */ | 803 | return 0; /* driver and not us */ |
853 | 804 | ||
854 | if (strncmp(s,"ide",3) && strncmp(s,"idebus",6) && strncmp(s,"hd",2)) | 805 | if (strncmp(s, "ide", 3) && strncmp(s, "hd", 2)) |
855 | return 0; | 806 | return 0; |
856 | 807 | ||
857 | printk(KERN_INFO "ide_setup: %s", s); | 808 | printk(KERN_INFO "ide_setup: %s", s); |
@@ -951,21 +902,6 @@ static int __init ide_setup(char *s) | |||
951 | } | 902 | } |
952 | } | 903 | } |
953 | 904 | ||
954 | if (s[0] != 'i' || s[1] != 'd' || s[2] != 'e') | ||
955 | goto bad_option; | ||
956 | /* | ||
957 | * Look for bus speed option: "idebus=" | ||
958 | */ | ||
959 | if (s[3] == 'b' && s[4] == 'u' && s[5] == 's') { | ||
960 | if (match_parm(&s[6], NULL, vals, 1) != 1) | ||
961 | goto bad_option; | ||
962 | if (vals[0] >= 20 && vals[0] <= 66) { | ||
963 | idebus_parameter = vals[0]; | ||
964 | } else | ||
965 | printk(" -- BAD BUS SPEED! Expected value from 20 to 66"); | ||
966 | goto obsolete_option; | ||
967 | } | ||
968 | |||
969 | bad_option: | 905 | bad_option: |
970 | printk(" -- BAD OPTION\n"); | 906 | printk(" -- BAD OPTION\n"); |
971 | return 1; | 907 | return 1; |
@@ -1287,11 +1223,6 @@ static int __init ide_init(void) | |||
1287 | int ret; | 1223 | int ret; |
1288 | 1224 | ||
1289 | printk(KERN_INFO "Uniform Multi-Platform E-IDE driver\n"); | 1225 | printk(KERN_INFO "Uniform Multi-Platform E-IDE driver\n"); |
1290 | system_bus_speed = ide_system_bus_speed(); | ||
1291 | |||
1292 | printk(KERN_INFO "ide: Assuming %dMHz system bus speed " | ||
1293 | "for PIO modes%s\n", system_bus_speed, | ||
1294 | idebus_parameter ? "" : "; override with idebus=xx"); | ||
1295 | 1226 | ||
1296 | ret = bus_register(&ide_bus_type); | 1227 | ret = bus_register(&ide_bus_type); |
1297 | if (ret < 0) { | 1228 | if (ret < 0) { |