diff options
Diffstat (limited to 'drivers/ide/pci/pdc202xx_old.c')
-rw-r--r-- | drivers/ide/pci/pdc202xx_old.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index e09742e2ba59..22c7a7533b69 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c | |||
@@ -162,7 +162,7 @@ static u8 pdc202xx_old_cable_detect (ide_hwif_t *hwif) | |||
162 | */ | 162 | */ |
163 | static void pdc_old_enable_66MHz_clock(ide_hwif_t *hwif) | 163 | static void pdc_old_enable_66MHz_clock(ide_hwif_t *hwif) |
164 | { | 164 | { |
165 | unsigned long clock_reg = hwif->dma_master + 0x11; | 165 | unsigned long clock_reg = hwif->extra_base + 0x01; |
166 | u8 clock = inb(clock_reg); | 166 | u8 clock = inb(clock_reg); |
167 | 167 | ||
168 | outb(clock | (hwif->channel ? 0x08 : 0x02), clock_reg); | 168 | outb(clock | (hwif->channel ? 0x08 : 0x02), clock_reg); |
@@ -170,7 +170,7 @@ static void pdc_old_enable_66MHz_clock(ide_hwif_t *hwif) | |||
170 | 170 | ||
171 | static void pdc_old_disable_66MHz_clock(ide_hwif_t *hwif) | 171 | static void pdc_old_disable_66MHz_clock(ide_hwif_t *hwif) |
172 | { | 172 | { |
173 | unsigned long clock_reg = hwif->dma_master + 0x11; | 173 | unsigned long clock_reg = hwif->extra_base + 0x01; |
174 | u8 clock = inb(clock_reg); | 174 | u8 clock = inb(clock_reg); |
175 | 175 | ||
176 | outb(clock & ~(hwif->channel ? 0x08 : 0x02), clock_reg); | 176 | outb(clock & ~(hwif->channel ? 0x08 : 0x02), clock_reg); |
@@ -193,7 +193,7 @@ static void pdc202xx_old_ide_dma_start(ide_drive_t *drive) | |||
193 | if (drive->media != ide_disk || drive->addressing == 1) { | 193 | if (drive->media != ide_disk || drive->addressing == 1) { |
194 | struct request *rq = HWGROUP(drive)->rq; | 194 | struct request *rq = HWGROUP(drive)->rq; |
195 | ide_hwif_t *hwif = HWIF(drive); | 195 | ide_hwif_t *hwif = HWIF(drive); |
196 | unsigned long high_16 = hwif->dma_master; | 196 | unsigned long high_16 = hwif->extra_base - 16; |
197 | unsigned long atapi_reg = high_16 + (hwif->channel ? 0x24 : 0x20); | 197 | unsigned long atapi_reg = high_16 + (hwif->channel ? 0x24 : 0x20); |
198 | u32 word_count = 0; | 198 | u32 word_count = 0; |
199 | u8 clock = inb(high_16 + 0x11); | 199 | u8 clock = inb(high_16 + 0x11); |
@@ -212,7 +212,7 @@ static int pdc202xx_old_ide_dma_end(ide_drive_t *drive) | |||
212 | { | 212 | { |
213 | if (drive->media != ide_disk || drive->addressing == 1) { | 213 | if (drive->media != ide_disk || drive->addressing == 1) { |
214 | ide_hwif_t *hwif = HWIF(drive); | 214 | ide_hwif_t *hwif = HWIF(drive); |
215 | unsigned long high_16 = hwif->dma_master; | 215 | unsigned long high_16 = hwif->extra_base - 16; |
216 | unsigned long atapi_reg = high_16 + (hwif->channel ? 0x24 : 0x20); | 216 | unsigned long atapi_reg = high_16 + (hwif->channel ? 0x24 : 0x20); |
217 | u8 clock = 0; | 217 | u8 clock = 0; |
218 | 218 | ||
@@ -228,7 +228,7 @@ static int pdc202xx_old_ide_dma_end(ide_drive_t *drive) | |||
228 | static int pdc202xx_old_ide_dma_test_irq(ide_drive_t *drive) | 228 | static int pdc202xx_old_ide_dma_test_irq(ide_drive_t *drive) |
229 | { | 229 | { |
230 | ide_hwif_t *hwif = HWIF(drive); | 230 | ide_hwif_t *hwif = HWIF(drive); |
231 | unsigned long high_16 = hwif->dma_master; | 231 | unsigned long high_16 = hwif->extra_base - 16; |
232 | u8 dma_stat = inb(hwif->dma_status); | 232 | u8 dma_stat = inb(hwif->dma_status); |
233 | u8 sc1d = inb(high_16 + 0x001d); | 233 | u8 sc1d = inb(high_16 + 0x001d); |
234 | 234 | ||
@@ -271,7 +271,7 @@ static void pdc202xx_dma_timeout(ide_drive_t *drive) | |||
271 | 271 | ||
272 | static void pdc202xx_reset_host (ide_hwif_t *hwif) | 272 | static void pdc202xx_reset_host (ide_hwif_t *hwif) |
273 | { | 273 | { |
274 | unsigned long high_16 = hwif->dma_master; | 274 | unsigned long high_16 = hwif->extra_base - 16; |
275 | u8 udma_speed_flag = inb(high_16 | 0x001f); | 275 | u8 udma_speed_flag = inb(high_16 | 0x001f); |
276 | 276 | ||
277 | outb(udma_speed_flag | 0x10, high_16 | 0x001f); | 277 | outb(udma_speed_flag | 0x10, high_16 | 0x001f); |