* [PATCH] drivers/ide/ppc/pmac.c - CONFIG_BLK_DEV_IDEDMA_PMAC
@ 2004-12-14 1:14 Magnus Damm
0 siblings, 0 replies; only message in thread
From: Magnus Damm @ 2004-12-14 1:14 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 389 bytes --]
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
[-- Attachment #2: linux-2.6.10-rc3-ide_pmac.patch --]
[-- Type: application/octet-stream, Size: 2792 bytes --]
diff -urN linux-2.6.10-rc3/drivers/ide/Kconfig linux-2.6.10-rc3-ide_pmac/drivers/ide/Kconfig
--- linux-2.6.10-rc3/drivers/ide/Kconfig 2004-12-13 23:38:32.000000000 +0100
+++ linux-2.6.10-rc3-ide_pmac/drivers/ide/Kconfig 2004-12-14 01:22:19.000000000 +0100
@@ -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)
diff -urN linux-2.6.10-rc3/drivers/ide/ppc/pmac.c linux-2.6.10-rc3-ide_pmac/drivers/ide/ppc/pmac.c
--- linux-2.6.10-rc3/drivers/ide/ppc/pmac.c 2004-12-13 23:38:33.000000000 +0100
+++ linux-2.6.10-rc3-ide_pmac/drivers/ide/ppc/pmac.c 2004-12-14 01:13:50.000000000 +0100
@@ -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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-12-14 1:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-14 1:14 [PATCH] drivers/ide/ppc/pmac.c - CONFIG_BLK_DEV_IDEDMA_PMAC Magnus Damm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.