imx6: Add src_base structure define macro
Instead of initializing 'struct src' to SRC_BASE_ADDR on
every function better to have global define macro.
Reviewed by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@openedev.com>
diff --git a/arch/arm/imx-common/init.c b/arch/arm/imx-common/init.c
index 036ebb2..5b4f828 100644
--- a/arch/arm/imx-common/init.c
+++ b/arch/arm/imx-common/init.c
@@ -119,11 +119,9 @@
#if defined(CONFIG_MX6)
u32 imx6_src_get_boot_mode(void)
{
- struct src *psrc = (struct src *)SRC_BASE_ADDR;
-
if (imx6_is_bmode_from_gpr9())
- return readl(&psrc->gpr9);
+ return readl(&src_base->gpr9);
else
- return readl(&psrc->sbmr1);
+ return readl(&src_base->sbmr1);
}
#endif