[U-Boot,01/18] lib: Allow using display_buffer() in SPL
diff mbox series

Message ID 20190110042457.134141-2-sjg@chromium.org
State Superseded
Delegated to: Philipp Tomsich
Headers show
  • rockchip: Add support for Bob Chromebook
Related show

Commit Message

Simon Glass Jan. 10, 2019, 4:24 a.m. UTC
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>

 lib/display_options.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff mbox series

diff --git a/lib/display_options.c b/lib/display_options.c
index 32849821f4..af1802ef99 100644
--- a/lib/display_options.c
+++ b/lib/display_options.c
@@ -174,7 +174,9 @@  int print_buffer(ulong addr, const void *data, uint width, uint count,
 				x = lb.us[i] = *(volatile uint16_t *)data;
 				x = lb.uc[i] = *(volatile uint8_t *)data;
+#if defined(CONFIG_SPL_BUILD)
+			printf(" %x", (uint)x);
 			printf(" %0*llx", width * 2, (long long)x);
 			printf(" %0*x", width * 2, x);