diff options
Diffstat (limited to 'arch/arm/imx-common/init.c')
-rw-r--r-- | arch/arm/imx-common/init.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/imx-common/init.c b/arch/arm/imx-common/init.c index e5dbd93c3b..036ebb2f17 100644 --- a/arch/arm/imx-common/init.c +++ b/arch/arm/imx-common/init.c @@ -115,3 +115,15 @@ void boot_mode_apply(unsigned cfg_val) writel(reg, &psrc->gpr10); } #endif + +#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); + else + return readl(&psrc->sbmr1); +} +#endif |