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 69273C433EF for ; Tue, 12 Apr 2022 22:40:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 553AA83ED6; Wed, 13 Apr 2022 00:40:37 +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=1649803237; bh=Jks5kwYdNln21A7uCPA6RmHh9Wu4dBDgK2pu3gHBGWI=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=gviArQVjo1OHUHuYRjLtFk0ZGMBpwapskghL/x9Yw2berxz4kJbmMRCmL7Yg7T3mY vCU971uJnNgk4svS0mY8ePj9X9rQ5z4OXP8Ywbt4fFNU3fbbjCqdbVvZVfGSFiAv7a enFW8pFLWx9Sq3aF6K4zi7JXwXDKXbuZMvAuN73/fu8xJzxHCytxQ/ug0VKxp2fOoT 3VuKV5FVqx5sEatNt7jNkQ0sGz7ZV1vt9+XyVqYwJFMniWhQaOag2b+jl2PB/rOkUp 2nC0E/PEp6cGnik44DioYJxkKwojYwrBUYUig7mvhfIWKS6vdTwzlfuoKHLP52HoUN KGUf3jnO5XvlQ== Received: from tr.lan (ip-86-49-12-201.net.upcbroadband.cz [86.49.12.201]) (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 A10C383E42; Wed, 13 Apr 2022 00:40:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1649803235; bh=Jks5kwYdNln21A7uCPA6RmHh9Wu4dBDgK2pu3gHBGWI=; h=From:To:Cc:Subject:Date:From; b=efGny7pM8mdnFqcnOkq6F5X+Dpke0RWtd7K18P+2fow85RDglm1qFJOZ94CdeRgZw VrL8JW8QN/uUxh54q0VxQBpXN1UPlz3aj4lRVdncf5Tt6lqRwM7B0//qvnTI22312D pHCYip5pdL4zYv84yqcmyAWu6guOt6TM9W3WR3ATESALUN9W/Zh3ZsueuGtWMyL/qj X+Pz7GO1UKA5rmadQVXwLlslmqJ+9JSBQqiVXKk/mftRwjlCkcRPd5YJLtxSgmCKSe eSsfpoSbZ3s7JTCJAziVZI3TmVI13c9WQWptjQzAGrdZ8ayCTmGaljpMmPqYRgxfJu yRwiq8EPWIROg== From: Marek Vasut To: u-boot@lists.denx.de, sbabic@denx.de Cc: Marek Vasut , Peng Fan , Fabio Estevam Subject: [PATCH v3] ARM: imx: Get rid of only i.MX8M SMCCC arch call Date: Wed, 13 Apr 2022 00:40:26 +0200 Message-Id: <20220412224026.194896-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 Reviewed-by: Peng Fan Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Peng Fan Cc: Stefano Babic --- V2: Add RB by Peng V3: Rebase on u-boot-imx/master --- arch/arm/mach-imx/imx8m/soc.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index 75559e3b799..bb94ef51492 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -29,7 +29,6 @@ #include #include #include -#include #include DECLARE_GLOBAL_DATA_PTR; @@ -1399,23 +1398,6 @@ 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) { if (IS_ENABLED(CONFIG_FSL_CAAM)) { @@ -1426,7 +1408,6 @@ int arch_misc_init(void) if (ret) printf("Failed to initialize %s: %d\n", dev->name, ret); } - acquire_buildinfo(); return 0; } -- 2.35.1