mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 05:01:30 +00:00
lib: Allow using display_buffer() in SPL
At present this function uses printf() format strings that are not supported in SPL, so the output just consists of %llx strings on 64-bit. machines. Fix this by adding a special case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
This commit is contained in:
parent
e5b29d870b
commit
f60662de77
1 changed files with 3 additions and 1 deletions
|
@ -174,7 +174,9 @@ int print_buffer(ulong addr, const void *data, uint width, uint count,
|
|||
x = lb.us[i] = *(volatile uint16_t *)data;
|
||||
else
|
||||
x = lb.uc[i] = *(volatile uint8_t *)data;
|
||||
#ifdef CONFIG_SYS_SUPPORT_64BIT_DATA
|
||||
#if defined(CONFIG_SPL_BUILD)
|
||||
printf(" %x", (uint)x);
|
||||
#elif defined(CONFIG_SYS_SUPPORT_64BIT_DATA)
|
||||
printf(" %0*llx", width * 2, (long long)x);
|
||||
#else
|
||||
printf(" %0*x", width * 2, x);
|
||||
|
|
Loading…
Add table
Reference in a new issue