aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/cs5530.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/cs5530.c')
-rw-r--r--drivers/ide/cs5530.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/cs5530.c b/drivers/ide/cs5530.c
index 40bf05eddf6e..4ced40255ad6 100644
--- a/drivers/ide/cs5530.c
+++ b/drivers/ide/cs5530.c
@@ -41,8 +41,8 @@ static unsigned int cs5530_pio_timings[2][5] = {
41 41
42/** 42/**
43 * cs5530_set_pio_mode - set host controller for PIO mode 43 * cs5530_set_pio_mode - set host controller for PIO mode
44 * @hwif: port
44 * @drive: drive 45 * @drive: drive
45 * @pio: PIO mode number
46 * 46 *
47 * Handles setting of PIO mode for the chipset. 47 * Handles setting of PIO mode for the chipset.
48 * 48 *
@@ -50,10 +50,11 @@ static unsigned int cs5530_pio_timings[2][5] = {
50 * will have valid default PIO timings set up before we get here. 50 * will have valid default PIO timings set up before we get here.
51 */ 51 */
52 52
53static void cs5530_set_pio_mode(ide_drive_t *drive, const u8 pio) 53static void cs5530_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
54{ 54{
55 unsigned long basereg = CS5530_BASEREG(drive->hwif); 55 unsigned long basereg = CS5530_BASEREG(hwif);
56 unsigned int format = (inl(basereg + 4) >> 31) & 1; 56 unsigned int format = (inl(basereg + 4) >> 31) & 1;
57 const u8 pio = drive->pio_mode - XFER_PIO_0;
57 58
58 outl(cs5530_pio_timings[format][pio], basereg + ((drive->dn & 1)<<3)); 59 outl(cs5530_pio_timings[format][pio], basereg + ((drive->dn & 1)<<3));
59} 60}