Hi Florian,

Florian Fainelli wrote:
> Hi Aleksandar,
>
> Le Wednesday 21 January 2009 13:02:19 Aleksandar Radovanovic, vous avez 
> écrit :
>   
>> Hi,
>>
>> I'm trying to write a driver for my wl-500gP to export the watchdog
>> timer on BCM4712 to userspace, via /dev/watchdog.
>>
>> Since I have no access to chip datasheets, I've been digging through
>> SSB code, trying to figure out a a way to manipulate the watchdog.
>>
>> The problem is that, if I use ssb_watchdog_timer_set(), it will trigger
>> a reboot almost immediately for all valid values of the WDT register,
>> as WDT is apparently clocked by the SSB backplane clock
>> (something like 133 MHz, if I'm right).
>>     
>
> Yeah, if you are setting the timeout counting in HZ instead of SSB_HZ, the 
> timeout is too small and therefore the watchdog will trigger a software reset 
> which for you seems to be immediate.
>
>   
Yep, I've already tried multiplying the timeout with ssb_clockspeed(...)
(which is 132000000), but it didn't do the trick. I've also tried
loading the WDT register
with 0xfffffff, which should (my naive assumption) be the max possible
timeout and
it's still too short.
>> Anyway, I need timeouts in the range of up to several tens of seconds
>> for the watchdog to be useful in userspace.
>>
>> Does anyone know of a way to pre-scale the WDT register or otherwise
>> extend the timeout?
>>     
>
> You might want to have a look at the bcm63xx watchdog driver, which I hope, 
> should give you a good insight of how broadcom possibly designed its watchdog 
> IP.
>
> See: 
> https://dev.openwrt.org/browser/trunk/target/linux/brcm63xx/files/drivers/watchdog/bcm63xx_wdt.c
>
>   
bcm63xx seems to be (from what I've found on the wiki) an entirely
different beast to 47xx, i.e.
it doesn't have a (visible) SSB backplane, and, at first glance, WDT
register layout and commands
don't resemble that of 47xx.
> There are also some bcm5325 pdfs on the internet which I am sure you can find 
> the link to in the wiki.
>   
No luck finding any... BTW isn't 5325 an Ethernet switch?

Anyway, thanks a lot for your help, will keep trying...

Aleksandar


_______________________________________________
openwrt-devel mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to