* [U-Boot-Users] mpc83xx watchdog
@ 2006-11-09 16:51 David Updegraff
2006-11-09 17:07 ` Wolfgang Denk
2006-11-09 17:15 ` Timur Tabi
0 siblings, 2 replies; 4+ messages in thread
From: David Updegraff @ 2006-11-09 16:51 UTC (permalink / raw)
To: u-boot
Hi.
Watchdog could work with this.
-dbu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wd.patch
Type: text/x-patch
Size: 914 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20061109/56743104/attachment.bin
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] mpc83xx watchdog
2006-11-09 16:51 [U-Boot-Users] mpc83xx watchdog David Updegraff
@ 2006-11-09 17:07 ` Wolfgang Denk
2006-11-09 17:15 ` Timur Tabi
1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2006-11-09 17:07 UTC (permalink / raw)
To: u-boot
In message <eivm9p$njd$2@sea.gmane.org> you wrote:
>
> Watchdog could work with this.
Maybe. But I have to reject the patch because of coding style
problems. Please indent by TABs.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Accident: A condition in which presence of mind is good, but absence
of body is better.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] mpc83xx watchdog
2006-11-09 16:51 [U-Boot-Users] mpc83xx watchdog David Updegraff
2006-11-09 17:07 ` Wolfgang Denk
@ 2006-11-09 17:15 ` Timur Tabi
2006-11-09 17:27 ` David Updegraff
1 sibling, 1 reply; 4+ messages in thread
From: Timur Tabi @ 2006-11-09 17:15 UTC (permalink / raw)
To: u-boot
David Updegraff wrote:
> Hi.
>
> Watchdog could work with this.
A patch that does something similar is already in Freescale's 83xx tree that
is waiting for Wolfgang to pull.
Here's the relevant bit:
@@ -150,9 +213,21 @@ unsigned long get_tbclk(void)
#if defined(CONFIG_WATCHDOG)
void watchdog_reset (void)
{
- hang(); /* FIXME: implement watchdog_reset()? */
+#ifdef CONFIG_MPC834X
+ int re_enable = disable_interrupts();
+
+ /* Reset the 83xx watchdog */
+ volatile immap_t *immr = (immap_t *) CFG_IMMRBAR;
+ immr->wdt.swsrr = 0x556c;
+ immr->wdt.swsrr = 0xaa39;
+
+ if (re_enable)
+ enable_interrupts ();
+#else
+ hang();
+#endif
}
-#endif /* CONFIG_WATCHDOG */
+#endif
We don't have any changes for start.S, though. Also, our tree renames
CFG_IMMRBAR to CFG_IMMR.
I'm going to NACK your patch, simply because it's incompatible with ours. I'm
willing to work with you to fix that, though, if you like.
--
Timur Tabi
Linux Kernel Developer @ Freescale
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] mpc83xx watchdog
2006-11-09 17:15 ` Timur Tabi
@ 2006-11-09 17:27 ` David Updegraff
0 siblings, 0 replies; 4+ messages in thread
From: David Updegraff @ 2006-11-09 17:27 UTC (permalink / raw)
To: u-boot
Timur
Good to hear you already have one; fine by me.
But.. I dont know how it can work w/o the tweek to start.S, since by my
reading of the PPC 603 asm.ref., the existing instruction there will not
accept full 16bit value. Did you have another workaround for it?
> David Updegraff wrote:
>> Hi.
>>
>> Watchdog could work with this.
>
> A patch that does something similar is already in Freescale's 83xx tree
> that is waiting for Wolfgang to pull.
>
> Here's the relevant bit:
>
> @@ -150,9 +213,21 @@ unsigned long get_tbclk(void)
> #if defined(CONFIG_WATCHDOG)
> void watchdog_reset (void)
> {
> - hang(); /* FIXME: implement watchdog_reset()? */
> +#ifdef CONFIG_MPC834X
> + int re_enable = disable_interrupts();
> +
> + /* Reset the 83xx watchdog */
> + volatile immap_t *immr = (immap_t *) CFG_IMMRBAR;
> + immr->wdt.swsrr = 0x556c;
> + immr->wdt.swsrr = 0xaa39;
> +
> + if (re_enable)
> + enable_interrupts ();
> +#else
> + hang();
> +#endif
> }
> -#endif /* CONFIG_WATCHDOG */
> +#endif
>
>
> We don't have any changes for start.S, though. Also, our tree renames
> CFG_IMMRBAR to CFG_IMMR.
>
> I'm going to NACK your patch, simply because it's incompatible with
> ours. I'm willing to work with you to fix that, though, if you like.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-11-09 17:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-09 16:51 [U-Boot-Users] mpc83xx watchdog David Updegraff
2006-11-09 17:07 ` Wolfgang Denk
2006-11-09 17:15 ` Timur Tabi
2006-11-09 17:27 ` David Updegraff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox