Fixed Make.defs in s5j and added necessary config flags to remove build error due...
authorShivam Garg <garg.shivam@samsung.com>
Mon, 18 Sep 2017 04:57:44 +0000 (13:57 +0900)
committerShivam Garg <garg.shivam@samsung.com>
Mon, 18 Sep 2017 14:03:35 +0000 (23:03 +0900)
os/arch/arm/src/artik053/src/artik053_boot.c
os/arch/arm/src/s5j/Kconfig
os/arch/arm/src/s5j/Make.defs
os/arch/arm/src/s5j/s5j_boot.c
os/arch/arm/src/s5j/s5j_watchdog.c

index e069c13..3dfeb58 100644 (file)
@@ -202,10 +202,12 @@ static void board_audio_initialize(void)
 
 static void board_wdt_initialize(void)
 {
+#ifdef CONFIG_S5J_WATCHDOG
 #ifdef CONFIG_WATCHDOG
        s5j_wdg_initialize(CONFIG_WATCHDOG_DEVPATH);
        putreg32(0x40C, 0x80090000);
 #endif
+#endif
 }
 
 /*****************************************************************************
index 3d88a71..fd7ba23 100644 (file)
@@ -323,7 +323,6 @@ config S5J_SPI
 config S5J_WATCHDOG
        bool "Watchdog"
        depends on S5J_HAVE_WATCHDOG
-       select WATCHDOG
        default n
 
 menu "Watchdog driver configuration"
index 28deeaf..ce2cc41 100644 (file)
@@ -119,10 +119,12 @@ CHIP_CSRCS += s5j_serial.c
 CHIP_CSRCS += s5j_mac.c
 CHIP_CSRCS += s5j_systemreset.c
 
+ifeq ($(CONFIG_S5J_WATCHDOG),y)
 CHIP_CSRCS += s5j_watchdog.c
 ifeq ($(CONFIG_WATCHDOG),y)
 CHIP_CSRCS += s5j_watchdog_lowerhalf.c
 endif
+endif
 
 CHIP_CSRCS += s5j_gpio.c
 ifeq ($(CONFIG_GPIO),y)
index 8b78154..c59f840 100644 (file)
@@ -180,7 +180,9 @@ void arm_boot(void)
        up_copyvectorblock();
 
        /* Disable the watchdog timer */
+#ifdef CONFIG_S5J_WATCHDOG
        s5j_watchdog_disable();
+#endif
 
 #ifdef CONFIG_ARMV7R_MEMINIT
        /* Initialize the .bss and .data sections as well as RAM functions
index cba1710..539b687 100644 (file)
@@ -101,7 +101,6 @@ void s5j_watchdog_disable(void)
        putreg32(wtcon, S5J_WDT_WTCON);
 }
 
-#ifdef CONFIG_S5J_WATCHDOG
 /****************************************************************************
  * Name: s5j_watchdog_enable
  *
@@ -250,4 +249,3 @@ void s5j_watchdog_clear_int(void)
 {
        putreg32(0xffffffff, S5J_WDT_WTCLRINT);
 }
-#endif