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/atiixp.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/atiixp.c')
-rw-r--r-- | drivers/ide/pci/atiixp.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index 679eb92b8920..e05e88298500 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c | |||
@@ -163,23 +163,21 @@ static void atiixp_tuneproc(ide_drive_t *drive, u8 pio) | |||
163 | /** | 163 | /** |
164 | * atiixp_tune_chipset - tune a ATIIXP interface | 164 | * atiixp_tune_chipset - tune a ATIIXP interface |
165 | * @drive: IDE drive to tune | 165 | * @drive: IDE drive to tune |
166 | * @xferspeed: speed to configure | 166 | * @speed: speed to configure |
167 | * | 167 | * |
168 | * Set a ATIIXP interface channel to the desired speeds. This involves | 168 | * Set a ATIIXP interface channel to the desired speeds. This involves |
169 | * requires the right timing data into the ATIIXP configuration space | 169 | * requires the right timing data into the ATIIXP configuration space |
170 | * then setting the drive parameters appropriately | 170 | * then setting the drive parameters appropriately |
171 | */ | 171 | */ |
172 | 172 | ||
173 | static int atiixp_speedproc(ide_drive_t *drive, u8 xferspeed) | 173 | static int atiixp_speedproc(ide_drive_t *drive, const u8 speed) |
174 | { | 174 | { |
175 | struct pci_dev *dev = drive->hwif->pci_dev; | 175 | struct pci_dev *dev = drive->hwif->pci_dev; |
176 | unsigned long flags; | 176 | unsigned long flags; |
177 | int timing_shift = (drive->dn & 2) ? 16 : 0 + (drive->dn & 1) ? 0 : 8; | 177 | int timing_shift = (drive->dn & 2) ? 16 : 0 + (drive->dn & 1) ? 0 : 8; |
178 | u32 tmp32; | 178 | u32 tmp32; |
179 | u16 tmp16; | 179 | u16 tmp16; |
180 | u8 speed, pio; | 180 | u8 pio; |
181 | |||
182 | speed = ide_rate_filter(drive, xferspeed); | ||
183 | 181 | ||
184 | if (speed >= XFER_PIO_0 && speed <= XFER_PIO_4) { | 182 | if (speed >= XFER_PIO_0 && speed <= XFER_PIO_4) { |
185 | atiixp_tune_pio(drive, speed - XFER_PIO_0); | 183 | atiixp_tune_pio(drive, speed - XFER_PIO_0); |