Commit e1d3e024 authored by Sergei Ianovich's avatar Sergei Ianovich Committed by Greg Kroah-Hartman

ARM: pxa: prevent PXA270 occasional reboot freezes

commit ff88b472 upstream.

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: default avatarSergei Ianovich <ynvich@gmail.com>
Tested-by: default avatarMarek Vasut <marex@denx.de>
Signed-off-by: default avatarHaojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Cc: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0045ba11
......@@ -13,6 +13,7 @@
#include <mach/regs-ost.h>
#include <mach/reset.h>
#include <mach/smemc.h>
unsigned int reset_status;
EXPORT_SYMBOL(reset_status);
......@@ -80,6 +81,12 @@ static void do_hw_reset(void)
OWER = OWER_WME;
OSSR = OSSR_M3;
OSMR3 = OSCR + 368640; /* ... in 100 ms */
/*
* 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(char mode, const char *cmd)
......@@ -103,4 +110,3 @@ void pxa_restart(char mode, const char *cmd)
break;
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment