aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/it8213.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/it8213.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/it8213.c')
-rw-r--r--drivers/ide/pci/it8213.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/ide/pci/it8213.c b/drivers/ide/pci/it8213.c
index 70b3245dbf62..6fa955749aec 100644
--- a/drivers/ide/pci/it8213.c
+++ b/drivers/ide/pci/it8213.c
@@ -115,20 +115,16 @@ static void it8213_tuneproc(ide_drive_t *drive, u8 pio)
115/** 115/**
116 * it8213_tune_chipset - set controller timings 116 * it8213_tune_chipset - set controller timings
117 * @drive: Drive to set up 117 * @drive: Drive to set up
118 * @xferspeed: speed we want to achieve 118 * @speed: speed we want to achieve
119 * 119 *
120 * Tune the ITE chipset for the desired mode. If we can't achieve 120 * Tune the ITE chipset for the desired mode.
121 * the desired mode then tune for a lower one, but ultimately
122 * make the thing work.
123 */ 121 */
124 122
125static int it8213_tune_chipset (ide_drive_t *drive, u8 xferspeed) 123static int it8213_tune_chipset(ide_drive_t *drive, const u8 speed)
126{ 124{
127
128 ide_hwif_t *hwif = HWIF(drive); 125 ide_hwif_t *hwif = HWIF(drive);
129 struct pci_dev *dev = hwif->pci_dev; 126 struct pci_dev *dev = hwif->pci_dev;
130 u8 maslave = 0x40; 127 u8 maslave = 0x40;
131 u8 speed = ide_rate_filter(drive, xferspeed);
132 int a_speed = 3 << (drive->dn * 4); 128 int a_speed = 3 << (drive->dn * 4);
133 int u_flag = 1 << drive->dn; 129 int u_flag = 1 << drive->dn;
134 int v_flag = 0x01 << drive->dn; 130 int v_flag = 0x01 << drive->dn;