drivers/ide/ppc/pmac.c - CONFIG_BLK_DEV_IDEDMA_PMAC
PATCH 1/1 drivers/ide/ppc/pmac.c - CONFIG_BLK_DEV_IDEDMA_PMAC
Hello,
The file drivers/ide/ppc/pmac.c in vanilla 2.6.9 and 2.6.10-rc3 will not compile with some configurations, the attached patch contains the following fixes:
- Make sure pmac.c compiles with CONFIG_BLK_DEV_IDEDMA_PMAC unset.
- CONFIG_BLK_DEV_IDEDMA_PMAC needs CONFIG_BLK_DEV_IDEDMA_PCI.
- Removes the default value of CONFIG_BLK_DEV_IDEPCI due to recursive deps.
Thanks,
/ magnus
drivers/ide/Kconfig +1 -2
@@ -325,7 +325,6 @@ config BLK_DEV_IDEPCI bool "PCI IDE chipset support" if PCI - default BLK_DEV_IDEDMA_PMAC if PPC_PMAC && BLK_DEV_IDEDMA_PMAC help Say Y here for PCI systems which use IDE drive(s). This option helps the IDE driver to automatically detect and
@@ -758,7 +757,7 @@ config BLK_DEV_IDEDMA_PMAC bool "PowerMac IDE DMA support" - depends on BLK_DEV_IDE_PMAC + depends on BLK_DEV_IDE_PMAC && BLK_DEV_IDEDMA_PCI help This option allows the driver for the built-in IDE controller on Power Macintoshes and PowerBooks to use DMA (direct memory access)
drivers/ide/ppc/pmac.c +13 -3
@@ -276,6 +276,8 @@ { 0, 90, 30 } /* 4 */ }; +#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ +/* UniNorth 2 ATA/100 timings */ struct kauai_timing {int cycle_time;
@@ -297,6 +299,8 @@ { 120 , 0x04000148 } }; +#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC + static struct kauai_timing kauai_mdma_timings[] __pmacdata = { { 1260 , 0x00fff000 },
@@ -322,6 +326,11 @@ { 0 , 0 }, }; +static void pmac_ide_setup_dma(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif); +static int pmac_ide_build_dmatable(ide_drive_t *drive, struct request *rq); + +#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ + static inline u32 kauai_lookup_timing(struct kauai_timing* table, int cycle_time) {
@@ -350,14 +359,11 @@*/ #define IDE_WAKEUP_DELAY (1*HZ) -static void pmac_ide_setup_dma (pmac_ide_hwif_t *pmif,ide_hwif_t *hwif); -static int pmac_ide_build_dmatable (ide_drive_t *drive,struct request *rq);static int pmac_ide_tune_chipset (ide_drive_t *drive,u8 speed);static void pmac_ide_tuneproc (ide_drive_t *drive,u8 pio);static void pmac_ide_selectproc (ide_drive_t *drive);static void pmac_ide_kauai_selectproc (ide_drive_t *drive); -#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ /* * Below is the code for blinking the laptop LED along with hard
@@ -1343,12 +1349,16 @@/* The inteface is released to the common IDE layer */ dev_set_drvdata (&mdev->ofdev.dev,NULL );iounmap (base); +#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC if (pmif->dma_regs)iounmap (pmif->dma_regs); +#endif memset (pmif,0 ,sizeof (*pmif));macio_release_resource (mdev,0 ); +#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC if (pmif->dma_regs)macio_release_resource (mdev,1 ); +#endif }return rc;