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