display_options: Use USE_TINY_PRINTF for SPL check
authorSimon Glass <sjg@chromium.org>
Thu, 14 Jan 2021 03:29:50 +0000 (20:29 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 27 Jan 2021 22:03:16 +0000 (17:03 -0500)
At present this code uses a simple printf() format if running in SPL. But
SPL can use the full printf. Use USE_TINY_PRINTF instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
lib/display_options.c

index b2025ee..cd48998 100644 (file)
@@ -169,11 +169,10 @@ 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;
-#if defined(CONFIG_SPL_BUILD)
-                       printf(" %x", (uint)x);
-#else
-                       printf(" %0*lx", width * 2, x);
-#endif
+                       if (CONFIG_IS_ENABLED(USE_TINY_PRINTF))
+                               printf(" %x", (uint)x);
+                       else
+                               printf(" %0*lx", width * 2, x);
                        data += width;
                }