aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/piix.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-11 17:53:59 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-11 17:53:59 -0400
commitf212ff28f08e4ddcef9f25b13463c45cc4204a0c (patch)
treee8fe63044c2ebec404689cbd55d75497aa77da0a /drivers/ide/pci/piix.c
parent3160d5416f39da9d9221fec7cb9d64399b706bbc (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/piix.c')
-rw-r--r--drivers/ide/pci/piix.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c
index 5cfa9378bbb8..b66f9d1411b3 100644
--- a/drivers/ide/pci/piix.c
+++ b/drivers/ide/pci/piix.c
@@ -221,19 +221,18 @@ static void piix_tune_drive (ide_drive_t *drive, u8 pio)
221/** 221/**
222 * piix_tune_chipset - tune a PIIX interface 222 * piix_tune_chipset - tune a PIIX interface
223 * @drive: IDE drive to tune 223 * @drive: IDE drive to tune
224 * @xferspeed: speed to configure 224 * @speed: speed to configure
225 * 225 *
226 * Set a PIIX interface channel to the desired speeds. This involves 226 * Set a PIIX interface channel to the desired speeds. This involves
227 * requires the right timing data into the PIIX configuration space 227 * requires the right timing data into the PIIX configuration space
228 * then setting the drive parameters appropriately 228 * then setting the drive parameters appropriately
229 */ 229 */
230 230
231static int piix_tune_chipset (ide_drive_t *drive, u8 xferspeed) 231static int piix_tune_chipset(ide_drive_t *drive, const u8 speed)
232{ 232{
233 ide_hwif_t *hwif = HWIF(drive); 233 ide_hwif_t *hwif = HWIF(drive);
234 struct pci_dev *dev = hwif->pci_dev; 234 struct pci_dev *dev = hwif->pci_dev;
235 u8 maslave = hwif->channel ? 0x42 : 0x40; 235 u8 maslave = hwif->channel ? 0x42 : 0x40;
236 u8 speed = ide_rate_filter(drive, xferspeed);
237 int a_speed = 3 << (drive->dn * 4); 236 int a_speed = 3 << (drive->dn * 4);
238 int u_flag = 1 << drive->dn; 237 int u_flag = 1 << drive->dn;
239 int v_flag = 0x01 << drive->dn; 238 int v_flag = 0x01 << drive->dn;