Skip to contentSkip to conversation

common/board_f.c: Enable IMX watchdog in init_func_watchdog_init()

PATCH New Stefan Roese 2 participants 3 messages Mar 9, 2015 – Mar 10, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/board_f.c: Enable IMX watchdog in init_func_watchdog_init()

Without this patch, the IMX watchdog will not be initialized. And therefor not active. This patch fixes this by calling hw_watchdog_init() also when CONFIG_IMX_WATCHDOG is defined.

Cc Simon Glass <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Stefano Babic <[email protected]>
---
 common/board_f.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
common/board_f.c +2 -1
index 4d8b8a6..1dfaa2a 100644
@@ -111,7 +111,8 @@ 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_AT91SAM9_WATCHDOG))
+	defined(CONFIG_SH) || defined(CONFIG_AT91SAM9_WATCHDOG)) || \
+	defined(CONFIG_IMX_WATCHDOG)
 	hw_watchdog_init();
 # endif
 	puts("       Watchdog enabled\n");
Signature · 1 line
2.3.1
#1 lore raw

PATCH 1/1 common/board_f.c: Enable IMX watchdog in init_func_watchdog_init()

Hello Stefan,

Am 09.03.2015 16:49, schrieb Stefan Roese:

Quoted 11 lines

Without this patch, the IMX watchdog will not be initialized. And therefor not active. This patch fixes this by calling hw_watchdog_init() also when CONFIG_IMX_WATCHDOG is defined.

Cc Simon Glass <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Stefano Babic <[email protected]>
---
  common/board_f.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

Thanks, Good catch!

common/board_f.c static int init_func_watchdog_init(void) · line 115

Quoted 11 lines
common/board_f.c +2 -1
index 4d8b8a6..1dfaa2a 100644
@@ -111,7 +111,8 @@ 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_AT91SAM9_WATCHDOG))
+	defined(CONFIG_SH) || defined(CONFIG_AT91SAM9_WATCHDOG)) || \
+	defined(CONFIG_IMX_WATCHDOG)

Hmm.. are you sure, you set the brackets correct? I think it should be:

-	defined(CONFIG_SH) || defined(CONFIG_AT91SAM9_WATCHDOG))
+	defined(CONFIG_SH) || defined(CONFIG_AT91SAM9_WATCHDOG) || \
                                                                ^
+	defined(CONFIG_IMX_WATCHDOG))
                                     ^

so it only gets enabled if CONFIG_HW_WATCHDOG is defined ... or is this not necessary for imx6?

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#2 lore raw

PATCH 1/1 common/board_f.c: Enable IMX watchdog in init_func_watchdog_init()

Hi Heiko,

Quoted 37 lines · Heiko Schocher

Hello Stefan,

Am 09.03.2015 16:49, schrieb Stefan Roese:

Quoted 5 lines

Without this patch, the IMX watchdog will not be initialized. And therefor
not active. This patch fixes this by calling hw_watchdog_init() also when CONFIG_IMX_WATCHDOG is defined.

Quoted 7 lines
Cc Simon Glass <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Stefano Babic <[email protected]>
---
  common/board_f.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

Thanks, Good catch!

common/board_f.c static int init_func_watchdog_init(void) · line 115

Quoted 11 lines
common/board_f.c +2 -1
index 4d8b8a6..1dfaa2a 100644
@@ -111,7 +111,8 @@ 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_AT91SAM9_WATCHDOG))
+    defined(CONFIG_SH) || defined(CONFIG_AT91SAM9_WATCHDOG)) || \
+    defined(CONFIG_IMX_WATCHDOG)

Hmm.. are you sure, you set the brackets correct? I think it should be:

(quoted diff) +2 -1
-    defined(CONFIG_SH) || defined(CONFIG_AT91SAM9_WATCHDOG))
+    defined(CONFIG_SH) || defined(CONFIG_AT91SAM9_WATCHDOG) || \
                                                                ^
+    defined(CONFIG_IMX_WATCHDOG))
                                     ^
Quoted 2 lines

so it only gets enabled if CONFIG_HW_WATCHDOG is defined ... or is this not necessary for imx6?

Right. Even though checking for CONFIG_HW_WATCHDOG & IMX_WATCHDOG seems a bit redundant. But such a cleanup is perhaps better done in a different patch.

Thanks for the review. I'll send a v2 right away...

Thanks,
Stefan