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/cmd64x.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/cmd64x.c')
-rw-r--r-- | drivers/ide/pci/cmd64x.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index 0e3b5de26e69..5fe50a234ce1 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c | |||
@@ -288,15 +288,13 @@ static void cmd64x_tune_drive (ide_drive_t *drive, u8 pio) | |||
288 | (void) ide_config_drive_speed(drive, XFER_PIO_0 + pio); | 288 | (void) ide_config_drive_speed(drive, XFER_PIO_0 + pio); |
289 | } | 289 | } |
290 | 290 | ||
291 | static int cmd64x_tune_chipset (ide_drive_t *drive, u8 speed) | 291 | static int cmd64x_tune_chipset(ide_drive_t *drive, const u8 speed) |
292 | { | 292 | { |
293 | ide_hwif_t *hwif = HWIF(drive); | 293 | ide_hwif_t *hwif = HWIF(drive); |
294 | struct pci_dev *dev = hwif->pci_dev; | 294 | struct pci_dev *dev = hwif->pci_dev; |
295 | u8 unit = drive->dn & 0x01; | 295 | u8 unit = drive->dn & 0x01; |
296 | u8 regU = 0, pciU = hwif->channel ? UDIDETCR1 : UDIDETCR0; | 296 | u8 regU = 0, pciU = hwif->channel ? UDIDETCR1 : UDIDETCR0; |
297 | 297 | ||
298 | speed = ide_rate_filter(drive, speed); | ||
299 | |||
300 | if (speed >= XFER_SW_DMA_0) { | 298 | if (speed >= XFER_SW_DMA_0) { |
301 | (void) pci_read_config_byte(dev, pciU, ®U); | 299 | (void) pci_read_config_byte(dev, pciU, ®U); |
302 | regU &= ~(unit ? 0xCA : 0x35); | 300 | regU &= ~(unit ? 0xCA : 0x35); |