From 2c5eac1e1820163d3776e1f842550bfc4a88d136 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 1 Oct 2018 12:22:11 -0600 Subject: Makefile: Add a warning if SPL/TPL cannot be built At present the build fails in strange ways if CONFIG_SPL is defined by CONFIG_SUPPORT_SPL is not. Add a warning for this case as it can be very confusing to debug. Signed-off-by: Simon Glass --- scripts/Makefile.spl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scripts') diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index e494d185e4b..c71497ff008 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -45,6 +45,13 @@ SPL_ := SPL_TPL_ := endif +ifeq ($(obj)$(CONFIG_SUPPORT_SPL),spl) +$(error You cannot build SPL without enabling CONFIG_SUPPORT_SPL) +endif +ifeq ($(obj)$(CONFIG_SUPPORT_TPL),tpl) +$(error You cannot build TPL without enabling CONFIG_SUPPORT_TPL) +endif + include $(srctree)/config.mk include $(srctree)/arch/$(ARCH)/Makefile -- cgit v1.3.1 From 107610775b9b1fd96a1dc6375219f590c0d06bb4 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 1 Oct 2018 12:22:14 -0600 Subject: Kconfig: Convert CONFIG_RTC_MC146818 to Kconfig Move this option to Kconfig and tidy up the two boards which use it. Signed-off-by: Simon Glass --- configs/edison_defconfig | 1 + configs/malta64_defconfig | 1 + configs/malta64el_defconfig | 1 + configs/malta_defconfig | 1 + configs/maltael_defconfig | 1 + drivers/rtc/Kconfig | 8 ++++++++ include/configs/edison.h | 1 - include/configs/malta.h | 1 - scripts/config_whitelist.txt | 1 - 9 files changed, 13 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/configs/edison_defconfig b/configs/edison_defconfig index f0f3449464c..eb9f9a089f1 100644 --- a/configs/edison_defconfig +++ b/configs/edison_defconfig @@ -33,6 +33,7 @@ CONFIG_CPU=y CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DM_PCI_COMPAT=y +CONFIG_RTC_MC146818=y CONFIG_USB_DWC3_GADGET=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Intel" diff --git a/configs/malta64_defconfig b/configs/malta64_defconfig index c509581ee80..99503260115 100644 --- a/configs/malta64_defconfig +++ b/configs/malta64_defconfig @@ -23,4 +23,5 @@ CONFIG_DEFAULT_DEVICE_TREE="mti,malta" CONFIG_ENV_IS_IN_FLASH=y CONFIG_MTD_NOR_FLASH=y CONFIG_PCI=y +CONFIG_RTC_MC146818=y CONFIG_SYS_NS16550=y diff --git a/configs/malta64el_defconfig b/configs/malta64el_defconfig index 992c855579d..63989ce2888 100644 --- a/configs/malta64el_defconfig +++ b/configs/malta64el_defconfig @@ -24,4 +24,5 @@ CONFIG_DEFAULT_DEVICE_TREE="mti,malta" CONFIG_ENV_IS_IN_FLASH=y CONFIG_MTD_NOR_FLASH=y CONFIG_PCI=y +CONFIG_RTC_MC146818=y CONFIG_SYS_NS16550=y diff --git a/configs/malta_defconfig b/configs/malta_defconfig index 585440584ee..8265daec8e7 100644 --- a/configs/malta_defconfig +++ b/configs/malta_defconfig @@ -22,4 +22,5 @@ CONFIG_DEFAULT_DEVICE_TREE="mti,malta" CONFIG_ENV_IS_IN_FLASH=y CONFIG_MTD_NOR_FLASH=y CONFIG_PCI=y +CONFIG_RTC_MC146818=y CONFIG_SYS_NS16550=y diff --git a/configs/maltael_defconfig b/configs/maltael_defconfig index 9cba7229f1a..c9c4c8fd4bd 100644 --- a/configs/maltael_defconfig +++ b/configs/maltael_defconfig @@ -23,4 +23,5 @@ CONFIG_DEFAULT_DEVICE_TREE="mti,malta" CONFIG_ENV_IS_IN_FLASH=y CONFIG_MTD_NOR_FLASH=y CONFIG_PCI=y +CONFIG_RTC_MC146818=y CONFIG_SYS_NS16550=y diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 54365092ec4..97cf7d84dfa 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -68,4 +68,12 @@ config RTC_S35392A help Enable s35392a driver which provides rtc get and set function. +config RTC_MC146818 + bool "Enable MC146818 driver" + help + This is a widely used real-time clock chip originally by Motorola + and now available from NXP. It includes a battery-backed real-time + clock with a wide array of features and 50 bytes of general-purpose, + battery-backed RAM. The driver supports access to the clock and RAM. + endmenu diff --git a/include/configs/edison.h b/include/configs/edison.h index 476f5e38b4b..86c584d73dc 100644 --- a/include/configs/edison.h +++ b/include/configs/edison.h @@ -48,6 +48,5 @@ /* RTC */ #define CONFIG_SYS_ISA_IO_BASE_ADDRESS 0 -#define CONFIG_RTC_MC146818 #endif diff --git a/include/configs/malta.h b/include/configs/malta.h index ba3639d177e..520b9870601 100644 --- a/include/configs/malta.h +++ b/include/configs/malta.h @@ -19,7 +19,6 @@ #define CONFIG_PCNET_79C973 #define PCNET_HAS_PROM -#define CONFIG_RTC_MC146818 #define CONFIG_SYS_ISA_IO_BASE_ADDRESS 0 /* diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index e805b1e6b36..b85c35b7af3 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1673,7 +1673,6 @@ CONFIG_RTC_IMXDI CONFIG_RTC_M41T11 CONFIG_RTC_M41T62 CONFIG_RTC_MC13XXX -CONFIG_RTC_MC146818 CONFIG_RTC_MCFRRTC CONFIG_RTC_MCP79411 CONFIG_RTC_MXS -- cgit v1.3.1 From 44093a1554be9ca4d4e964710537a3d0014909b9 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 1 Oct 2018 12:22:43 -0600 Subject: fdt: Allow C++ comments in link scripts and DT files At present // in a device-tree file or link script causes a warning. But this is used in the standard license header. Update the compiler flags to use C99, which permits this. Signed-off-by: Simon Glass --- Makefile | 2 +- scripts/Makefile.spl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/Makefile b/Makefile index 3f2d494c4f9..aadd1ec8c69 100644 --- a/Makefile +++ b/Makefile @@ -1524,7 +1524,7 @@ $(defaultenv_h): $(CONFIG_DEFAULT_ENV_FILE:"%"=%) FORCE # --------------------------------------------------------------------------- quiet_cmd_cpp_lds = LDS $@ cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) \ - -D__ASSEMBLY__ -x assembler-with-cpp -P -o $@ $< + -D__ASSEMBLY__ -x assembler-with-cpp -std=c99 -P -o $@ $< u-boot.lds: $(LDSCRIPT) prepare FORCE $(call if_changed_dep,cpp_lds) diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index c71497ff008..7416abec62e 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -371,7 +371,7 @@ $(u-boot-spl-dirs): $(u-boot-spl-platdata) quiet_cmd_cpp_lds = LDS $@ cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \ - -D__ASSEMBLY__ -x assembler-with-cpp -P -o $@ $< + -D__ASSEMBLY__ -x assembler-with-cpp -std=c99 -P -o $@ $< $(obj)/u-boot-spl.lds: $(LDSCRIPT) FORCE $(call if_changed_dep,cpp_lds) -- cgit v1.3.1