From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 72E27EB64DA for ; Fri, 7 Jul 2023 14:45:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B29F0865C6; Fri, 7 Jul 2023 16:44:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id CE9AA865C0; Fri, 7 Jul 2023 16:44:36 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id B00C886307 for ; Fri, 7 Jul 2023 16:44:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=abdellatif.elkhlifi@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 123C21063; Fri, 7 Jul 2023 07:45:16 -0700 (PDT) Received: from e130802.arm.com (unknown [10.57.35.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ABB5B3F73F; Fri, 7 Jul 2023 07:44:32 -0700 (PDT) From: Abdellatif El Khlifi To: sjg@chromium.org Cc: trini@konsulko.com, abdellatif.elkhlifi@arm.com, ilias.apalodimas@linaro.org, nd@arm.com, u-boot@lists.denx.de Subject: [PATCH v14 05/11] log: select physical address formatting in a generic way Date: Fri, 7 Jul 2023 15:44:04 +0100 Message-Id: <20230707144410.228472-6-abdellatif.elkhlifi@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230707144410.228472-1-abdellatif.elkhlifi@arm.com> References: <20230707144410.228472-1-abdellatif.elkhlifi@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean sets the log formatting according to the platform (64-bit vs 32-bit) Signed-off-by: Abdellatif El Khlifi Cc: Simon Glass --- 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