diff options
author | Stefan Sicleru <stefan.sicleru@enea.com> | 2016-06-13 15:20:57 +0200 |
---|---|---|
committer | Martin Borg <martin.borg@enea.com> | 2016-06-14 09:54:31 +0200 |
commit | 63ad71c10bc9be088998c138a75697eac1fec7c5 (patch) | |
tree | 05e193fc0a890ee3c8b8bc855198865852978a3a /recipes-kernel/linux/linux-ls1/0002-watchdog-fix-errata-err004346.patch | |
parent | 78169327885c65f1f4d3e83eb0bb78e297d3a5c5 (diff) | |
download | meta-enea-bsp-arm-63ad71c10bc9be088998c138a75697eac1fec7c5.tar.gz |
linux-ls1: fix reset issue
Watchdog failed to assert reset signal so the board hanged everytime
a reboot command was issued. The watchdog (same controller used for
i.MX platforms) has an errata mentioning a software workaround for
a hardware issue that has no scheduled fix.
Implemented the workaround described in the errata. The workaround is
already present in upstream repositories.
Signed-off-by: Stefan Sicleru <stefan.sicleru@enea.com>
Signed-off-by: Martin Borg <martin.borg@enea.com>
Diffstat (limited to 'recipes-kernel/linux/linux-ls1/0002-watchdog-fix-errata-err004346.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ls1/0002-watchdog-fix-errata-err004346.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ls1/0002-watchdog-fix-errata-err004346.patch b/recipes-kernel/linux/linux-ls1/0002-watchdog-fix-errata-err004346.patch new file mode 100644 index 0000000..a69ef9b --- /dev/null +++ b/recipes-kernel/linux/linux-ls1/0002-watchdog-fix-errata-err004346.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From ff7712de39c333cf888e497a90f88601ef3e228f Mon Sep 17 00:00:00 2001 | ||
2 | From: Stefan Sicleru <stefan.sicleru@enea.com> | ||
3 | Date: Fri, 10 Jun 2016 10:42:28 +0200 | ||
4 | Subject: [PATCH] watchdog: fix errata ERR004346 | ||
5 | |||
6 | Due to errata ERR004346 (WDOG: SRS bit requires to be written twice), two | ||
7 | additional writes are added to ensure that at least two writes occur within | ||
8 | one period of the 32kHz clock. | ||
9 | |||
10 | Replace __raw_writew() calls with *_relaxed() calls in order to be | ||
11 | endian-safe. | ||
12 | |||
13 | Signed-off-by: Stefan Sicleru <stefan.sicleru@enea.com> | ||
14 | --- | ||
15 | arch/arm/mach-imx/system.c | 5 ++++- | ||
16 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c | ||
19 | index 80c177c..6e09ac0 100644 | ||
20 | --- a/arch/arm/mach-imx/system.c | ||
21 | +++ b/arch/arm/mach-imx/system.c | ||
22 | @@ -51,7 +51,10 @@ void mxc_restart(enum reboot_mode mode, const char *cmd) | ||
23 | wcr_enable = (1 << 2); | ||
24 | |||
25 | /* Assert SRS signal */ | ||
26 | - __raw_writew(wcr_enable, wdog_base); | ||
27 | + | ||
28 | + writew_relaxed(wcr_enable, wdog_base); | ||
29 | + writew_relaxed(wcr_enable, wdog_base); | ||
30 | + writew_relaxed(wcr_enable, wdog_base); | ||
31 | |||
32 | /* wait for reset to assert... */ | ||
33 | mdelay(500); | ||
34 | -- | ||
35 | 1.9.1 | ||