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 EC27DC433F5 for ; Thu, 31 Mar 2022 02:56:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 157FE84181; Thu, 31 Mar 2022 04:56:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1648695381; bh=Ci76mJFELaaQZbKKT6nB24pUlPDyl7aVrLWuzhWIIhs=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=T5QLPzcnCEZZaWo7QvuemAn1ZwimBpL2lDpViXxycKJXXlyflt+Y/o4geIQ6B2I9E LKAKTL7V5g8y0hQeNYYRzeetD+hiTykUH+mpqdH5J8+WEQIik2QSRHFzZ73+c8qy21 00j6RF/w8caJiLkaeBKLou0/kDrb4FhLRDi0kDDM3halRZ78/54j6QFZTuTpDCmDtH fxwi3R6l3aBxrtEYaQlgOT1OVaw/0mdRtW8s2fgZSLFZWkmm08dWfqWebboPoOPisW zoXjhwoAsu7dgS5iZPdGyQfEhcu9jqQ+Ahuu3D9ajtMllraMA7MKa4f9/1dtkwnxse qNNQROrRIrMlA== Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 734D184181; Thu, 31 Mar 2022 04:56:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1648695379; bh=Ci76mJFELaaQZbKKT6nB24pUlPDyl7aVrLWuzhWIIhs=; h=From:To:Cc:Subject:Date:From; b=xAERDqgFoypEeAEgpL0VILm0nL1QGI0GlvwA6Y4dN4AyX3bBpqhOblkzl/3G5xdmY sskJ5FtacKqabg65hjzWmxrLzd/wSqEAo8jJyuIdryqWKc0YNcypIpcQDyXW1i/fCq cN4egQlg6HkkSUrsCb5ssuKW2Mlep3Xu2fUhrhStDS143jrOjSvRrVP2nfSlz2RXpk UW40lmZyx59ySXkX9jAlawBR3S5ZZd8ozIzRll8Ei/hHc9bPH69gb7FZZ114AboECc B6rkTs7yumFAZ+H3kWE6hQ2giZ5KIwoWYykzvUhwAiFEaIVJWr26lVqSsWsrDy6enP xUU3psk8JmKXA== From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Fabio Estevam , Peng Fan , Stefano Babic Subject: [PATCH] ARM: imx: Get rid of only i.MX8M SMCCC arch call Date: Thu, 31 Mar 2022 04:56:12 +0200 Message-Id: <20220331025612.482362-1-marex@denx.de> X-Mailer: git-send-email 2.35.1 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.5 at phobos.denx.de X-Virus-Status: Clean This is the only place where i.MX8M code does SMCCC call, remove it. The output has little value as it prints some part of commit ID, and worse, if there is no SMC handler installed, the code outright hangs or crashes the system. By removing this one instance of SMCCC call, U-Boot no longer depends on SMC handlers and can boot without hanging in any case. If there is a need to dump this commit ID, use CMD_SMC instead and do 'smc' call from U-Boot shell or scripts instead of hard-coding SMCCC dependency into architecture code. This particular code can be replaced by: => smc 0xc2000003 0 0 0 0 0 0 Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic --- NOTE: This could also be hidden behind ARM_PSCI_FW , but I would rather just remove this hard dependency, it makes U-Boot porting easier. --- arch/arm/mach-imx/imx8m/soc.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index 1a5a391443d..45c5476bbc7 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -27,7 +27,6 @@ #include #include #include -#include #include DECLARE_GLOBAL_DATA_PTR; @@ -1191,27 +1190,8 @@ void reset_cpu(void) #endif #if defined(CONFIG_ARCH_MISC_INIT) -static void acquire_buildinfo(void) -{ - u64 atf_commit = 0; - struct arm_smccc_res res; - - /* Get ARM Trusted Firmware commit id */ - arm_smccc_smc(IMX_SIP_BUILDINFO, IMX_SIP_BUILDINFO_GET_COMMITHASH, - 0, 0, 0, 0, 0, 0, &res); - atf_commit = res.a0; - if (atf_commit == 0xffffffff) { - debug("ATF does not support build info\n"); - atf_commit = 0x30; /* Display 0, 0 ascii is 0x30 */ - } - - printf("\n BuildInfo:\n - ATF %s\n\n", (char *)&atf_commit); -} - int arch_misc_init(void) { - acquire_buildinfo(); - return 0; } #endif -- 2.35.1