Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
ide: build-fix for CONFIG_BLK_DEV_IDEDMA_PMAC=n
Revert "ide: respect current DMA setting during resume"

+10 -40
+3 -11
drivers/ide/Kconfig
··· 669 669 670 670 endif 671 671 672 + # TODO: BLK_DEV_IDEDMA_PCI -> BLK_DEV_IDEDMA_SFF 672 673 config BLK_DEV_IDE_PMAC 673 674 tristate "PowerMac on-board IDE support" 674 675 depends on PPC_PMAC && IDE=y 675 676 select IDE_TIMINGS 677 + select BLK_DEV_IDEDMA_PCI 676 678 help 677 679 This driver provides support for the on-board IDE controller on 678 680 most of the recent Apple Power Macintoshes and PowerBooks. ··· 690 688 these, those machine used to have the hard disk on hdc and the 691 689 CD-ROM on hda. This option changes this to more natural hda for 692 690 hard disk and hdc for CD-ROM. 693 - 694 - config BLK_DEV_IDEDMA_PMAC 695 - bool "PowerMac IDE DMA support" 696 - depends on BLK_DEV_IDE_PMAC 697 - select BLK_DEV_IDEDMA_PCI 698 - help 699 - This option allows the driver for the on-board IDE controller on 700 - Power Macintoshes and PowerBooks to use DMA (direct memory access) 701 - to transfer data to and from memory. Saying Y is safe and improves 702 - performance. 703 691 704 692 config BLK_DEV_IDE_AU1XXX 705 693 bool "IDE for AMD Alchemy Au1200" ··· 904 912 endif 905 913 906 914 config BLK_DEV_IDEDMA 907 - def_bool BLK_DEV_IDEDMA_SFF || BLK_DEV_IDEDMA_PMAC || \ 915 + def_bool BLK_DEV_IDEDMA_SFF || \ 908 916 BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 909 917 910 918 endif # IDE
+4 -2
drivers/ide/ide-io.c
··· 208 208 */ 209 209 if (drive->hwif->dma_ops == NULL) 210 210 break; 211 - if (drive->dev_flags & IDE_DFLAG_USING_DMA) 212 - ide_set_dma(drive); 211 + /* 212 + * TODO: respect IDE_DFLAG_USING_DMA 213 + */ 214 + ide_set_dma(drive); 213 215 break; 214 216 } 215 217
+3 -27
drivers/ide/pmac.c
··· 66 66 struct macio_dev *mdev; 67 67 u32 timings[4]; 68 68 volatile u32 __iomem * *kauai_fcr; 69 - #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC 70 69 /* Those fields are duplicating what is in hwif. We currently 71 70 * can't use the hwif ones because of some assumptions that are 72 71 * beeing done by the generic code about the kind of dma controller ··· 73 74 */ 74 75 volatile struct dbdma_regs __iomem * dma_regs; 75 76 struct dbdma_cmd* dma_table_cpu; 76 - #endif 77 - 78 77 } pmac_ide_hwif_t; 79 78 80 79 enum { ··· 218 221 #define KAUAI_FCR_UATA_MAGIC 0x00000004 219 222 #define KAUAI_FCR_UATA_RESET_N 0x00000002 220 223 #define KAUAI_FCR_UATA_ENABLE 0x00000001 221 - 222 - #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC 223 224 224 225 /* Rounded Multiword DMA timings 225 226 * ··· 408 413 static void pmac_ide_selectproc(ide_drive_t *drive); 409 414 static void pmac_ide_kauai_selectproc(ide_drive_t *drive); 410 415 411 - #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ 412 - 413 416 #define PMAC_IDE_REG(x) \ 414 417 ((void __iomem *)((drive)->hwif->io_ports.data_addr + (x))) 415 418 ··· 576 583 *timings = t; 577 584 pmac_ide_do_update_timings(drive); 578 585 } 579 - 580 - #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC 581 586 582 587 /* 583 588 * Calculate KeyLargo ATA/66 UDMA timings ··· 777 786 drive->name, speed & 0xf, *timings); 778 787 #endif 779 788 } 780 - #endif /* #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC */ 781 789 782 790 static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed) 783 791 { ··· 794 804 tl[0] = *timings; 795 805 tl[1] = *timings2; 796 806 797 - #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC 798 807 if (speed >= XFER_UDMA_0) { 799 808 if (pmif->kind == controller_kl_ata4) 800 809 ret = set_timings_udma_ata4(&tl[0], speed); ··· 806 817 ret = -1; 807 818 } else 808 819 set_timings_mdma(drive, pmif->kind, &tl[0], &tl[1], speed); 809 - #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ 820 + 810 821 if (ret) 811 822 return; 812 823 ··· 997 1008 .chipset = ide_pmac, 998 1009 .tp_ops = &pmac_tp_ops, 999 1010 .port_ops = &pmac_ide_port_ops, 1000 - #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC 1001 1011 .dma_ops = &pmac_dma_ops, 1002 - #endif 1003 1012 .host_flags = IDE_HFLAG_SET_PIO_MODE_KEEP_DMA | 1004 1013 IDE_HFLAG_POST_SET_MODE | 1005 1014 IDE_HFLAG_MMIO | ··· 1169 1182 pmif->regbase = regbase; 1170 1183 pmif->irq = irq; 1171 1184 pmif->kauai_fcr = NULL; 1172 - #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC 1185 + 1173 1186 if (macio_resource_count(mdev) >= 2) { 1174 1187 if (macio_request_resource(mdev, 1, "ide-pmac (dma)")) 1175 1188 printk(KERN_WARNING "ide-pmac: can't request DMA " ··· 1179 1192 pmif->dma_regs = ioremap(macio_resource_start(mdev, 1), 0x1000); 1180 1193 } else 1181 1194 pmif->dma_regs = NULL; 1182 - #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ 1195 + 1183 1196 dev_set_drvdata(&mdev->ofdev.dev, pmif); 1184 1197 1185 1198 memset(&hw, 0, sizeof(hw)); ··· 1287 1300 1288 1301 base = ioremap(rbase, rlen); 1289 1302 pmif->regbase = (unsigned long) base + 0x2000; 1290 - #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC 1291 1303 pmif->dma_regs = base + 0x1000; 1292 - #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ 1293 1304 pmif->kauai_fcr = base; 1294 1305 pmif->irq = pdev->irq; 1295 1306 ··· 1418 1433 out: 1419 1434 return error; 1420 1435 } 1421 - 1422 - #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC 1423 1436 1424 1437 /* 1425 1438 * pmac_ide_build_dmatable builds the DBDMA command list ··· 1706 1723 1707 1724 return 0; 1708 1725 } 1709 - #else 1710 - static int __devinit pmac_ide_init_dma(ide_hwif_t *hwif, 1711 - const struct ide_port_info *d) 1712 - { 1713 - return -EOPNOTSUPP; 1714 - } 1715 - #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ 1716 1726 1717 1727 module_init(pmac_ide_probe); 1718 1728