diff options
| author | Tom Rini <[email protected]> | 2023-01-12 17:05:41 -0500 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-01-12 17:05:41 -0500 |
| commit | 87c9e117bf57d6bb42c5521a3f6ec9ca7d97e5fa (patch) | |
| tree | 9a2a90d475abd35c8945bb3af7aa0c14bfc149f7 /common | |
| parent | f58885d002302b8047446a6a15f7376bb7b1ea32 (diff) | |
| parent | 48b3ecbedf8208845ac5956a3fb8817269fafedd (diff) | |
Merge branch '2023-01-12-further-assorted-general-updates'
- Bring in a number of assorted updates, some of which have been waiting
around for a bit. Make silent console really be silent, get rid of
gpio_hog_probe_all, add RNG for imx6, make net/fm use fs_loader, get
rid of a bad __weak usage and set distro_bootpart_uuid in another case.
Diffstat (limited to 'common')
| -rw-r--r-- | common/Kconfig | 10 | ||||
| -rw-r--r-- | common/board_r.c | 3 | ||||
| -rw-r--r-- | common/console.c | 5 | ||||
| -rw-r--r-- | common/spl/spl.c | 3 | ||||
| -rw-r--r-- | common/spl/spl_ram.c | 9 |
5 files changed, 20 insertions, 10 deletions
diff --git a/common/Kconfig b/common/Kconfig index 8c71d3c972b..73e3fe36573 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -164,6 +164,16 @@ config SILENT_CONSOLE_UPDATE_ON_RELOC (e.g. NAND). This option makes the value of the 'silent' environment variable take effect at relocation. +config SILENT_CONSOLE_UNTIL_ENV + bool "Keep console silent until environment is loaded" + depends on SILENT_CONSOLE + help + This option makes sure U-Boot will never use the console unless the + environment from flash does not contain the 'silent' variable. If + set, the console is kept silent until after the environment was + loaded. Use this in combination with PRE_CONSOLE_BUFFER to print out + earlier messages after loading the environment when allowed. + config PRE_CONSOLE_BUFFER bool "Buffer characters before the console is available" help diff --git a/common/board_r.c b/common/board_r.c index 42060ee709d..3618acad437 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -756,9 +756,6 @@ static init_fnc_t init_sequence_r[] = { initr_status_led, #endif /* PPC has a udelay(20) here dating from 2002. Why? */ -#if defined(CONFIG_GPIO_HOG) - gpio_hog_probe_all, -#endif #ifdef CONFIG_BOARD_LATE_INIT board_late_init, #endif diff --git a/common/console.c b/common/console.c index 10ab361d006..e4301a49322 100644 --- a/common/console.c +++ b/common/console.c @@ -970,6 +970,11 @@ static bool console_update_silent(void) if (!IS_ENABLED(CONFIG_SILENT_CONSOLE)) return false; + if (IS_ENABLED(CONFIG_SILENT_CONSOLE_UNTIL_ENV) && !(gd->flags & GD_FLG_ENV_READY)) { + gd->flags |= GD_FLG_SILENT; + return false; + } + if (env_get("silent")) { gd->flags |= GD_FLG_SILENT; return false; diff --git a/common/spl/spl.c b/common/spl/spl.c index 4668367b680..a630e798661 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -786,9 +786,6 @@ void board_init_r(gd_t *dummy1, ulong dummy2) } } - if (CONFIG_IS_ENABLED(GPIO_HOG)) - gpio_hog_probe_all(); - #if CONFIG_IS_ENABLED(BOARD_INIT) spl_board_init(); #endif diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c index 5753bd228f7..8139a203273 100644 --- a/common/spl/spl_ram.c +++ b/common/spl/spl_ram.c @@ -38,12 +38,13 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) { struct legacy_img_hdr *header; + int ret; header = (struct legacy_img_hdr *)CONFIG_SPL_LOAD_FIT_ADDRESS; if (CONFIG_IS_ENABLED(IMAGE_PRE_LOAD)) { unsigned long addr = (unsigned long)header; - int ret = image_pre_load(addr); + ret = image_pre_load(addr); if (ret) return ret; @@ -64,7 +65,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, debug("Found FIT\n"); load.bl_len = 1; load.read = spl_ram_load_read; - spl_load_simple_fit(spl_image, &load, 0, header); + ret = spl_load_simple_fit(spl_image, &load, 0, header); } else { ulong u_boot_pos = spl_get_image_pos(); @@ -85,10 +86,10 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, } header = (struct legacy_img_hdr *)map_sysmem(u_boot_pos, 0); - spl_parse_image_header(spl_image, bootdev, header); + ret = spl_parse_image_header(spl_image, bootdev, header); } - return 0; + return ret; } #if CONFIG_IS_ENABLED(RAM_DEVICE) SPL_LOAD_IMAGE_METHOD("RAM", 0, BOOT_DEVICE_RAM, spl_ram_load_image); |
