diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-11 17:53:59 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-11 17:53:59 -0400 |
commit | f212ff28f08e4ddcef9f25b13463c45cc4204a0c (patch) | |
tree | e8fe63044c2ebec404689cbd55d75497aa77da0a /drivers/ide/pci/siimage.c | |
parent | 3160d5416f39da9d9221fec7cb9d64399b706bbc (diff) |
ide: move ide_rate_filter() calls to the upper layer (take 2)
* Move ide_rate_filter() calls from host drivers to IDE core.
* Make ide_rate_filter() static.
* Make 'speed' argument of ->speedproc const.
v2:
* Fix it8213_tune_chipset() comment.
There should be no functionality changes caused by this patch.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/siimage.c')
-rw-r--r-- | drivers/ide/pci/siimage.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index 50f6d172ef77..4c1f3bc7e179 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -229,14 +229,12 @@ static void sil_tuneproc(ide_drive_t *drive, u8 pio) | |||
229 | /** | 229 | /** |
230 | * siimage_tune_chipset - set controller timings | 230 | * siimage_tune_chipset - set controller timings |
231 | * @drive: Drive to set up | 231 | * @drive: Drive to set up |
232 | * @xferspeed: speed we want to achieve | 232 | * @speed: speed we want to achieve |
233 | * | 233 | * |
234 | * Tune the SII chipset for the desired mode. If we can't achieve | 234 | * Tune the SII chipset for the desired mode. |
235 | * the desired mode then tune for a lower one, but ultimately | ||
236 | * make the thing work. | ||
237 | */ | 235 | */ |
238 | 236 | ||
239 | static int siimage_tune_chipset (ide_drive_t *drive, byte xferspeed) | 237 | static int siimage_tune_chipset(ide_drive_t *drive, const u8 speed) |
240 | { | 238 | { |
241 | u8 ultra6[] = { 0x0F, 0x0B, 0x07, 0x05, 0x03, 0x02, 0x01 }; | 239 | u8 ultra6[] = { 0x0F, 0x0B, 0x07, 0x05, 0x03, 0x02, 0x01 }; |
242 | u8 ultra5[] = { 0x0C, 0x07, 0x05, 0x04, 0x02, 0x01 }; | 240 | u8 ultra5[] = { 0x0C, 0x07, 0x05, 0x04, 0x02, 0x01 }; |
@@ -245,7 +243,6 @@ static int siimage_tune_chipset (ide_drive_t *drive, byte xferspeed) | |||
245 | ide_hwif_t *hwif = HWIF(drive); | 243 | ide_hwif_t *hwif = HWIF(drive); |
246 | u16 ultra = 0, multi = 0; | 244 | u16 ultra = 0, multi = 0; |
247 | u8 mode = 0, unit = drive->select.b.unit; | 245 | u8 mode = 0, unit = drive->select.b.unit; |
248 | u8 speed = ide_rate_filter(drive, xferspeed); | ||
249 | unsigned long base = (unsigned long)hwif->hwif_data; | 246 | unsigned long base = (unsigned long)hwif->hwif_data; |
250 | u8 scsc = 0, addr_mask = ((hwif->channel) ? | 247 | u8 scsc = 0, addr_mask = ((hwif->channel) ? |
251 | ((hwif->mmio) ? 0xF4 : 0x84) : | 248 | ((hwif->mmio) ? 0xF4 : 0x84) : |