From bcee8d6764f9215f16b393a35581000178633254 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 6 Dec 2019 21:41:35 -0700 Subject: dm: gpio: Allow control of GPIO uclass in SPL At present if CONFIG_SPL_GPIO_SUPPORT is enabled then the GPIO uclass is included in SPL/TPL without any control for boards. Some boards may want to disable this to reduce code size where GPIOs are not needed in SPL or TPL. Add a new Kconfig option to permit this. Default it to 'y' so that existing boards work correctly. Change existing uses of CONFIG_DM_GPIO to CONFIG_IS_ENABLED(DM_GPIO) to preserve the current behaviour. Also update the 74x164 GPIO driver since it cannot build with SPL. This allows us to remove the hacks in config_uncmd_spl.h and Makefile.uncmd_spl (eventually those files should be removed). Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- scripts/Makefile.uncmd_spl | 1 - 1 file changed, 1 deletion(-) (limited to 'scripts') diff --git a/scripts/Makefile.uncmd_spl b/scripts/Makefile.uncmd_spl index ba267d9ac6e..6ea097d36dd 100644 --- a/scripts/Makefile.uncmd_spl +++ b/scripts/Makefile.uncmd_spl @@ -6,7 +6,6 @@ ifdef CONFIG_SPL_BUILD ifndef CONFIG_SPL_DM CONFIG_DM_SERIAL= -CONFIG_DM_GPIO= CONFIG_DM_I2C= CONFIG_DM_SPI= CONFIG_DM_SPI_FLASH= -- cgit v1.3.1 From 1653b6a4bf2edf101c2e3bf632f60e857ec8c038 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 6 Dec 2019 21:41:44 -0700 Subject: fdt: Show the preprocessed .dts file on error When device-tree compilation fails it is sometimes tricky to see which line is broken, since the input file to dtc is a pre-processed version of the device tree. Add a line that points to the file that needs to be checked: When the error is in the main .dts file, output is something like this: output: 'Error: arch/x86/dts/.chromebook_coral.dtb.pre.tmp:478.46-47 syntax error FATAL ERROR: Unable to parse input tree but in fact looking at that file shows nothing useful: PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_157, UP_20K, DEEP, NF1, HIZCRX1, DISPUPD) Instead we need to look at the preprocessed file, which shows: 163 ((1U << 30) | (1 << 10)) ((0xb << 10) | PAD_CFG1_IOSSTATE_HIZCRX1) Here it is clear that PAD_CFG1_IOSSTATE_HIZCRX1 is not defined and so is not being resolved by the preprocessor. This commit adds an additional useful message: Check arch/x86/dts/.chromebook_coral.dtb.dts.tmp for errors Note that if the error is reported in an included file, such as u-boot.dtsi then the output is the following: Error: arch/x86/dts/u-boot.dtsi:137.14-15 syntax error FATAL ERROR: Unable to parse input tree But again, if the error is due to a preprocessor failure, like this: filename = CONFIG_IFW_INPUT_FILE; then you can't tell what the problem is by looking at the source. All you see is the original code: intel-ifwi { filename = CONFIG_IFW_INPUT_FILE; ... }; }; intel-fsp-m { filename = CONFIG_FSP_FILE_M; }; Everything looks fine. But looking at the output of the preprocessor: intel-ifwi { filename = CONFIG_IFW_INPUT_FILE; ... }; intel-fsp-m { filename = "fsp_m.bin"; }; This shows that the filename (normally "fitimage.bin") has not been inserted the preprocess, leading to the realisation that the value should be CONFIG_IFWI_INPUT_FILE. If the above does not make sense, I encourage people to try introducing errors in the device tree preprocessed values. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- scripts/Makefile.lib | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index ef116e0e0ae..c10cd83a0a3 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -300,7 +300,9 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \ $(DTC) -O dtb -o $@ -b 0 \ -i $(dir $<) $(DTC_FLAGS) \ - -d $(depfile).dtc.tmp $(dtc-tmp) ; \ + -d $(depfile).dtc.tmp $(dtc-tmp) || \ + (echo "Check $(shell pwd)/$(pre-tmp) for errors" && false) \ + ; \ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) ; \ sed -i "s:$(pre-tmp):$(<):" $(depfile) -- cgit v1.3.1 From 05577fa518e8785ee7db751a8ff74069fcec60ba Mon Sep 17 00:00:00 2001 From: Holger Brunck Date: Tue, 26 Nov 2019 19:09:01 +0100 Subject: ppc/km: convert KM_DEF_NETDEV to Kconfig Remove this from the board header files and move it to Kconfig. Also use the correct default address for kmtegr1. Signed-off-by: Holger Brunck Reviewed-by: Priyanka Jain CC: Priyanka Jain CC: Valentin Longchamp --- board/keymile/Kconfig | 6 ++++++ configs/kmcoge5ne_defconfig | 1 + configs/kmeter1_defconfig | 1 + configs/kmtegr1_defconfig | 1 + include/configs/km/keymile-common.h | 7 +------ include/configs/kmcoge5ne.h | 1 - include/configs/kmeter1.h | 1 - include/configs/kmp204x.h | 2 -- scripts/config_whitelist.txt | 1 - 9 files changed, 10 insertions(+), 11 deletions(-) (limited to 'scripts') diff --git a/board/keymile/Kconfig b/board/keymile/Kconfig index acaa9289f76..5f512d56dac 100644 --- a/board/keymile/Kconfig +++ b/board/keymile/Kconfig @@ -62,6 +62,12 @@ config KM_CONSOLE_TTY help TTY console to use on board. +config KM_DEF_NETDEV + string "Default Netdevice" + default "eth0" + help + Default netdevice for debug interface + config KM_COMMON_ETH_INIT bool "Common Ethernet Initialization" default y if KIRKWOOD || MPC83xx diff --git a/configs/kmcoge5ne_defconfig b/configs/kmcoge5ne_defconfig index c5e709e28cc..282b9577faf 100644 --- a/configs/kmcoge5ne_defconfig +++ b/configs/kmcoge5ne_defconfig @@ -1,5 +1,6 @@ CONFIG_PPC=y CONFIG_SYS_TEXT_BASE=0xF0000000 +CONFIG_KM_DEF_NETDEV="eth1" CONFIG_ENV_SIZE=0x4000 CONFIG_SYS_BOOTCOUNT_ADDR=0xE011BFF8 CONFIG_ENV_SECT_SIZE=0x20000 diff --git a/configs/kmeter1_defconfig b/configs/kmeter1_defconfig index 18f96257845..33b4a3462e7 100644 --- a/configs/kmeter1_defconfig +++ b/configs/kmeter1_defconfig @@ -1,5 +1,6 @@ CONFIG_PPC=y CONFIG_SYS_TEXT_BASE=0xF0000000 +CONFIG_KM_DEF_NETDEV="eth2" CONFIG_ENV_SIZE=0x4000 CONFIG_SYS_BOOTCOUNT_ADDR=0xE011BFF8 CONFIG_ENV_SECT_SIZE=0x20000 diff --git a/configs/kmtegr1_defconfig b/configs/kmtegr1_defconfig index 91b7aa8b77d..e014f7e3f46 100644 --- a/configs/kmtegr1_defconfig +++ b/configs/kmtegr1_defconfig @@ -1,5 +1,6 @@ CONFIG_PPC=y CONFIG_SYS_TEXT_BASE=0xF0000000 +CONFIG_KM_DEF_NETDEV="eth1" CONFIG_ENV_SIZE=0x4000 CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8 CONFIG_ENV_SECT_SIZE=0x20000 diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h index 8433d8e5682..e690d8f39da 100644 --- a/include/configs/km/keymile-common.h +++ b/include/configs/km/keymile-common.h @@ -38,11 +38,6 @@ "actual_bank=0\0" #endif -#ifndef CONFIG_KM_DEF_NETDEV -#define CONFIG_KM_DEF_NETDEV \ - "netdev=eth0\0" -#endif - #ifndef CONFIG_KM_UBI_PARTITION_NAME_BOOT #define CONFIG_KM_UBI_PARTITION_NAME_BOOT "ubi0" #endif /* CONFIG_KM_UBI_PARTITION_NAME_BOOT */ @@ -168,7 +163,7 @@ #ifndef CONFIG_KM_DEF_ENV #define CONFIG_KM_DEF_ENV \ CONFIG_KM_DEF_ENV_BOOTPARAMS \ - CONFIG_KM_DEF_NETDEV \ + "netdev=" __stringify(CONFIG_KM_DEF_NETDEV) "\0" \ CONFIG_KM_DEF_ENV_CPU \ CONFIG_KM_DEF_ENV_BOOTTARGETS \ CONFIG_KM_DEF_ENV_BOOTARGS \ diff --git a/include/configs/kmcoge5ne.h b/include/configs/kmcoge5ne.h index fc78b27cbb6..53350345058 100644 --- a/include/configs/kmcoge5ne.h +++ b/include/configs/kmcoge5ne.h @@ -10,7 +10,6 @@ #define CONFIG_HOSTNAME "kmcoge5ne" #define CONFIG_KM_BOARD_NAME "kmcoge5ne" -#define CONFIG_KM_DEF_NETDEV "netdev=eth1\0" #define CONFIG_NAND_ECC_BCH #define CONFIG_NAND_KMETER1 #define CONFIG_SYS_MAX_NAND_DEVICE 1 diff --git a/include/configs/kmeter1.h b/include/configs/kmeter1.h index bfa7ca27c74..7d85a02c680 100644 --- a/include/configs/kmeter1.h +++ b/include/configs/kmeter1.h @@ -10,7 +10,6 @@ #define CONFIG_HOSTNAME "kmeter1" #define CONFIG_KM_BOARD_NAME "kmeter1" -#define CONFIG_KM_DEF_NETDEV "netdev=eth2\0" /* include common defines/options for all Keymile boards */ #include "km/keymile-common.h" diff --git a/include/configs/kmp204x.h b/include/configs/kmp204x.h index 771d0248f79..9c17044b9bc 100644 --- a/include/configs/kmp204x.h +++ b/include/configs/kmp204x.h @@ -17,8 +17,6 @@ #define CONFIG_KMP204X -#define CONFIG_KM_DEF_NETDEV "netdev=eth0\0" - /* an additionnal option is required for UBI as subpage access is * supported in u-boot */ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index cf1808e051c..4b8958ed6ee 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -935,7 +935,6 @@ CONFIG_KM_DEF_ENV_BOOTTARGETS CONFIG_KM_DEF_ENV_CONSTANTS CONFIG_KM_DEF_ENV_CPU CONFIG_KM_DEF_ENV_FLASH_BOOT -CONFIG_KM_DEF_NETDEV CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI CONFIG_KM_DISABLE_PCIE CONFIG_KM_ECC_MODE -- cgit v1.3.1 From aeda123a2045b73377d97800f549d68d3b4be5e6 Mon Sep 17 00:00:00 2001 From: Holger Brunck Date: Tue, 26 Nov 2019 19:09:02 +0100 Subject: board/km: remove CONFIG_KM_BOARD_NAME We can use the existing CONFIG_SYS_CONFIG_NAME define for that and remove the option. Also fix the boot string for all km83xx boards. Signed-off-by: Holger Brunck Reviewed-by: Priyanka Jain CC: Priyanka Jain CC: Valentin Longchamp --- board/keymile/km83xx/km83xx.c | 2 +- board/keymile/kmp204x/kmp204x.c | 2 +- include/configs/kmcoge5ne.h | 1 - include/configs/kmeter1.h | 1 - include/configs/kmopti2.h | 1 - include/configs/kmp204x.h | 1 - include/configs/kmsupx5.h | 1 - include/configs/kmtegr1.h | 1 - include/configs/kmtepr2.h | 1 - include/configs/suvd3.h | 1 - include/configs/tuge1.h | 1 - include/configs/tuxx1.h | 1 - scripts/config_whitelist.txt | 1 - 13 files changed, 2 insertions(+), 13 deletions(-) (limited to 'scripts') diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c index abbf985eb2e..5969d513952 100644 --- a/board/keymile/km83xx/km83xx.c +++ b/board/keymile/km83xx/km83xx.c @@ -277,7 +277,7 @@ int dram_init(void) int checkboard(void) { - puts("Board: Keymile " CONFIG_KM_BOARD_NAME); + puts("Board: ABB " CONFIG_SYS_CONFIG_NAME); if (piggy_present()) puts(" with PIGGY."); diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c index ae9653db78f..88914c80e87 100644 --- a/board/keymile/kmp204x/kmp204x.c +++ b/board/keymile/kmp204x/kmp204x.c @@ -29,7 +29,7 @@ static uchar ivm_content[CONFIG_SYS_IVM_EEPROM_MAX_LEN]; int checkboard(void) { - printf("Board: Keymile %s\n", CONFIG_KM_BOARD_NAME); + printf("Board: Keymile %s\n", CONFIG_SYS_CONFIG_NAME); return 0; } diff --git a/include/configs/kmcoge5ne.h b/include/configs/kmcoge5ne.h index 53350345058..cdfb280aeee 100644 --- a/include/configs/kmcoge5ne.h +++ b/include/configs/kmcoge5ne.h @@ -9,7 +9,6 @@ #define __CONFIG_H #define CONFIG_HOSTNAME "kmcoge5ne" -#define CONFIG_KM_BOARD_NAME "kmcoge5ne" #define CONFIG_NAND_ECC_BCH #define CONFIG_NAND_KMETER1 #define CONFIG_SYS_MAX_NAND_DEVICE 1 diff --git a/include/configs/kmeter1.h b/include/configs/kmeter1.h index 7d85a02c680..4129d97505b 100644 --- a/include/configs/kmeter1.h +++ b/include/configs/kmeter1.h @@ -9,7 +9,6 @@ #define __CONFIG_H #define CONFIG_HOSTNAME "kmeter1" -#define CONFIG_KM_BOARD_NAME "kmeter1" /* include common defines/options for all Keymile boards */ #include "km/keymile-common.h" diff --git a/include/configs/kmopti2.h b/include/configs/kmopti2.h index 67e864fc987..5050c703039 100644 --- a/include/configs/kmopti2.h +++ b/include/configs/kmopti2.h @@ -23,7 +23,6 @@ /* * High Level Configuration Options */ -#define CONFIG_KM_BOARD_NAME "kmopti2" #define CONFIG_HOSTNAME "kmopti2" /* include common defines/options for all Keymile boards */ diff --git a/include/configs/kmp204x.h b/include/configs/kmp204x.h index 9c17044b9bc..6cee3b47b3e 100644 --- a/include/configs/kmp204x.h +++ b/include/configs/kmp204x.h @@ -9,7 +9,6 @@ #if defined(CONFIG_KMCOGE4) #define CONFIG_HOSTNAME "kmcoge4" -#define CONFIG_KM_BOARD_NAME "kmcoge4" #else #error ("Board not supported") diff --git a/include/configs/kmsupx5.h b/include/configs/kmsupx5.h index ba33e6074bf..e3de6c61e71 100644 --- a/include/configs/kmsupx5.h +++ b/include/configs/kmsupx5.h @@ -23,7 +23,6 @@ /* * High Level Configuration Options */ -#define CONFIG_KM_BOARD_NAME "kmsupx5" #define CONFIG_HOSTNAME "kmsupx5" /* include common defines/options for all Keymile boards */ diff --git a/include/configs/kmtegr1.h b/include/configs/kmtegr1.h index a441fca1218..bdd35cc7fb7 100644 --- a/include/configs/kmtegr1.h +++ b/include/configs/kmtegr1.h @@ -21,7 +21,6 @@ */ #define CONFIG_HOSTNAME "kmtegr1" -#define CONFIG_KM_BOARD_NAME "kmtegr1" #define CONFIG_KM_UBI_PARTITION_NAME_BOOT "ubi0" #define CONFIG_KM_UBI_PARTITION_NAME_APP "ubi1" diff --git a/include/configs/kmtepr2.h b/include/configs/kmtepr2.h index e0c907d11a4..a4ceb1c50d6 100644 --- a/include/configs/kmtepr2.h +++ b/include/configs/kmtepr2.h @@ -23,7 +23,6 @@ /* * High Level Configuration Options */ -#define CONFIG_KM_BOARD_NAME "kmtepr2" #define CONFIG_HOSTNAME "kmtepr2" /* include common defines/options for all Keymile boards */ diff --git a/include/configs/suvd3.h b/include/configs/suvd3.h index 1705f9cafba..d74707971ba 100644 --- a/include/configs/suvd3.h +++ b/include/configs/suvd3.h @@ -21,7 +21,6 @@ */ #define CONFIG_HOSTNAME "suvd3" -#define CONFIG_KM_BOARD_NAME "suvd3" /* include common defines/options for all Keymile boards */ #include "km/keymile-common.h" diff --git a/include/configs/tuge1.h b/include/configs/tuge1.h index 808538ef9d6..d43ccbe8dd9 100644 --- a/include/configs/tuge1.h +++ b/include/configs/tuge1.h @@ -23,7 +23,6 @@ /* * High Level Configuration Options */ -#define CONFIG_KM_BOARD_NAME "tuge1" #define CONFIG_HOSTNAME "tuge1" /* include common defines/options for all Keymile boards */ diff --git a/include/configs/tuxx1.h b/include/configs/tuxx1.h index 0eb673a9474..f5a9f1284a3 100644 --- a/include/configs/tuxx1.h +++ b/include/configs/tuxx1.h @@ -23,7 +23,6 @@ /* * High Level Configuration Options */ -#define CONFIG_KM_BOARD_NAME "tuxx1" #define CONFIG_HOSTNAME "tuxx1" /* include common defines/options for all Keymile boards */ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 4b8958ed6ee..594e6b726df 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -924,7 +924,6 @@ CONFIG_KMCOGE4 CONFIG_KMP204X CONFIG_KMTEGR1 CONFIG_KM_BOARD_EXTRA_ENV -CONFIG_KM_BOARD_NAME CONFIG_KM_COGE5UN CONFIG_KM_DEF_ARCH CONFIG_KM_DEF_BOOT_ARGS_CPU -- cgit v1.3.1