diff --git a/configs/cloudctrl/src/Makefile b/configs/cloudctrl/src/Makefile index f18f63eba3..f0ee184e64 100644 --- a/configs/cloudctrl/src/Makefile +++ b/configs/cloudctrl/src/Makefile @@ -73,10 +73,6 @@ ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_STM32_PHYINIT),y) CSRCS += stm32_phyinit.c endif diff --git a/configs/fire-stm32v2/src/Makefile b/configs/fire-stm32v2/src/Makefile index c9c97c43e8..ea45dc7623 100644 --- a/configs/fire-stm32v2/src/Makefile +++ b/configs/fire-stm32v2/src/Makefile @@ -72,8 +72,4 @@ ifeq ($(CONFIG_USBDEV_COMPOSITE),y) CSRCS += stm32_composite.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - include $(TOPDIR)/configs/Board.mk diff --git a/configs/hymini-stm32v/src/Makefile b/configs/hymini-stm32v/src/Makefile index f4a6dc2603..f709a57b8d 100644 --- a/configs/hymini-stm32v/src/Makefile +++ b/configs/hymini-stm32v/src/Makefile @@ -59,8 +59,4 @@ ifeq ($(CONFIG_USBMSC),y) CSRCS += stm32_usbmsc.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - include $(TOPDIR)/configs/Board.mk diff --git a/configs/maple/src/Makefile b/configs/maple/src/Makefile index 99f214e5ea..b919138108 100644 --- a/configs/maple/src/Makefile +++ b/configs/maple/src/Makefile @@ -52,10 +52,6 @@ endif ifeq ($(CONFIG_USBMSC),y) endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += stm32_appinit.c endif diff --git a/configs/mikroe-stm32f4/src/Makefile b/configs/mikroe-stm32f4/src/Makefile index d19eda17f7..3fba8bdc71 100644 --- a/configs/mikroe-stm32f4/src/Makefile +++ b/configs/mikroe-stm32f4/src/Makefile @@ -58,10 +58,6 @@ ifeq ($(CONFIG_QENCODER),y) CSRCS += stm32_qencoder.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += stm32_appinit.c endif diff --git a/configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h b/configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h index 9cd4a9ab68..791be9c596 100644 --- a/configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h +++ b/configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h @@ -1,7 +1,7 @@ /************************************************************************************ * configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Bob Doiron * @@ -229,5 +229,21 @@ int sam_timerinitialize(void); # define sam_timerinitialize() (0) #endif +/**************************************************************************** + * Name: sam_watchdog_initialize() + * + * Description: + * Perform architecture-specific initialization of the Watchdog hardware. + * + * Input parameters: + * None + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +int sam_watchdog_initialize(void); + #endif /* __ASSEMBLY__ */ #endif /* __CONFIGS_SAM4S_XPLAINED_SRC_SAM4S_XPLAINED_H */ diff --git a/configs/sam4s-xplained-pro/src/sam_boot.c b/configs/sam4s-xplained-pro/src/sam_boot.c index f8caef92c0..ce7ae2fad3 100644 --- a/configs/sam4s-xplained-pro/src/sam_boot.c +++ b/configs/sam4s-xplained-pro/src/sam_boot.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/sam4s-xplained-pro/src/sam_boot.c * - * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -97,7 +97,7 @@ void board_initialize(void) #if (defined(CONFIG_SAM34_WDT) && !defined(CONFIG_WDT_DISABLE_ON_RESET)) /* Configure watchdog timer and enable kicker kernel thread. */ - DEBUGASSERT(up_wdginitialize() >= 0); + DEBUGASSERT(sam_watchdog_initialize() >= 0); #endif #ifndef CONFIG_ARCH_LEDS diff --git a/configs/sam4s-xplained-pro/src/sam_wdt.c b/configs/sam4s-xplained-pro/src/sam_wdt.c index 5ce6cc25df..4696db19ee 100644 --- a/configs/sam4s-xplained-pro/src/sam_wdt.c +++ b/configs/sam4s-xplained-pro/src/sam_wdt.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/sam4s-xplained-pro/src/up_watchdog.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Bob Doiron * @@ -164,7 +164,7 @@ errout: #endif /**************************************************************************** - * Name: up_wdginitialize() + * Name: sam_watchdog_initialize() * * Description: * Perform architecture-specific initialization of the Watchdog hardware. @@ -173,7 +173,7 @@ errout: * ****************************************************************************/ -int up_wdginitialize(void) +int sam_watchdog_initialize(void) { #if (defined(CONFIG_SAM34_WDT) && !defined(CONFIG_WDT_DISABLE_ON_RESET)) int fd; diff --git a/configs/shenzhou/src/Makefile b/configs/shenzhou/src/Makefile index 15458ca938..beecc84582 100644 --- a/configs/shenzhou/src/Makefile +++ b/configs/shenzhou/src/Makefile @@ -80,10 +80,6 @@ ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - # NOTE: SSD1289 is not supported on the board ifeq ($(CONFIG_LCD_SSD1289),y) diff --git a/configs/spark/src/Makefile b/configs/spark/src/Makefile index 5a375120db..51ee3a0280 100644 --- a/configs/spark/src/Makefile +++ b/configs/spark/src/Makefile @@ -69,10 +69,6 @@ ifeq ($(CONFIG_WL_CC3000),y) CSRCS += stm32_wireless.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_CC3000_PROBES),) CSRCS += stm32_io.c endif diff --git a/configs/stm3210e-eval/src/Makefile b/configs/stm3210e-eval/src/Makefile index 301f0eed9d..dc282c48b6 100644 --- a/configs/stm3210e-eval/src/Makefile +++ b/configs/stm3210e-eval/src/Makefile @@ -68,10 +68,6 @@ ifeq ($(CONFIG_CAN),y) CSRCS += stm32_can.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_ARCH_CUSTOM_PMINIT),y) CSRCS += stm32_pm.c endif diff --git a/configs/stm3220g-eval/src/Makefile b/configs/stm3220g-eval/src/Makefile index fe48b22317..a823e9388e 100644 --- a/configs/stm3220g-eval/src/Makefile +++ b/configs/stm3220g-eval/src/Makefile @@ -72,10 +72,6 @@ ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += stm32_appinit.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_INPUT_STMPE811),y) CSRCS += stm32_stmpe811.c endif diff --git a/configs/stm3240g-eval/src/Makefile b/configs/stm3240g-eval/src/Makefile index 8035987fb3..28b1b4f702 100644 --- a/configs/stm3240g-eval/src/Makefile +++ b/configs/stm3240g-eval/src/Makefile @@ -77,10 +77,6 @@ ifeq ($(CONFIG_ARCH_FPU),y) CSRCS += stm32_ostest.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_INPUT_STMPE811),y) CSRCS += stm32_stmpe811.c endif diff --git a/configs/stm32_tiny/src/Makefile b/configs/stm32_tiny/src/Makefile index a29dd097b2..14ee306846 100644 --- a/configs/stm32_tiny/src/Makefile +++ b/configs/stm32_tiny/src/Makefile @@ -51,8 +51,4 @@ ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += stm32_appinit.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - include $(TOPDIR)/configs/Board.mk diff --git a/configs/stm32f3discovery/src/Makefile b/configs/stm32f3discovery/src/Makefile index cac567aa4c..119bca3f59 100644 --- a/configs/stm32f3discovery/src/Makefile +++ b/configs/stm32f3discovery/src/Makefile @@ -60,10 +60,6 @@ ifeq ($(CONFIG_QENCODER),y) CSRCS += stm32_qencoder.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += stm32_appinit.c endif diff --git a/configs/stm32f4discovery/src/Makefile b/configs/stm32f4discovery/src/Makefile index b607925bce..58d3e7c487 100644 --- a/configs/stm32f4discovery/src/Makefile +++ b/configs/stm32f4discovery/src/Makefile @@ -92,10 +92,6 @@ ifeq ($(CONFIG_QENCODER),y) CSRCS += stm32_qencoder.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_NSH_LIBRARY),y) CSRCS += stm32_appinit.c endif diff --git a/configs/stm32ldiscovery/src/Makefile b/configs/stm32ldiscovery/src/Makefile index 7e17afc3d6..84f146b7cb 100644 --- a/configs/stm32ldiscovery/src/Makefile +++ b/configs/stm32ldiscovery/src/Makefile @@ -60,10 +60,6 @@ ifeq ($(CONFIG_QENCODER),y) CSRCS += stm32_qencoder.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += stm32_appinit.c endif diff --git a/include/nuttx/timers/watchdog.h b/include/nuttx/timers/watchdog.h index a9ebc1f810..9c7d9001fa 100644 --- a/include/nuttx/timers/watchdog.h +++ b/include/nuttx/timers/watchdog.h @@ -203,9 +203,6 @@ extern "C" #define EXTERN extern #endif -/**************************************************************************** - * "Upper-Half" Watchdog Driver Interfaces - ****************************************************************************/ /**************************************************************************** * Name: watchdog_register * @@ -217,9 +214,8 @@ extern "C" * When this function is called, the "lower half" driver should be in the * disabled state (as if the stop() method had already been called). * - * NOTE: Normally, this function would not be called by application code. - * Rather it is called indirectly through the architecture-specific - * interface up_wdginitialize() described below. + * NOTE: This function would not be called by application code. Rather it is + * called indirectly through the architecture-specific interfaces. * * Input parameters: * dev path - The full path to the driver to be registers in the NuttX @@ -256,35 +252,6 @@ FAR void *watchdog_register(FAR const char *path, void watchdog_unregister(FAR void *handle); -/**************************************************************************** - * Platform-Independent "Lower-Half" Watchdog Driver Interfaces - ****************************************************************************/ - -/**************************************************************************** - * Architecture-specific Application Interfaces - ****************************************************************************/ - -/**************************************************************************** - * Name: up_wdginitialize() - * - * Description: - * Perform architecture-specific initialization of the Watchdog hardware. - * This interface should be provided by all configurations using - * to avoid exposed platform-dependent logic. - * - * At a minimum, this function should call watchdog_register() which is - * described above. - * - * Input parameters: - * None - * - * Returned Value: - * Zero on success; a negated errno value on failure. - * - ****************************************************************************/ - -int up_wdginitialize(void); - #undef EXTERN #ifdef __cplusplus }