summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Sicleru <stefan.sicleru@enea.com>2016-06-13 15:20:57 +0200
committerMartin Borg <martin.borg@enea.com>2016-06-14 10:17:46 +0200
commit8dce58d4412dd6784139613184ce655a88d05222 (patch)
treef76c94b9d253d4e6712493e8626212d75a84c6a4
parent5d967bd08988d949d5d775994db572c1ac730d51 (diff)
downloadmeta-enea-bsp-arm-8dce58d4412dd6784139613184ce655a88d05222.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>
-rw-r--r--recipes-kernel/linux/linux-ls1/0002-watchdog-fix-errata-err004346.patch35
-rw-r--r--recipes-kernel/linux/linux-ls1_3.12.bbappend1
2 files changed, 36 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 @@
1From ff7712de39c333cf888e497a90f88601ef3e228f Mon Sep 17 00:00:00 2001
2From: Stefan Sicleru <stefan.sicleru@enea.com>
3Date: Fri, 10 Jun 2016 10:42:28 +0200
4Subject: [PATCH] watchdog: fix errata ERR004346
5
6Due to errata ERR004346 (WDOG: SRS bit requires to be written twice), two
7additional writes are added to ensure that at least two writes occur within
8one period of the 32kHz clock.
9
10Replace __raw_writew() calls with *_relaxed() calls in order to be
11endian-safe.
12
13Signed-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
18diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
19index 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--
351.9.1
diff --git a/recipes-kernel/linux/linux-ls1_3.12.bbappend b/recipes-kernel/linux/linux-ls1_3.12.bbappend
index e8fd2e4..e0c7a91 100644
--- a/recipes-kernel/linux/linux-ls1_3.12.bbappend
+++ b/recipes-kernel/linux/linux-ls1_3.12.bbappend
@@ -4,6 +4,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
4 4
5SRC_URI += "file://ls1021aiot.dts \ 5SRC_URI += "file://ls1021aiot.dts \
6 file://0001-fsnotify-fix-oops-in-fsnotify_clear_marks_by_group_f.patch \ 6 file://0001-fsnotify-fix-oops-in-fsnotify_clear_marks_by_group_f.patch \
7 file://0002-watchdog-fix-errata-err004346.patch \
7 " 8 "
8 9
9# fix err: "linux-ls1-3.12-r0 do_deploy: Taskhash mismatch" 10# fix err: "linux-ls1-3.12-r0 do_deploy: Taskhash mismatch"