[U-Boot] [PATCH] i.MX6: imx_ccm is a constant that points to a register set

Eric Nelson eric.nelson at boundarydevices.com
Mon Mar 5 17:34:06 CET 2012


If we're going to use globals to point at register banks, they
should be constant and visible.
---
 arch/arm/cpu/armv7/mx6/clock.c           |    2 +-
 arch/arm/include/asm/arch-mx6/imx-regs.h |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
index ef98563..eb1f09b 100644
--- a/arch/arm/cpu/armv7/mx6/clock.c
+++ b/arch/arm/cpu/armv7/mx6/clock.c
@@ -34,7 +34,7 @@ enum pll_clocks {
 	PLL_ENET,	/* ENET PLL */
 };
 
-struct imx_ccm_reg *imx_ccm = (struct imx_ccm_reg *)CCM_BASE_ADDR;
+struct imx_ccm_reg *const imx_ccm = (struct imx_ccm_reg *)CCM_BASE_ADDR;
 
 void enable_usboh3_clk(unsigned char enable)
 {
diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h
index 3e5c4c2..3eae704 100644
--- a/arch/arm/include/asm/arch-mx6/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
@@ -297,5 +297,7 @@ struct aipstz_regs {
 	u32	opacr4;
 };
 
+extern struct imx_ccm_reg *const imx_ccm ;
+
 #endif /* __ASSEMBLER__*/
 #endif /* __ASM_ARCH_MX6_IMX_REGS_H__ */
-- 
1.7.9



More information about the U-Boot mailing list