sets the log formatting according to the platform (64-bit vs 32-bit)

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhl...@arm.com>
Cc: Simon Glass <s...@chromium.org>
---
 include/log.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/log.h b/include/log.h
index 3bab40b617..689cef905b 100644
--- a/include/log.h
+++ b/include/log.h
@@ -686,4 +686,12 @@ static inline int log_get_default_format(void)
               (IS_ENABLED(CONFIG_LOGF_FUNC) ? BIT(LOGF_FUNC) : 0);
 }
 
+/* Select the right physical address formatting according to the platform */
+#ifdef CONFIG_PHYS_64BIT
+#define PhysAddrLength "ll"
+#else
+#define PhysAddrLength ""
+#endif
+#define PHYS_ADDR_LN "%" PhysAddrLength "x"
+#define PHYS_ADDR_LNU "%" PhysAddrLength "u"
 #endif
-- 
2.25.1

Reply via email to