diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2010-09-27 14:02:57 -0600 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-09-27 14:02:57 -0600 |
commit | 70ba71a25e02ef7b8796723c8615955620e465ff (patch) | |
tree | 2f438307bd74e24f26c35727800fef46bb7bf675 /arch/arm/mach-omap2/control.c | |
parent | 0c3492467c99f3d0d83a48012ee6e672b016759c (diff) | |
download | talos-op-linux-70ba71a25e02ef7b8796723c8615955620e465ff.tar.gz talos-op-linux-70ba71a25e02ef7b8796723c8615955620e465ff.zip |
omap4: control: Add accessor api's for pad control module
On OMAP4 control pad are not addressable from control
core base. So the common omap_ctrl_read/write APIs breaks
Hence export separate APIs to manage the omap4 pad control
registers.
This APIs will work only for OMAP4
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/control.c')
-rw-r--r-- | arch/arm/mach-omap2/control.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c index 99c0eb645d4d..8b3c469e7bcd 100644 --- a/arch/arm/mach-omap2/control.c +++ b/arch/arm/mach-omap2/control.c @@ -138,6 +138,7 @@ static struct omap3_control_regs control_context; #endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */ #define OMAP_CTRL_REGADDR(reg) (omap2_ctrl_base + (reg)) +#define OMAP4_CTRL_PAD_REGADDR(reg) (omap4_ctrl_pad_base + (reg)) void __init omap2_set_globals_control(struct omap_globals *omap2_globals) { @@ -189,6 +190,23 @@ void omap_ctrl_writel(u32 val, u16 offset) __raw_writel(val, OMAP_CTRL_REGADDR(offset)); } +/* + * On OMAP4 control pad are not addressable from control + * core base. So the common omap_ctrl_read/write APIs breaks + * Hence export separate APIs to manage the omap4 pad control + * registers. This APIs will work only for OMAP4 + */ + +u32 omap4_ctrl_pad_readl(u16 offset) +{ + return __raw_readl(OMAP4_CTRL_PAD_REGADDR(offset)); +} + +void omap4_ctrl_pad_writel(u32 val, u16 offset) +{ + __raw_writel(val, OMAP4_CTRL_PAD_REGADDR(offset)); +} + #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) /* * Clears the scratchpad contents in case of cold boot- |