From 5858b90f506e1d3b03afd9dc5f6a5835c2d81675 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 8 Jun 2022 08:24:37 -0400 Subject: spl: Move SPL_LDSCRIPT defaults to one place We want to keep all of the default values for SPL_LDSCRIPT in the same place both for overall clarity as well as not polluting unrelated config files. Signed-off-by: Tom Rini --- common/spl/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'common') diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 2ad2351c6eb..42f2c95228a 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -221,6 +221,18 @@ config SPL_HANDOFF config SPL_LDSCRIPT string "Linker script for the SPL stage" + default "arch/arm/cpu/arm926ejs/sunxi/u-boot-spl.lds" if MACH_SUNIV + default "arch/arm/cpu/armv7/sunxi/u-boot-spl.lds" if ARCH_SUNXI && !MACH_SUNIV && !ARM64 + default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if (ARCH_MX23 || ARCH_MX28) && !SPL_FRAMEWORK + default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136 + default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARCH_LS1043A || ARCH_LS1046A || ARCH_LS2080A + default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64 + default "arch/arm/mach-at91/arm926ejs/u-boot-spl.lds" if ARCH_AT91 && CPU_ARM926EJS + default "arch/arm/mach-at91/armv7/u-boot-spl.lds" if ARCH_AT91 && CPU_V7A + default "arch/arm/mach-omap2/u-boot-spl.lds" if ARCH_MX6 || ARCH_OMAP2PLUS || (ARCH_K3 && !ARM64) + default "arch/arm/mach-zynq/u-boot-spl.lds" if ARCH_ZYNQ + default "board/samsung/common/exynos-uboot-spl.lds" if ARCH_EXYNOS5 || ARCH_EXYNOS4 + default "board/davinci/da8xxevm/u-boot-spl-da850evm.lds" if ARCH_DAVINCI default "arch/\$(ARCH)/cpu/u-boot-spl.lds" help The SPL stage will usually require a different linker-script -- cgit v1.2.3 From 8bea4bf7d31d2ab8a4a0162755b79a4a59a90dcd Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 8 Jun 2022 08:24:39 -0400 Subject: tpl: Ensure all TPL symbols in Kconfig have some TPL dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tighten up symbol dependencies in a number of places. Ensure that a TPL specific option has at least a direct dependency on TPL. In places where it's clear that we depend on something more specific, use that dependency instead. Reported-by: Pali Rohár Signed-off-by: Tom Rini --- common/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/Kconfig b/common/Kconfig index 84db2e43f15..e3a57e20820 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -87,6 +87,7 @@ config SPL_LOGLEVEL config TPL_LOGLEVEL int + depends on TPL default LOGLEVEL config VPL_LOGLEVEL @@ -408,7 +409,7 @@ endif config TPL_LOG bool "Enable logging support in TPL" - depends on LOG + depends on LOG && TPL help This enables support for logging of status and debug messages. These can be displayed on the console, recorded in a memory buffer, or -- cgit v1.2.3 From 13ce351b9a292a758415ef8eba3c349c28cf4697 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 8 Jun 2022 08:24:40 -0400 Subject: vpl: Ensure all VPL symbols in Kconfig have some VPL dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tighten up symbol dependencies in a number of places. Ensure that a VPL specific option has at least a direct dependency on VPL. In places where it's clear that we depend on something more specific, use that dependency instead. Reported-by: Pali Rohár Signed-off-by: Tom Rini --- common/Kconfig | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'common') diff --git a/common/Kconfig b/common/Kconfig index e3a57e20820..f08a8e7493d 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -92,6 +92,7 @@ config TPL_LOGLEVEL config VPL_LOGLEVEL int "loglevel for VPL" + depends on VPL default LOGLEVEL help All Messages with a loglevel smaller than the console loglevel will @@ -272,15 +273,6 @@ config LOG if LOG -config VPL_LOG - bool "Enable logging support in VPL" - depends on LOG - help - This enables support for logging of status and debug messages. These - can be displayed on the console, recorded in a memory buffer, or - discarded if not needed. Logging supports various categories and - levels of severity. - config LOG_MAX_LEVEL int "Maximum log level to record" default 6 @@ -452,7 +444,7 @@ endif config VPL_LOG bool "Enable logging support in VPL" - depends on LOG + depends on LOG && VPL help This enables support for logging of status and debug messages. These can be displayed on the console, recorded in a memory buffer, or -- cgit v1.2.3 From 525fbfabf1f91bde3bd8fc8aa3ec8504e77c074f Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 12 Jun 2022 20:02:03 -0400 Subject: common: usb: Update logic for usb.o, usb_hub.o and usb_storage.o Now that we have consistently named symbols to enable USB host or gadget controller support in SPL or full U-Boot, we do not need to unconditionally build USB files nor depend on non-SPL symbols to know when to build these common files. Signed-off-by: Tom Rini --- common/Makefile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'common') diff --git a/common/Makefile b/common/Makefile index 75c24e32492..2ed8672c3ac 100644 --- a/common/Makefile +++ b/common/Makefile @@ -23,10 +23,9 @@ obj-$(CONFIG_MII) += miiphyutil.o obj-$(CONFIG_CMD_MII) += miiphyutil.o obj-$(CONFIG_PHYLIB) += miiphyutil.o -ifdef CONFIG_USB -obj-y += usb.o usb_hub.o +obj-$(CONFIG_USB_HOST) += usb.o usb_hub.o +obj-$(CONFIG_USB_GADGET) += usb.o usb_hub.o obj-$(CONFIG_USB_STORAGE) += usb_storage.o -endif # others obj-$(CONFIG_CONSOLE_MUX) += iomux.o @@ -57,13 +56,9 @@ endif obj-$(CONFIG_SPL_NET) += miiphyutil.o obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += fdt_support.o -ifdef CONFIG_SPL_USB_HOST -obj-y += usb.o -obj-y += usb_hub.o +obj-$(CONFIG_SPL_USB_HOST) += usb.o usb_hub.o obj-$(CONFIG_SPL_USB_STORAGE) += usb_storage.o -else -obj-$(CONFIG_USB_MUSB_HOST) += usb.o -endif +obj-$(CONFIG_SPL_MUSB_NEW) += usb.o endif # CONFIG_SPL_BUILD #others -- cgit v1.2.3 From 3371eddaa10212b1303b2de305e1d976fe7770ca Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 12 Jun 2022 20:02:04 -0400 Subject: Convert CONFIG_USB_MAX_CONTROLLER_COUNT to Kconfig This converts the following to Kconfig: CONFIG_USB_MAX_CONTROLLER_COUNT Signed-off-by: Tom Rini --- common/usb.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'common') diff --git a/common/usb.c b/common/usb.c index aad13fd9c55..6fcf1e8428e 100644 --- a/common/usb.c +++ b/common/usb.c @@ -49,10 +49,6 @@ char usb_started; /* flag for the started/stopped USB status */ static struct usb_device usb_dev[USB_MAX_DEVICE]; static int dev_index; -#ifndef CONFIG_USB_MAX_CONTROLLER_COUNT -#define CONFIG_USB_MAX_CONTROLLER_COUNT 1 -#endif - /*************************************************************************** * Init USB Device */ -- cgit v1.2.3 From 5dbf320bef92770ffba24cd4b04c06fc06692892 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sun, 12 Jun 2022 20:02:05 -0400 Subject: Convert CONFIG_SYS_USB_FAT_BOOT_PARTITION to Kconfig This converts the following to Kconfig: CONFIG_SYS_USB_FAT_BOOT_PARTITION Signed-off-by: Tom Rini --- common/spl/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'common') diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 42f2c95228a..3fd56448006 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -1317,6 +1317,13 @@ config SPL_USB_STORAGE config options. This enables loading from USB using a configured device. +config SYS_USB_FAT_BOOT_PARTITION + int "Partition on USB to use to load U-Boot from" + depends on SPL_USB_STORAGE + default 1 + help + Partition on the USB storage device to load U-Boot from + config SPL_USB_GADGET bool "Suppport USB Gadget drivers" help -- cgit v1.2.3