MLK-20479 imx8mq: clear ocotp error bit
In case ocotp error bit is set, clear it.
This is a workaround to ocotp error bit.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 781f2d8feb)
This commit is contained in:
parent
c630e0ad3b
commit
654088cc21
|
|
@ -249,6 +249,7 @@ static void imx_set_wdog_powerdown(bool enable)
|
||||||
|
|
||||||
int arch_cpu_init(void)
|
int arch_cpu_init(void)
|
||||||
{
|
{
|
||||||
|
struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
|
||||||
/*
|
/*
|
||||||
* Init timer at very early state, because pll setting will use it,
|
* Init timer at very early state, because pll setting will use it,
|
||||||
* Rom Turnned off SCTR, enable it before timer_init
|
* Rom Turnned off SCTR, enable it before timer_init
|
||||||
|
|
@ -288,6 +289,12 @@ int arch_cpu_init(void)
|
||||||
writel(0x21, 0x30370038);
|
writel(0x21, 0x30370038);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (is_imx8mq()) {
|
||||||
|
clock_enable(CCGR_OCOTP, 1);
|
||||||
|
if (readl(&ocotp->ctrl) & 0x200)
|
||||||
|
writel(0x200, &ocotp->ctrl_clr);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue