ARM i.MX28: make chip reset via reset pin work again
Since commit:
2ccd451
ARM i.MX28: change default watchdog reset method
the external reset via the reset pin is broken. That commit overwrites the
HW_CLKCTRL_RESET register with only WDOG_POR_DISABLE set, which results in
disabling the external reset.
This patch uses read-modify-write to set the WDOG_POR_DISABLE, leaving the
WDOG_POR_DISABLE untouched.
Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
46d7027a6a
commit
8bafdc1c46
|
@ -39,12 +39,16 @@ EXPORT_SYMBOL(reset_cpu);
|
||||||
|
|
||||||
static int imx28_init(void)
|
static int imx28_init(void)
|
||||||
{
|
{
|
||||||
|
u32 reg;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The default setting for the WDT is to do a POR. If the SoC is only
|
* The default setting for the WDT is to do a POR. If the SoC is only
|
||||||
* powered via battery, then a WDT reset powers the chip down instead
|
* powered via battery, then a WDT reset powers the chip down instead
|
||||||
* of resetting it. Use a software reset only.
|
* of resetting it. Use a software reset only.
|
||||||
*/
|
*/
|
||||||
writel(HW_CLKCTRL_WDOG_POR_DISABLE, IMX_CCM_BASE + HW_CLKCTRL_RESET);
|
reg = readl(IMX_CCM_BASE + HW_CLKCTRL_RESET) |
|
||||||
|
HW_CLKCTRL_WDOG_POR_DISABLE;
|
||||||
|
writel(reg, IMX_CCM_BASE + HW_CLKCTRL_RESET);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue