diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/Kconfig | 18 | ||||
-rw-r--r-- | common/Makefile | 13 | ||||
-rw-r--r-- | common/board_f.c | 4 | ||||
-rw-r--r-- | common/init/board_init.c | 2 | ||||
-rw-r--r-- | common/spl/Kconfig | 20 | ||||
-rw-r--r-- | common/spl/spl_spi.c | 16 | ||||
-rw-r--r-- | common/usb.c | 4 |
7 files changed, 45 insertions, 32 deletions
diff --git a/common/Kconfig b/common/Kconfig index 84db2e43f1..e7914ca750 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -83,14 +83,17 @@ config LOGLEVEL config SPL_LOGLEVEL int + depends on SPL default LOGLEVEL config TPL_LOGLEVEL int + depends on TPL default 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 @@ -271,15 +274,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 @@ -365,7 +359,7 @@ config LOG_SYSLOG config SPL_LOG bool "Enable logging support in SPL" - depends on LOG + depends on LOG && SPL help This enables support for logging of status and debug messages. These can be displayed on the console, recorded in a memory buffer, or @@ -408,7 +402,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 @@ -451,7 +445,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 diff --git a/common/Makefile b/common/Makefile index 75c24e3249..2ed8672c3a 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 diff --git a/common/board_f.c b/common/board_f.c index a5666ca77c..5c86faeb21 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -400,13 +400,9 @@ static int reserve_video(void) ((unsigned long)gd->relocaddr - addr) >> 10, addr); gd->relocaddr = addr; #elif defined(CONFIG_LCD) -# ifdef CONFIG_FB_ADDR - gd->fb_base = CONFIG_FB_ADDR; -# else /* reserve memory for LCD display (always full pages) */ gd->relocaddr = lcd_setmem(gd->relocaddr); gd->fb_base = gd->relocaddr; -# endif /* CONFIG_FB_ADDR */ #endif return 0; diff --git a/common/init/board_init.c b/common/init/board_init.c index eab5ee1395..6a55026177 100644 --- a/common/init/board_init.c +++ b/common/init/board_init.c @@ -78,9 +78,11 @@ __weak void board_init_f_init_stack_protection(void) ulong board_init_f_alloc_reserve(ulong top) { /* Reserve early malloc arena */ +#ifndef CONFIG_MALLOC_F_ADDR #if CONFIG_VAL(SYS_MALLOC_F_LEN) top -= CONFIG_VAL(SYS_MALLOC_F_LEN); #endif +#endif /* LAST : reserve GD (rounded up to a multiple of 16 bytes) */ top = rounddown(top-sizeof(struct global_data), 16); diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 152569ee43..931619c366 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -82,6 +82,7 @@ config SPL_MAX_SIZE default 0x7fa0 if SUNXI_SRAM_ADDRESS = 0x20000 && !MACH_SUN50I_H616 default 0x7000 if RCAR_GEN3 default 0x5fa0 if SUNXI_SRAM_ADDRESS = 0x0 + default 0x10000 if ASPEED_AST2600 default 0x0 help Maximum size of the SPL image (text, data, rodata, and linker lists @@ -234,6 +235,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 @@ -1318,6 +1331,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 diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c index cf3f7ef4c0..3eef2f8d68 100644 --- a/common/spl/spl_spi.c +++ b/common/spl/spl_spi.c @@ -71,6 +71,16 @@ unsigned int __weak spl_spi_get_uboot_offs(struct spi_flash *flash) return CONFIG_SYS_SPI_U_BOOT_OFFS; } +u32 __weak spl_spi_boot_bus(void) +{ + return CONFIG_SF_DEFAULT_BUS; +} + +u32 __weak spl_spi_boot_cs(void) +{ + return CONFIG_SF_DEFAULT_CS; +} + /* * The main entry for SPI booting. It's necessary that SDRAM is already * configured and available since this code loads the main U-Boot image @@ -83,15 +93,15 @@ static int spl_spi_load_image(struct spl_image_info *spl_image, unsigned int payload_offs; struct spi_flash *flash; struct image_header *header; + unsigned int sf_bus = spl_spi_boot_bus(); + unsigned int sf_cs = spl_spi_boot_cs(); /* * Load U-Boot image from SPI flash into RAM * In DM mode: defaults speed and mode will be * taken from DT when available */ - - flash = spi_flash_probe(CONFIG_SF_DEFAULT_BUS, - CONFIG_SF_DEFAULT_CS, + flash = spi_flash_probe(sf_bus, sf_cs, CONFIG_SF_DEFAULT_SPEED, CONFIG_SF_DEFAULT_MODE); if (!flash) { diff --git a/common/usb.c b/common/usb.c index aad13fd9c5..6fcf1e8428 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 */ |