From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Date: Mon, 28 Sep 2009 09:28:40 -0500 Subject: [U-Boot] [PATCH] arm:kirkwood: Add hardware watchdog support for Marvell Kirkwood boards In-Reply-To: <20090928153638.3067fff2@marrow.netinsight.se> References: <1254121586-26903-1-git-send-email-simon.kagstrom@netinsight.net> <4AC0ADD0.80402@windriver.com> <20090928153638.3067fff2@marrow.netinsight.se> Message-ID: <4AC0C818.7080503@windriver.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Simon Kagstrom wrote: > On Mon, 28 Sep 2009 07:36:32 -0500 > Tom wrote: > >>> +void hw_watchdog_reset(void) >>> +{ >>> + unsigned long time = CONFIG_SYS_TCLK * watchdog_timeout; >>> diff --git a/include/asm-arm/arch-kirkwood/cpu.h b/include/asm-arm/arch-kirkwood/cpu.h >>> index b3022a3..df49c3f 100644 >>> --- a/include/asm-arm/arch-kirkwood/cpu.h >>> +++ b/include/asm-arm/arch-kirkwood/cpu.h >>> @@ -165,5 +165,7 @@ int kw_config_mpp(unsigned int mpp0_7, unsigned int mpp8_15, >>> unsigned int mpp32_39, unsigned int mpp40_47, >>> unsigned int mpp48_55); >>> unsigned int kw_winctrl_calcsize(unsigned int sizeval); >>> +void kw_watchdog_init(unsigned long timeout_secs); >> You should add hw_watchdog_reset to H the file or declare it static. > > It's a public interface and defined in include/watchdog.h (this is > what's being called by WATCHDOG_RESET), but I'll submit a new patch > which includes this. Yes thanks. My mistake. A new patch is not needed. > >> You may want to add #define stubs to handle the ifndef CONFIG_HW_WATCHDOG. > > I'm afraid I don't understand this comment though, what is the > suggestion here? > > // Simon Something like this is already being done in watchdog.h So it it not needed. #ifdef CONFIG_HW_WATCHDOG #if defined(__ASSEMBLY__) #define WATCHDOG_RESET bl hw_watchdog_reset #else extern void hw_watchdog_reset(void); #define WATCHDOG_RESET hw_watchdog_reset #endif /* __ASSEMBLY__ */ #else /* * No hardware or software watchdog. */ #if defined(__ASSEMBLY__) #define WATCHDOG_RESET /*XXX DO_NOT_DEL_THIS_COMMENT*/ #else ----> stub #define WATCHDOG_RESET() {} #endif /* __ASSEMBLY__ */ #endif /* CONFIG_WATCHDOG && !__ASSEMBLY__ */ #endif /* CONFIG_HW_WATCHDOG */ Thanks for making your changes clear to me. Ack-ed Tom