Skip to contentSkip to conversation

udoo: fix watchdog setting

PATCH New Giuseppe Pagano 2 participants 3 messages Nov 6, 2013 – Nov 7, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 udoo: fix watchdog setting

To have watchdog quiet during kernel boot it is necessary to change gpio wdt trigger direction.

Cc sbabic at denx.de

---

board/udoo/udoo.c +0 -0
diff -uNr a/board/udoo/udoo.c b/board/udoo/udoo.c
@@ -168,6 +168,7 @@
        imx_iomux_v3_setup_multiple_pads(wdog_pads,
ARRAY_SIZE(wdog_pads));
        gpio_direction_output(WDT_TRG, 0);
        gpio_direction_output(WDT_EN, 1);

+ gpio_direction_input(WDT_TRG);
}

static struct fsl_esdhc_cfg usdhc_cfg = { USDHC3_BASE_ADDR };

#1 lore raw

PATCH 4/4 udoo: fix watchdog setting

Hi Giuseppe,

Quoted 3 lines · Giuseppe Pagano

To have watchdog quiet during kernel boot it is necessary to change gpio wdt trigger direction.

Sorry, this is not a good explanation. You force a GPIO to drop a feture, instead of disabling the feature itself. And maybe some other people want to have this feature enabled.

Which is the timeout for the watchdog ? Why is it hitting too soon ?

Fix should be not done simply removing the effect, but checking the cause.

Quoted 10 lines
Cc sbabic at denx.de

---

diff -uNr a/board/udoo/udoo.c b/board/udoo/udoo.c

board/udoo/udoo.c line 172

Quoted 5 lines
board/udoo/udoo.c +1 -0
@@ -168,6 +168,7 @@
        imx_iomux_v3_setup_multiple_pads(wdog_pads,
 ARRAY_SIZE(wdog_pads));
        gpio_direction_output(WDT_TRG, 0);
        gpio_direction_output(WDT_EN, 1);
+	gpio_direction_input(WDT_TRG);

I do not think this a right way to disable a watchdog.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#2 lore raw

PATCH 4/4 udoo: fix watchdog setting

Hi Stefano,

Quoted 7 lines · Stefano Babic

Hi Giuseppe,

Quoted 3 lines · Giuseppe Pagano

To have watchdog quiet during kernel boot it is necessary to change gpio wdt trigger direction.

Quoted 7 lines

Sorry, this is not a good explanation. You force a GPIO to drop a feture, instead of disabling the feature itself. And maybe some other people want to have this feature enabled.

Which is the timeout for the watchdog ? Why is it hitting too soon ?

Fix should be not done simply removing the effect, but checking the cause.

I know, my explanation was poor.
uDoo use APX823-31W5 as watchdog chip. Timeout is about 1.2 seconds. To disabled watchdog during kernel boot, WDI pin of that chip needs to be in "high impedance" state. As far as I known mx6 gpio configuration does not contemplate tristate, so the option I choose is to set pin as input and in "high impedance". If wdt gpio is leaved as output che chip resets.

Quoted 4 lines

Best regards,
Stefano Babic

Best regards,
Giuseppe Pagano