public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] i.MX6 based board does not work if watchdog support is enabled
@ 2013-09-29  0:19 Otavio Salvador
  2013-09-29  8:23 ` Michael Trimarchi
  2013-09-29 16:57 ` Anatolij Gustschin
  0 siblings, 2 replies; 7+ messages in thread
From: Otavio Salvador @ 2013-09-29  0:19 UTC (permalink / raw)
  To: u-boot

Hello,

I am trying to add support for watchdog in one board and it is not
working as expected.

I did add the:

#define CONFIG_HW_WATCHDOG
#define CONFIG_IMX_WATCHDOG

into the board config file.

Into the board .c file, I added:

int board_late_init(void)
{
...
#ifdef CONFIG_HW_WATCHDOG
     hw_watchdog_init();
#endif

return 0;
}

and the hw_watchdog_init is indeed called.

It starts booting and shows:

U-Boot 2013.10-rc3-00046-gc1c2434-dirty (Sep 28 2013 - 21:12:53)

CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
Reset cause: WDOG
Board: yyyy
DRAM:  1 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
In:    serial
Out:   serial
Err:   serial
Net:?

and it in fact resets.

I am booting the board from USB loader. May it be an issue?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] i.MX6 based board does not work if watchdog support is enabled
  2013-09-29  0:19 [U-Boot] i.MX6 based board does not work if watchdog support is enabled Otavio Salvador
@ 2013-09-29  8:23 ` Michael Trimarchi
  2013-09-29 17:54   ` Otavio Salvador
  2013-09-29 16:57 ` Anatolij Gustschin
  1 sibling, 1 reply; 7+ messages in thread
From: Michael Trimarchi @ 2013-09-29  8:23 UTC (permalink / raw)
  To: u-boot

Hi

On Sun, Sep 29, 2013 at 2:19 AM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> Hello,
>
> I am trying to add support for watchdog in one board and it is not
> working as expected.
>
> I did add the:
>
> #define CONFIG_HW_WATCHDOG
> #define CONFIG_IMX_WATCHDOG
>
> into the board config file.
>
> Into the board .c file, I added:
>
> int board_late_init(void)
> {
> ...
> #ifdef CONFIG_HW_WATCHDOG
>      hw_watchdog_init();
> #endif
>
> return 0;
> }
>
> and the hw_watchdog_init is indeed called.
>
> It starts booting and shows:
>
> U-Boot 2013.10-rc3-00046-gc1c2434-dirty (Sep 28 2013 - 21:12:53)
>
> CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
> Reset cause: WDOG
> Board: yyyy
> DRAM:  1 GiB
> MMC:   FSL_SDHC: 0, FSL_SDHC: 1
> In:    serial
> Out:   serial
> Err:   serial
> Net:?
>
> and it in fact resets.
>
> I am booting the board from USB loader. May it be an issue?
>

I have read the code and briefly compare with linux one and seems the setting
on the register is ok and default is 128secs if CONFIG_WATCHDOG_TIMEOUT_MSECS
is not define.

are you sure that you don't change this define?

CONFIG_WATCHDOG_TIMEOUT_MSECS

Michael



> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] i.MX6 based board does not work if watchdog support is enabled
  2013-09-29  0:19 [U-Boot] i.MX6 based board does not work if watchdog support is enabled Otavio Salvador
  2013-09-29  8:23 ` Michael Trimarchi
@ 2013-09-29 16:57 ` Anatolij Gustschin
  2013-09-29 18:08   ` Otavio Salvador
  1 sibling, 1 reply; 7+ messages in thread
From: Anatolij Gustschin @ 2013-09-29 16:57 UTC (permalink / raw)
  To: u-boot

Hi,

On Sat, 28 Sep 2013 21:19:19 -0300
Otavio Salvador <otavio@ossystems.com.br> wrote:

> I am trying to add support for watchdog in one board and it is not
> working as expected.
> 
> I did add the:
> 
> #define CONFIG_HW_WATCHDOG
> #define CONFIG_IMX_WATCHDOG
> 
> into the board config file.
> 
> Into the board .c file, I added:
> 
> int board_late_init(void)
> {
> ...
> #ifdef CONFIG_HW_WATCHDOG
>      hw_watchdog_init();
> #endif
> 
> return 0;
> }
> 
> and the hw_watchdog_init is indeed called.
> 
> It starts booting and shows:
> 
> U-Boot 2013.10-rc3-00046-gc1c2434-dirty (Sep 28 2013 - 21:12:53)
> 
> CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
> Reset cause: WDOG
> Board: yyyy
> DRAM:  1 GiB
> MMC:   FSL_SDHC: 0, FSL_SDHC: 1
> In:    serial
> Out:   serial
> Err:   serial
> Net:?
> 
> and it in fact resets.
> 
> I am booting the board from USB loader. May it be an issue?

No, it shouldn't be an issue. Does the attached patch help?

Thanks,

Anatolij

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] i.MX6 based board does not work if watchdog support is enabled
  2013-09-29  8:23 ` Michael Trimarchi
@ 2013-09-29 17:54   ` Otavio Salvador
  0 siblings, 0 replies; 7+ messages in thread
From: Otavio Salvador @ 2013-09-29 17:54 UTC (permalink / raw)
  To: u-boot

On Sun, Sep 29, 2013 at 5:23 AM, Michael Trimarchi
<michael@amarulasolutions.com> wrote:
> On Sun, Sep 29, 2013 at 2:19 AM, Otavio Salvador
> <otavio@ossystems.com.br> wrote:
>> I am trying to add support for watchdog in one board and it is not
>> working as expected.
>>
>> I did add the:
>>
>> #define CONFIG_HW_WATCHDOG
>> #define CONFIG_IMX_WATCHDOG
>>
>> into the board config file.
>>
>> Into the board .c file, I added:
>>
>> int board_late_init(void)
>> {
>> ...
>> #ifdef CONFIG_HW_WATCHDOG
>>      hw_watchdog_init();
>> #endif
>>
>> return 0;
>> }
>>
>> and the hw_watchdog_init is indeed called.
>>
>> It starts booting and shows:
>>
>> U-Boot 2013.10-rc3-00046-gc1c2434-dirty (Sep 28 2013 - 21:12:53)
>>
>> CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
>> Reset cause: WDOG
>> Board: yyyy
>> DRAM:  1 GiB
>> MMC:   FSL_SDHC: 0, FSL_SDHC: 1
>> In:    serial
>> Out:   serial
>> Err:   serial
>> Net:?
>>
>> and it in fact resets.
>>
>> I am booting the board from USB loader. May it be an issue?
>>
>
> I have read the code and briefly compare with linux one and seems the setting
> on the register is ok and default is 128secs if CONFIG_WATCHDOG_TIMEOUT_MSECS
> is not define.
>
> are you sure that you don't change this define?

I set it originally to 10000 and later to 128000 and in the end
removed it. It kept doing it wrong.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] i.MX6 based board does not work if watchdog support is enabled
  2013-09-29 16:57 ` Anatolij Gustschin
@ 2013-09-29 18:08   ` Otavio Salvador
  2013-09-30  5:41     ` Stefano Babic
  0 siblings, 1 reply; 7+ messages in thread
From: Otavio Salvador @ 2013-09-29 18:08 UTC (permalink / raw)
  To: u-boot

On Sun, Sep 29, 2013 at 1:57 PM, Anatolij Gustschin <agust@denx.de> wrote:
> On Sat, 28 Sep 2013 21:19:19 -0300
> Otavio Salvador <otavio@ossystems.com.br> wrote:
>
>> I am trying to add support for watchdog in one board and it is not
>> working as expected.
>>
>> I did add the:
>>
>> #define CONFIG_HW_WATCHDOG
>> #define CONFIG_IMX_WATCHDOG
>>
>> into the board config file.
>>
>> Into the board .c file, I added:
>>
>> int board_late_init(void)
>> {
>> ...
>> #ifdef CONFIG_HW_WATCHDOG
>>      hw_watchdog_init();
>> #endif
>>
>> return 0;
>> }
>>
>> and the hw_watchdog_init is indeed called.
>>
>> It starts booting and shows:
>>
>> U-Boot 2013.10-rc3-00046-gc1c2434-dirty (Sep 28 2013 - 21:12:53)
>>
>> CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
>> Reset cause: WDOG
>> Board: yyyy
>> DRAM:  1 GiB
>> MMC:   FSL_SDHC: 0, FSL_SDHC: 1
>> In:    serial
>> Out:   serial
>> Err:   serial
>> Net:?
>>
>> and it in fact resets.
>>
>> I am booting the board from USB loader. May it be an issue?
>
> No, it shouldn't be an issue. Does the attached patch help?

It does fix the issue! :-)

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] i.MX6 based board does not work if watchdog support is enabled
  2013-09-29 18:08   ` Otavio Salvador
@ 2013-09-30  5:41     ` Stefano Babic
  2013-09-30 10:49       ` Anatolij Gustschin
  0 siblings, 1 reply; 7+ messages in thread
From: Stefano Babic @ 2013-09-30  5:41 UTC (permalink / raw)
  To: u-boot

Hi Antolji,

On 29/09/2013 20:08, Otavio Salvador wrote:

>>>
>>> I am booting the board from USB loader. May it be an issue?
>>
>> No, it shouldn't be an issue. Does the attached patch help?
> 
> It does fix the issue! :-)
> 

Can you resend the patch in the usual way to ML for including into
mainline ?

Thanks,
Stefano

-- 
=====================================================================
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
=====================================================================

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] i.MX6 based board does not work if watchdog support is enabled
  2013-09-30  5:41     ` Stefano Babic
@ 2013-09-30 10:49       ` Anatolij Gustschin
  0 siblings, 0 replies; 7+ messages in thread
From: Anatolij Gustschin @ 2013-09-30 10:49 UTC (permalink / raw)
  To: u-boot

Hi Stefano,

On Mon, 30 Sep 2013 07:41:46 +0200
Stefano Babic <sbabic@denx.de> wrote:
... 
> Can you resend the patch in the usual way to ML for including into
> mainline ?

yes, I can resend it.

Thanks,

Anatolij

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-09-30 10:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-29  0:19 [U-Boot] i.MX6 based board does not work if watchdog support is enabled Otavio Salvador
2013-09-29  8:23 ` Michael Trimarchi
2013-09-29 17:54   ` Otavio Salvador
2013-09-29 16:57 ` Anatolij Gustschin
2013-09-29 18:08   ` Otavio Salvador
2013-09-30  5:41     ` Stefano Babic
2013-09-30 10:49       ` Anatolij Gustschin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox