From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Wed, 8 Aug 2012 01:11:15 -0400 Subject: [U-Boot] [PATCH 13/16] Blackfin: Bf60x: add hw watchdog support In-Reply-To: <1344326875-348-13-git-send-email-lliubbo@gmail.com> References: <1344326875-348-1-git-send-email-lliubbo@gmail.com> <1344326875-348-13-git-send-email-lliubbo@gmail.com> Message-ID: <201208080111.17162.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday 07 August 2012 04:07:52 Bob Liu wrote: > --- a/arch/blackfin/cpu/initcode.c > +++ b/arch/blackfin/cpu/initcode.c > > if (CONFIG_BFIN_BOOT_MODE != BFIN_BOOT_BYPASS) { > serial_putc('e'); > +#ifdef __ADSPBF60x__ > + int i; > + bfin_write_SEC_GCTL(0x2); > + while (i++ < 100000); > + bfin_write_SEC_FCTL(0xc1); > + bfin_write_SEC_SCTL(2, bfin_read_SEC_SCTL(2) | 0x6); > + > + bfin_write_SEC_CCTL(0x2); > + while (i++ < 100000); > + bfin_write_SEC_GCTL(0x1); > + bfin_write_SEC_CCTL(0x1); > +#endif err, this doesn't look like hardware watchdog ... this is the interrupt controller isn't it ? those while() loops also won't fly -- you need to use a proper sync function here. certainly not without comments as to what's going on. > --- a/arch/blackfin/cpu/start.S > +++ b/arch/blackfin/cpu/start.S > @@ -65,6 +65,7 @@ ENTRY(_start) > p5.h = HI(COREMMR_BASE); > > #ifdef CONFIG_HW_WATCHDOG > +#ifndef __ADSPBF60x__ > # ifndef CONFIG_HW_WATCHDOG_TIMEOUT_START > # define CONFIG_HW_WATCHDOG_TIMEOUT_START 5000 > # endif > @@ -78,6 +79,7 @@ ENTRY(_start) > /* fire up the watchdog - R0.L above needs to be 0x0000 */ > W[p4 + (WDOG_CTL - SYSMMR_BASE)] = r0; > #endif > +#endif you need to implement the bf60x equivalent here and not just disable the bf5xx code -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. URL: