diff options
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/Kconfig | 14 | ||||
-rw-r--r-- | drivers/ide/alim15x3.c | 2 | ||||
-rw-r--r-- | drivers/ide/amd74xx.c | 11 | ||||
-rw-r--r-- | drivers/ide/icside.c | 4 | ||||
-rw-r--r-- | drivers/ide/ide-io.c | 24 | ||||
-rw-r--r-- | drivers/ide/ide-iops.c | 9 | ||||
-rw-r--r-- | drivers/ide/ide-probe.c | 3 | ||||
-rw-r--r-- | drivers/ide/pmac.c | 30 | ||||
-rw-r--r-- | drivers/ide/sgiioc4.c | 6 |
9 files changed, 39 insertions, 64 deletions
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 6d7401772a8f..e6857e01d1ba 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -669,10 +669,12 @@ config BLK_DEV_CELLEB | |||
669 | 669 | ||
670 | endif | 670 | endif |
671 | 671 | ||
672 | # TODO: BLK_DEV_IDEDMA_PCI -> BLK_DEV_IDEDMA_SFF | ||
672 | config BLK_DEV_IDE_PMAC | 673 | config BLK_DEV_IDE_PMAC |
673 | tristate "PowerMac on-board IDE support" | 674 | tristate "PowerMac on-board IDE support" |
674 | depends on PPC_PMAC && IDE=y | 675 | depends on PPC_PMAC && IDE=y |
675 | select IDE_TIMINGS | 676 | select IDE_TIMINGS |
677 | select BLK_DEV_IDEDMA_PCI | ||
676 | help | 678 | help |
677 | This driver provides support for the on-board IDE controller on | 679 | This driver provides support for the on-board IDE controller on |
678 | most of the recent Apple Power Macintoshes and PowerBooks. | 680 | most of the recent Apple Power Macintoshes and PowerBooks. |
@@ -689,16 +691,6 @@ config BLK_DEV_IDE_PMAC_ATA100FIRST | |||
689 | CD-ROM on hda. This option changes this to more natural hda for | 691 | CD-ROM on hda. This option changes this to more natural hda for |
690 | hard disk and hdc for CD-ROM. | 692 | hard disk and hdc for CD-ROM. |
691 | 693 | ||
692 | config BLK_DEV_IDEDMA_PMAC | ||
693 | bool "PowerMac IDE DMA support" | ||
694 | depends on BLK_DEV_IDE_PMAC | ||
695 | select BLK_DEV_IDEDMA_PCI | ||
696 | help | ||
697 | This option allows the driver for the on-board IDE controller on | ||
698 | Power Macintoshes and PowerBooks to use DMA (direct memory access) | ||
699 | to transfer data to and from memory. Saying Y is safe and improves | ||
700 | performance. | ||
701 | |||
702 | config BLK_DEV_IDE_AU1XXX | 694 | config BLK_DEV_IDE_AU1XXX |
703 | bool "IDE for AMD Alchemy Au1200" | 695 | bool "IDE for AMD Alchemy Au1200" |
704 | depends on SOC_AU1200 | 696 | depends on SOC_AU1200 |
@@ -912,7 +904,7 @@ config BLK_DEV_UMC8672 | |||
912 | endif | 904 | endif |
913 | 905 | ||
914 | config BLK_DEV_IDEDMA | 906 | config BLK_DEV_IDEDMA |
915 | def_bool BLK_DEV_IDEDMA_SFF || BLK_DEV_IDEDMA_PMAC || \ | 907 | def_bool BLK_DEV_IDEDMA_SFF || \ |
916 | BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | 908 | BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA |
917 | 909 | ||
918 | endif # IDE | 910 | endif # IDE |
diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c index e56c7b72f9e2..45d2356bb725 100644 --- a/drivers/ide/alim15x3.c +++ b/drivers/ide/alim15x3.c | |||
@@ -591,7 +591,7 @@ static int __init ali15x3_ide_init(void) | |||
591 | 591 | ||
592 | static void __exit ali15x3_ide_exit(void) | 592 | static void __exit ali15x3_ide_exit(void) |
593 | { | 593 | { |
594 | return pci_unregister_driver(&alim15x3_pci_driver); | 594 | pci_unregister_driver(&alim15x3_pci_driver); |
595 | } | 595 | } |
596 | 596 | ||
597 | module_init(ali15x3_ide_init); | 597 | module_init(ali15x3_ide_init); |
diff --git a/drivers/ide/amd74xx.c b/drivers/ide/amd74xx.c index 81ec73134eda..c6bcd3014a29 100644 --- a/drivers/ide/amd74xx.c +++ b/drivers/ide/amd74xx.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * IDE driver for Linux. | 3 | * IDE driver for Linux. |
4 | * | 4 | * |
5 | * Copyright (c) 2000-2002 Vojtech Pavlik | 5 | * Copyright (c) 2000-2002 Vojtech Pavlik |
6 | * Copyright (c) 2007 Bartlomiej Zolnierkiewicz | 6 | * Copyright (c) 2007-2008 Bartlomiej Zolnierkiewicz |
7 | * | 7 | * |
8 | * Based on the work of: | 8 | * Based on the work of: |
9 | * Andre Hedrick | 9 | * Andre Hedrick |
@@ -263,6 +263,15 @@ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_ | |||
263 | d.udma_mask = ATA_UDMA5; | 263 | d.udma_mask = ATA_UDMA5; |
264 | } | 264 | } |
265 | 265 | ||
266 | /* | ||
267 | * It seems that on some nVidia controllers using AltStatus | ||
268 | * register can be unreliable so default to Status register | ||
269 | * if the device is in Compatibility Mode. | ||
270 | */ | ||
271 | if (dev->vendor == PCI_VENDOR_ID_NVIDIA && | ||
272 | ide_pci_is_in_compatibility_mode(dev)) | ||
273 | d.host_flags |= IDE_HFLAG_BROKEN_ALTSTATUS; | ||
274 | |||
266 | printk(KERN_INFO "%s %s: UDMA%s controller\n", | 275 | printk(KERN_INFO "%s %s: UDMA%s controller\n", |
267 | d.name, pci_name(dev), amd_dma[fls(d.udma_mask) - 1]); | 276 | d.name, pci_name(dev), amd_dma[fls(d.udma_mask) - 1]); |
268 | 277 | ||
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c index 2d848010499d..81f70caeb40f 100644 --- a/drivers/ide/icside.c +++ b/drivers/ide/icside.c | |||
@@ -419,7 +419,7 @@ static void icside_setup_ports(hw_regs_t *hw, void __iomem *base, | |||
419 | hw->chipset = ide_acorn; | 419 | hw->chipset = ide_acorn; |
420 | } | 420 | } |
421 | 421 | ||
422 | static int __init | 422 | static int __devinit |
423 | icside_register_v5(struct icside_state *state, struct expansion_card *ec) | 423 | icside_register_v5(struct icside_state *state, struct expansion_card *ec) |
424 | { | 424 | { |
425 | void __iomem *base; | 425 | void __iomem *base; |
@@ -473,7 +473,7 @@ static const struct ide_port_info icside_v6_port_info __initdata = { | |||
473 | .swdma_mask = ATA_SWDMA2, | 473 | .swdma_mask = ATA_SWDMA2, |
474 | }; | 474 | }; |
475 | 475 | ||
476 | static int __init | 476 | static int __devinit |
477 | icside_register_v6(struct icside_state *state, struct expansion_card *ec) | 477 | icside_register_v6(struct icside_state *state, struct expansion_card *ec) |
478 | { | 478 | { |
479 | void __iomem *ioc_base, *easi_base; | 479 | void __iomem *ioc_base, *easi_base; |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 7162d67562af..cc35d6dbd410 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -132,10 +132,14 @@ int ide_end_request (ide_drive_t *drive, int uptodate, int nr_sectors) | |||
132 | } | 132 | } |
133 | EXPORT_SYMBOL(ide_end_request); | 133 | EXPORT_SYMBOL(ide_end_request); |
134 | 134 | ||
135 | static void ide_complete_power_step(ide_drive_t *drive, struct request *rq, u8 stat, u8 error) | 135 | static void ide_complete_power_step(ide_drive_t *drive, struct request *rq) |
136 | { | 136 | { |
137 | struct request_pm_state *pm = rq->data; | 137 | struct request_pm_state *pm = rq->data; |
138 | 138 | ||
139 | #ifdef DEBUG_PM | ||
140 | printk(KERN_INFO "%s: complete_power_step(step: %d)\n", | ||
141 | drive->name, pm->pm_step); | ||
142 | #endif | ||
139 | if (drive->media != ide_disk) | 143 | if (drive->media != ide_disk) |
140 | return; | 144 | return; |
141 | 145 | ||
@@ -172,7 +176,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request * | |||
172 | /* Not supported? Switch to next step now. */ | 176 | /* Not supported? Switch to next step now. */ |
173 | if (ata_id_flush_enabled(drive->id) == 0 || | 177 | if (ata_id_flush_enabled(drive->id) == 0 || |
174 | (drive->dev_flags & IDE_DFLAG_WCACHE) == 0) { | 178 | (drive->dev_flags & IDE_DFLAG_WCACHE) == 0) { |
175 | ide_complete_power_step(drive, rq, 0, 0); | 179 | ide_complete_power_step(drive, rq); |
176 | return ide_stopped; | 180 | return ide_stopped; |
177 | } | 181 | } |
178 | if (ata_id_flush_ext_enabled(drive->id)) | 182 | if (ata_id_flush_ext_enabled(drive->id)) |
@@ -191,7 +195,7 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request * | |||
191 | if (drive->media != ide_disk) | 195 | if (drive->media != ide_disk) |
192 | pm->pm_step = IDE_PM_RESTORE_DMA; | 196 | pm->pm_step = IDE_PM_RESTORE_DMA; |
193 | else | 197 | else |
194 | ide_complete_power_step(drive, rq, 0, 0); | 198 | ide_complete_power_step(drive, rq); |
195 | return ide_stopped; | 199 | return ide_stopped; |
196 | case IDE_PM_IDLE: /* Resume step 2 (idle) */ | 200 | case IDE_PM_IDLE: /* Resume step 2 (idle) */ |
197 | args->tf.command = ATA_CMD_IDLEIMMEDIATE; | 201 | args->tf.command = ATA_CMD_IDLEIMMEDIATE; |
@@ -322,11 +326,8 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err) | |||
322 | } | 326 | } |
323 | } else if (blk_pm_request(rq)) { | 327 | } else if (blk_pm_request(rq)) { |
324 | struct request_pm_state *pm = rq->data; | 328 | struct request_pm_state *pm = rq->data; |
325 | #ifdef DEBUG_PM | 329 | |
326 | printk("%s: complete_power_step(step: %d, stat: %x, err: %x)\n", | 330 | ide_complete_power_step(drive, rq); |
327 | drive->name, rq->pm->pm_step, stat, err); | ||
328 | #endif | ||
329 | ide_complete_power_step(drive, rq, stat, err); | ||
330 | if (pm->pm_step == IDE_PM_COMPLETED) | 331 | if (pm->pm_step == IDE_PM_COMPLETED) |
331 | ide_complete_pm_request(drive, rq); | 332 | ide_complete_pm_request(drive, rq); |
332 | return; | 333 | return; |
@@ -804,7 +805,7 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq) | |||
804 | struct request_pm_state *pm = rq->data; | 805 | struct request_pm_state *pm = rq->data; |
805 | #ifdef DEBUG_PM | 806 | #ifdef DEBUG_PM |
806 | printk("%s: start_power_step(step: %d)\n", | 807 | printk("%s: start_power_step(step: %d)\n", |
807 | drive->name, rq->pm->pm_step); | 808 | drive->name, pm->pm_step); |
808 | #endif | 809 | #endif |
809 | startstop = ide_start_power_step(drive, rq); | 810 | startstop = ide_start_power_step(drive, rq); |
810 | if (startstop == ide_stopped && | 811 | if (startstop == ide_stopped && |
@@ -967,14 +968,13 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq) | |||
967 | ide_startstop_t startstop; | 968 | ide_startstop_t startstop; |
968 | int loops = 0; | 969 | int loops = 0; |
969 | 970 | ||
970 | /* for atari only: POSSIBLY BROKEN HERE(?) */ | ||
971 | ide_get_lock(ide_intr, hwgroup); | ||
972 | |||
973 | /* caller must own ide_lock */ | 971 | /* caller must own ide_lock */ |
974 | BUG_ON(!irqs_disabled()); | 972 | BUG_ON(!irqs_disabled()); |
975 | 973 | ||
976 | while (!hwgroup->busy) { | 974 | while (!hwgroup->busy) { |
977 | hwgroup->busy = 1; | 975 | hwgroup->busy = 1; |
976 | /* for atari only */ | ||
977 | ide_get_lock(ide_intr, hwgroup); | ||
978 | drive = choose_drive(hwgroup); | 978 | drive = choose_drive(hwgroup); |
979 | if (drive == NULL) { | 979 | if (drive == NULL) { |
980 | int sleeping = 0; | 980 | int sleeping = 0; |
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 5d6ba14e211d..c41c3b9b6f02 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -457,18 +457,14 @@ int drive_is_ready (ide_drive_t *drive) | |||
457 | if (drive->waiting_for_dma) | 457 | if (drive->waiting_for_dma) |
458 | return hwif->dma_ops->dma_test_irq(drive); | 458 | return hwif->dma_ops->dma_test_irq(drive); |
459 | 459 | ||
460 | #if 0 | ||
461 | /* need to guarantee 400ns since last command was issued */ | ||
462 | udelay(1); | ||
463 | #endif | ||
464 | |||
465 | /* | 460 | /* |
466 | * We do a passive status test under shared PCI interrupts on | 461 | * We do a passive status test under shared PCI interrupts on |
467 | * cards that truly share the ATA side interrupt, but may also share | 462 | * cards that truly share the ATA side interrupt, but may also share |
468 | * an interrupt with another pci card/device. We make no assumptions | 463 | * an interrupt with another pci card/device. We make no assumptions |
469 | * about possible isa-pnp and pci-pnp issues yet. | 464 | * about possible isa-pnp and pci-pnp issues yet. |
470 | */ | 465 | */ |
471 | if (hwif->io_ports.ctl_addr) | 466 | if (hwif->io_ports.ctl_addr && |
467 | (hwif->host_flags & IDE_HFLAG_BROKEN_ALTSTATUS) == 0) | ||
472 | stat = hwif->tp_ops->read_altstatus(hwif); | 468 | stat = hwif->tp_ops->read_altstatus(hwif); |
473 | else | 469 | else |
474 | /* Note: this may clear a pending IRQ!! */ | 470 | /* Note: this may clear a pending IRQ!! */ |
@@ -610,6 +606,7 @@ static const struct drive_list_entry ivb_list[] = { | |||
610 | { "TSSTcorp CDDVDW SH-S202N" , "SB01" }, | 606 | { "TSSTcorp CDDVDW SH-S202N" , "SB01" }, |
611 | { "TSSTcorp CDDVDW SH-S202H" , "SB00" }, | 607 | { "TSSTcorp CDDVDW SH-S202H" , "SB00" }, |
612 | { "TSSTcorp CDDVDW SH-S202H" , "SB01" }, | 608 | { "TSSTcorp CDDVDW SH-S202H" , "SB01" }, |
609 | { "SAMSUNG SP0822N" , "WA100-10" }, | ||
613 | { NULL , NULL } | 610 | { NULL , NULL } |
614 | }; | 611 | }; |
615 | 612 | ||
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 1649ea54f76c..c55bdbd22314 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -266,7 +266,8 @@ static int actual_try_to_identify (ide_drive_t *drive, u8 cmd) | |||
266 | /* take a deep breath */ | 266 | /* take a deep breath */ |
267 | msleep(50); | 267 | msleep(50); |
268 | 268 | ||
269 | if (io_ports->ctl_addr) { | 269 | if (io_ports->ctl_addr && |
270 | (hwif->host_flags & IDE_HFLAG_BROKEN_ALTSTATUS) == 0) { | ||
270 | a = tp_ops->read_altstatus(hwif); | 271 | a = tp_ops->read_altstatus(hwif); |
271 | s = tp_ops->read_status(hwif); | 272 | s = tp_ops->read_status(hwif); |
272 | if ((a ^ s) & ~ATA_IDX) | 273 | if ((a ^ s) & ~ATA_IDX) |
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c index 2e19d6298536..7c481bb56fab 100644 --- a/drivers/ide/pmac.c +++ b/drivers/ide/pmac.c | |||
@@ -66,7 +66,6 @@ typedef struct pmac_ide_hwif { | |||
66 | struct macio_dev *mdev; | 66 | struct macio_dev *mdev; |
67 | u32 timings[4]; | 67 | u32 timings[4]; |
68 | volatile u32 __iomem * *kauai_fcr; | 68 | volatile u32 __iomem * *kauai_fcr; |
69 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | ||
70 | /* Those fields are duplicating what is in hwif. We currently | 69 | /* Those fields are duplicating what is in hwif. We currently |
71 | * can't use the hwif ones because of some assumptions that are | 70 | * can't use the hwif ones because of some assumptions that are |
72 | * beeing done by the generic code about the kind of dma controller | 71 | * beeing done by the generic code about the kind of dma controller |
@@ -74,8 +73,6 @@ typedef struct pmac_ide_hwif { | |||
74 | */ | 73 | */ |
75 | volatile struct dbdma_regs __iomem * dma_regs; | 74 | volatile struct dbdma_regs __iomem * dma_regs; |
76 | struct dbdma_cmd* dma_table_cpu; | 75 | struct dbdma_cmd* dma_table_cpu; |
77 | #endif | ||
78 | |||
79 | } pmac_ide_hwif_t; | 76 | } pmac_ide_hwif_t; |
80 | 77 | ||
81 | enum { | 78 | enum { |
@@ -222,8 +219,6 @@ static const char* model_name[] = { | |||
222 | #define KAUAI_FCR_UATA_RESET_N 0x00000002 | 219 | #define KAUAI_FCR_UATA_RESET_N 0x00000002 |
223 | #define KAUAI_FCR_UATA_ENABLE 0x00000001 | 220 | #define KAUAI_FCR_UATA_ENABLE 0x00000001 |
224 | 221 | ||
225 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | ||
226 | |||
227 | /* Rounded Multiword DMA timings | 222 | /* Rounded Multiword DMA timings |
228 | * | 223 | * |
229 | * I gave up finding a generic formula for all controller | 224 | * I gave up finding a generic formula for all controller |
@@ -413,8 +408,6 @@ static int pmac_ide_build_dmatable(ide_drive_t *drive, struct request *rq); | |||
413 | static void pmac_ide_selectproc(ide_drive_t *drive); | 408 | static void pmac_ide_selectproc(ide_drive_t *drive); |
414 | static void pmac_ide_kauai_selectproc(ide_drive_t *drive); | 409 | static void pmac_ide_kauai_selectproc(ide_drive_t *drive); |
415 | 410 | ||
416 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ | ||
417 | |||
418 | #define PMAC_IDE_REG(x) \ | 411 | #define PMAC_IDE_REG(x) \ |
419 | ((void __iomem *)((drive)->hwif->io_ports.data_addr + (x))) | 412 | ((void __iomem *)((drive)->hwif->io_ports.data_addr + (x))) |
420 | 413 | ||
@@ -584,8 +577,6 @@ pmac_ide_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
584 | pmac_ide_do_update_timings(drive); | 577 | pmac_ide_do_update_timings(drive); |
585 | } | 578 | } |
586 | 579 | ||
587 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | ||
588 | |||
589 | /* | 580 | /* |
590 | * Calculate KeyLargo ATA/66 UDMA timings | 581 | * Calculate KeyLargo ATA/66 UDMA timings |
591 | */ | 582 | */ |
@@ -786,7 +777,6 @@ set_timings_mdma(ide_drive_t *drive, int intf_type, u32 *timings, u32 *timings2, | |||
786 | drive->name, speed & 0xf, *timings); | 777 | drive->name, speed & 0xf, *timings); |
787 | #endif | 778 | #endif |
788 | } | 779 | } |
789 | #endif /* #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC */ | ||
790 | 780 | ||
791 | static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed) | 781 | static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed) |
792 | { | 782 | { |
@@ -804,7 +794,6 @@ static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
804 | tl[0] = *timings; | 794 | tl[0] = *timings; |
805 | tl[1] = *timings2; | 795 | tl[1] = *timings2; |
806 | 796 | ||
807 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | ||
808 | if (speed >= XFER_UDMA_0) { | 797 | if (speed >= XFER_UDMA_0) { |
809 | if (pmif->kind == controller_kl_ata4) | 798 | if (pmif->kind == controller_kl_ata4) |
810 | ret = set_timings_udma_ata4(&tl[0], speed); | 799 | ret = set_timings_udma_ata4(&tl[0], speed); |
@@ -817,7 +806,7 @@ static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
817 | ret = -1; | 806 | ret = -1; |
818 | } else | 807 | } else |
819 | set_timings_mdma(drive, pmif->kind, &tl[0], &tl[1], speed); | 808 | set_timings_mdma(drive, pmif->kind, &tl[0], &tl[1], speed); |
820 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ | 809 | |
821 | if (ret) | 810 | if (ret) |
822 | return; | 811 | return; |
823 | 812 | ||
@@ -1008,9 +997,7 @@ static const struct ide_port_info pmac_port_info = { | |||
1008 | .chipset = ide_pmac, | 997 | .chipset = ide_pmac, |
1009 | .tp_ops = &pmac_tp_ops, | 998 | .tp_ops = &pmac_tp_ops, |
1010 | .port_ops = &pmac_ide_port_ops, | 999 | .port_ops = &pmac_ide_port_ops, |
1011 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | ||
1012 | .dma_ops = &pmac_dma_ops, | 1000 | .dma_ops = &pmac_dma_ops, |
1013 | #endif | ||
1014 | .host_flags = IDE_HFLAG_SET_PIO_MODE_KEEP_DMA | | 1001 | .host_flags = IDE_HFLAG_SET_PIO_MODE_KEEP_DMA | |
1015 | IDE_HFLAG_POST_SET_MODE | | 1002 | IDE_HFLAG_POST_SET_MODE | |
1016 | IDE_HFLAG_MMIO | | 1003 | IDE_HFLAG_MMIO | |
@@ -1182,7 +1169,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
1182 | pmif->regbase = regbase; | 1169 | pmif->regbase = regbase; |
1183 | pmif->irq = irq; | 1170 | pmif->irq = irq; |
1184 | pmif->kauai_fcr = NULL; | 1171 | pmif->kauai_fcr = NULL; |
1185 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | 1172 | |
1186 | if (macio_resource_count(mdev) >= 2) { | 1173 | if (macio_resource_count(mdev) >= 2) { |
1187 | if (macio_request_resource(mdev, 1, "ide-pmac (dma)")) | 1174 | if (macio_request_resource(mdev, 1, "ide-pmac (dma)")) |
1188 | printk(KERN_WARNING "ide-pmac: can't request DMA " | 1175 | printk(KERN_WARNING "ide-pmac: can't request DMA " |
@@ -1192,7 +1179,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
1192 | pmif->dma_regs = ioremap(macio_resource_start(mdev, 1), 0x1000); | 1179 | pmif->dma_regs = ioremap(macio_resource_start(mdev, 1), 0x1000); |
1193 | } else | 1180 | } else |
1194 | pmif->dma_regs = NULL; | 1181 | pmif->dma_regs = NULL; |
1195 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ | 1182 | |
1196 | dev_set_drvdata(&mdev->ofdev.dev, pmif); | 1183 | dev_set_drvdata(&mdev->ofdev.dev, pmif); |
1197 | 1184 | ||
1198 | memset(&hw, 0, sizeof(hw)); | 1185 | memset(&hw, 0, sizeof(hw)); |
@@ -1300,9 +1287,7 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1300 | 1287 | ||
1301 | base = ioremap(rbase, rlen); | 1288 | base = ioremap(rbase, rlen); |
1302 | pmif->regbase = (unsigned long) base + 0x2000; | 1289 | pmif->regbase = (unsigned long) base + 0x2000; |
1303 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | ||
1304 | pmif->dma_regs = base + 0x1000; | 1290 | pmif->dma_regs = base + 0x1000; |
1305 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ | ||
1306 | pmif->kauai_fcr = base; | 1291 | pmif->kauai_fcr = base; |
1307 | pmif->irq = pdev->irq; | 1292 | pmif->irq = pdev->irq; |
1308 | 1293 | ||
@@ -1434,8 +1419,6 @@ out: | |||
1434 | return error; | 1419 | return error; |
1435 | } | 1420 | } |
1436 | 1421 | ||
1437 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | ||
1438 | |||
1439 | /* | 1422 | /* |
1440 | * pmac_ide_build_dmatable builds the DBDMA command list | 1423 | * pmac_ide_build_dmatable builds the DBDMA command list |
1441 | * for a transfer and sets the DBDMA channel to point to it. | 1424 | * for a transfer and sets the DBDMA channel to point to it. |
@@ -1723,13 +1706,6 @@ static int __devinit pmac_ide_init_dma(ide_hwif_t *hwif, | |||
1723 | 1706 | ||
1724 | return 0; | 1707 | return 0; |
1725 | } | 1708 | } |
1726 | #else | ||
1727 | static int __devinit pmac_ide_init_dma(ide_hwif_t *hwif, | ||
1728 | const struct ide_port_info *d) | ||
1729 | { | ||
1730 | return -EOPNOTSUPP; | ||
1731 | } | ||
1732 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ | ||
1733 | 1709 | ||
1734 | module_init(pmac_ide_probe); | 1710 | module_init(pmac_ide_probe); |
1735 | 1711 | ||
diff --git a/drivers/ide/sgiioc4.c b/drivers/ide/sgiioc4.c index 7defa0ae2014..a687a7dfea6f 100644 --- a/drivers/ide/sgiioc4.c +++ b/drivers/ide/sgiioc4.c | |||
@@ -550,7 +550,7 @@ static const struct ide_dma_ops sgiioc4_dma_ops = { | |||
550 | .dma_timeout = ide_dma_timeout, | 550 | .dma_timeout = ide_dma_timeout, |
551 | }; | 551 | }; |
552 | 552 | ||
553 | static const struct ide_port_info sgiioc4_port_info __devinitdata = { | 553 | static const struct ide_port_info sgiioc4_port_info __devinitconst = { |
554 | .name = DRV_NAME, | 554 | .name = DRV_NAME, |
555 | .chipset = ide_pci, | 555 | .chipset = ide_pci, |
556 | .init_dma = ide_dma_sgiioc4, | 556 | .init_dma = ide_dma_sgiioc4, |
@@ -633,7 +633,7 @@ out: | |||
633 | return ret; | 633 | return ret; |
634 | } | 634 | } |
635 | 635 | ||
636 | int | 636 | int __devinit |
637 | ioc4_ide_attach_one(struct ioc4_driver_data *idd) | 637 | ioc4_ide_attach_one(struct ioc4_driver_data *idd) |
638 | { | 638 | { |
639 | /* PCI-RT does not bring out IDE connection. | 639 | /* PCI-RT does not bring out IDE connection. |
@@ -645,7 +645,7 @@ ioc4_ide_attach_one(struct ioc4_driver_data *idd) | |||
645 | return pci_init_sgiioc4(idd->idd_pdev); | 645 | return pci_init_sgiioc4(idd->idd_pdev); |
646 | } | 646 | } |
647 | 647 | ||
648 | static struct ioc4_submodule ioc4_ide_submodule = { | 648 | static struct ioc4_submodule __devinitdata ioc4_ide_submodule = { |
649 | .is_name = "IOC4_ide", | 649 | .is_name = "IOC4_ide", |
650 | .is_owner = THIS_MODULE, | 650 | .is_owner = THIS_MODULE, |
651 | .is_probe = ioc4_ide_attach_one, | 651 | .is_probe = ioc4_ide_attach_one, |