aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/cs5530.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/cs5530.c')
-rw-r--r--drivers/ide/pci/cs5530.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c
index 98f260196c4b..68b5d278ca01 100644
--- a/drivers/ide/pci/cs5530.c
+++ b/drivers/ide/pci/cs5530.c
@@ -81,8 +81,8 @@ static void cs5530_tuneproc (ide_drive_t *drive, u8 pio) /* pio=255 means "autot
81 81
82 pio = ide_get_best_pio_mode(drive, pio, 4, NULL); 82 pio = ide_get_best_pio_mode(drive, pio, 4, NULL);
83 if (!cs5530_set_xfer_mode(drive, modes[pio])) { 83 if (!cs5530_set_xfer_mode(drive, modes[pio])) {
84 format = (hwif->INL(basereg+4) >> 31) & 1; 84 format = (inl(basereg + 4) >> 31) & 1;
85 hwif->OUTL(cs5530_pio_timings[format][pio], 85 outl(cs5530_pio_timings[format][pio],
86 basereg+(drive->select.b.unit<<3)); 86 basereg+(drive->select.b.unit<<3));
87 } 87 }
88} 88}
@@ -183,17 +183,17 @@ static int cs5530_config_dma (ide_drive_t *drive)
183 break; 183 break;
184 } 184 }
185 basereg = CS5530_BASEREG(hwif); 185 basereg = CS5530_BASEREG(hwif);
186 reg = hwif->INL(basereg+4); /* get drive0 config register */ 186 reg = inl(basereg + 4); /* get drive0 config register */
187 timings |= reg & 0x80000000; /* preserve PIO format bit */ 187 timings |= reg & 0x80000000; /* preserve PIO format bit */
188 if (unit == 0) { /* are we configuring drive0? */ 188 if (unit == 0) { /* are we configuring drive0? */
189 hwif->OUTL(timings, basereg+4); /* write drive0 config register */ 189 outl(timings, basereg + 4); /* write drive0 config register */
190 } else { 190 } else {
191 if (timings & 0x00100000) 191 if (timings & 0x00100000)
192 reg |= 0x00100000; /* enable UDMA timings for both drives */ 192 reg |= 0x00100000; /* enable UDMA timings for both drives */
193 else 193 else
194 reg &= ~0x00100000; /* disable UDMA timings for both drives */ 194 reg &= ~0x00100000; /* disable UDMA timings for both drives */
195 hwif->OUTL(reg, basereg+4); /* write drive0 config register */ 195 outl(reg, basereg + 4); /* write drive0 config register */
196 hwif->OUTL(timings, basereg+12); /* write drive1 config register */ 196 outl(timings, basereg + 12); /* write drive1 config register */
197 } 197 }
198 198
199 /* 199 /*
@@ -315,17 +315,17 @@ static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif)
315 315
316 hwif->tuneproc = &cs5530_tuneproc; 316 hwif->tuneproc = &cs5530_tuneproc;
317 basereg = CS5530_BASEREG(hwif); 317 basereg = CS5530_BASEREG(hwif);
318 d0_timings = hwif->INL(basereg+0); 318 d0_timings = inl(basereg + 0);
319 if (CS5530_BAD_PIO(d0_timings)) { 319 if (CS5530_BAD_PIO(d0_timings)) {
320 /* PIO timings not initialized? */ 320 /* PIO timings not initialized? */
321 hwif->OUTL(cs5530_pio_timings[(d0_timings>>31)&1][0], basereg+0); 321 outl(cs5530_pio_timings[(d0_timings >> 31) & 1][0], basereg + 0);
322 if (!hwif->drives[0].autotune) 322 if (!hwif->drives[0].autotune)
323 hwif->drives[0].autotune = 1; 323 hwif->drives[0].autotune = 1;
324 /* needs autotuning later */ 324 /* needs autotuning later */
325 } 325 }
326 if (CS5530_BAD_PIO(hwif->INL(basereg+8))) { 326 if (CS5530_BAD_PIO(inl(basereg + 8))) {
327 /* PIO timings not initialized? */ 327 /* PIO timings not initialized? */
328 hwif->OUTL(cs5530_pio_timings[(d0_timings>>31)&1][0], basereg+8); 328 outl(cs5530_pio_timings[(d0_timings >> 31) & 1][0], basereg + 8);
329 if (!hwif->drives[1].autotune) 329 if (!hwif->drives[1].autotune)
330 hwif->drives[1].autotune = 1; 330 hwif->drives[1].autotune = 1;
331 /* needs autotuning later */ 331 /* needs autotuning later */