[PATCH v14 05/11] log: select physical address formatting in a generic way

Abdellatif El Khlifi abdellatif.elkhlifi at arm.com
Fri Jul 7 16:44:04 CEST 2023


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

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi at arm.com>
Cc: Simon Glass <sjg at 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



More information about the U-Boot mailing list