aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/mux.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2008-03-18 10:04:51 +0200
committerTony Lindgren <tony@atomide.com>2008-04-14 10:29:37 -0700
commit445959821f82846913fe09fee0573e0238415e8c (patch)
tree38d0ec8fd827017e21961a42a58a9bcaaede7c6e /arch/arm/mach-omap2/mux.c
parentc595713da76bc7cedddf5135072ea6037cc0befb (diff)
ARM: OMAP2: Change 24xx to use new register access
This patch changes 24xx to use new register access, except for clock framework. Clock framework register access will get updates in the next patch. Note that board-*.c files change GPMC (General Purpose Memory Controller) access to use gpmc_cs_write_reg() instead of accessing the registers directly. The code also uses gpmc_fck instead of it's parent clock core_l3_ck for GPMC clock. The H4 board file also adds h4_init_flash() function, which specify the flash start and end addresses. Also note that sleep.S removes some unused registers addresses. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/mux.c')
-rw-r--r--arch/arm/mach-omap2/mux.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 0cf7562ff88..930770012a7 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -29,6 +29,7 @@
#include <asm/io.h>
#include <linux/spinlock.h>
+#include <asm/arch/control.h>
#include <asm/arch/mux.h>
#ifdef CONFIG_OMAP_MUX
@@ -218,18 +219,16 @@ MUX_CFG_24XX("AD13_2430_MCBSP2_DR_OFF", 0x0131, 0, 0, 0, 1)
#define OMAP24XX_PINS_SZ 0
#endif /* CONFIG_ARCH_OMAP24XX */
-#define OMAP24XX_L4_BASE 0x48000000
#define OMAP24XX_PULL_ENA (1 << 3)
#define OMAP24XX_PULL_UP (1 << 4)
-/* REVISIT: Convert this code to use ctrl_{read,write}_reg */
#if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS)
void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u8 reg)
{
u16 orig;
u8 warn = 0, debug = 0;
- orig = omap_readb(OMAP24XX_L4_BASE + cfg->mux_reg);
+ orig = omap_ctrl_readb(cfg->mux_reg);
#ifdef CONFIG_OMAP_MUX_DEBUG
debug = cfg->debug;
@@ -238,7 +237,8 @@ void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u8 reg)
if (debug || warn)
printk(KERN_WARNING
"MUX: setup %s (0x%08x): 0x%02x -> 0x%02x\n",
- cfg->name, omap_readb(OMAP24XX_L4_BASE + cfg->mux_reg));
+ cfg->name, omap_ctrl_base_get() + cfg->mux_reg,
+ orig, reg);
}
#else
#define omap2_cfg_debug(x, y) do {} while (0)
@@ -258,7 +258,7 @@ int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg)
if (cfg->pu_pd_val)
reg |= OMAP24XX_PULL_UP;
omap2_cfg_debug(cfg, reg);
- omap_writeb(reg, OMAP24XX_L4_BASE + cfg->mux_reg);
+ omap_ctrl_writeb(reg, cfg->mux_reg);
spin_unlock_irqrestore(&mux_spin_lock, flags);
return 0;