diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 16:25:21 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 16:25:21 -0400 |
commit | 73369d2a15cfe7dceae89a9e70e3d442e4c21576 (patch) | |
tree | cad879775a4cd202a688e8bc18192ae032a4b9e6 /drivers | |
parent | 8d9f9a76ea09911f4aaf0d9e852fd25335080f53 (diff) |
pdc202xx_old: remove init_dma_pdc202xx()
Do PDC202xx specific DMA initialization in init_chipset_pdc202xx()
and remove no longer needed init_dma_pdc202xx().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/pci/pdc202xx_old.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index 421a1f878efa..24e440de4c80 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c | |||
@@ -263,12 +263,6 @@ static void pdc202xx_dma_timeout(ide_drive_t *drive) | |||
263 | ide_dma_timeout(drive); | 263 | ide_dma_timeout(drive); |
264 | } | 264 | } |
265 | 265 | ||
266 | static unsigned int __devinit init_chipset_pdc202xx(struct pci_dev *dev, | ||
267 | const char *name) | ||
268 | { | ||
269 | return dev->irq; | ||
270 | } | ||
271 | |||
272 | static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif) | 266 | static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif) |
273 | { | 267 | { |
274 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 268 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
@@ -286,15 +280,14 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif) | |||
286 | hwif->ide_dma_test_irq = &pdc202xx_old_ide_dma_test_irq; | 280 | hwif->ide_dma_test_irq = &pdc202xx_old_ide_dma_test_irq; |
287 | } | 281 | } |
288 | 282 | ||
289 | static void __devinit init_dma_pdc202xx(ide_hwif_t *hwif, unsigned long dmabase) | 283 | static unsigned int __devinit init_chipset_pdc202xx(struct pci_dev *dev, |
284 | const char *name) | ||
290 | { | 285 | { |
291 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 286 | unsigned long dmabase = pci_resource_start(dev, 4); |
292 | u8 udma_speed_flag = 0, primary_mode = 0, secondary_mode = 0; | 287 | u8 udma_speed_flag = 0, primary_mode = 0, secondary_mode = 0; |
293 | 288 | ||
294 | if (hwif->channel) { | 289 | if (dmabase == 0) |
295 | ide_setup_dma(hwif, dmabase); | 290 | goto out; |
296 | return; | ||
297 | } | ||
298 | 291 | ||
299 | udma_speed_flag = inb(dmabase | 0x1f); | 292 | udma_speed_flag = inb(dmabase | 0x1f); |
300 | primary_mode = inb(dmabase | 0x1a); | 293 | primary_mode = inb(dmabase | 0x1a); |
@@ -313,8 +306,8 @@ static void __devinit init_dma_pdc202xx(ide_hwif_t *hwif, unsigned long dmabase) | |||
313 | outb(udma_speed_flag | 1, dmabase | 0x1f); | 306 | outb(udma_speed_flag | 1, dmabase | 0x1f); |
314 | printk("%sACTIVE\n", (inb(dmabase | 0x1f) & 1) ? "" : "IN"); | 307 | printk("%sACTIVE\n", (inb(dmabase | 0x1f) & 1) ? "" : "IN"); |
315 | } | 308 | } |
316 | 309 | out: | |
317 | ide_setup_dma(hwif, dmabase); | 310 | return dev->irq; |
318 | } | 311 | } |
319 | 312 | ||
320 | static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev, | 313 | static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev, |
@@ -358,7 +351,6 @@ static const struct ide_port_ops pdc2026x_port_ops = { | |||
358 | .name = name_str, \ | 351 | .name = name_str, \ |
359 | .init_chipset = init_chipset_pdc202xx, \ | 352 | .init_chipset = init_chipset_pdc202xx, \ |
360 | .init_hwif = init_hwif_pdc202xx, \ | 353 | .init_hwif = init_hwif_pdc202xx, \ |
361 | .init_dma = init_dma_pdc202xx, \ | ||
362 | .port_ops = &pdc2026x_port_ops, \ | 354 | .port_ops = &pdc2026x_port_ops, \ |
363 | .host_flags = IDE_HFLAGS_PDC202XX | extra_flags, \ | 355 | .host_flags = IDE_HFLAGS_PDC202XX | extra_flags, \ |
364 | .pio_mask = ATA_PIO4, \ | 356 | .pio_mask = ATA_PIO4, \ |
@@ -371,7 +363,6 @@ static const struct ide_port_info pdc202xx_chipsets[] __devinitdata = { | |||
371 | .name = "PDC20246", | 363 | .name = "PDC20246", |
372 | .init_chipset = init_chipset_pdc202xx, | 364 | .init_chipset = init_chipset_pdc202xx, |
373 | .init_hwif = init_hwif_pdc202xx, | 365 | .init_hwif = init_hwif_pdc202xx, |
374 | .init_dma = init_dma_pdc202xx, | ||
375 | .port_ops = &pdc20246_port_ops, | 366 | .port_ops = &pdc20246_port_ops, |
376 | .host_flags = IDE_HFLAGS_PDC202XX, | 367 | .host_flags = IDE_HFLAGS_PDC202XX, |
377 | .pio_mask = ATA_PIO4, | 368 | .pio_mask = ATA_PIO4, |