aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/alim15x3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/alim15x3.c')
-rw-r--r--drivers/ide/alim15x3.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c
index 8f03cce055fa..28cee1055f76 100644
--- a/drivers/ide/alim15x3.c
+++ b/drivers/ide/alim15x3.c
@@ -63,15 +63,14 @@ static void ali_fifo_control(ide_hwif_t *hwif, ide_drive_t *drive, int on)
63 63
64/** 64/**
65 * ali_set_pio_mode - set host controller for PIO mode 65 * ali_set_pio_mode - set host controller for PIO mode
66 * @hwif: port
66 * @drive: drive 67 * @drive: drive
67 * @pio: PIO mode number
68 * 68 *
69 * Program the controller for the given PIO mode. 69 * Program the controller for the given PIO mode.
70 */ 70 */
71 71
72static void ali_set_pio_mode(ide_drive_t *drive, const u8 pio) 72static void ali_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
73{ 73{
74 ide_hwif_t *hwif = drive->hwif;
75 struct pci_dev *dev = to_pci_dev(hwif->dev); 74 struct pci_dev *dev = to_pci_dev(hwif->dev);
76 int bus_speed = ide_pci_clk ? ide_pci_clk : 33; 75 int bus_speed = ide_pci_clk ? ide_pci_clk : 33;
77 unsigned long T = 1000000 / bus_speed; /* PCI clock based */ 76 unsigned long T = 1000000 / bus_speed; /* PCI clock based */
@@ -79,7 +78,7 @@ static void ali_set_pio_mode(ide_drive_t *drive, const u8 pio)
79 u8 unit = drive->dn & 1; 78 u8 unit = drive->dn & 1;
80 struct ide_timing t; 79 struct ide_timing t;
81 80
82 ide_timing_compute(drive, XFER_PIO_0 + pio, &t, T, 1); 81 ide_timing_compute(drive, drive->pio_mode, &t, T, 1);
83 82
84 t.setup = clamp_val(t.setup, 1, 8) & 7; 83 t.setup = clamp_val(t.setup, 1, 8) & 7;
85 t.active = clamp_val(t.active, 1, 8) & 7; 84 t.active = clamp_val(t.active, 1, 8) & 7;