diff options
| author | Michal Simek <[email protected]> | 2026-06-23 14:53:41 +0200 |
|---|---|---|
| committer | Michal Simek <[email protected]> | 2026-07-08 08:55:51 +0200 |
| commit | e8f4248fc344b60a153b6163fcdd1c5f6aeb740b (patch) | |
| tree | 1c435d8f083f0bd3a96895523d298239d574c9c6 | |
| parent | d9938274747cafa24af47d404e78001396f7fdf0 (diff) | |
arm64: versal-net: Do not print bootmode from spi_get_env_dev()
spi_get_bootseq() printed the QSPI/OSPI mode banner, which is noise when
called from spi_get_env_dev() during environment setup. The banner is
only meaningful for the "Bootmode:" announcement in boot_targets_setup().
Make spi_get_bootseq() a pure lookup that returns the banner string
through an optional output argument instead of printing it.
spi_get_env_dev() passes NULL and stays silent, while
boot_targets_setup() prints the returned mode name as before.
Signed-off-by: Michal Simek <[email protected]>
Link: https://patch.msgid.link/ae257af9d2fe026306b32c647e406450319a3c7a.1782219202.git.michal.simek@amd.com
| -rw-r--r-- | board/xilinx/versal-net/board.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/board/xilinx/versal-net/board.c b/board/xilinx/versal-net/board.c index 50dd49927be..687d042d106 100644 --- a/board/xilinx/versal-net/board.c +++ b/board/xilinx/versal-net/board.c @@ -68,7 +68,7 @@ int board_early_init_r(void) return 0; } -static int spi_get_bootseq(u8 bootmode) +static int spi_get_bootseq(u8 bootmode, const char **modename) { struct udevice *dev; const char *name; @@ -76,15 +76,18 @@ static int spi_get_bootseq(u8 bootmode) switch (bootmode) { case QSPI_MODE_24BIT: - puts("QSPI_MODE_24\n"); + if (modename) + *modename = "QSPI_MODE_24\n"; name = "spi@f1030000"; break; case QSPI_MODE_32BIT: - puts("QSPI_MODE_32\n"); + if (modename) + *modename = "QSPI_MODE_32\n"; name = "spi@f1030000"; break; case OSPI_MODE: - puts("OSPI_MODE\n"); + if (modename) + *modename = "OSPI_MODE\n"; name = "spi@f1010000"; break; default: @@ -104,7 +107,7 @@ static int spi_get_bootseq(u8 bootmode) int spi_get_env_dev(void) { - return spi_get_bootseq(versal_net_get_bootmode()); + return spi_get_bootseq(versal_net_get_bootmode(), NULL); } static int boot_targets_setup(void) @@ -115,6 +118,7 @@ static int boot_targets_setup(void) int bootseq_len = 0; int env_targets_len = 0; const char *mode = NULL; + const char *modename = NULL; char *new_targets; char *env_targets; @@ -133,7 +137,9 @@ static int boot_targets_setup(void) case QSPI_MODE_24BIT: case QSPI_MODE_32BIT: case OSPI_MODE: - bootseq = spi_get_bootseq(bootmode); + bootseq = spi_get_bootseq(bootmode, &modename); + if (modename) + puts(modename); if (bootseq >= 0) mode = "xspi"; break; |
