diff options
author | Kevin Hilman <khilman@deeprootsystems.com> | 2009-04-14 08:04:16 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-04-23 12:31:09 -0400 |
commit | f5c122da543ebf98a5ccb3166768e38eea3120dd (patch) | |
tree | 0275d0646aab07c8e3bf9ef5a22572bcf668f400 /arch/arm/mach-davinci/mux.c | |
parent | c5b736d093217890245a33e9a98fe92d6f3529bf (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.c | 5 |
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); | |||
23 | 23 | ||
24 | void davinci_mux_peripheral(unsigned int mux, unsigned int enable) | 24 | void davinci_mux_peripheral(unsigned int mux, unsigned int enable) |
25 | { | 25 | { |
26 | void __iomem *base = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE); | ||
26 | u32 pinmux, muxreg = PINMUX0; | 27 | u32 pinmux, muxreg = PINMUX0; |
27 | 28 | ||
28 | if (mux >= DAVINCI_MUX_LEVEL2) { | 29 | if (mux >= DAVINCI_MUX_LEVEL2) { |
@@ -31,11 +32,11 @@ void davinci_mux_peripheral(unsigned int mux, unsigned int enable) | |||
31 | } | 32 | } |
32 | 33 | ||
33 | spin_lock(&mux_lock); | 34 | spin_lock(&mux_lock); |
34 | pinmux = davinci_readl(DAVINCI_SYSTEM_MODULE_BASE + muxreg); | 35 | pinmux = __raw_readl(base + muxreg); |
35 | if (enable) | 36 | if (enable) |
36 | pinmux |= (1 << mux); | 37 | pinmux |= (1 << mux); |
37 | else | 38 | else |
38 | pinmux &= ~(1 << mux); | 39 | pinmux &= ~(1 << mux); |
39 | davinci_writel(pinmux, DAVINCI_SYSTEM_MODULE_BASE + muxreg); | 40 | __raw_writel(pinmux, base + muxreg); |
40 | spin_unlock(&mux_lock); | 41 | spin_unlock(&mux_lock); |
41 | } | 42 | } |