arm, at91: update SPL wdt support
cover arm, at91: update SPL wdt support
update SPL WDT support and use it on the taurus board
- if CONFIG_AT91SAM9_WATCHDOG is set:
- do not disable WDT in SPL
- call hw_watchdog_init()
- make the WDT timeout configurable
- enable it on the taurus board
Heiko Schocher (4):
arm, at91, wdt: do not disable WDT in SPL
common/board_f: add at91 wdt
arm, at91, wdt: make timeout configurable
arm, at91, taurus: enable WDT
README | 3 +++ arch/arm/cpu/at91-common/spl.c | 4 ++++ common/board_f.c | 2 +- drivers/watchdog/at91sam9_wdt.c | 4 ++++ include/configs/taurus.h | 6 ++++++ 5 files changed, 18 insertions(+), 1 deletion(-)
Signature · 1 line
2.1.0
PATCH 1/4 arm, at91, wdt: do not disable WDT in SPL
if CONFIG_AT91SAM9_WATCHDOG is set, do not disable WDT in SPL
---
arch/arm/cpu/at91-common/spl.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/cpu/at91-common/spl.c +4 -0
@@ -12,12 +12,16 @@#include <asm/arch/clk.h> #include <spl.h> +#if defined(CONFIG_AT91SAM9_WATCHDOG ) +void at91_disable_wdt (void ) { } +#else void at91_disable_wdt (void ) {struct at91_wdt *wdt = (struct at91_wdt *)ATMEL_BASE_WDT ;writel (AT91_WDT_MR_WDDIS , &wdt->mr); } +#endif u32 spl_boot_device (void ) {
Signature · 1 line
2.1.0
PATCH 1/4 arm, at91, wdt: do not disable WDT in SPL
Dear Heiko Schocher,
Quoted 8 lines · Heiko Schocher
if
CONFIG_AT91SAM9_WATCHDOGis set, do not disable WDT in SPLSigned-off-by Heiko Schocher <[email protected]>---
arch/arm/cpu/at91-common/spl.c| 4 ++++1 file changed, 4 insertions(+)
applied to u-boot-atmel/master, thanks!
Best regards,
Andreas Bie?mann
PATCH 2/4 common/board_f: add at91 wdt
In reply to Heiko Schochercall hw_watchdog_init() also if CONFIG_AT91SAM9_WATCHDOG is used.
---
common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/board_f.c +1 -1
@@ -111,7 +111,7 @@ static int init_func_watchdog_init(void) {# if defined(CONFIG_HW_WATCHDOG ) && (defined(CONFIG_BLACKFIN ) || \ defined(CONFIG_M68K ) || defined(CONFIG_MICROBLAZE ) || \ - defined(CONFIG_SH )) + defined(CONFIG_SH ) || defined(CONFIG_AT91SAM9_WATCHDOG ))hw_watchdog_init ();# endif puts (" Watchdog enabled\n" );
Signature · 1 line
2.1.0
PATCH 2/4 common/board_f: add at91 wdt
Quoted 9 lines · Heiko Schocher
call
hw_watchdog_init()also ifCONFIG_AT91SAM9_WATCHDOGis used.Signed-off-by Heiko Schocher <[email protected]>---
common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
PATCH 2/4 common/board_f: add at91 wdt
In reply to Heiko SchocherDear Heiko Schocher,
Quoted 9 lines · Heiko Schocher
call
hw_watchdog_init()also ifCONFIG_AT91SAM9_WATCHDOGis used.Signed-off-by Heiko Schocher <[email protected]>Reviewed-by Simon Glass <[email protected]>---
common/board_f.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)
applied to u-boot-atmel/master, thanks!
Best regards,
Andreas Bie?mann
PATCH 3/4 arm, at91, wdt: make timeout configurable
In reply to Heiko Schochermake the HW WDT timeout configurable through the define CONFIG_AT91_HW_WDT_TIMEOUT.
---
README | 3 +++ drivers/watchdog/at91sam9_wdt.c | 4 ++++ 2 files changed, 7 insertions(+)
README +3 -0
@@ -1257,6 +1257,9 @@ The following options need to be configured: SoC, then define this variable and provide board specific code for the "hw_watchdog_reset" function. + CONFIG_AT91_HW_WDT_TIMEOUT + specify the timeout in seconds. default 2 seconds. + - U-Boot Version: CONFIG_VERSION_VARIABLE If this variable is defined, an environment variable
drivers/watchdog/at91sam9_wdt.c +4 -0
@@ -30,7 +30,11 @@#define ticks_to_ms (t) (((t + 1) * 1000) >> 8)/* Hardware timeout in seconds */ +#if !defined(CONFIG_AT91_HW_WDT_TIMEOUT )#define WDT_HW_TIMEOUT 2 +#else +#define WDT_HW_TIMEOUT CONFIG_AT91_HW_WDT_TIMEOUT +#endif /* * Set the watchdog time interval in 1/256Hz (write-once)
Signature · 1 line
2.1.0
PATCH 3/4 arm, at91, wdt: make timeout configurable
Heiko,
On Wed, Jan 21, 2015 at 08:38:22AM +0100, Heiko Schocher wrote:
[...]
README The following options need to be configured: · line 1262
Quoted 11 lines
README +3
-0@@ -1257,6 +1257,9 @@ The following options need to be configured: SoC, then define this variable and provide board specific code for the "hw_watchdog_reset" function. + CONFIG_AT91_HW_WDT_TIMEOUT + specify the timeout in seconds. default 2 seconds. +
Capitalize 'specify' since it is the start of a sentence.
You could also make the sentence slightly more concise by not repeating 'seconds'.
+ Specify the timeout in seconds (default 2).
[...]
Signature · 1 line
- Jeremiah Mahler
PATCH 3/4 arm, at91, wdt: make timeout configurable
Hello Jeremiah,
Am 21.01.2015 13:35, schrieb Jeremiah Mahler:
Quoted 20 lines
Heiko,
On Wed, Jan 21, 2015 at 08:38:22AM +0100, Heiko Schocher wrote:
[...]README The following options need to be configured: · line 1262
Quoted 11 lines
README +3
-0@@ -1257,6 +1257,9 @@ The following options need to be configured: SoC, then define this variable and provide board specific code for the "hw_watchdog_reset" function. + CONFIG_AT91_HW_WDT_TIMEOUT + specify the timeout in seconds. default 2 seconds. +Capitalize 'specify' since it is the start of a sentence.
You could also make the sentence slightly more concise by not repeating 'seconds'.
Review
Quoted 1 line
(quoted diff) +1
-0+ Specify the timeout in seconds (default 2).
Thanks! (Sorry for my bad denglish ...)
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 3/4 arm, at91, wdt: make timeout configurable
Heiko,
On Wed, Jan 21, 2015 at 01:38:47PM +0100, Heiko Schocher wrote:
[...]
Quoted 3 lines
Thanks! (Sorry for my bad denglish ...)
No need to apologize.
Ich spreche nicht so gut Deutsch. :-)
Quoted 5 lines
bye,
HeikoSignature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Signature · 1 line
- Jeremiah Mahler
PATCH 3/4 arm, at91, wdt: make timeout configurable
In reply to Heiko SchocherDear Heiko Schocher,
Quoted 9 lines · Heiko Schocher
make the HW WDT timeout configurable through the define
CONFIG_AT91_HW_WDT_TIMEOUT.Signed-off-by Heiko Schocher <[email protected]>---
README | 3 +++
drivers/watchdog/at91sam9_wdt.c| 4 ++++2 files changed, 7 insertions(+)
applied to u-boot-atmel/master, thanks!
Best regards,
Andreas Bie?mann
PATCH 4/4 arm, at91, taurus: enable WDT
In reply to Heiko Schocherenable WDT for the taurus board.
---
include/configs/taurus.h | 6 ++++++ 1 file changed, 6 insertions(+)
include/configs/taurus.h +6 -0
@@ -121,6 +121,12 @@#define CONFIG_RMII #define CONFIG_AT91_WANTS_COMMON_PHY +#define CONFIG_AT91SAM9_WATCHDOG +#if !defined(CONFIG_SPL_BUILD ) +/* Enable the watchdog */ +#define CONFIG_HW_WATCHDOG +#endif +/* USB */ #if defined(CONFIG_BOARD_TAURUS )#define CONFIG_USB_ATMEL
Signature · 1 line
2.1.0
PATCH 4/4 arm, at91, taurus: enable WDT
Dear Heiko Schocher,
Quoted 7 lines · Heiko Schocher
enable WDT for the taurus board.
Signed-off-by Heiko Schocher <[email protected]>---
include/configs/taurus.h| 6 ++++++1 file changed, 6 insertions(+)
applied to u-boot-atmel/master, thanks!
Best regards,
Andreas Bie?mann