mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH next 3/3] ARM: i.MX8M: align SIP_BUILDINFO with the tf-a define
Date: Mon, 17 Oct 2022 18:18:18 +0200	[thread overview]
Message-ID: <20221017161818.333094-3-m.felsch@pengutronix.de> (raw)
In-Reply-To: <20221017161818.333094-1-m.felsch@pengutronix.de>

Align the define with the name used by the usptream and downstream tf-a.

While on change the pr_info behaviour to only print the version if a0
contain something useful.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 arch/arm/mach-imx/imx8m.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-imx/imx8m.c b/arch/arm/mach-imx/imx8m.c
index 8b275bd6f6..9758525b54 100644
--- a/arch/arm/mach-imx/imx8m.c
+++ b/arch/arm/mach-imx/imx8m.c
@@ -18,8 +18,8 @@
 #include <linux/iopoll.h>
 #include <linux/arm-smccc.h>
 
-#define FSL_SIP_BUILDINFO			0xC2000003
-#define FSL_SIP_BUILDINFO_GET_COMMITHASH	0x00
+#define IMX_SIP_BUILDINFO			0xC2000003
+#define IMX_SIP_BUILDINFO_GET_COMMITHASH	0x00
 
 void imx8m_clock_set_target_val(int clock_id, u32 val)
 {
@@ -62,10 +62,12 @@ static int imx8m_init(const char *cputypestr)
 
 	if (IS_ENABLED(CONFIG_ARM_SMCCC) &&
 	    IS_ENABLED(CONFIG_FIRMWARE_IMX8MQ_ATF)) {
-		arm_smccc_smc(FSL_SIP_BUILDINFO,
-			      FSL_SIP_BUILDINFO_GET_COMMITHASH,
+		arm_smccc_smc(IMX_SIP_BUILDINFO,
+			      IMX_SIP_BUILDINFO_GET_COMMITHASH,
 			      0, 0, 0, 0, 0, 0, &res);
-		pr_info("i.MX ARM Trusted Firmware: %s\n", (char *)&res.a0);
+
+		if (res.a0 > 0)
+			pr_info("i.MX ARM Trusted Firmware: %s\n", (char *)&res.a0);
 	}
 
 	return 0;
-- 
2.30.2




  parent reply	other threads:[~2022-10-17 16:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 16:18 [PATCH next 1/3] ARM: i.MX8MP: EVK: convert to board driver and enable deep-probe Marco Felsch
2022-10-17 16:18 ` [PATCH next 2/3] ARM: dts: i.MX8MP: assume hsio power domain to be powered Marco Felsch
2022-10-17 16:39   ` Ahmad Fatoum
2022-10-17 16:18 ` Marco Felsch [this message]
2022-10-17 16:39   ` [PATCH next 3/3] ARM: i.MX8M: align SIP_BUILDINFO with the tf-a define Ahmad Fatoum
2022-10-17 16:38 ` [PATCH next 1/3] ARM: i.MX8MP: EVK: convert to board driver and enable deep-probe Ahmad Fatoum
2022-10-18  9:04 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221017161818.333094-3-m.felsch@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox