diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/Kconfig | 62 | ||||
-rw-r--r-- | common/board_r.c | 7 | ||||
-rw-r--r-- | common/console.c | 2 | ||||
-rw-r--r-- | common/dlmalloc.c | 8 | ||||
-rw-r--r-- | common/main.c | 1 | ||||
-rw-r--r-- | common/spl/Kconfig | 9 | ||||
-rw-r--r-- | common/spl/spl_mmc.c | 12 | ||||
-rw-r--r-- | common/splash.c | 8 |
8 files changed, 85 insertions, 24 deletions
diff --git a/common/Kconfig b/common/Kconfig index 0afc01b759a..7ff62552cbb 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -551,12 +551,11 @@ endmenu menu "Init options" config BOARD_TYPES - bool "Call get_board_type() to get and display the board type" + bool "Enable board_type entry in global data struct" help - If this option is enabled, checkboard() will call get_board_type() - to get a string containing the board type and this will be - displayed immediately after the model is shown on the console - early in boot. + If this option is enabled, a field will be added to the global + data struct to store an unsigned long value for the type of + platform that we have determined we are on, at run-time. config DISPLAY_CPUINFO bool "Display information about the CPU during start up" @@ -631,10 +630,30 @@ config EVENT_DEBUG events, such as event-type names. This adds to the code size of U-Boot so can be turned off for production builds. +config SPL_EVENT + bool # General-purpose event-handling mechanism in SPL + depends on SPL + help + This adds a framework for general purpose sending and processing of + events, to allow interested parties to be alerted when something + happens. This is an attempt to stem the flow of weak functions, + hooks, functions in board_f.c and board_r.c and the Kconfig options + below. + + See doc/develop/event.rst for more information. + +config SPL_EVENT_DYNAMIC + bool + depends on SPL_EVENT && EVENT_DYNAMIC + help + Enable this to support adding an event spy at runtime, without adding + it to the EVENT_SPY() linker list. This increases code size slightly + but provides more flexibility for boards and subsystems that need it. + endif # EVENT config ARCH_EARLY_INIT_R - bool "Call arch-specific init soon after relocation" + bool help With this option U-Boot will call arch_early_init_r() soon after relocation. Driver model is running by this point, and the cache @@ -1043,7 +1062,7 @@ choice prompt "Bloblist location in TPL" help Select the location of the bloblist, via various means. Typically - you should use the same value for SPL as for U-Boot, since they need + you should use the same value for TPL as for U-Boot, since they need to look in the same place. But if BLOBLIST_ALLOC is used, then a fresh bloblist will be created each time, since there is no shared address (between phases) for the bloblist. @@ -1066,6 +1085,35 @@ endchoice endif # TPL_BLOBLIST +if VPL_BLOBLIST + +choice + prompt "Bloblist location in VPL" + help + Select the location of the bloblist, via various means. Typically + you should use the same value for VPL as for U-Boot, since they need + to look in the same place. But if BLOBLIST_ALLOC is used, then a + fresh bloblist will be created each time, since there is no shared + address (between phases) for the bloblist. + +config VPL_BLOBLIST_FIXED + bool "Place bloblist at a fixed address in memory" + help + Select this to used a fixed memory address for the bloblist. If the + bloblist exists at this address from a previous phase, it used as is. + If not it is created at this address in VPL. + +config VPL_BLOBLIST_ALLOC + bool "Allocate bloblist" + help + Allocate the bloblist using malloc(). This avoids the need to + specify a fixed address on systems where this is unknown or can + change at runtime. + +endchoice + +endif # VPL_BLOBLIST + endmenu source "common/spl/Kconfig" diff --git a/common/board_r.c b/common/board_r.c index e45003353f7..6b4180b3ecd 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -569,6 +569,13 @@ static int dm_announce(void) printf("Warning: Unexpected devicetree source (not from a prior stage)"); printf("Warning: U-Boot may not function properly\n"); } + if (IS_ENABLED(CONFIG_OF_TAG_MIGRATE) && + (gd->flags & GD_FLG_OF_TAG_MIGRATE)) + /* + * U-Boot will silently fail to work after 2023.07 if + * there are old tags present + */ + printf("Warning: Device tree includes old 'u-boot,dm-' tags: please fix by 2023.07!\n"); } return 0; diff --git a/common/console.c b/common/console.c index e4301a49322..71ad8efd6f4 100644 --- a/common/console.c +++ b/common/console.c @@ -842,7 +842,7 @@ int console_record_readline(char *str, int maxlen) return -ENOSPC; return membuff_readline((struct membuff *)&gd->console_out, str, - maxlen, ' '); + maxlen, '\0'); } int console_record_avail(void) diff --git a/common/dlmalloc.c b/common/dlmalloc.c index 41c7230424c..0f9b7262d51 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -80,7 +80,7 @@ GmListElement* makeGmListElement (void* bas) return this; } -void gcleanup () +void gcleanup (void) { BOOL rval; assert ( (head == NULL) || (head->base == (void*)gAddressBase)); @@ -2340,7 +2340,7 @@ size_t malloc_usable_size(mem) Void_t* mem; /* Utility to update current_mallinfo for malloc_stats and mallinfo() */ #ifdef DEBUG -static void malloc_update_mallinfo() +static void malloc_update_mallinfo(void) { int i; mbinptr b; @@ -2397,7 +2397,7 @@ static void malloc_update_mallinfo() */ #ifdef DEBUG -void malloc_stats() +void malloc_stats(void) { malloc_update_mallinfo(); printf("max system bytes = %10u\n", @@ -2418,7 +2418,7 @@ void malloc_stats() */ #ifdef DEBUG -struct mallinfo mALLINFo() +struct mallinfo mALLINFo(void) { malloc_update_mallinfo(); return current_mallinfo; diff --git a/common/main.c b/common/main.c index 682f3359ea3..7c70de2e59a 100644 --- a/common/main.c +++ b/common/main.c @@ -13,6 +13,7 @@ #include <command.h> #include <console.h> #include <env.h> +#include <fdtdec.h> #include <init.h> #include <net.h> #include <version_string.h> diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 3c2af453ab6..2c042ad3066 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -816,8 +816,17 @@ config SPL_MMC this option to build the drivers in drivers/mmc as part of an SPL build. +config SYS_MMCSD_FS_BOOT + bool "MMC FS Boot mode" + depends on SPL_MMC + default y if !ARCH_MVEBU + help + Enable MMC FS Boot mode. Partition is selected by option + SYS_MMCSD_FS_BOOT_PARTITION. + config SYS_MMCSD_FS_BOOT_PARTITION int "MMC Boot Partition" + depends on SYS_MMCSD_FS_BOOT default 1 help Partition on the MMC to load U-Boot from when the MMC is being diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index e4135b20487..bd5e6adf1ea 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -272,7 +272,7 @@ int spl_start_uboot(void) } #endif -#ifdef CONFIG_SYS_MMCSD_FS_BOOT_PARTITION +#ifdef CONFIG_SYS_MMCSD_FS_BOOT static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image, struct spl_boot_device *bootdev, struct mmc *mmc, @@ -341,14 +341,6 @@ static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image, return err; } -#else -static int spl_mmc_do_fs_boot(struct spl_image_info *spl_image, - struct spl_boot_device *bootdev, - struct mmc *mmc, - const char *filename) -{ - return -ENOSYS; -} #endif u32 __weak spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device) @@ -481,6 +473,7 @@ int spl_mmc_load(struct spl_image_info *spl_image, return err; #endif /* If RAW mode fails, try FS mode. */ +#ifdef CONFIG_SYS_MMCSD_FS_BOOT case MMCSD_MODE_FS: debug("spl: mmc boot mode: fs\n"); @@ -489,6 +482,7 @@ int spl_mmc_load(struct spl_image_info *spl_image, return err; break; +#endif #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT default: puts("spl: mmc: wrong boot mode\n"); diff --git a/common/splash.c b/common/splash.c index 245ff680ebd..4bc54b1bf9e 100644 --- a/common/splash.c +++ b/common/splash.c @@ -127,9 +127,11 @@ void splash_get_pos(int *x, int *y) #include <dm.h> #include <video_console.h> #include <video_font.h> +#include <video_font_data.h> void splash_display_banner(void) { + struct video_fontdata __maybe_unused *fontdata = fonts; struct udevice *dev; char buf[DISPLAY_OPTIONS_BANNER_LENGTH]; int col, row, ret; @@ -138,9 +140,9 @@ void splash_display_banner(void) if (ret) return; -#ifdef CONFIG_VIDEO_LOGO - col = BMP_LOGO_WIDTH / VIDEO_FONT_WIDTH + 1; - row = BMP_LOGO_HEIGHT / VIDEO_FONT_HEIGHT + 1; +#if IS_ENABLED(CONFIG_VIDEO_LOGO) + col = BMP_LOGO_WIDTH / fontdata->width + 1; + row = BMP_LOGO_HEIGHT / fontdata->height + 1; #else col = 0; row = 0; |