提交 ff88b472 编写于 作者: S Sergei Ianovich 提交者: Olof Johansson

ARM: pxa: prevent PXA270 occasional reboot freezes

Erratum 71 of PXA270M Processor Family Specification Update
(April 19, 2010) explains that watchdog reset time is just
8us insead of 10ms in EMTS.

If SDRAM is not reset, it causes memory bus congestion and
the device hangs. We put SDRAM in selfresh mode before watchdog
reset, removing potential freezes.

Without this patch PXA270-based ICP DAS LP-8x4x hangs after up to 40
reboots. With this patch it has successfully rebooted 500 times.
Signed-off-by: NSergei Ianovich <ynvich@gmail.com>
Tested-by: NMarek Vasut <marex@denx.de>
Signed-off-by: NHaojian Zhuang <haojian.zhuang@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: NOlof Johansson <olof@lixom.net>
上级 506cac15
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <mach/regs-ost.h> #include <mach/regs-ost.h>
#include <mach/reset.h> #include <mach/reset.h>
#include <mach/smemc.h>
unsigned int reset_status; unsigned int reset_status;
EXPORT_SYMBOL(reset_status); EXPORT_SYMBOL(reset_status);
...@@ -81,6 +82,12 @@ static void do_hw_reset(void) ...@@ -81,6 +82,12 @@ static void do_hw_reset(void)
writel_relaxed(OSSR_M3, OSSR); writel_relaxed(OSSR_M3, OSSR);
/* ... in 100 ms */ /* ... in 100 ms */
writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3); writel_relaxed(readl_relaxed(OSCR) + 368640, OSMR3);
/*
* SDRAM hangs on watchdog reset on Marvell PXA270 (erratum 71)
* we put SDRAM into self-refresh to prevent that
*/
while (1)
writel_relaxed(MDREFR_SLFRSH, MDREFR);
} }
void pxa_restart(enum reboot_mode mode, const char *cmd) void pxa_restart(enum reboot_mode mode, const char *cmd)
...@@ -104,4 +111,3 @@ void pxa_restart(enum reboot_mode mode, const char *cmd) ...@@ -104,4 +111,3 @@ void pxa_restart(enum reboot_mode mode, const char *cmd)
break; break;
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册