From 2b2d5f705f1f5fad4275401d695697c06ad1e886 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Mon, 17 Mar 2008 14:24:55 +0200 Subject: [PATCH] ARM: OMAP: More fixes for cm and prm assembly access More fixes for cm and prm assembly access Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/prcm.c | 1 + arch/arm/mach-omap2/prm.h | 17 ++++++++++++++--- arch/arm/mach-omap2/sdrc.h | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c index 9ff918a35fa..e0035987eb4 100644 --- a/arch/arm/mach-omap2/prcm.c +++ b/arch/arm/mach-omap2/prcm.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "prm.h" #include "prm-regbits-24xx.h" diff --git a/arch/arm/mach-omap2/prm.h b/arch/arm/mach-omap2/prm.h index fcc1aa04740..455b060665f 100644 --- a/arch/arm/mach-omap2/prm.h +++ b/arch/arm/mach-omap2/prm.h @@ -14,13 +14,19 @@ * published by the Free Software Foundation. */ -#include -#include #include "prcm-common.h" - +#ifndef __ASSEMBLER__ #define OMAP_PRM_REGADDR(module, reg) \ (void __iomem *)IO_ADDRESS(OMAP2_PRM_BASE + (module) + (reg)) +#else +#define OMAP2420_PRM_REGADDR(module, reg) \ + IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg)) +#define OMAP2430_PRM_REGADDR(module, reg) \ + IO_ADDRESS(OMAP2430_PRM_BASE + (module) + (reg)) +#define OMAP34XX_PRM_REGADDR(module, reg) \ + IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg)) +#endif /* * Architecture-specific global PRM registers @@ -91,6 +97,8 @@ #define OMAP3430_PRM_CLKSEL OMAP_PRM_REGADDR(OMAP3430_CCR_MOD, 0x0040) #define OMAP3430_PRM_CLKOUT_CTRL OMAP_PRM_REGADDR(OMAP3430_CCR_MOD, 0x0070) +#ifndef __ASSEMBLER__ + /* Power/reset management global register get/set */ static void __attribute__((unused)) prm_write_reg(u32 val, void __iomem *addr) @@ -105,6 +113,7 @@ static u32 __attribute__((unused)) prm_read_reg(void __iomem *addr) return __raw_readl(addr); } +#endif /* * Module specific PRM registers from PRM_BASE + domain offset @@ -156,6 +165,7 @@ static u32 __attribute__((unused)) prm_read_reg(void __iomem *addr) #define OMAP24XX_PRCM_IRQSTATUS_IVA 0x00f8 #define OMAP24XX_PRCM_IRQENABLE_IVA 0x00fc +#ifndef __ASSEMBLER__ /* Power/reset management domain register get/set */ @@ -169,6 +179,7 @@ static u32 __attribute__((unused)) prm_read_mod_reg(s16 module, s16 idx) return prm_read_reg(OMAP_PRM_REGADDR(module, idx)); } +#endif /* * Bits common to specific registers diff --git a/arch/arm/mach-omap2/sdrc.h b/arch/arm/mach-omap2/sdrc.h index aa386210107..928e1c4c754 100644 --- a/arch/arm/mach-omap2/sdrc.h +++ b/arch/arm/mach-omap2/sdrc.h @@ -56,7 +56,7 @@ static u32 __attribute__((unused)) sms_read_reg(u16 reg) return __raw_readl(OMAP_SMS_REGADDR(reg)); } #else -#define OMAP242X_SDRC_REGADDR(reg) IO_ADDRESS(OMAP242X_SDRC_BASE + (reg)) +#define OMAP242X_SDRC_REGADDR(reg) IO_ADDRESS(OMAP2420_SDRC_BASE + (reg)) #define OMAP243X_SDRC_REGADDR(reg) IO_ADDRESS(OMAP243X_SDRC_BASE + (reg)) #define OMAP34XX_SDRC_REGADDR(reg) IO_ADDRESS(OMAP343X_SDRC_BASE + (reg)) #endif /* __ASSEMBLER__ */ -- 2.41.1