ARM: pxa: prevent PXA270 occasional reboot freezes
Subsystems (3)
PATCH 1/1 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.
--- arch/arm/mach-pxa/reset.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm/mach-pxa/reset.c +7 -1
@@ -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);
@@ -81,6 +82,12 @@ static void do_hw_reset(void)writel_relaxed (OSSR_M3 ,OSSR );/* ... in 100 ms */ 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)
@@ -104,4 +111,3 @@ void pxa_restart(enum reboot_mode mode, const char *cmd)break ; } } -
Signature · 1 line
1.8.4.2
Haojian Zhuang
maintainerQuoted 43 lines · Sergei Ianovich
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 Sergei Ianovich <[email protected]>--- arch/arm/mach-pxa/reset.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)arch/arm/mach-pxa/reset.c +7
-0@@ -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);@@ -81,6 +82,12 @@ static void do_hw_reset(void)writel_relaxed (OSSR_M3 ,OSSR );/* ... in 100 ms */ 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)
arch/arm/mach-pxa/reset.c void pxa_restart(enum reboot_mode mode, const char *cmd) · line 107
Quoted 4 lines
arch/arm/mach-pxa/reset.c +0
-1@@ -104,4 +111,3 @@ void pxa_restart(enum reboot_mode mode, const char *cmd)break ; } } -
Hi Daniel/Marek/Igor,
Could you help to try this patch? I'm lack of PXA27x board.
Best Regards
Haojian
Quoted 51 lines · Haojian Zhuang
Quoted 43 lines · Sergei Ianovich
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 Sergei Ianovich <[email protected]>--- arch/arm/mach-pxa/reset.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)arch/arm/mach-pxa/reset.c +7
-0@@ -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);@@ -81,6 +82,12 @@ static void do_hw_reset(void)writel_relaxed (OSSR_M3 ,OSSR );/* ... in 100 ms */ 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)arch/arm/mach-pxa/reset.c void pxa_restart(enum reboot_mode mode, const char *cmd) · line 107
Quoted 4 lines
arch/arm/mach-pxa/reset.c +0
-1@@ -104,4 +111,3 @@ void pxa_restart(enum reboot_mode mode, const char *cmd)break ; } } -Hi Daniel/Marek/Igor,
Quoted 1 line
Could you help to try this patch? I'm lack of PXA27x board.
I don't have any either right now ...
Daniel
Marek Vasut
Tested-byQuoted 59 lines · Daniel Mack
Quoted 58 lines · Haojian Zhuang
Quoted 57 lines · Sergei Ianovich
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 Sergei Ianovich <[email protected]>---
arch/arm/mach-pxa/reset.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)arch/arm/mach-pxa/reset.c +1
-0@@ -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);arch/arm/mach-pxa/reset.c +6
-0@@ -81,6 +82,12 @@ static void do_hw_reset(void)writel_relaxed (OSSR_M3 ,OSSR );/* ... in 100 ms */ 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)arch/arm/mach-pxa/reset.c +0
-0@@ -104,4 +111,3 @@ void pxa_restart(enum reboot_mode mode, const char *cmd)break ; } }
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
-
Hi Daniel/Marek/Igor,
Could you help to try this patch? I'm lack of PXA27x board.
I don't have any either right now ...
On VPAC270
Best regards,
Marek Vasut
Quoted 66 lines · Marek Vasut
Quoted 65 lines · Daniel Mack
Quoted 63 lines · Haojian Zhuang
Quoted 49 lines · Sergei Ianovich
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 Sergei Ianovich <[email protected]>---
arch/arm/mach-pxa/reset.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)arch/arm/mach-pxa/reset.c +1
-0@@ -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);arch/arm/mach-pxa/reset.c +6
-0@@ -81,6 +82,12 @@ static void do_hw_reset(void)writel_relaxed (OSSR_M3 ,OSSR );/* ... in 100 ms */ 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)arch/arm/mach-pxa/reset.c void pxa_restart(enum reboot_mode mode, const char
Quoted 9 lines
arch/arm/mach-pxa/reset.c +0
-1@@ -104,4 +111,3 @@ void pxa_restart(enum reboot_mode mode, const char *cmd)break ; } } -Hi Daniel/Marek/Igor,
Could you help to try this patch? I'm lack of PXA27x board.
Quoted 9 lines
Quoted 1 line
I don't have any either right now ...
On VPAC270
Tested-by Marek Vasut <[email protected]>Best regards,
Marek Vasut
Applied.
Thanks
Haojian