summaryrefslogtreecommitdiff
path: root/arch/arm/mach-davinci/mux.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@deeprootsystems.com>2009-04-14 07:04:16 -0500
committerKevin Hilman <khilman@deeprootsystems.com>2009-04-23 09:31:09 -0700
commitf5c122da543ebf98a5ccb3166768e38eea3120dd (patch)
tree0275d0646aab07c8e3bf9ef5a22572bcf668f400 /arch/arm/mach-davinci/mux.c
parentc5b736d093217890245a33e9a98fe92d6f3529bf (diff)
davinci: add arch_ioremap() which uses existing static mappings
Add arch-specific ioremap() which uses any existing static mappings in place of doing a new mapping. From now on, drivers should always use ioremap() instead of IO_ADDRESS(). In addition, remove the davinci_[read|write]* macros in favor of using ioremap. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/mux.c')
-rw-r--r--arch/arm/mach-davinci/mux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/mux.c b/arch/arm/mach-davinci/mux.c
index 8ff9d8aca60b..53734dee1f93 100644
--- a/arch/arm/mach-davinci/mux.c
+++ b/arch/arm/mach-davinci/mux.c
@@ -23,6 +23,7 @@ static DEFINE_SPINLOCK(mux_lock);
void davinci_mux_peripheral(unsigned int mux, unsigned int enable)
{
+ void __iomem *base = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE);
u32 pinmux, muxreg = PINMUX0;
if (mux >= DAVINCI_MUX_LEVEL2) {
@@ -31,11 +32,11 @@ void davinci_mux_peripheral(unsigned int mux, unsigned int enable)
}
spin_lock(&mux_lock);
- pinmux = davinci_readl(DAVINCI_SYSTEM_MODULE_BASE + muxreg);
+ pinmux = __raw_readl(base + muxreg);
if (enable)
pinmux |= (1 << mux);
else
pinmux &= ~(1 << mux);
- davinci_writel(pinmux, DAVINCI_SYSTEM_MODULE_BASE + muxreg);
+ __raw_writel(pinmux, base + muxreg);
spin_unlock(&mux_lock);
}