From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Thu, 09 Nov 2006 11:15:19 -0600 Subject: [U-Boot-Users] mpc83xx watchdog In-Reply-To: References: Message-ID: <45536227.1080506@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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