From 5cfb19ac604a68c030b245561f575c2d1bac1d49 Mon Sep 17 00:00:00 2001 From: Manjunath Hadli Date: Wed, 21 Dec 2011 19:13:36 +0530 Subject: ARM: davinci: streamline sysmod access There are instances of IO_ADDRESS() being used for system module (sysmod) register access. Eliminate this in favor of a ioremap() based access. ioremap() the entire sysmod address space once during boot-up and provide a helper macro to access specific register offsets within the address space. With this, also eliminate ioremap() of specific sysmodule registers related to VPIF happening in DM646x EVM code. While at it, also eliminate some duplicate sysmod register offset macros defined in code and place offset definitions at one place in davinci.h Signed-off-by: Manjunath Hadli Acked-by: Arnd Bergmann [nsekhar@ti.com: removed the addition of ifndef __ASSEMBLER__ in davinci.h, eliminate IO_ADDRESS() usage left out in dm646x.c, cleanup VPIF sysmodule register access as part of this patch and keep all sysmod offsets in davinci.h Also, convert the WARN_ON() on failure to setup sysmod base to BUG_ON()] Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/davinci.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'arch/arm/mach-davinci/davinci.h') diff --git a/arch/arm/mach-davinci/davinci.h b/arch/arm/mach-davinci/davinci.h index 5e4f85e..b1a52fb 100644 --- a/arch/arm/mach-davinci/davinci.h +++ b/arch/arm/mach-davinci/davinci.h @@ -25,10 +25,21 @@ #include #include +#include #include #include +#define DAVINCI_SYSTEM_MODULE_BASE 0x01c40000 +#define SYSMOD_VIDCLKCTL 0x38 +#define SYSMOD_VDD3P3VPWDN 0x48 +#define SYSMOD_VSCLKDIS 0x6c +#define SYSMOD_PUPDCTL1 0x7c + +extern void __iomem *davinci_sysmod_base; +#define DAVINCI_SYSMOD_VIRT(x) (davinci_sysmod_base + (x)) +void davinci_map_sysmod(void); + /* DM355 base addresses */ #define DM355_ASYNC_EMIF_CONTROL_BASE 0x01e10000 #define DM355_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 -- cgit v1.1