mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
ARM: imx: Add bmode support for iMX7
Add the basic differentiation between i.MX6 and i.MX7 into the bmode command, the mechanism really works almost the same on both platforms. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
This commit is contained in:
committed by
Stefano Babic
parent
789bfb5266
commit
c72372d38c
@@ -103,14 +103,20 @@ void init_src(void)
|
||||
#ifdef CONFIG_CMD_BMODE
|
||||
void boot_mode_apply(unsigned cfg_val)
|
||||
{
|
||||
unsigned reg;
|
||||
#ifdef CONFIG_MX6
|
||||
const u32 bmode = IMX6_SRC_GPR10_BMODE;
|
||||
#elif CONFIG_MX7
|
||||
const u32 bmode = IMX7_SRC_GPR10_BMODE;
|
||||
#endif
|
||||
struct src *psrc = (struct src *)SRC_BASE_ADDR;
|
||||
unsigned reg;
|
||||
|
||||
writel(cfg_val, &psrc->gpr9);
|
||||
reg = readl(&psrc->gpr10);
|
||||
if (cfg_val)
|
||||
reg |= IMX6_SRC_GPR10_BMODE;
|
||||
reg |= bmode;
|
||||
else
|
||||
reg &= ~IMX6_SRC_GPR10_BMODE;
|
||||
reg &= ~bmode;
|
||||
writel(reg, &psrc->gpr10);
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user