blob: a69ef9b86c88affafd6c57148a582759e8098aea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
From ff7712de39c333cf888e497a90f88601ef3e228f Mon Sep 17 00:00:00 2001
From: Stefan Sicleru <stefan.sicleru@enea.com>
Date: Fri, 10 Jun 2016 10:42:28 +0200
Subject: [PATCH] watchdog: fix errata ERR004346
Due to errata ERR004346 (WDOG: SRS bit requires to be written twice), two
additional writes are added to ensure that at least two writes occur within
one period of the 32kHz clock.
Replace __raw_writew() calls with *_relaxed() calls in order to be
endian-safe.
Signed-off-by: Stefan Sicleru <stefan.sicleru@enea.com>
---
arch/arm/mach-imx/system.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
index 80c177c..6e09ac0 100644
--- a/arch/arm/mach-imx/system.c
+++ b/arch/arm/mach-imx/system.c
@@ -51,7 +51,10 @@ void mxc_restart(enum reboot_mode mode, const char *cmd)
wcr_enable = (1 << 2);
/* Assert SRS signal */
- __raw_writew(wcr_enable, wdog_base);
+
+ writew_relaxed(wcr_enable, wdog_base);
+ writew_relaxed(wcr_enable, wdog_base);
+ writew_relaxed(wcr_enable, wdog_base);
/* wait for reset to assert... */
mdelay(500);
--
1.9.1
|