[PATCH 58/90] ARM: OMAP: musb_hdrc: tusb dma patch, minor

From: Tony Lindgren
Date: Wed Apr 04 2007 - 14:25:18 EST


From: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>

Move all DMAREQ for TUSB6010 into its chip setup; it shouldn't be in
either the board-specific code, or the tusb6010 glue. (Note, we still
aren't passing the "which channels" info to the driver...)

Signed-off-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
---
arch/arm/mach-omap2/board-h4.c | 5 +++--
arch/arm/mach-omap2/usb-tusb6010.c | 16 ++++++++++++++++
2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 100aea4..e85bbeb 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -476,9 +476,10 @@ static void __init tusb_evm_setup(void)
*/
omap_cfg_reg(J15_24XX_GPIO99);
irq = 99;
- omap_cfg_reg(AA10_242X_DMAREQ0);
- omap_cfg_reg(AA6_242X_DMAREQ1);
dmachan = (1 << 1) | (1 << 0);
+#if !(defined(CONFIG_MTD_OMAP_NOR) || defined(CONFIG_MTD_OMAP_NOR_MODULE))
+ dmachan |= (1 << 5) | (1 << 4) (1 << 3) | (1 << 2);
+#endif
break;
}

diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c
index 5f276c5..497f733 100644
--- a/arch/arm/mach-omap2/usb-tusb6010.c
+++ b/arch/arm/mach-omap2/usb-tusb6010.c
@@ -17,6 +17,7 @@

#include <asm/arch/gpmc.h>
#include <asm/arch/gpio.h>
+#include <asm/arch/mux.h>


static u8 async_cs, sync_cs;
@@ -322,6 +323,21 @@ tusb6010_setup_interface(struct musb_hdrc_platform_data *data,
/* REVISIT let the driver know what DMA channels work */
if (!dmachan)
tusb_device.dev.dma_mask = NULL;
+ else {
+ /* assume OMAP 2420 ES2.0 and later */
+ if (dmachan & (1 << 0))
+ omap_cfg_reg(AA10_242X_DMAREQ0);
+ if (dmachan & (1 << 1))
+ omap_cfg_reg(AA6_242X_DMAREQ1);
+ if (dmachan & (1 << 2))
+ omap_cfg_reg(E4_242X_DMAREQ2);
+ if (dmachan & (1 << 3))
+ omap_cfg_reg(G4_242X_DMAREQ3);
+ if (dmachan & (1 << 4))
+ omap_cfg_reg(D3_242X_DMAREQ4);
+ if (dmachan & (1 << 5))
+ omap_cfg_reg(E3_242X_DMAREQ5);
+ }

/* so far so good ... register the device */
status = platform_device_register(&tusb_device);
--
1.4.4.2

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/