From 25a838175cb571a27337385d20bd164f0e3603cf Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 10:26:53 -0600 Subject: [PATCH 01/24] usb: Update struct usb_device to indicate speed enum The speed member actually uses an enum, so add this to the comment. Signed-off-by: Simon Glass Reviewed-by: Marek Vasut --- include/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/usb.h b/include/usb.h index 22f6088fe6..fa9e09607e 100644 --- a/include/usb.h +++ b/include/usb.h @@ -103,7 +103,7 @@ enum { */ struct usb_device { int devnum; /* Device number on USB bus */ - int speed; /* full/low/high */ + enum usb_device_speed speed; /* full/low/high */ char mf[32]; /* manufacturer */ char prod[32]; /* product */ char serial[32]; /* serial number */ From 5f20c283f9c232b226758f23b55c761790457b34 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 10 May 2020 10:26:54 -0600 Subject: [PATCH 02/24] pci: Fix typo in definition for PCI_DEV Fix a typo in the comment. Signed-off-by: Simon Glass --- include/pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pci.h b/include/pci.h index aff56b24f9..19c9244b94 100644 --- a/include/pci.h +++ b/include/pci.h @@ -531,7 +531,7 @@ typedef int pci_dev_t; * This is relevant for the following macros: * PCI_DEV, PCI_FUNC, PCI_DEVFN * The U-Boot macro PCI_DEV is equivalent to the Linux PCI_SLOT version with - * the remark from above (input d in bits 15-8 instead of 7-0. + * the remark from above (input is in bits 15-8 instead of 7-0. */ #define PCI_DEV(d) (((d) >> 11) & 0x1f) #define PCI_FUNC(d) (((d) >> 8) & 0x7) From 8239be61bdeb228863734a890b02d10006360a65 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 6 May 2020 08:03:56 -0600 Subject: [PATCH 03/24] lib: Allow MD5 to be enabled in SPL At present the MD5 option cannot be enabled by board configs since it has no Kconfig name. It is generally enabled, so long as FIT support is present. But not all boards use FIT, particularly in SPL Fix this and add an option for SPL as well. This allows board code to call md5() even if FIT support is not enabled. Signed-off-by: Simon Glass --- lib/Kconfig | 17 ++++++++++++++++- lib/Makefile | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/Kconfig b/lib/Kconfig index 868de3bf3b..c3f694afc0 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -363,7 +363,22 @@ config SHA_PROG_HW_ACCEL is performed in hardware. config MD5 - bool + bool "Support MD5 algorithm" + help + This option enables MD5 support. MD5 is an algorithm designed + in 1991 that produces a 16-byte digest (or checksum) from its input + data. It has a number of vulnerabilities which preclude its use in + security applications, but it can be useful for providing a quick + checksum of a block of data. + +config SPL_MD5 + bool "Support MD5 algorithm in SPL" + help + This option enables MD5 support in SPL. MD5 is an algorithm designed + in 1991 that produces a 16-byte digest (or checksum) from its input + data. It has a number of vulnerabilities which preclude its use in + security applications, but it can be useful for providing a quick + checksum of a block of data. config CRC32C bool diff --git a/lib/Makefile b/lib/Makefile index c6f862b0c2..6e688afa68 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -40,7 +40,6 @@ obj-$(CONFIG_GZIP_COMPRESSED) += gzip.o obj-$(CONFIG_GENERATE_SMBIOS_TABLE) += smbios.o obj-$(CONFIG_IMAGE_SPARSE) += image-sparse.o obj-y += ldiv.o -obj-$(CONFIG_MD5) += md5.o obj-$(CONFIG_XXHASH) += xxhash.o obj-y += net_utils.o obj-$(CONFIG_PHYSMEM) += physmem.o @@ -59,6 +58,7 @@ obj-$(CONFIG_TPM_V2) += tpm-v2.o endif obj-$(CONFIG_$(SPL_)ACPIGEN) += acpi/ +obj-$(CONFIG_$(SPL_)MD5) += md5.o obj-$(CONFIG_$(SPL_)RSA) += rsa/ obj-$(CONFIG_SHA1) += sha1.o obj-$(CONFIG_SHA256) += sha256.o From 248cf96d36a5dc2cacbbc332901f40b1c88b98d6 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 14 May 2020 11:38:20 +0900 Subject: [PATCH 04/24] Makefile: remove m68k GCC 3.4 workaround This code dates back to 2006, commit 483a0cf804df ("Fixes for gcc 3.4 based m68k toolchain,"). GCC 3.4 is so old. We do not support it. Signed-off-by: Masahiro Yamada --- Makefile | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Makefile b/Makefile index a9d58ca7a0..97fd492bc0 100644 --- a/Makefile +++ b/Makefile @@ -722,13 +722,6 @@ else KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) endif -# turn jbsr into jsr for m68k -ifeq ($(ARCH),m68k) -ifeq ($(findstring 3.4,$(shell $(CC) --version)),3.4) -KBUILD_AFLAGS += -Wa,-gstabs,-S -endif -endif - # Prohibit date/time macros, which would make the build non-deterministic KBUILD_CFLAGS += $(call cc-option,-Werror=date-time) From 7677fc08573550450dbd4728475b3f6bc3355b84 Mon Sep 17 00:00:00 2001 From: Chunfeng Yun Date: Thu, 14 May 2020 13:56:19 +0800 Subject: [PATCH 05/24] configs: mt7629: support usb host and udisk Enable modules to support download image from usb Signed-off-by: Chunfeng Yun --- configs/mt7629_rfb_defconfig | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/configs/mt7629_rfb_defconfig b/configs/mt7629_rfb_defconfig index 3efff8fee8..42d5dc552c 100644 --- a/configs/mt7629_rfb_defconfig +++ b/configs/mt7629_rfb_defconfig @@ -24,13 +24,17 @@ CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_BOOTMENU=y # CONFIG_CMD_ELF is not set # CONFIG_CMD_XIMG is not set +CONFIG_CMD_BIND=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_GPIO=y CONFIG_CMD_SF_TEST=y +CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set # CONFIG_CMD_NFS is not set CONFIG_CMD_PING=y -# CONFIG_PARTITIONS is not set +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_CMD_LOG=y CONFIG_DEFAULT_DEVICE_TREE="mt7629-rfb" CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-parents" CONFIG_SYS_RELOC_GD_ENV_ADDR=y @@ -40,6 +44,7 @@ CONFIG_REGMAP=y CONFIG_SPL_REGMAP=y CONFIG_SYSCON=y CONFIG_SPL_SYSCON=y +CONFIG_BLK=y CONFIG_CLK=y CONFIG_SPL_CLK=y # CONFIG_MMC is not set @@ -54,11 +59,15 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_WINBOND=y CONFIG_DM_ETH=y CONFIG_MEDIATEK_ETH=y +CONFIG_PHY=y +CONFIG_PHY_MTK_TPHY=y CONFIG_PINCTRL=y CONFIG_PINCONF=y CONFIG_PINCTRL_MT7629=y CONFIG_POWER_DOMAIN=y CONFIG_MTK_POWER_DOMAIN=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y CONFIG_RAM=y CONFIG_SPL_RAM=y CONFIG_DM_SERIAL=y @@ -69,6 +78,12 @@ CONFIG_MTK_SNFI_SPI=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_WATCHDOG=y +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_MTK=y +CONFIG_USB_STORAGE=y +CONFIG_USB_KEYBOARD=y CONFIG_WDT_MTK=y CONFIG_LZMA=y # CONFIG_EFI_LOADER is not set From 0ff042d836f2a40b2104d4501111fbb340293c5c Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Fri, 15 May 2020 22:20:34 +1000 Subject: [PATCH 06/24] rsa: don't use malloc.h in rsa-sign.c stdlib.h is the header for malloc since at least c89/c90. There is no system malloc.h on OpenBSD and trying to use malloc.h here falls back to the U-Boot malloc.h breaking the build of qemu_arm64. Fixes: 336d4615f8 ("dm: core: Create a new header file for 'compat' features") Signed-off-by: Jonathan Gray --- lib/rsa/rsa-sign.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c index 580c744709..621ddc4350 100644 --- a/lib/rsa/rsa-sign.c +++ b/lib/rsa/rsa-sign.c @@ -4,7 +4,7 @@ */ #include "mkimage.h" -#include +#include #include #include #include From b3d9a8b1857878fd72bf5385d91585fbafe516d6 Mon Sep 17 00:00:00 2001 From: Trevor Woerner Date: Wed, 6 May 2020 08:02:36 -0400 Subject: [PATCH 07/24] arm: lpc32xx: move SoC to mach-lpc32xx Following the example of most other SoCs in arch/$(ARCH)/cpu/$(CPU)/$(SOC) move the lpc32xx code from arch/arm/cpu/arm926ejs/lpc32xx to arch/arm/mach-lpc32xx. Following the checklist from commit 01f14456306c ("ARM: prepare for moving SoC sources into mach-*"): [1] move files from arch/arm/cpu/arm926ejs/lpc32xx to arch/arm/mach-lpx32xx [2] add machine entry to arch/arm/Makefile [3] remove "obj-y += ..." from arch/arm/cpu/arm926ejs/Makefile [4] fix the Kconfig file path in arch/arm/Kconfig [5] (no MAINTAINERS update) Reviewed-by: Simon Glass Signed-off-by: Trevor Woerner --- arch/arm/Kconfig | 2 +- arch/arm/Makefile | 1 + arch/arm/cpu/arm926ejs/Makefile | 1 - arch/arm/{cpu/arm926ejs/lpc32xx => mach-lpc32xx}/Kconfig | 0 arch/arm/{cpu/arm926ejs/lpc32xx => mach-lpc32xx}/Makefile | 0 arch/arm/{cpu/arm926ejs/lpc32xx => mach-lpc32xx}/clk.c | 0 arch/arm/{cpu/arm926ejs/lpc32xx => mach-lpc32xx}/cpu.c | 0 arch/arm/{cpu/arm926ejs/lpc32xx => mach-lpc32xx}/devices.c | 0 arch/arm/{cpu/arm926ejs/lpc32xx => mach-lpc32xx}/dram.c | 0 .../arm/{cpu/arm926ejs/lpc32xx => mach-lpc32xx}/lowlevel_init.S | 0 arch/arm/{cpu/arm926ejs/lpc32xx => mach-lpc32xx}/timer.c | 0 11 files changed, 2 insertions(+), 2 deletions(-) rename arch/arm/{cpu/arm926ejs/lpc32xx => mach-lpc32xx}/Kconfig (100%) rename arch/arm/{cpu/arm926ejs/lpc32xx => mach-lpc32xx}/Makefile (100%) rename arch/arm/{cpu/arm926ejs/lpc32xx => mach-lpc32xx}/clk.c (100%) rename arch/arm/{cpu/arm926ejs/lpc32xx => mach-lpc32xx}/cpu.c (100%) rename arch/arm/{cpu/arm926ejs/lpc32xx => mach-lpc32xx}/devices.c (100%) rename arch/arm/{cpu/arm926ejs/lpc32xx => mach-lpc32xx}/dram.c (100%) rename arch/arm/{cpu/arm926ejs/lpc32xx => mach-lpc32xx}/lowlevel_init.S (100%) rename arch/arm/{cpu/arm926ejs/lpc32xx => mach-lpc32xx}/timer.c (100%) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 0d463088a2..bd802b3be9 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1777,7 +1777,7 @@ source "arch/arm/mach-keystone/Kconfig" source "arch/arm/mach-kirkwood/Kconfig" -source "arch/arm/cpu/arm926ejs/lpc32xx/Kconfig" +source "arch/arm/mach-lpc32xx/Kconfig" source "arch/arm/mach-mvebu/Kconfig" diff --git a/arch/arm/Makefile b/arch/arm/Makefile index e25bb0e594..33bb8923bf 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -62,6 +62,7 @@ machine-$(CONFIG_ARCH_K3) += k3 machine-$(CONFIG_ARCH_KEYSTONE) += keystone # TODO: rename CONFIG_KIRKWOOD -> CONFIG_ARCH_KIRKWOOD machine-$(CONFIG_KIRKWOOD) += kirkwood +machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx machine-$(CONFIG_ARCH_MEDIATEK) += mediatek machine-$(CONFIG_ARCH_MESON) += meson machine-$(CONFIG_ARCH_MVEBU) += mvebu diff --git a/arch/arm/cpu/arm926ejs/Makefile b/arch/arm/cpu/arm926ejs/Makefile index b051025bb0..af63d5cc5e 100644 --- a/arch/arm/cpu/arm926ejs/Makefile +++ b/arch/arm/cpu/arm926ejs/Makefile @@ -13,7 +13,6 @@ endif endif obj-$(CONFIG_ARMADA100) += armada100/ -obj-$(if $(filter lpc32xx,$(SOC)),y) += lpc32xx/ obj-$(CONFIG_MX25) += mx25/ obj-$(CONFIG_MX27) += mx27/ obj-$(if $(filter mxs,$(SOC)),y) += mxs/ diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/Kconfig b/arch/arm/mach-lpc32xx/Kconfig similarity index 100% rename from arch/arm/cpu/arm926ejs/lpc32xx/Kconfig rename to arch/arm/mach-lpc32xx/Kconfig diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/Makefile b/arch/arm/mach-lpc32xx/Makefile similarity index 100% rename from arch/arm/cpu/arm926ejs/lpc32xx/Makefile rename to arch/arm/mach-lpc32xx/Makefile diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/clk.c b/arch/arm/mach-lpc32xx/clk.c similarity index 100% rename from arch/arm/cpu/arm926ejs/lpc32xx/clk.c rename to arch/arm/mach-lpc32xx/clk.c diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/cpu.c b/arch/arm/mach-lpc32xx/cpu.c similarity index 100% rename from arch/arm/cpu/arm926ejs/lpc32xx/cpu.c rename to arch/arm/mach-lpc32xx/cpu.c diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/devices.c b/arch/arm/mach-lpc32xx/devices.c similarity index 100% rename from arch/arm/cpu/arm926ejs/lpc32xx/devices.c rename to arch/arm/mach-lpc32xx/devices.c diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/dram.c b/arch/arm/mach-lpc32xx/dram.c similarity index 100% rename from arch/arm/cpu/arm926ejs/lpc32xx/dram.c rename to arch/arm/mach-lpc32xx/dram.c diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/lowlevel_init.S b/arch/arm/mach-lpc32xx/lowlevel_init.S similarity index 100% rename from arch/arm/cpu/arm926ejs/lpc32xx/lowlevel_init.S rename to arch/arm/mach-lpc32xx/lowlevel_init.S diff --git a/arch/arm/cpu/arm926ejs/lpc32xx/timer.c b/arch/arm/mach-lpc32xx/timer.c similarity index 100% rename from arch/arm/cpu/arm926ejs/lpc32xx/timer.c rename to arch/arm/mach-lpc32xx/timer.c From 9bffc54996bc36c87efdd36a6b1345609e33d795 Mon Sep 17 00:00:00 2001 From: Trevor Woerner Date: Wed, 6 May 2020 08:02:37 -0400 Subject: [PATCH 08/24] arch/arm/Makefile: sort machine names The comment immediately above the block of machine directory names implored users to keep the macro names sorted, but, alas, this is no longer the case. Put the list of machine directory names back in alphanumerical order by CONFIG_* macro name, as the comment asks. Sort all the symbols as though they all followed the convention of having the string "ARCH_" in the middle of their definitions. Signed-off-by: Trevor Woerner --- arch/arm/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 33bb8923bf..5d32dec29c 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -66,25 +66,25 @@ machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx machine-$(CONFIG_ARCH_MEDIATEK) += mediatek machine-$(CONFIG_ARCH_MESON) += meson machine-$(CONFIG_ARCH_MVEBU) += mvebu -# TODO: rename CONFIG_TEGRA -> CONFIG_ARCH_TEGRA +machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2 # TODO: rename CONFIG_ORION5X -> CONFIG_ARCH_ORION5X machine-$(CONFIG_ORION5X) += orion5x -machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2 machine-$(CONFIG_ARCH_OWL) += owl -machine-$(CONFIG_ARCH_S5PC1XX) += s5pc1xx -machine-$(CONFIG_ARCH_SUNXI) += sunxi -machine-$(CONFIG_ARCH_SNAPDRAGON) += snapdragon -machine-$(CONFIG_ARCH_SOCFPGA) += socfpga machine-$(CONFIG_ARCH_RMOBILE) += rmobile machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip +machine-$(CONFIG_ARCH_S5PC1XX) += s5pc1xx +machine-$(CONFIG_ARCH_SNAPDRAGON) += snapdragon +machine-$(CONFIG_ARCH_SOCFPGA) += socfpga machine-$(CONFIG_STM32) += stm32 machine-$(CONFIG_ARCH_STM32MP) += stm32mp +machine-$(CONFIG_ARCH_SUNXI) += sunxi +# TODO: rename CONFIG_TEGRA -> CONFIG_ARCH_TEGRA machine-$(CONFIG_TEGRA) += tegra machine-$(CONFIG_ARCH_U8500) += u8500 machine-$(CONFIG_ARCH_UNIPHIER) += uniphier +machine-$(CONFIG_ARCH_VERSAL) += versal machine-$(CONFIG_ARCH_ZYNQ) += zynq machine-$(CONFIG_ARCH_ZYNQMP) += zynqmp -machine-$(CONFIG_ARCH_VERSAL) += versal machine-$(CONFIG_ARCH_ZYNQMP_R5) += zynqmp-r5 machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) From b16a331697820d1f36ee8ccb793ae12eb501ad42 Mon Sep 17 00:00:00 2001 From: Trevor Woerner Date: Wed, 6 May 2020 08:02:38 -0400 Subject: [PATCH 09/24] rename symbol: CONFIG_ORION5X -> CONFIG_ARCH_ORION5X Have this symbol follow the pattern of all other such symbols. This patch removes a TODO from the code. Signed-off-by: Trevor Woerner --- arch/arm/Kconfig | 2 +- arch/arm/Makefile | 3 +-- arch/arm/mach-orion5x/Kconfig | 2 +- configs/edminiv2_defconfig | 2 +- drivers/ata/mvsata_ide.c | 2 +- drivers/i2c/mvtwsi.c | 2 +- drivers/net/Kconfig | 2 +- drivers/net/mvgbe.c | 2 +- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/ehci-marvell.c | 2 +- 10 files changed, 10 insertions(+), 11 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index bd802b3be9..586464620c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -576,7 +576,7 @@ config TARGET_APF27 select CPU_ARM926EJS select SUPPORT_SPL -config ORION5X +config ARCH_ORION5X bool "Marvell Orion" select CPU_ARM926EJS diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 5d32dec29c..2b44ffb493 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -67,8 +67,7 @@ machine-$(CONFIG_ARCH_MEDIATEK) += mediatek machine-$(CONFIG_ARCH_MESON) += meson machine-$(CONFIG_ARCH_MVEBU) += mvebu machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2 -# TODO: rename CONFIG_ORION5X -> CONFIG_ARCH_ORION5X -machine-$(CONFIG_ORION5X) += orion5x +machine-$(CONFIG_ARCH_ORION5X) += orion5x machine-$(CONFIG_ARCH_OWL) += owl machine-$(CONFIG_ARCH_RMOBILE) += rmobile machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig index 7644b8dc85..5baa6fb935 100644 --- a/arch/arm/mach-orion5x/Kconfig +++ b/arch/arm/mach-orion5x/Kconfig @@ -1,4 +1,4 @@ -if ORION5X +if ARCH_ORION5X choice prompt "Marvell Orion board select" diff --git a/configs/edminiv2_defconfig b/configs/edminiv2_defconfig index b9a68a9263..d06f83db04 100644 --- a/configs/edminiv2_defconfig +++ b/configs/edminiv2_defconfig @@ -1,6 +1,6 @@ CONFIG_ARM=y CONFIG_ARCH_CPU_INIT=y -CONFIG_ORION5X=y +CONFIG_ARCH_ORION5X=y CONFIG_SPL_LDSCRIPT="arch/arm/cpu/arm926ejs/orion5x/u-boot-spl.lds" CONFIG_SYS_TEXT_BASE=0x00800000 CONFIG_SPL_LIBCOMMON_SUPPORT=y diff --git a/drivers/ata/mvsata_ide.c b/drivers/ata/mvsata_ide.c index 38181235af..9ac16555d6 100644 --- a/drivers/ata/mvsata_ide.c +++ b/drivers/ata/mvsata_ide.c @@ -8,7 +8,7 @@ #include #include -#if defined(CONFIG_ORION5X) +#if defined(CONFIG_ARCH_ORION5X) #include #elif defined(CONFIG_KIRKWOOD) #include diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c index 382cf4b304..77fe35a42b 100644 --- a/drivers/i2c/mvtwsi.c +++ b/drivers/i2c/mvtwsi.c @@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR; */ #ifndef CONFIG_DM_I2C -#if defined(CONFIG_ORION5X) +#if defined(CONFIG_ARCH_ORION5X) #include #elif (defined(CONFIG_KIRKWOOD) || defined(CONFIG_ARCH_MVEBU)) #include diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 38f2bd6637..4d6716fdb8 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -309,7 +309,7 @@ config FSLDMAFEC config MVGBE bool "Marvell Orion5x/Kirkwood network interface support" - depends on KIRKWOOD || ORION5X + depends on KIRKWOOD || ARCH_ORION5X select PHYLIB if DM_ETH help This driver supports the network interface units in the diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c index 037e59ec6e..b0b8d349a8 100644 --- a/drivers/net/mvgbe.c +++ b/drivers/net/mvgbe.c @@ -26,7 +26,7 @@ #if defined(CONFIG_KIRKWOOD) #include -#elif defined(CONFIG_ORION5X) +#elif defined(CONFIG_ARCH_ORION5X) #include #endif diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 2f381dc958..cc9646d40a 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -135,7 +135,7 @@ config USB_EHCI_ATMEL config USB_EHCI_MARVELL bool "Support for Marvell on-chip EHCI USB controller" - depends on ARCH_MVEBU || KIRKWOOD || ORION5X + depends on ARCH_MVEBU || KIRKWOOD || ARCH_ORION5X default y ---help--- Enables support for the on-chip EHCI controller on MVEBU SoCs. diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c index 8efe6b63b9..3b10cdfc58 100644 --- a/drivers/usb/host/ehci-marvell.c +++ b/drivers/usb/host/ehci-marvell.c @@ -15,7 +15,7 @@ #if defined(CONFIG_KIRKWOOD) #include -#elif defined(CONFIG_ORION5X) +#elif defined(CONFIG_ARCH_ORION5X) #include #endif From b48f72a86b3758e05227fa1fc607ea2c0c365f93 Mon Sep 17 00:00:00 2001 From: Trevor Woerner Date: Wed, 6 May 2020 08:02:39 -0400 Subject: [PATCH 10/24] arm: orion5x: finish moving SoC to mach-orion5x The SPL linker script had been left in arch/$(ARCH)/cpu/$(CPU)/$(SOC); therefore move it to the already-established arch/$(ARCH)/mach-$(SOC) location. Signed-off-by: Trevor Woerner --- arch/arm/{cpu/arm926ejs/orion5x => mach-orion5x}/u-boot-spl.lds | 0 configs/edminiv2_defconfig | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename arch/arm/{cpu/arm926ejs/orion5x => mach-orion5x}/u-boot-spl.lds (100%) diff --git a/arch/arm/cpu/arm926ejs/orion5x/u-boot-spl.lds b/arch/arm/mach-orion5x/u-boot-spl.lds similarity index 100% rename from arch/arm/cpu/arm926ejs/orion5x/u-boot-spl.lds rename to arch/arm/mach-orion5x/u-boot-spl.lds diff --git a/configs/edminiv2_defconfig b/configs/edminiv2_defconfig index d06f83db04..9a9d9c58d7 100644 --- a/configs/edminiv2_defconfig +++ b/configs/edminiv2_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_ARCH_CPU_INIT=y CONFIG_ARCH_ORION5X=y -CONFIG_SPL_LDSCRIPT="arch/arm/cpu/arm926ejs/orion5x/u-boot-spl.lds" +CONFIG_SPL_LDSCRIPT="arch/arm/mach-orion5x/u-boot-spl.lds" CONFIG_SYS_TEXT_BASE=0x00800000 CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y From bb0fb4c0f40803eaffd7a4fc0ec3a9fe4a8be0f0 Mon Sep 17 00:00:00 2001 From: Trevor Woerner Date: Wed, 6 May 2020 08:02:40 -0400 Subject: [PATCH 11/24] rename symbol: CONFIG_KIRKWOOD -> CONFIG_ARCH_KIRKWOOD Have this symbol follow the pattern of all other such symbols. This patch also removes a TODO from the code. Reviewed-by: Chris Packham Signed-off-by: Trevor Woerner --- Kconfig | 2 +- arch/arm/Kconfig | 2 +- arch/arm/Makefile | 3 +-- arch/arm/dts/Makefile | 2 +- arch/arm/mach-kirkwood/Kconfig | 2 +- arch/arm/mach-mvebu/Makefile | 6 +++--- arch/arm/mach-mvebu/mbus.c | 6 +++--- board/keymile/Kconfig | 12 ++++++------ configs/SBx81LIFKW_defconfig | 2 +- configs/SBx81LIFXCAT_defconfig | 2 +- configs/d2net_v2_defconfig | 2 +- configs/db-88f6281-bp-nand_defconfig | 2 +- configs/db-88f6281-bp-spi_defconfig | 2 +- configs/dns325_defconfig | 2 +- configs/dockstar_defconfig | 2 +- configs/dreamplug_defconfig | 2 +- configs/ds109_defconfig | 2 +- configs/goflexhome_defconfig | 2 +- configs/guruplug_defconfig | 2 +- configs/ib62x0_defconfig | 2 +- configs/iconnect_defconfig | 2 +- configs/inetspace_v2_defconfig | 2 +- configs/km_kirkwood_128m16_defconfig | 2 +- configs/km_kirkwood_defconfig | 2 +- configs/km_kirkwood_pci_defconfig | 2 +- configs/kmcoge5un_defconfig | 2 +- configs/kmnusa_defconfig | 2 +- configs/kmsuse2_defconfig | 2 +- configs/lschlv2_defconfig | 2 +- configs/lsxhl_defconfig | 2 +- configs/nas220_defconfig | 2 +- configs/net2big_v2_defconfig | 2 +- configs/netspace_lite_v2_defconfig | 2 +- configs/netspace_max_v2_defconfig | 2 +- configs/netspace_mini_v2_defconfig | 2 +- configs/netspace_v2_defconfig | 2 +- configs/nsa310s_defconfig | 2 +- configs/openrd_base_defconfig | 2 +- configs/openrd_client_defconfig | 2 +- configs/openrd_ultimate_defconfig | 2 +- configs/pogo_e02_defconfig | 2 +- configs/sheevaplug_defconfig | 2 +- drivers/ata/mvsata_ide.c | 2 +- drivers/ata/sata_mv.c | 2 +- drivers/i2c/mvtwsi.c | 4 ++-- drivers/net/Kconfig | 2 +- drivers/net/mvgbe.c | 2 +- drivers/spi/kirkwood_spi.c | 10 +++++----- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/ehci-marvell.c | 2 +- tools/Makefile | 4 ++-- 51 files changed, 66 insertions(+), 67 deletions(-) diff --git a/Kconfig b/Kconfig index 15f1a75c61..0e7ccc0b07 100644 --- a/Kconfig +++ b/Kconfig @@ -268,7 +268,7 @@ config BUILD_TARGET default "u-boot-elf.srec" if RCAR_GEN3 default "u-boot.itb" if SPL_LOAD_FIT && (ARCH_ROCKCHIP || \ ARCH_SUNXI || RISCV || ARCH_ZYNQMP) - default "u-boot.kwb" if KIRKWOOD + default "u-boot.kwb" if ARCH_KIRKWOOD default "u-boot-with-spl.bin" if ARCH_AT91 && SPL_NAND_SUPPORT default "u-boot-with-spl.imx" if ARCH_MX6 && SPL help diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 586464620c..8bdcf3409d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -553,7 +553,7 @@ config ARCH_DAVINCI help Support for TI's DaVinci platform. -config KIRKWOOD +config ARCH_KIRKWOOD bool "Marvell Kirkwood" select ARCH_MISC_INIT select BOARD_EARLY_INIT_F diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 2b44ffb493..9b3ca9772c 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -60,8 +60,7 @@ machine-$(CONFIG_ARCH_EXYNOS) += exynos machine-$(CONFIG_ARCH_HIGHBANK) += highbank machine-$(CONFIG_ARCH_K3) += k3 machine-$(CONFIG_ARCH_KEYSTONE) += keystone -# TODO: rename CONFIG_KIRKWOOD -> CONFIG_ARCH_KIRKWOOD -machine-$(CONFIG_KIRKWOOD) += kirkwood +machine-$(CONFIG_ARCH_KIRKWOOD) += kirkwood machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx machine-$(CONFIG_ARCH_MEDIATEK) += mediatek machine-$(CONFIG_ARCH_MESON) += meson diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 1325134bd4..66fcfc5646 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -34,7 +34,7 @@ dtb-$(CONFIG_ARCH_DAVINCI) += \ da850-lcdk.dtb \ da850-lego-ev3.dtb -dtb-$(CONFIG_KIRKWOOD) += \ +dtb-$(CONFIG_ARCH_KIRKWOOD) += \ kirkwood-atl-sbx81lifkw.dtb \ kirkwood-atl-sbx81lifxcat.dtb \ kirkwood-blackarmor-nas220.dtb \ diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index 2f68092f82..ae44cb665e 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig @@ -1,4 +1,4 @@ -if KIRKWOOD +if ARCH_KIRKWOOD choice prompt "Marvell Kirkwood board select" diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index b73952044d..7e9c206ed6 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile @@ -10,14 +10,14 @@ obj-y += arm64-common.o else # CONFIG_ARM64 -ifdef CONFIG_KIRKWOOD +ifdef CONFIG_ARCH_KIRKWOOD obj-y = dram.o obj-y += gpio.o obj-y += mbus.o obj-y += timer.o -else # CONFIG_KIRKWOOD +else # CONFIG_ARCH_KIRKWOOD obj-y = cpu.o obj-y += dram.o @@ -73,5 +73,5 @@ obj-$(CONFIG_SPL_BUILD) += lowlevel_spl.o obj-$(CONFIG_ARMADA_38X) += serdes/a38x/ obj-$(CONFIG_ARMADA_XP) += serdes/axp/ -endif # CONFIG_KIRKWOOD +endif # CONFIG_ARCH_KIRKWOOD endif # CONFIG_ARM64 diff --git a/arch/arm/mach-mvebu/mbus.c b/arch/arm/mach-mvebu/mbus.c index a95db5e5c3..39bd200c83 100644 --- a/arch/arm/mach-mvebu/mbus.c +++ b/arch/arm/mach-mvebu/mbus.c @@ -411,7 +411,7 @@ int mvebu_mbus_del_window(phys_addr_t base, size_t size) return 0; } -#ifndef CONFIG_KIRKWOOD +#ifndef CONFIG_ARCH_KIRKWOOD static void mvebu_mbus_get_lowest_base(struct mvebu_mbus_state *mbus, phys_addr_t *base) { @@ -479,7 +479,7 @@ int mbus_dt_setup_win(struct mvebu_mbus_state *mbus, return -ENOMEM; } -#ifndef CONFIG_KIRKWOOD +#ifndef CONFIG_ARCH_KIRKWOOD /* * Re-configure the mbus bridge registers each time this function * is called. Since it may get called from the board code in @@ -497,7 +497,7 @@ int mvebu_mbus_probe(struct mbus_win windows[], int count) int ret; int i; -#if defined(CONFIG_KIRKWOOD) +#if defined(CONFIG_ARCH_KIRKWOOD) mbus_state.soc = &kirkwood_mbus_data; #endif #if defined(CONFIG_ARCH_MVEBU) diff --git a/board/keymile/Kconfig b/board/keymile/Kconfig index 7f4cad86aa..e20c017436 100644 --- a/board/keymile/Kconfig +++ b/board/keymile/Kconfig @@ -28,7 +28,7 @@ config KM_PHRAM config KM_RESERVED_PRAM hex "Reserved RAM" - default 0x801000 if KIRKWOOD + default 0x801000 if ARCH_KIRKWOOD default 0x0 if MPC83xx default 0x1000 if MPC85xx depends on !ARCH_SOCFPGA @@ -37,7 +37,7 @@ config KM_RESERVED_PRAM config KM_CRAMFS_ADDR hex "CRAMFS Address" - default 0x2400000 if KIRKWOOD + default 0x2400000 if ARCH_KIRKWOOD default 0xC00000 if MPC83xx default 0x2000000 if MPC85xx depends on !ARCH_SOCFPGA @@ -46,7 +46,7 @@ config KM_CRAMFS_ADDR config KM_KERNEL_ADDR hex "Kernel Load Address" - default 0x2000000 if KIRKWOOD + default 0x2000000 if ARCH_KIRKWOOD default 0x400000 if MPC83xx default 0x1000000 if MPC85xx || ARCH_SOCFPGA help @@ -54,7 +54,7 @@ config KM_KERNEL_ADDR config KM_FDT_ADDR hex "FDT Load Address" - default 0x23E0000 if KIRKWOOD || ARCH_SOCFPGA + default 0x23E0000 if ARCH_KIRKWOOD || ARCH_SOCFPGA default 0xB80000 if MPC83xx default 0x1F80000 if MPC85xx help @@ -74,7 +74,7 @@ config KM_DEF_NETDEV config KM_COMMON_ETH_INIT bool "Common Ethernet Initialization" - default y if KIRKWOOD || MPC83xx + default y if ARCH_KIRKWOOD || MPC83xx default n if MPC85xx || ARCH_SOCFPGA help Use the Ethernet initialization implemented in common code, which @@ -96,7 +96,7 @@ config KM_MVEXTSW_ADDR config KM_IVM_BUS int "IVM I2C Bus" default 0 if ARCH_SOCFPGA - default 1 if KIRKWOOD || MPC85xx + default 1 if ARCH_KIRKWOOD || MPC85xx default 2 if MPC83xx help Identifier number of I2C bus, where the inventory EEPROM is connected to. diff --git a/configs/SBx81LIFKW_defconfig b/configs/SBx81LIFKW_defconfig index 4b3c729598..b21db3c9df 100644 --- a/configs/SBx81LIFKW_defconfig +++ b/configs/SBx81LIFKW_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x00600000 CONFIG_TARGET_SBx81LIFKW=y CONFIG_ENV_SIZE=0x2000 diff --git a/configs/SBx81LIFXCAT_defconfig b/configs/SBx81LIFXCAT_defconfig index fdbde4930f..420d75ea30 100644 --- a/configs/SBx81LIFXCAT_defconfig +++ b/configs/SBx81LIFXCAT_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x00600000 CONFIG_TARGET_SBx81LIFXCAT=y CONFIG_ENV_SIZE=0x2000 diff --git a/configs/d2net_v2_defconfig b/configs/d2net_v2_defconfig index 41ed344e73..fe3c6c4762 100644 --- a/configs/d2net_v2_defconfig +++ b/configs/d2net_v2_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_NET2BIG_V2=y CONFIG_ENV_SIZE=0x1000 diff --git a/configs/db-88f6281-bp-nand_defconfig b/configs/db-88f6281-bp-nand_defconfig index e390423780..f98e462d42 100644 --- a/configs/db-88f6281-bp-nand_defconfig +++ b/configs/db-88f6281-bp-nand_defconfig @@ -2,7 +2,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y CONFIG_SYS_THUMB_BUILD=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_DB_88F6281_BP=y CONFIG_ENV_SIZE=0x1000 diff --git a/configs/db-88f6281-bp-spi_defconfig b/configs/db-88f6281-bp-spi_defconfig index 1bef1c5bb3..52af8f41ce 100644 --- a/configs/db-88f6281-bp-spi_defconfig +++ b/configs/db-88f6281-bp-spi_defconfig @@ -2,7 +2,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y CONFIG_SYS_THUMB_BUILD=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_DB_88F6281_BP=y CONFIG_ENV_SIZE=0x1000 diff --git a/configs/dns325_defconfig b/configs/dns325_defconfig index 8457806282..e44ec51ce9 100644 --- a/configs/dns325_defconfig +++ b/configs/dns325_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_DNS325=y CONFIG_ENV_SIZE=0x20000 diff --git a/configs/dockstar_defconfig b/configs/dockstar_defconfig index 079b6652f1..fcc597d249 100644 --- a/configs/dockstar_defconfig +++ b/configs/dockstar_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_DOCKSTAR=y CONFIG_ENV_SIZE=0x20000 diff --git a/configs/dreamplug_defconfig b/configs/dreamplug_defconfig index 566aa0dbf4..26bb8b7e19 100644 --- a/configs/dreamplug_defconfig +++ b/configs/dreamplug_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_DREAMPLUG=y CONFIG_ENV_SIZE=0x1000 diff --git a/configs/ds109_defconfig b/configs/ds109_defconfig index 3f7a661432..89ed5eb13c 100644 --- a/configs/ds109_defconfig +++ b/configs/ds109_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_DS109=y CONFIG_ENV_SIZE=0x10000 diff --git a/configs/goflexhome_defconfig b/configs/goflexhome_defconfig index 97b1615c8a..9384244ebb 100644 --- a/configs/goflexhome_defconfig +++ b/configs/goflexhome_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_GOFLEXHOME=y CONFIG_ENV_SIZE=0x20000 diff --git a/configs/guruplug_defconfig b/configs/guruplug_defconfig index 2bdd78041d..8d862696ca 100644 --- a/configs/guruplug_defconfig +++ b/configs/guruplug_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_GURUPLUG=y CONFIG_ENV_SIZE=0x20000 diff --git a/configs/ib62x0_defconfig b/configs/ib62x0_defconfig index 9da976f399..fea69d32e9 100644 --- a/configs/ib62x0_defconfig +++ b/configs/ib62x0_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_IB62X0=y CONFIG_ENV_SIZE=0x20000 diff --git a/configs/iconnect_defconfig b/configs/iconnect_defconfig index 8121867008..4281aa93bc 100644 --- a/configs/iconnect_defconfig +++ b/configs/iconnect_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_ICONNECT=y CONFIG_ENV_SIZE=0x20000 diff --git a/configs/inetspace_v2_defconfig b/configs/inetspace_v2_defconfig index 94c708e602..6144eb5fad 100644 --- a/configs/inetspace_v2_defconfig +++ b/configs/inetspace_v2_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_NETSPACE_V2=y CONFIG_ENV_SIZE=0x1000 diff --git a/configs/km_kirkwood_128m16_defconfig b/configs/km_kirkwood_128m16_defconfig index d185100f66..9bbbfd9442 100644 --- a/configs/km_kirkwood_128m16_defconfig +++ b/configs/km_kirkwood_128m16_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x07d00000 CONFIG_TARGET_KM_KIRKWOOD=y CONFIG_ENV_SIZE=0x2000 diff --git a/configs/km_kirkwood_defconfig b/configs/km_kirkwood_defconfig index a8374d9fc2..887893ef33 100644 --- a/configs/km_kirkwood_defconfig +++ b/configs/km_kirkwood_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x07d00000 CONFIG_TARGET_KM_KIRKWOOD=y CONFIG_ENV_SIZE=0x2000 diff --git a/configs/km_kirkwood_pci_defconfig b/configs/km_kirkwood_pci_defconfig index 7ad69e1639..81c9f697bb 100644 --- a/configs/km_kirkwood_pci_defconfig +++ b/configs/km_kirkwood_pci_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x07d00000 CONFIG_TARGET_KM_KIRKWOOD=y CONFIG_KM_FPGA_CONFIG=y diff --git a/configs/kmcoge5un_defconfig b/configs/kmcoge5un_defconfig index b70bab618e..169d895203 100644 --- a/configs/kmcoge5un_defconfig +++ b/configs/kmcoge5un_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x07d00000 CONFIG_TARGET_KM_KIRKWOOD=y CONFIG_PIGGY_MAC_ADDRESS_OFFSET=3 diff --git a/configs/kmnusa_defconfig b/configs/kmnusa_defconfig index a4b301db7d..8d90cdab0f 100644 --- a/configs/kmnusa_defconfig +++ b/configs/kmnusa_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x07d00000 CONFIG_TARGET_KM_KIRKWOOD=y CONFIG_KM_FPGA_CONFIG=y diff --git a/configs/kmsuse2_defconfig b/configs/kmsuse2_defconfig index 119607ac91..82006010ed 100644 --- a/configs/kmsuse2_defconfig +++ b/configs/kmsuse2_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x07d00000 CONFIG_TARGET_KM_KIRKWOOD=y CONFIG_KM_FPGA_CONFIG=y diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig index 2ce23464b9..e2e0e8af71 100644 --- a/configs/lschlv2_defconfig +++ b/configs/lschlv2_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_LSXL=y CONFIG_ENV_SIZE=0x10000 diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig index 336fb34d5b..4de845da2c 100644 --- a/configs/lsxhl_defconfig +++ b/configs/lsxhl_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_LSXL=y CONFIG_ENV_SIZE=0x10000 diff --git a/configs/nas220_defconfig b/configs/nas220_defconfig index eb7effe98f..918fd26b05 100644 --- a/configs/nas220_defconfig +++ b/configs/nas220_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_NAS220=y CONFIG_ENV_SIZE=0x10000 diff --git a/configs/net2big_v2_defconfig b/configs/net2big_v2_defconfig index b7565e5214..1389d30900 100644 --- a/configs/net2big_v2_defconfig +++ b/configs/net2big_v2_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_NET2BIG_V2=y CONFIG_ENV_SIZE=0x1000 diff --git a/configs/netspace_lite_v2_defconfig b/configs/netspace_lite_v2_defconfig index 3f95f38dab..c744d2c58e 100644 --- a/configs/netspace_lite_v2_defconfig +++ b/configs/netspace_lite_v2_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_NETSPACE_V2=y CONFIG_ENV_SIZE=0x1000 diff --git a/configs/netspace_max_v2_defconfig b/configs/netspace_max_v2_defconfig index 1d710395ae..8602729fcb 100644 --- a/configs/netspace_max_v2_defconfig +++ b/configs/netspace_max_v2_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_NETSPACE_V2=y CONFIG_ENV_SIZE=0x1000 diff --git a/configs/netspace_mini_v2_defconfig b/configs/netspace_mini_v2_defconfig index abf8011e4f..ba9301de4d 100644 --- a/configs/netspace_mini_v2_defconfig +++ b/configs/netspace_mini_v2_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_NETSPACE_V2=y CONFIG_ENV_SIZE=0x1000 diff --git a/configs/netspace_v2_defconfig b/configs/netspace_v2_defconfig index 052049af1c..6ba1ef423e 100644 --- a/configs/netspace_v2_defconfig +++ b/configs/netspace_v2_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_NETSPACE_V2=y CONFIG_ENV_SIZE=0x1000 diff --git a/configs/nsa310s_defconfig b/configs/nsa310s_defconfig index 6a1073c30b..7a864bddf3 100644 --- a/configs/nsa310s_defconfig +++ b/configs/nsa310s_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_NSA310S=y CONFIG_ENV_SIZE=0x20000 diff --git a/configs/openrd_base_defconfig b/configs/openrd_base_defconfig index f575bf24e7..2551f284af 100644 --- a/configs/openrd_base_defconfig +++ b/configs/openrd_base_defconfig @@ -2,7 +2,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y CONFIG_SYS_THUMB_BUILD=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_OPENRD=y CONFIG_ENV_SIZE=0x20000 diff --git a/configs/openrd_client_defconfig b/configs/openrd_client_defconfig index 42f3786918..c0bf3be373 100644 --- a/configs/openrd_client_defconfig +++ b/configs/openrd_client_defconfig @@ -2,7 +2,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y CONFIG_SYS_THUMB_BUILD=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_OPENRD=y CONFIG_ENV_SIZE=0x20000 diff --git a/configs/openrd_ultimate_defconfig b/configs/openrd_ultimate_defconfig index 47189da080..ab97d66e89 100644 --- a/configs/openrd_ultimate_defconfig +++ b/configs/openrd_ultimate_defconfig @@ -2,7 +2,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y CONFIG_SYS_THUMB_BUILD=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_OPENRD=y CONFIG_ENV_SIZE=0x20000 diff --git a/configs/pogo_e02_defconfig b/configs/pogo_e02_defconfig index 8957a87639..e254ac0393 100644 --- a/configs/pogo_e02_defconfig +++ b/configs/pogo_e02_defconfig @@ -1,7 +1,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_POGO_E02=y CONFIG_ENV_SIZE=0x20000 diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig index 723ef7bb46..d350429cad 100644 --- a/configs/sheevaplug_defconfig +++ b/configs/sheevaplug_defconfig @@ -2,7 +2,7 @@ CONFIG_ARM=y CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_CPU_INIT=y CONFIG_SYS_THUMB_BUILD=y -CONFIG_KIRKWOOD=y +CONFIG_ARCH_KIRKWOOD=y CONFIG_SYS_TEXT_BASE=0x600000 CONFIG_TARGET_SHEEVAPLUG=y CONFIG_ENV_SIZE=0x20000 diff --git a/drivers/ata/mvsata_ide.c b/drivers/ata/mvsata_ide.c index 9ac16555d6..6bbb345f6e 100644 --- a/drivers/ata/mvsata_ide.c +++ b/drivers/ata/mvsata_ide.c @@ -10,7 +10,7 @@ #if defined(CONFIG_ARCH_ORION5X) #include -#elif defined(CONFIG_KIRKWOOD) +#elif defined(CONFIG_ARCH_KIRKWOOD) #include #elif defined(CONFIG_ARCH_MVEBU) #include diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 6019ac089e..9ced9c0fa8 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -46,7 +46,7 @@ #include #include -#if defined(CONFIG_KIRKWOOD) +#if defined(CONFIG_ARCH_KIRKWOOD) #define SATAHC_BASE KW_SATA_BASE #else #define SATAHC_BASE MVEBU_AXP_SATA_BASE diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c index 77fe35a42b..d4b2031249 100644 --- a/drivers/i2c/mvtwsi.c +++ b/drivers/i2c/mvtwsi.c @@ -27,7 +27,7 @@ DECLARE_GLOBAL_DATA_PTR; #ifndef CONFIG_DM_I2C #if defined(CONFIG_ARCH_ORION5X) #include -#elif (defined(CONFIG_KIRKWOOD) || defined(CONFIG_ARCH_MVEBU)) +#elif (defined(CONFIG_ARCH_KIRKWOOD) || defined(CONFIG_ARCH_MVEBU)) #include #elif defined(CONFIG_ARCH_SUNXI) #include @@ -821,7 +821,7 @@ static int mvtwsi_i2c_bind(struct udevice *bus) struct mvtwsi_registers *twsi = devfdt_get_addr_ptr(bus); /* Disable the hidden slave in i2c0 of these platforms */ - if ((IS_ENABLED(CONFIG_ARMADA_38X) || IS_ENABLED(CONFIG_KIRKWOOD)) + if ((IS_ENABLED(CONFIG_ARMADA_38X) || IS_ENABLED(CONFIG_ARCH_KIRKWOOD)) && bus->req_seq == 0) twsi_disable_i2c_slave(twsi); diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 4d6716fdb8..f7855c92d3 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -309,7 +309,7 @@ config FSLDMAFEC config MVGBE bool "Marvell Orion5x/Kirkwood network interface support" - depends on KIRKWOOD || ARCH_ORION5X + depends on ARCH_KIRKWOOD || ARCH_ORION5X select PHYLIB if DM_ETH help This driver supports the network interface units in the diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c index b0b8d349a8..6d56360a20 100644 --- a/drivers/net/mvgbe.c +++ b/drivers/net/mvgbe.c @@ -24,7 +24,7 @@ #include #include -#if defined(CONFIG_KIRKWOOD) +#if defined(CONFIG_ARCH_KIRKWOOD) #include #elif defined(CONFIG_ARCH_ORION5X) #include diff --git a/drivers/spi/kirkwood_spi.c b/drivers/spi/kirkwood_spi.c index c725625146..38fe4143f5 100644 --- a/drivers/spi/kirkwood_spi.c +++ b/drivers/spi/kirkwood_spi.c @@ -13,7 +13,7 @@ #include #include #include -#ifdef CONFIG_KIRKWOOD +#ifdef CONFIG_ARCH_KIRKWOOD #include #endif #include @@ -98,7 +98,7 @@ static int _spi_xfer(struct kwspi_registers *reg, unsigned int bitlen, static struct kwspi_registers *spireg = (struct kwspi_registers *)MVEBU_SPI_BASE; -#ifdef CONFIG_KIRKWOOD +#ifdef CONFIG_ARCH_KIRKWOOD static u32 cs_spi_mpp_back[2]; #endif @@ -107,7 +107,7 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, { struct spi_slave *slave; u32 data; -#ifdef CONFIG_KIRKWOOD +#ifdef CONFIG_ARCH_KIRKWOOD static const u32 kwspi_mpp_config[2][2] = { { MPP0_SPI_SCn, 0 }, /* if cs == 0 */ { MPP7_SPI_SCn, 0 } /* if cs != 0 */ @@ -135,7 +135,7 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, writel(KWSPI_SMEMRDIRQ, &spireg->irq_cause); writel(KWSPI_IRQMASK, &spireg->irq_mask); -#ifdef CONFIG_KIRKWOOD +#ifdef CONFIG_ARCH_KIRKWOOD /* program mpp registers to select SPI_CSn */ kirkwood_mpp_conf(kwspi_mpp_config[cs ? 1 : 0], cs_spi_mpp_back); #endif @@ -145,7 +145,7 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs, void spi_free_slave(struct spi_slave *slave) { -#ifdef CONFIG_KIRKWOOD +#ifdef CONFIG_ARCH_KIRKWOOD kirkwood_mpp_conf(cs_spi_mpp_back, NULL); #endif free(slave); diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index cc9646d40a..cbfb54c5a2 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -135,7 +135,7 @@ config USB_EHCI_ATMEL config USB_EHCI_MARVELL bool "Support for Marvell on-chip EHCI USB controller" - depends on ARCH_MVEBU || KIRKWOOD || ARCH_ORION5X + depends on ARCH_MVEBU || ARCH_KIRKWOOD || ARCH_ORION5X default y ---help--- Enables support for the on-chip EHCI controller on MVEBU SoCs. diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c index 3b10cdfc58..5a9bd549e3 100644 --- a/drivers/usb/host/ehci-marvell.c +++ b/drivers/usb/host/ehci-marvell.c @@ -13,7 +13,7 @@ #include #include -#if defined(CONFIG_KIRKWOOD) +#if defined(CONFIG_ARCH_KIRKWOOD) #include #elif defined(CONFIG_ARCH_ORION5X) #include diff --git a/tools/Makefile b/tools/Makefile index 1f9144f028..879c3fd4a7 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -5,7 +5,7 @@ # Enable all the config-independent tools ifneq ($(HOST_TOOLS_ALL),) -CONFIG_KIRKWOOD = y +CONFIG_ARCH_KIRKWOOD = y CONFIG_LCD_LOGO = y CONFIG_CMD_LOADS = y CONFIG_CMD_NET = y @@ -199,7 +199,7 @@ ubsha1-objs := os_support.o ubsha1.o lib/sha1.o HOSTCFLAGS_ubsha1.o := -pedantic -hostprogs-$(CONFIG_KIRKWOOD) += kwboot +hostprogs-$(CONFIG_ARCH_KIRKWOOD) += kwboot hostprogs-$(CONFIG_ARCH_MVEBU) += kwboot hostprogs-y += proftool hostprogs-$(CONFIG_STATIC_RELA) += relocate-rela From 18138ab20347ffe5a2b80dd180026dae697a160d Mon Sep 17 00:00:00 2001 From: Trevor Woerner Date: Wed, 6 May 2020 08:02:41 -0400 Subject: [PATCH 12/24] rename symbol: CONFIG_TEGRA -> CONFIG_ARCH_TEGRA Have this symbol follow the pattern of all other such symbols. Signed-off-by: Trevor Woerner --- Makefile | 4 ++-- arch/arm/Kconfig | 2 +- arch/arm/Makefile | 7 +++---- arch/arm/cpu/arm720t/interrupts.c | 2 +- arch/arm/cpu/armv7/Kconfig | 2 +- arch/arm/dts/Makefile | 2 +- arch/arm/mach-tegra/Kconfig | 2 +- common/spl/Kconfig | 4 ++-- config.mk | 2 +- configs/apalis-tk1_defconfig | 2 +- configs/apalis_t30_defconfig | 2 +- configs/beaver_defconfig | 2 +- configs/cardhu_defconfig | 2 +- configs/cei-tk1-som_defconfig | 2 +- configs/colibri_t20_defconfig | 2 +- configs/colibri_t30_defconfig | 2 +- configs/dalmore_defconfig | 2 +- configs/e2220-1170_defconfig | 2 +- configs/harmony_defconfig | 2 +- configs/jetson-tk1_defconfig | 2 +- configs/medcom-wide_defconfig | 2 +- configs/nyan-big_defconfig | 2 +- configs/p2371-0000_defconfig | 2 +- configs/p2371-2180_defconfig | 2 +- configs/p2571_defconfig | 2 +- configs/p2771-0000-000_defconfig | 2 +- configs/p2771-0000-500_defconfig | 2 +- configs/p3450-0000_defconfig | 2 +- configs/paz00_defconfig | 2 +- configs/plutux_defconfig | 2 +- configs/seaboard_defconfig | 2 +- configs/tec-ng_defconfig | 2 +- configs/tec_defconfig | 2 +- configs/trimslice_defconfig | 2 +- configs/venice2_defconfig | 2 +- configs/ventana_defconfig | 2 +- disk/Kconfig | 4 ++-- drivers/i2c/Kconfig | 2 +- drivers/mailbox/Kconfig | 2 +- drivers/mmc/Kconfig | 2 +- drivers/pci/Kconfig | 2 +- drivers/usb/host/Kconfig | 2 +- drivers/video/Kconfig | 2 +- include/serial.h | 2 +- 44 files changed, 49 insertions(+), 50 deletions(-) diff --git a/Makefile b/Makefile index 97fd492bc0..12ecce3e7e 100644 --- a/Makefile +++ b/Makefile @@ -929,7 +929,7 @@ ALL-y += u-boot-sunxi-with-spl.bin endif # enable combined SPL/u-boot/dtb rules for tegra -ifeq ($(CONFIG_TEGRA)$(CONFIG_SPL),yy) +ifeq ($(CONFIG_ARCH_TEGRA)$(CONFIG_SPL),yy) ALL-y += u-boot-tegra.bin u-boot-nodtb-tegra.bin ALL-$(CONFIG_OF_SEPARATE) += u-boot-dtb-tegra.bin endif @@ -1625,7 +1625,7 @@ endif u-boot-x86-with-spl.bin: spl/u-boot-spl.bin u-boot.bin FORCE $(call if_changed,binman) -ifneq ($(CONFIG_TEGRA),) +ifneq ($(CONFIG_ARCH_TEGRA),) ifneq ($(CONFIG_BINMAN),) # Makes u-boot-dtb-tegra.bin u-boot-tegra.bin u-boot-nodtb-tegra.bin %-dtb-tegra.bin %-tegra.bin %-nodtb-tegra.bin: \ diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 8bdcf3409d..6152b11b10 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1142,7 +1142,7 @@ config ARCH_ZYNQMP imply MP imply DM_USB_GADGET -config TEGRA +config ARCH_TEGRA bool "NVIDIA Tegra" imply DISTRO_DEFAULTS imply FAT_WRITE diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 9b3ca9772c..e91b37fb34 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0+ -ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TEGRA),yy) +ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_ARCH_TEGRA),yy) CONFIG_CPU_V7A= CONFIG_CPU_ARM720T=y endif @@ -22,7 +22,7 @@ arch-$(CONFIG_ARM64) =-march=armv8-a # On Tegra systems we must build SPL for the armv4 core on the device # but otherwise we can use the value in CONFIG_SYS_ARM_ARCH -ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TEGRA),yy) +ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_ARCH_TEGRA),yy) arch-y += -D__LINUX_ARM_ARCH__=4 else arch-y += -D__LINUX_ARM_ARCH__=$(CONFIG_SYS_ARM_ARCH) @@ -76,8 +76,7 @@ machine-$(CONFIG_ARCH_SOCFPGA) += socfpga machine-$(CONFIG_STM32) += stm32 machine-$(CONFIG_ARCH_STM32MP) += stm32mp machine-$(CONFIG_ARCH_SUNXI) += sunxi -# TODO: rename CONFIG_TEGRA -> CONFIG_ARCH_TEGRA -machine-$(CONFIG_TEGRA) += tegra +machine-$(CONFIG_ARCH_TEGRA) += tegra machine-$(CONFIG_ARCH_U8500) += u8500 machine-$(CONFIG_ARCH_UNIPHIER) += uniphier machine-$(CONFIG_ARCH_VERSAL) += versal diff --git a/arch/arm/cpu/arm720t/interrupts.c b/arch/arm/cpu/arm720t/interrupts.c index 8437717a7b..f0fc58dead 100644 --- a/arch/arm/cpu/arm720t/interrupts.c +++ b/arch/arm/cpu/arm720t/interrupts.c @@ -11,7 +11,7 @@ #include -#if defined(CONFIG_TEGRA) +#if defined(CONFIG_ARCH_TEGRA) static ulong timestamp; static ulong lastdec; diff --git a/arch/arm/cpu/armv7/Kconfig b/arch/arm/cpu/armv7/Kconfig index 73d57a2aae..14569e560b 100644 --- a/arch/arm/cpu/armv7/Kconfig +++ b/arch/arm/cpu/armv7/Kconfig @@ -19,7 +19,7 @@ config ARMV7_NONSEC config ARMV7_BOOT_SEC_DEFAULT bool "Boot in secure mode by default" if EXPERT depends on ARMV7_NONSEC - default y if TEGRA + default y if ARCH_TEGRA ---help--- Say Y here to boot in secure mode by default even if non-secure mode is supported. This option is useful to boot kernels which do not diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 66fcfc5646..ca663a86f2 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -162,7 +162,7 @@ dtb-$(CONFIG_ARCH_MESON) += \ meson-g12b-a311d-khadas-vim3.dtb \ meson-sm1-khadas-vim3l.dtb \ meson-sm1-sei610.dtb -dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \ +dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \ tegra20-medcom-wide.dtb \ tegra20-paz00.dtb \ tegra20-plutux.dtb \ diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index ff9f29f2d5..00facf492e 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -1,4 +1,4 @@ -if TEGRA +if ARCH_TEGRA config SPL_GPIO_SUPPORT default y diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 6f37f75650..414b6f396d 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -970,7 +970,7 @@ config SPL_POWER_DOMAIN config SPL_RAM_SUPPORT bool "Support booting from RAM" - default y if MICROBLAZE || ARCH_SOCFPGA || TEGRA || ARCH_ZYNQ + default y if MICROBLAZE || ARCH_SOCFPGA || ARCH_TEGRA || ARCH_ZYNQ help Enable booting of an image in RAM. The image can be preloaded or it can be loaded by SPL directly into RAM (e.g. using USB). @@ -978,7 +978,7 @@ config SPL_RAM_SUPPORT config SPL_RAM_DEVICE bool "Support booting from preloaded image in RAM" depends on SPL_RAM_SUPPORT - default y if MICROBLAZE || ARCH_SOCFPGA || TEGRA || ARCH_ZYNQ + default y if MICROBLAZE || ARCH_SOCFPGA || ARCH_TEGRA || ARCH_ZYNQ help Enable booting of an image already loaded in RAM. The image has to be already in memory when SPL takes over, e.g. loaded by the boot diff --git a/config.mk b/config.mk index 097d1f67d2..7bb1fd4ed1 100644 --- a/config.mk +++ b/config.mk @@ -23,7 +23,7 @@ VENDOR := ARCH := $(CONFIG_SYS_ARCH:"%"=%) CPU := $(CONFIG_SYS_CPU:"%"=%) ifdef CONFIG_SPL_BUILD -ifdef CONFIG_TEGRA +ifdef CONFIG_ARCH_TEGRA CPU := arm720t endif endif diff --git a/configs/apalis-tk1_defconfig b/configs/apalis-tk1_defconfig index 150941fd1a..604a473fa9 100644 --- a/configs/apalis-tk1_defconfig +++ b/configs/apalis-tk1_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80110000 CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_ENV_SIZE=0x2000 diff --git a/configs/apalis_t30_defconfig b/configs/apalis_t30_defconfig index b2e3ff6614..a5db39129e 100644 --- a/configs/apalis_t30_defconfig +++ b/configs/apalis_t30_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80110000 CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_ENV_SIZE=0x2000 diff --git a/configs/beaver_defconfig b/configs/beaver_defconfig index d70467012c..89f4dc1144 100644 --- a/configs/beaver_defconfig +++ b/configs/beaver_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80110000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/cardhu_defconfig b/configs/cardhu_defconfig index 6145861060..bf2f5f5208 100644 --- a/configs/cardhu_defconfig +++ b/configs/cardhu_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80110000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/cei-tk1-som_defconfig b/configs/cei-tk1-som_defconfig index c30b37e8c7..366a90dd42 100644 --- a/configs/cei-tk1-som_defconfig +++ b/configs/cei-tk1-som_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80110000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig index cf3e4e0beb..a1d6ab206a 100644 --- a/configs/colibri_t20_defconfig +++ b/configs/colibri_t20_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x00110000 CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_ENV_SIZE=0x10000 diff --git a/configs/colibri_t30_defconfig b/configs/colibri_t30_defconfig index 4937433af0..d44ed05784 100644 --- a/configs/colibri_t30_defconfig +++ b/configs/colibri_t30_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80110000 CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_ENV_SIZE=0x2000 diff --git a/configs/dalmore_defconfig b/configs/dalmore_defconfig index cad56f131b..483a7cfeb5 100644 --- a/configs/dalmore_defconfig +++ b/configs/dalmore_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80110000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/e2220-1170_defconfig b/configs/e2220-1170_defconfig index d9f110ce1e..da418de4cd 100644 --- a/configs/e2220-1170_defconfig +++ b/configs/e2220-1170_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80080000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/harmony_defconfig b/configs/harmony_defconfig index 197add3945..ec8f4dad22 100644 --- a/configs/harmony_defconfig +++ b/configs/harmony_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x00110000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0x1FFE0000 diff --git a/configs/jetson-tk1_defconfig b/configs/jetson-tk1_defconfig index 116950ea7b..74f4456d89 100644 --- a/configs/jetson-tk1_defconfig +++ b/configs/jetson-tk1_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80110000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/medcom-wide_defconfig b/configs/medcom-wide_defconfig index bfca54d857..95c9dfa807 100644 --- a/configs/medcom-wide_defconfig +++ b/configs/medcom-wide_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x00110000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0x1FFE0000 diff --git a/configs/nyan-big_defconfig b/configs/nyan-big_defconfig index 2b1bcb8695..8abb1a432a 100644 --- a/configs/nyan-big_defconfig +++ b/configs/nyan-big_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x81000100 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/p2371-0000_defconfig b/configs/p2371-0000_defconfig index 3c183df470..d8d28ed6ea 100644 --- a/configs/p2371-0000_defconfig +++ b/configs/p2371-0000_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80080000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/p2371-2180_defconfig b/configs/p2371-2180_defconfig index 3aa6f578d7..ec4c5909ac 100644 --- a/configs/p2371-2180_defconfig +++ b/configs/p2371-2180_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80080000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/p2571_defconfig b/configs/p2571_defconfig index 37685eaebc..95188a142a 100644 --- a/configs/p2571_defconfig +++ b/configs/p2571_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80080000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/p2771-0000-000_defconfig b/configs/p2771-0000-000_defconfig index e3d42a20e7..befa46a4cd 100644 --- a/configs/p2771-0000-000_defconfig +++ b/configs/p2771-0000-000_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80080000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/p2771-0000-500_defconfig b/configs/p2771-0000-500_defconfig index 51715d0b23..71cde4e41d 100644 --- a/configs/p2771-0000-500_defconfig +++ b/configs/p2771-0000-500_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80080000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/p3450-0000_defconfig b/configs/p3450-0000_defconfig index c12d58a44d..2bf8f97ca2 100644 --- a/configs/p3450-0000_defconfig +++ b/configs/p3450-0000_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80080000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/paz00_defconfig b/configs/paz00_defconfig index 8536c64fc0..4330d141a3 100644 --- a/configs/paz00_defconfig +++ b/configs/paz00_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x00110000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/plutux_defconfig b/configs/plutux_defconfig index 3c716d6e27..6b70a240f5 100644 --- a/configs/plutux_defconfig +++ b/configs/plutux_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x00110000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0x1FFE0000 diff --git a/configs/seaboard_defconfig b/configs/seaboard_defconfig index 9c285b96aa..ba19ceb5ac 100644 --- a/configs/seaboard_defconfig +++ b/configs/seaboard_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x00110000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/tec-ng_defconfig b/configs/tec-ng_defconfig index 2fc0470b34..d31db78818 100644 --- a/configs/tec-ng_defconfig +++ b/configs/tec-ng_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80110000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/tec_defconfig b/configs/tec_defconfig index fd7b1b6267..34df740bc5 100644 --- a/configs/tec_defconfig +++ b/configs/tec_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x00110000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0x1FFE0000 diff --git a/configs/trimslice_defconfig b/configs/trimslice_defconfig index fb9be305b6..230a3b836d 100644 --- a/configs/trimslice_defconfig +++ b/configs/trimslice_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x00110000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFE000 diff --git a/configs/venice2_defconfig b/configs/venice2_defconfig index 94211e5091..58fb867e9e 100644 --- a/configs/venice2_defconfig +++ b/configs/venice2_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x80110000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/configs/ventana_defconfig b/configs/ventana_defconfig index bb94e23ad5..9ff4f1c8ac 100644 --- a/configs/ventana_defconfig +++ b/configs/ventana_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_TEGRA=y +CONFIG_ARCH_TEGRA=y CONFIG_SYS_TEXT_BASE=0x00110000 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0xFFFFE000 diff --git a/disk/Kconfig b/disk/Kconfig index 747275c2ba..cee16a80bc 100644 --- a/disk/Kconfig +++ b/disk/Kconfig @@ -53,7 +53,7 @@ config ISO_PARTITION bool "Enable ISO partition table" depends on PARTITIONS default y if DISTRO_DEFAULTS - default y if MIPS || TEGRA + default y if MIPS || ARCH_TEGRA config SPL_ISO_PARTITION bool "Enable ISO partition table for SPL" @@ -75,7 +75,7 @@ config EFI_PARTITION bool "Enable EFI GPT partition table" depends on PARTITIONS default y if DISTRO_DEFAULTS - default y if TEGRA + default y if ARCH_TEGRA select LIB_UUID help Say Y here if you would like to use device under U-Boot which diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index e42b6516bf..f8b18de8f3 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -402,7 +402,7 @@ config SYS_I2C_STM32F7 config SYS_I2C_TEGRA bool "NVIDIA Tegra internal I2C controller" - depends on TEGRA + depends on ARCH_TEGRA help Support for NVIDIA I2C controller available in Tegra SoCs. diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig index 85c2a829ae..dd4b0ac0c3 100644 --- a/drivers/mailbox/Kconfig +++ b/drivers/mailbox/Kconfig @@ -19,7 +19,7 @@ config SANDBOX_MBOX config TEGRA_HSP bool "Enable Tegra HSP controller support" - depends on DM_MAILBOX && TEGRA + depends on DM_MAILBOX && ARCH_TEGRA help This enables support for the NVIDIA Tegra HSP Hw module, which implements doorbells, mailboxes, semaphores, and shared interrupts. diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 8f0df568b9..3c4f057373 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -616,7 +616,7 @@ config MMC_SDHCI_TANGIER config MMC_SDHCI_TEGRA bool "SDHCI platform support for the Tegra SD/MMC Controller" - depends on TEGRA + depends on ARCH_TEGRA select BOUNCE_BUFFER default y help diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 437cd9a055..6fc26884e2 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -111,7 +111,7 @@ config PCI_SANDBOX config PCI_TEGRA bool "Tegra PCI support" - depends on TEGRA + depends on ARCH_TEGRA depends on (TEGRA186 && POWER_DOMAIN) || (!TEGRA186) help Enable support for the PCIe controller found on some generations of diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index cbfb54c5a2..f0a9ed226c 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -203,7 +203,7 @@ config USB_EHCI_PCI config USB_EHCI_TEGRA bool "Support for NVIDIA Tegra on-chip EHCI USB controller" - depends on TEGRA + depends on ARCH_TEGRA ---help--- Enable support for Tegra on-chip EHCI USB controller diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 7c5012a67f..38123543a5 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -128,7 +128,7 @@ config CONSOLE_TRUETYPE_SIZE config SYS_WHITE_ON_BLACK bool "Display console as white on a black background" - default y if ARCH_AT91 || ARCH_EXYNOS || ARCH_ROCKCHIP || TEGRA || X86 || ARCH_SUNXI + default y if ARCH_AT91 || ARCH_EXYNOS || ARCH_ROCKCHIP || ARCH_TEGRA || X86 || ARCH_SUNXI help Normally the display is black on a white background, Enable this option to invert this, i.e. white on a black background. This can be diff --git a/include/serial.h b/include/serial.h index 54b21a0470..c590637b1f 100644 --- a/include/serial.h +++ b/include/serial.h @@ -28,7 +28,7 @@ extern struct serial_device *default_serial_console(void); #if defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \ defined(CONFIG_MPC86xx) || \ - defined(CONFIG_TEGRA) || defined(CONFIG_SYS_COREBOOT) || \ + defined(CONFIG_ARCH_TEGRA) || defined(CONFIG_SYS_COREBOOT) || \ defined(CONFIG_MICROBLAZE) extern struct serial_device serial0_device; extern struct serial_device serial1_device; From 71f6354b0e3a098ddbddd7c59bbfda4c60c88381 Mon Sep 17 00:00:00 2001 From: Trevor Woerner Date: Wed, 6 May 2020 08:02:42 -0400 Subject: [PATCH 13/24] rename symbol: CONFIG_STM32 -> CONFIG_ARCH_STM32 Have this symbol follow the pattern of all other such symbols. Signed-off-by: Trevor Woerner --- arch/arm/Kconfig | 2 +- arch/arm/Makefile | 2 +- arch/arm/mach-stm32/Kconfig | 2 +- configs/stm32f429-discovery_defconfig | 2 +- configs/stm32f429-evaluation_defconfig | 2 +- configs/stm32f469-discovery_defconfig | 2 +- configs/stm32f746-disco_defconfig | 2 +- configs/stm32f769-disco_defconfig | 2 +- configs/stm32h743-disco_defconfig | 2 +- configs/stm32h743-eval_defconfig | 2 +- drivers/gpio/Kconfig | 2 +- drivers/misc/Kconfig | 2 +- drivers/reset/Kconfig | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 6152b11b10..ef7da27877 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1607,7 +1607,7 @@ config ARCH_UNIPHIER Support for UniPhier SoC family developed by Socionext Inc. (formerly, System LSI Business Division of Panasonic Corporation) -config STM32 +config ARCH_STM32 bool "Support STMicroelectronics STM32 MCU with cortex M" select CPU_V7M select DM diff --git a/arch/arm/Makefile b/arch/arm/Makefile index e91b37fb34..94eb50bf72 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -73,7 +73,7 @@ machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip machine-$(CONFIG_ARCH_S5PC1XX) += s5pc1xx machine-$(CONFIG_ARCH_SNAPDRAGON) += snapdragon machine-$(CONFIG_ARCH_SOCFPGA) += socfpga -machine-$(CONFIG_STM32) += stm32 +machine-$(CONFIG_ARCH_STM32) += stm32 machine-$(CONFIG_ARCH_STM32MP) += stm32mp machine-$(CONFIG_ARCH_SUNXI) += sunxi machine-$(CONFIG_ARCH_TEGRA) += tegra diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig index cea5ee2ce5..b42b05669a 100644 --- a/arch/arm/mach-stm32/Kconfig +++ b/arch/arm/mach-stm32/Kconfig @@ -1,4 +1,4 @@ -if STM32 +if ARCH_STM32 config STM32F4 bool "stm32f4 family" diff --git a/configs/stm32f429-discovery_defconfig b/configs/stm32f429-discovery_defconfig index 52a577f97b..da43317ae5 100644 --- a/configs/stm32f429-discovery_defconfig +++ b/configs/stm32f429-discovery_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_STM32=y +CONFIG_ARCH_STM32=y CONFIG_SYS_TEXT_BASE=0x08000000 CONFIG_SYS_MALLOC_F_LEN=0xF00 CONFIG_ENV_SIZE=0x2000 diff --git a/configs/stm32f429-evaluation_defconfig b/configs/stm32f429-evaluation_defconfig index 24f79b51bf..f67ce3e407 100644 --- a/configs/stm32f429-evaluation_defconfig +++ b/configs/stm32f429-evaluation_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_STM32=y +CONFIG_ARCH_STM32=y CONFIG_SYS_TEXT_BASE=0x08000000 CONFIG_SYS_MALLOC_F_LEN=0xF00 CONFIG_ENV_SIZE=0x2000 diff --git a/configs/stm32f469-discovery_defconfig b/configs/stm32f469-discovery_defconfig index 0ab00514d5..082fb0cc19 100644 --- a/configs/stm32f469-discovery_defconfig +++ b/configs/stm32f469-discovery_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_STM32=y +CONFIG_ARCH_STM32=y CONFIG_SYS_TEXT_BASE=0x08000000 CONFIG_SYS_MALLOC_F_LEN=0xF00 CONFIG_ENV_SIZE=0x2000 diff --git a/configs/stm32f746-disco_defconfig b/configs/stm32f746-disco_defconfig index cdfa8bbbc4..be030bfb37 100644 --- a/configs/stm32f746-disco_defconfig +++ b/configs/stm32f746-disco_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_STM32=y +CONFIG_ARCH_STM32=y CONFIG_SYS_TEXT_BASE=0x08008000 CONFIG_SYS_MALLOC_F_LEN=0xE00 CONFIG_ENV_SIZE=0x2000 diff --git a/configs/stm32f769-disco_defconfig b/configs/stm32f769-disco_defconfig index c40730e14a..09fbcc968f 100644 --- a/configs/stm32f769-disco_defconfig +++ b/configs/stm32f769-disco_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_STM32=y +CONFIG_ARCH_STM32=y CONFIG_SYS_TEXT_BASE=0x08008000 CONFIG_SYS_MALLOC_F_LEN=0xE00 CONFIG_ENV_SIZE=0x2000 diff --git a/configs/stm32h743-disco_defconfig b/configs/stm32h743-disco_defconfig index 6b7a1d6d68..21ea90a2c1 100644 --- a/configs/stm32h743-disco_defconfig +++ b/configs/stm32h743-disco_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_STM32=y +CONFIG_ARCH_STM32=y CONFIG_SYS_TEXT_BASE=0x08000000 CONFIG_SYS_MALLOC_F_LEN=0xF00 CONFIG_ENV_SIZE=0x2000 diff --git a/configs/stm32h743-eval_defconfig b/configs/stm32h743-eval_defconfig index 7564d97707..432fce0181 100644 --- a/configs/stm32h743-eval_defconfig +++ b/configs/stm32h743-eval_defconfig @@ -1,5 +1,5 @@ CONFIG_ARM=y -CONFIG_STM32=y +CONFIG_ARCH_STM32=y CONFIG_SYS_TEXT_BASE=0x08000000 CONFIG_SYS_MALLOC_F_LEN=0xF00 CONFIG_ENV_SIZE=0x2000 diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 2081520f42..d87f6cc105 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -318,7 +318,7 @@ config PIC32_GPIO config STM32_GPIO bool "ST STM32 GPIO driver" - depends on DM_GPIO && (STM32 || ARCH_STM32MP) + depends on DM_GPIO && (ARCH_STM32 || ARCH_STM32MP) default y help Device model driver support for STM32 GPIO controller. It should be diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 766402745d..81ed9eb209 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -310,7 +310,7 @@ config STM32MP_FUSE config STM32_RCC bool "Enable RCC driver for the STM32 SoC's family" - depends on (STM32 || ARCH_STM32MP) && MISC + depends on (ARCH_STM32 || ARCH_STM32MP) && MISC help Enable the STM32 RCC driver. The RCC block (Reset and Clock Control block) is responsible of the management of the clock and reset diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index 75ccd65799..65101ab4e8 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -30,7 +30,7 @@ config STI_RESET config STM32_RESET bool "Enable the STM32 reset" - depends on STM32 || ARCH_STM32MP + depends on ARCH_STM32 || ARCH_STM32MP help Support for reset controllers on STMicroelectronics STM32 family SoCs. This resset driver is compatible with STM32 F4/F7 and H7 SoCs. From 1bc5d3a568efe2e0337760c72e78961bf380ba34 Mon Sep 17 00:00:00 2001 From: Trevor Woerner Date: Wed, 6 May 2020 08:02:43 -0400 Subject: [PATCH 14/24] drivers/reset/Kconfig: fix typo Signed-off-by: Trevor Woerner --- drivers/reset/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index 65101ab4e8..88d3be1593 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -33,7 +33,7 @@ config STM32_RESET depends on ARCH_STM32 || ARCH_STM32MP help Support for reset controllers on STMicroelectronics STM32 family SoCs. - This resset driver is compatible with STM32 F4/F7 and H7 SoCs. + This reset driver is compatible with STM32 F4/F7 and H7 SoCs. config TEGRA_CAR_RESET bool "Enable Tegra CAR-based reset driver" From 25ec2282ebbcd09af0f8f714abbc9bab89659e9a Mon Sep 17 00:00:00 2001 From: Petr Borsodi Date: Thu, 7 May 2020 12:25:55 +0200 Subject: [PATCH 15/24] JFFS2: Process obsolete nodes as well as accurate ones Obsolete nodes (ie. without the JFFS2_NODE_ACCURATE flag) were ignored because they had seemingly invalid crc. This could lead to finding the phantom node header in obsolete node data. Signed-off-by: Petr Borsodi --- fs/jffs2/jffs2_1pass.c | 73 +++++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 26 deletions(-) diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c index 5912cde838..68db8c3ba4 100644 --- a/fs/jffs2/jffs2_1pass.c +++ b/fs/jffs2/jffs2_1pass.c @@ -1471,7 +1471,7 @@ static u32 jffs2_1pass_build_lists(struct part_info * part) { struct b_lists *pL; - struct jffs2_unknown_node *node; + union jffs2_node_union *node; u32 nr_sectors; u32 i; u32 counter4 = 0; @@ -1507,6 +1507,7 @@ jffs2_1pass_build_lists(struct part_info * part) #endif /* Indicates a sector with a CLEANMARKER was found */ int clean_sector = 0; + struct jffs2_unknown_node crcnode; /* Set buf_size to maximum length */ buf_size = DEFAULT_EMPTY_SCAN_SIZE; @@ -1600,9 +1601,10 @@ jffs2_1pass_build_lists(struct part_info * part) } prevofs = ofs; if (sector_ofs + part->sector_size < - ofs + sizeof(*node)) + ofs + sizeof(struct jffs2_unknown_node)) break; - if (buf_ofs + buf_len < ofs + sizeof(*node)) { + if (buf_ofs + buf_len < + ofs + sizeof(struct jffs2_unknown_node)) { buf_len = min_t(uint32_t, buf_size, sector_ofs + part->sector_size - ofs); get_fl_mem((u32)part->offset + ofs, buf_len, @@ -1610,7 +1612,7 @@ jffs2_1pass_build_lists(struct part_info * part) buf_ofs = ofs; } - node = (struct jffs2_unknown_node *)&buf[ofs-buf_ofs]; + node = (union jffs2_node_union *)&buf[ofs - buf_ofs]; if (*(uint32_t *)(&buf[ofs-buf_ofs]) == 0xffffffff) { uint32_t inbuf_ofs; @@ -1665,23 +1667,41 @@ jffs2_1pass_build_lists(struct part_info * part) * the 'clean_sector' flag. */ clean_sector = 0; - if (node->magic != JFFS2_MAGIC_BITMASK || - !hdr_crc(node)) { + if (node->u.magic != JFFS2_MAGIC_BITMASK) { ofs += 4; counter4++; continue; } - if (ofs + node->totlen > - sector_ofs + part->sector_size) { + + crcnode.magic = node->u.magic; + crcnode.nodetype = node->u.nodetype | JFFS2_NODE_ACCURATE; + crcnode.totlen = node->u.totlen; + crcnode.hdr_crc = node->u.hdr_crc; + if (!hdr_crc(&crcnode)) { ofs += 4; counter4++; continue; } + + if (ofs + node->u.totlen > sector_ofs + part->sector_size) { + ofs += 4; + counter4++; + continue; + } + + if (!(node->u.nodetype & JFFS2_NODE_ACCURATE)) { + DEBUGF("Obsolete node type: %x len %d offset 0x%x\n", + node->u.nodetype, node->u.totlen, ofs); + ofs += ((node->u.totlen + 3) & ~3); + counterF++; + continue; + } + /* if its a fragment add it */ - switch (node->nodetype) { + switch (node->u.nodetype) { case JFFS2_NODETYPE_INODE: - if (buf_ofs + buf_len < ofs + sizeof(struct - jffs2_raw_inode)) { + if (buf_ofs + buf_len < + ofs + sizeof(struct jffs2_raw_inode)) { buf_len = min_t(uint32_t, sizeof(struct jffs2_raw_inode), sector_ofs + @@ -1701,8 +1721,8 @@ jffs2_1pass_build_lists(struct part_info * part) jffs2_free_cache(part); return 0; } - if (max_totlen < node->totlen) - max_totlen = node->totlen; + if (max_totlen < node->u.totlen) + max_totlen = node->u.totlen; break; case JFFS2_NODETYPE_DIRENT: if (buf_ofs + buf_len < ofs + sizeof(struct @@ -1711,7 +1731,7 @@ jffs2_1pass_build_lists(struct part_info * part) jffs2_raw_dirent *) node)->nsize) { buf_len = min_t(uint32_t, - node->totlen, + node->u.totlen, sector_ofs + part->sector_size - ofs); @@ -1736,19 +1756,19 @@ jffs2_1pass_build_lists(struct part_info * part) jffs2_free_cache(part); return 0; } - if (max_totlen < node->totlen) - max_totlen = node->totlen; + if (max_totlen < node->u.totlen) + max_totlen = node->u.totlen; counterN++; break; case JFFS2_NODETYPE_CLEANMARKER: - if (node->totlen != sizeof(struct jffs2_unknown_node)) + if (node->u.totlen != sizeof(struct jffs2_unknown_node)) printf("OOPS Cleanmarker has bad size " "%d != %zu\n", - node->totlen, + node->u.totlen, sizeof(struct jffs2_unknown_node)); - if ((node->totlen == - sizeof(struct jffs2_unknown_node)) && - (ofs == sector_ofs)) { + if (node->u.totlen == + sizeof(struct jffs2_unknown_node) && + ofs == sector_ofs) { /* * Found a CLEANMARKER at the beginning * of the sector. It's in the correct @@ -1758,20 +1778,21 @@ jffs2_1pass_build_lists(struct part_info * part) } break; case JFFS2_NODETYPE_PADDING: - if (node->totlen < sizeof(struct jffs2_unknown_node)) + if (node->u.totlen < + sizeof(struct jffs2_unknown_node)) printf("OOPS Padding has bad size " "%d < %zu\n", - node->totlen, + node->u.totlen, sizeof(struct jffs2_unknown_node)); break; case JFFS2_NODETYPE_SUMMARY: break; default: printf("Unknown node type: %x len %d offset 0x%x\n", - node->nodetype, - node->totlen, ofs); + node->u.nodetype, + node->u.totlen, ofs); } - ofs += ((node->totlen + 3) & ~3); + ofs += ((node->u.totlen + 3) & ~3); counterF++; } } From 69dbebd1f70a983bede22ffb8be36fbf7eaa7d61 Mon Sep 17 00:00:00 2001 From: Petr Borsodi Date: Thu, 7 May 2020 12:25:56 +0200 Subject: [PATCH 16/24] JFFS2: Add useful fields into lists The inode list uses version and ino, the dirent list uses version and pino. This information is collected during scanning, reducing accesses to flash and significantly speeding up ls and read. Signed-off-by: Petr Borsodi --- fs/jffs2/jffs2_1pass.c | 154 +++++++++++++++++++-------------------- fs/jffs2/jffs2_private.h | 5 ++ 2 files changed, 81 insertions(+), 78 deletions(-) diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c index 68db8c3ba4..1115c8682e 100644 --- a/fs/jffs2/jffs2_1pass.c +++ b/fs/jffs2/jffs2_1pass.c @@ -549,7 +549,7 @@ add_node(struct b_list *list) } static struct b_node * -insert_node(struct b_list *list, u32 offset) +insert_node(struct b_list *list) { struct b_node *new; @@ -557,7 +557,6 @@ insert_node(struct b_list *list, u32 offset) putstr("add_node failed!\r\n"); return NULL; } - new->offset = offset; new->next = NULL; if (list->listTail != NULL) @@ -575,18 +574,7 @@ insert_node(struct b_list *list, u32 offset) */ static int compare_inodes(struct b_node *new, struct b_node *old) { - /* - * Only read in the version info from flash, not the entire inode. - * This can make a big difference to speed if flash is slow. - */ - u32 new_version; - u32 old_version; - get_fl_mem(new->offset + offsetof(struct jffs2_raw_inode, version), - sizeof(new_version), &new_version); - get_fl_mem(old->offset + offsetof(struct jffs2_raw_inode, version), - sizeof(old_version), &old_version); - - return new_version > old_version; + return new->version > old->version; } /* Sort directory entries so all entries in the same directory @@ -683,7 +671,7 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 inode, char *dest) uchar *src; int i; u32 counter = 0; -#ifdef CONFIG_SYS_JFFS2_SORT_FRAGMENTS + /* Find file size before loading any data, so fragments that * start past the end of file can be ignored. A fragment * that is partially in the file is loaded, so extra data may @@ -691,35 +679,40 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 inode, char *dest) * This shouldn't cause trouble when loading kernel images, so * we will live with it. */ + int latestOffset = -1; for (b = pL->frag.listHead; b != NULL; b = b->next) { - jNode = (struct jffs2_raw_inode *) get_fl_mem(b->offset, - sizeof(struct jffs2_raw_inode), pL->readbuf); - if ((inode == jNode->ino)) { + if (inode == b->ino) { /* get actual file length from the newest node */ - if (jNode->version >= latestVersion) { - totalSize = jNode->isize; - latestVersion = jNode->version; + if (b->version >= latestVersion) { + latestVersion = b->version; + latestOffset = b->offset; } } + } + + if (latestOffset >= 0) { + jNode = (struct jffs2_raw_inode *)get_fl_mem(latestOffset, + sizeof(struct jffs2_raw_inode), pL->readbuf); + totalSize = jNode->isize; put_fl_mem(jNode, pL->readbuf); } + /* * If no destination is provided, we are done. * Just return the total size. */ if (!dest) return totalSize; -#endif for (b = pL->frag.listHead; b != NULL; b = b->next) { - /* - * Copy just the node and not the data at this point, - * since we don't yet know if we need this data. - */ - jNode = (struct jffs2_raw_inode *)get_fl_mem(b->offset, - sizeof(struct jffs2_raw_inode), - pL->readbuf); - if (inode == jNode->ino) { + if (inode == b->ino) { + /* + * Copy just the node and not the data at this point, + * since we don't yet know if we need this data. + */ + jNode = (struct jffs2_raw_inode *)get_fl_mem(b->offset, + sizeof(struct jffs2_raw_inode), + pL->readbuf); #if 0 putLabeledWord("\r\n\r\nread_inode: totlen = ", jNode->totlen); putLabeledWord("read_inode: inode = ", jNode->ino); @@ -733,14 +726,6 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 inode, char *dest) putLabeledWord("read_inode: flags = ", jNode->flags); #endif -#ifndef CONFIG_SYS_JFFS2_SORT_FRAGMENTS - /* get actual file length from the newest node */ - if (jNode->version >= latestVersion) { - totalSize = jNode->isize; - latestVersion = jNode->version; - } -#endif - if(dest) { /* * Now that the inode has been checked, @@ -804,9 +789,9 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 inode, char *dest) #if 0 putLabeledWord("read_inode: totalSize = ", totalSize); #endif + put_fl_mem(jNode, pL->readbuf); } counter++; - put_fl_mem(jNode, pL->readbuf); } #if 0 @@ -953,13 +938,14 @@ jffs2_1pass_list_inodes(struct b_lists * pL, u32 pino) struct jffs2_raw_dirent *jDir; for (b = pL->dir.listHead; b; b = b->next) { - jDir = (struct jffs2_raw_dirent *) get_node_mem(b->offset, - pL->readbuf); - if (pino == jDir->pino) { + if (pino == b->pino) { u32 i_version = 0; - struct jffs2_raw_inode *jNode, *i = NULL; + int i_offset = -1; + struct jffs2_raw_inode *jNode = NULL; struct b_node *b2; + jDir = (struct jffs2_raw_dirent *) + get_node_mem(b->offset, pL->readbuf); #ifdef CONFIG_SYS_JFFS2_SORT_FRAGMENTS /* Check for more recent versions of this file */ int match; @@ -991,30 +977,27 @@ jffs2_1pass_list_inodes(struct b_lists * pL, u32 pino) } for (b2 = pL->frag.listHead; b2; b2 = b2->next) { - jNode = (struct jffs2_raw_inode *) - get_fl_mem(b2->offset, sizeof(*jNode), - NULL); - if (jNode->ino == jDir->ino && - jNode->version >= i_version) { - i_version = jNode->version; - if (i) - put_fl_mem(i, NULL); - - if (jDir->type == DT_LNK) - i = get_node_mem(b2->offset, - NULL); - else - i = get_fl_mem(b2->offset, - sizeof(*i), - NULL); + if (b2->ino == jDir->ino && + b2->version >= i_version) { + i_version = b2->version; + i_offset = b2->offset; } - put_fl_mem(jNode, NULL); } - dump_inode(pL, jDir, i); - put_fl_mem(i, NULL); + if (i_version >= 0) { + if (jDir->type == DT_LNK) + jNode = get_node_mem(i_offset, NULL); + else + jNode = get_fl_mem(i_offset, + sizeof(*jNode), + NULL); + } + + dump_inode(pL, jDir, jNode); + put_fl_mem(jNode, NULL); + + put_fl_mem(jDir, pL->readbuf); } - put_fl_mem(jDir, pL->readbuf); } return pino; } @@ -1266,7 +1249,7 @@ static int jffs2_sum_process_sum_data(struct part_info *part, uint32_t offset, { void *sp; int i, pass; - void *ret; + struct b_node *b; for (pass = 0; pass < 2; pass++) { sp = summary->sum; @@ -1281,13 +1264,17 @@ static int jffs2_sum_process_sum_data(struct part_info *part, uint32_t offset, if (pass) { spi = sp; - ret = insert_node(&pL->frag, - (u32)part->offset + + b = insert_node(&pL->frag); + if (!b) + return -1; + b->offset = (u32)part->offset + offset + sum_get_unaligned32( - &spi->offset)); - if (ret == NULL) - return -1; + &spi->offset); + b->version = sum_get_unaligned32( + &spi->version); + b->ino = sum_get_unaligned32( + &spi->inode); } sp += JFFS2_SUMMARY_INODE_SIZE; @@ -1298,13 +1285,17 @@ static int jffs2_sum_process_sum_data(struct part_info *part, uint32_t offset, struct jffs2_sum_dirent_flash *spd; spd = sp; if (pass) { - ret = insert_node(&pL->dir, - (u32) part->offset + + b = insert_node(&pL->dir); + if (!b) + return -1; + b->offset = (u32)part->offset + offset + sum_get_unaligned32( - &spd->offset)); - if (ret == NULL) - return -1; + &spd->offset); + b->version = sum_get_unaligned32( + &spd->version); + b->pino = sum_get_unaligned32( + &spd->pino); } sp += JFFS2_SUMMARY_DIRENT_SIZE( @@ -1508,6 +1499,7 @@ jffs2_1pass_build_lists(struct part_info * part) /* Indicates a sector with a CLEANMARKER was found */ int clean_sector = 0; struct jffs2_unknown_node crcnode; + struct b_node *b; /* Set buf_size to maximum length */ buf_size = DEFAULT_EMPTY_SCAN_SIZE; @@ -1715,12 +1707,15 @@ jffs2_1pass_build_lists(struct part_info * part) if (!inode_crc((struct jffs2_raw_inode *)node)) break; - if (insert_node(&pL->frag, (u32) part->offset + - ofs) == NULL) { + b = insert_node(&pL->frag); + if (!b) { free(buf); jffs2_free_cache(part); return 0; } + b->offset = (u32)part->offset + ofs; + b->version = node->i.version; + b->ino = node->i.ino; if (max_totlen < node->u.totlen) max_totlen = node->u.totlen; break; @@ -1750,12 +1745,15 @@ jffs2_1pass_build_lists(struct part_info * part) break; if (! (counterN%100)) puts ("\b\b. "); - if (insert_node(&pL->dir, (u32) part->offset + - ofs) == NULL) { + b = insert_node(&pL->dir); + if (!b) { free(buf); jffs2_free_cache(part); return 0; } + b->offset = (u32)part->offset + ofs; + b->version = node->d.version; + b->pino = node->d.pino; if (max_totlen < node->u.totlen) max_totlen = node->u.totlen; counterN++; diff --git a/fs/jffs2/jffs2_private.h b/fs/jffs2/jffs2_private.h index 06b6ca2919..65d19a76f9 100644 --- a/fs/jffs2/jffs2_private.h +++ b/fs/jffs2/jffs2_private.h @@ -8,6 +8,11 @@ struct b_node { u32 offset; struct b_node *next; enum { CRC_UNKNOWN = 0, CRC_OK, CRC_BAD } datacrc; + u32 version; + union { + u32 ino; /* for inodes */ + u32 pino; /* for dirents */ + }; }; struct b_list { From 774904c910ce9b8b1be82c784ae5163e622ca1c6 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 7 May 2020 18:09:22 +0200 Subject: [PATCH 17/24] Makefile: add file 'defconfig' to clean target File 'defconfig' is a build artifact of 'make savedefconfig'. Remove it when cleaning. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 12ecce3e7e..463fa72e3f 100644 --- a/Makefile +++ b/Makefile @@ -2030,7 +2030,7 @@ CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h tools/version.h \ boot* u-boot* MLO* SPL System.map fit-dtb.blob* \ u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-boot.imx.log \ lpc32xx-* bl31.c bl31.elf bl31_*.bin image.map tispl.bin* \ - idbloader.img flash.bin flash.log + idbloader.img flash.bin flash.log defconfig # Directories & files removed with 'make mrproper' MRPROPER_DIRS += include/config include/generated spl tpl \ From 48069ff84fe5e5e0ad733bef4718e02600b518c4 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Thu, 7 May 2020 20:36:13 +0200 Subject: [PATCH 18/24] lib: rsa: Also check for presence of r-squared property Better than crashing later if it is missing. Signed-off-by: Jan Kiszka --- lib/rsa/rsa-verify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c index 80e817314b..f7ae174cb0 100644 --- a/lib/rsa/rsa-verify.c +++ b/lib/rsa/rsa-verify.c @@ -445,7 +445,7 @@ static int rsa_verify_with_keynode(struct image_sign_info *info, prop.rr = fdt_getprop(blob, node, "rsa,r-squared", NULL); - if (!prop.num_bits || !prop.modulus) { + if (!prop.num_bits || !prop.modulus || !prop.rr) { debug("%s: Missing RSA key info", __func__); return -EFAULT; } From 3988be5fd4369402c410336553bc0ca1920dbe6f Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Thu, 7 May 2020 18:08:10 -0500 Subject: [PATCH 19/24] spl: Always define preloader_console_init A large number of boards call preloader_console_init unconditionally. Currently, they fail to build with CONFIG_SPL_SERIAL=n, because the function is undefined in that case. To fix the build, always define preloader_console_init, but make it no-op when CONFIG_SPL_SERIAL=n. For the few boards that did check for CONFIG_SPL_SERIAL before calling preloader_console_init, remove the checks, since the function can now be called unconditionally. Signed-off-by: Samuel Holland Reviewed-by: Stefan Roese Reviewed-by: Lokesh Vutla --- arch/arm/mach-omap2/boot-common.c | 3 +-- arch/arm/mach-uniphier/spl_board_init.c | 2 -- common/spl/spl.c | 7 +++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c index 7538523724..d57382aabe 100644 --- a/arch/arm/mach-omap2/boot-common.c +++ b/arch/arm/mach-omap2/boot-common.c @@ -194,10 +194,9 @@ u32 spl_mmc_boot_mode(const u32 boot_device) void spl_board_init(void) { -#ifdef CONFIG_SPL_SERIAL_SUPPORT /* Prepare console output */ preloader_console_init(); -#endif + #if defined(CONFIG_SPL_NAND_SUPPORT) || defined(CONFIG_SPL_ONENAND_SUPPORT) gpmc_init(); #endif diff --git a/arch/arm/mach-uniphier/spl_board_init.c b/arch/arm/mach-uniphier/spl_board_init.c index c7262d70a5..48764a1870 100644 --- a/arch/arm/mach-uniphier/spl_board_init.c +++ b/arch/arm/mach-uniphier/spl_board_init.c @@ -112,9 +112,7 @@ void spl_board_init(void) initdata->early_clk_init(); -#ifdef CONFIG_SPL_SERIAL_SUPPORT preloader_console_init(); -#endif ret = initdata->dpll_init(bd); if (ret) { diff --git a/common/spl/spl.c b/common/spl/spl.c index b0f0e1557b..fc5cbbbeba 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -574,8 +574,7 @@ void board_init_f(ulong dummy) } } - if (CONFIG_IS_ENABLED(SERIAL_SUPPORT)) - preloader_console_init(); + preloader_console_init(); } #endif @@ -724,13 +723,13 @@ void board_init_r(gd_t *dummy1, ulong dummy2) jump_to_image_no_args(&spl_image); } -#ifdef CONFIG_SPL_SERIAL_SUPPORT /* * This requires UART clocks to be enabled. In order for this to work the * caller must ensure that the gd pointer is valid. */ void preloader_console_init(void) { +#ifdef CONFIG_SPL_SERIAL_SUPPORT gd->baudrate = CONFIG_BAUDRATE; serial_init(); /* serial communications setup */ @@ -744,8 +743,8 @@ void preloader_console_init(void) #ifdef CONFIG_SPL_DISPLAY_PRINT spl_display_print(); #endif -} #endif +} /** * This function is called before the stack is changed from initial stack to From 542809620e62a3fc2f93c230440c6d105e59b32e Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 9 May 2020 21:21:14 +0200 Subject: [PATCH 20/24] common/board_f: avoid -Wtype-limits warning CONFIG_SYS_SDRAM_BASE maybe zero. Avoid a build warning when compiling with -Wtype-limits. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/board_f.c b/common/board_f.c index 5223453511..a5ead31ca7 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -309,7 +309,7 @@ __weak int mach_cpu_init(void) /* Get the top of usable RAM */ __weak ulong board_get_usable_ram_top(ulong total_size) { -#ifdef CONFIG_SYS_SDRAM_BASE +#if defined(CONFIG_SYS_SDRAM_BASE) && CONFIG_SYS_SDRAM_BASE > 0 /* * Detect whether we have so much RAM that it goes past the end of our * 32-bit address space. If so, clip the usable RAM so it doesn't. From a29162a11c341f5fa8fc177e22f23898fc96689b Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 9 May 2020 17:10:41 +0200 Subject: [PATCH 21/24] tools: mkimage: use /* fallthrough */ as needed GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled. Let's use it consistently. Signed-off-by: Heinrich Schuchardt --- tools/mkimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mkimage.c b/tools/mkimage.c index 336376f8d0..d2cd191787 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -211,7 +211,7 @@ static void process_args(int argc, char **argv) case 'f': datafile = optarg; params.auto_its = !strcmp(datafile, "auto"); - /* no break */ + /* fallthrough */ case 'F': /* * The flattened image tree (FIT) format From b606a6cfa6d3d606f4cdbd1585f74cec409af661 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 9 May 2020 17:12:42 +0200 Subject: [PATCH 22/24] tools: ftdgrep: use /* fallthrough */ as needed GCC recognizes /* fallthrough */ if -Wimplicit-fallthrough=3 is enabled. Let's use it consistently. Signed-off-by: Heinrich Schuchardt --- tools/fdtgrep.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/fdtgrep.c b/tools/fdtgrep.c index 7e168a1e6b..e4112b8f69 100644 --- a/tools/fdtgrep.c +++ b/tools/fdtgrep.c @@ -923,7 +923,9 @@ static const char usage_synopsis[] = /* Helper for getopt case statements */ #define case_USAGE_COMMON_FLAGS \ case 'h': usage(NULL); \ + /* fallthrough */ \ case 'V': util_version(); \ + /* fallthrough */ \ case '?': usage("unknown option"); static const char usage_short_opts[] = @@ -1085,6 +1087,7 @@ static void scan_args(struct display_info *disp, int argc, char *argv[]) switch (opt) { case_USAGE_COMMON_FLAGS + /* fallthrough */ case 'a': disp->show_addr = 1; break; @@ -1096,7 +1099,7 @@ static void scan_args(struct display_info *disp, int argc, char *argv[]) break; case 'C': inc = 0; - /* no break */ + /* fallthrough */ case 'c': type = FDT_IS_COMPAT; break; @@ -1111,7 +1114,7 @@ static void scan_args(struct display_info *disp, int argc, char *argv[]) break; case 'G': inc = 0; - /* no break */ + /* fallthrough */ case 'g': type = FDT_ANY_GLOBAL; break; @@ -1129,7 +1132,7 @@ static void scan_args(struct display_info *disp, int argc, char *argv[]) break; case 'N': inc = 0; - /* no break */ + /* fallthrough */ case 'n': type = FDT_IS_NODE; break; @@ -1148,7 +1151,7 @@ static void scan_args(struct display_info *disp, int argc, char *argv[]) break; case 'P': inc = 0; - /* no break */ + /* fallthrough */ case 'p': type = FDT_IS_PROP; break; From 3b84809b7b34f1f099303767a48f20cfb7c4e78c Mon Sep 17 00:00:00 2001 From: Christophe Leroy Date: Wed, 13 May 2020 05:30:03 +0000 Subject: [PATCH 23/24] MAINTAINERS: POWERPC MPC8XX: Update email address Our email addresses have changed from @c-s.fr to @csgroup.eu Update entry in MAINTAINERS Signed-off-by: Christophe Leroy --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index ec59ce8b88..d671124797 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -818,7 +818,7 @@ S: Maintained F: arch/powerpc/ POWERPC MPC8XX -M: Christophe Leroy +M: Christophe Leroy S: Maintained T: git https://gitlab.denx.de/u-boot/custodians/u-boot-mpc8xx.git F: arch/powerpc/cpu/mpc8xx/ From 24bf6e84ce22cd1b53cb79e4f89a4036af7e9c6b Mon Sep 17 00:00:00 2001 From: Jan Luebbe Date: Wed, 13 May 2020 12:26:24 +0200 Subject: [PATCH 24/24] lib: rsa: avoid overriding the object name when already specified If "object=" is specified in "keydir" when using the pkcs11 engine do not append another "object=". This makes it possible to use object names other than the key name hint. These two string identifiers are not necessarily equal. Signed-off-by: Jan Luebbe Signed-off-by: Bastian Krause Reviewed-by: George McCollister --- doc/uImage.FIT/signature.txt | 8 +++++--- lib/rsa/rsa-sign.c | 22 ++++++++++++++++------ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/doc/uImage.FIT/signature.txt b/doc/uImage.FIT/signature.txt index 3591225a6e..d4afd755e9 100644 --- a/doc/uImage.FIT/signature.txt +++ b/doc/uImage.FIT/signature.txt @@ -481,12 +481,14 @@ openssl. This may require setting up LD_LIBRARY_PATH if engine is not installed to openssl's default search paths. PKCS11 engine support forms "key id" based on "keydir" and with -"key-name-hint". "key-name-hint" is used as "object" name and "keydir" if -defined is used to define (prefix for) which PKCS11 source is being used for -lookup up for the key. +"key-name-hint". "key-name-hint" is used as "object" name (if not defined in +keydir). "keydir" (if defined) is used to define (prefix for) which PKCS11 source +is being used for lookup up for the key. PKCS11 engine key ids: "pkcs11:;object=;type=" +or, if keydir contains "object=" + "pkcs11:;type=" or "pkcs11:object=;type=", diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c index 621ddc4350..40ca1e1f57 100644 --- a/lib/rsa/rsa-sign.c +++ b/lib/rsa/rsa-sign.c @@ -135,9 +135,14 @@ static int rsa_engine_get_pub_key(const char *keydir, const char *name, if (engine_id && !strcmp(engine_id, "pkcs11")) { if (keydir) - snprintf(key_id, sizeof(key_id), - "pkcs11:%s;object=%s;type=public", - keydir, name); + if (strstr(keydir, "object=")) + snprintf(key_id, sizeof(key_id), + "pkcs11:%s;type=public", + keydir); + else + snprintf(key_id, sizeof(key_id), + "pkcs11:%s;object=%s;type=public", + keydir, name); else snprintf(key_id, sizeof(key_id), "pkcs11:object=%s;type=public", @@ -255,9 +260,14 @@ static int rsa_engine_get_priv_key(const char *keydir, const char *name, if (engine_id && !strcmp(engine_id, "pkcs11")) { if (keydir) - snprintf(key_id, sizeof(key_id), - "pkcs11:%s;object=%s;type=private", - keydir, name); + if (strstr(keydir, "object=")) + snprintf(key_id, sizeof(key_id), + "pkcs11:%s;type=private", + keydir); + else + snprintf(key_id, sizeof(key_id), + "pkcs11:%s;object=%s;type=private", + keydir, name); else snprintf(key_id, sizeof(key_id), "pkcs11:object=%s;type=private",