[U-Boot] mcf5445x watchdog support in U-Boot

Matthew Lear matt at bubblegen.co.uk
Wed Jun 24 14:32:14 CEST 2009


Hello TsiChung.

I have added watchdog support in U-Boot for MCF5445x devices using the
M54455 EVB platform to test. I can send you a patch if you wish (the
timeout is hard coded to 16 secs at the moment)?

However, I am having trouble when U-Boot starts Linux in the case when the
watchdog has been enabled in U-Boot. Basically, Linux seems to crash
before it gets a chance to print anything on the console - but, control
appears to have left U-Boot.

Building U-Boot with debug, it displays:

## Transferring control to Linux (at address 40020000) ...
BIV

Then it's dead after which the watchdog times out and causes a cpu reset.

Building U-Boot without debug I get the following:

*** Unexpected exception ***
Vector Number: 4  Format: 04  Fault Status: 0

PC: 4fdbfdc8    SR: 00002700    SP: 4fd72a64
D0: 00000004    D1: 000003f9    D2: 4fdb4202    D3: 004fa3da
D4: 00000000    D5: 4fdc7c8c    D6: 122c0034    D7: 4fd82f76
A0: 4033cb98    A1: 4025aa39    A2: 40020000    A3: 4fdbfdc8
A4: 00000000    A5: 4fdc5800    A6: 4fd72afb

*** Please Reset Board! ***

Then again, the watchdog times out and causes a cpu reset.

It definitely appears as though Linux has been started but I cannot tell
what has actually happened. I think it's possible that something in the
Linux setup has caused (or contributed to) the crash. The problem does not
happen if the watchdog support is disabled by #undefining CONFIG_WATCHDOG.

It certainly seems that U-Boot is not responsible for the crash. Do you
have any thoughts on this? I'd appreciate a bit of help.

Rgds,
--  Matt


> Hi TsiChung,
>
> I can supply you my patch for a watchdog driver implementation for 5445x
> to test with if you like? I've not fed it back to Freescale yet. Will do
> though. It's based on 2.6.29.
>
> Is there a mechanism to allow U-Boot to indicate to Linux that it has
> enabled the watchdog (eg as part of the bd_info struct maybe)? Just a
> thought... It could then be kicked at kernel arch init and then repeatedly
> by Linux user space via /dev/watchdog if required by the application. The
> reason I suggested kicking the watchdog in arch init is to give Linux a
> chance to boot (kernel and user) before the watchdog times out. Obviously
> several things could prevent this (eg tasks that take time before user
> space starts for example fsck etc).
>
> I'm sure other U-Boot developers/maintainers have thought about this..?
> Thoughts?
>
> In any case, I need to enable the watchdog in U-Boot for a mcf54451 based
> platform because need it in our system (we're using an mcf54455 evb as
> reference hw). I'm happy to help in the development / testing etc. Please
> just let me know.
>
> Best regards,
> --  Matt
>
>
>> Matt,
>>
>> Yes. I am planning to enable watchdog in mcf5445x in u-boot. Need to
>> investigate more in booting linux and the transition to starting the
>> linux kernel of watchdog behavior to make sure it is not causing problem
>> to the linux kernel.
>>
>> Best Regards,
>> TsiChung
>>
>>
>> -----Original Message-----
>> From: Matthew Lear [mailto:matt at bubblegen.co.uk]
>> Sent: Monday, June 15, 2009 7:59 AM
>> To: Liew Tsi Chung-R5AAHP; u-boot at lists.denx.de
>> Subject: mcf5445x watchdog support in U-Boot
>>
>> Hi TsiChung et al,
>>
>> I was wondering if there are plans to support and utilise the watchdog
>> in the mcf5445x devices within U-Boot?
>>
>> I've ported a kernel driver from the bitshrine gpp
>> (http://www.bitshrine.org/gpp/linux-2.6.25-mcfv4e-watchdog.patch) so
>> that it hooks into my 54455 hw (Freescale EVB), however I'd like to
>> configure and enable the watchdog in U-Boot with the intention that once
>> Linux starts, the responsibility of kicking the watchdog resides with a
>> user space app -> driver.
>>
>> Thoughts?
>>
>> Much appreciated.
>> --  Matt
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>>
>>
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
>




More information about the U-Boot mailing list