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 ADE38C433EF for ; Mon, 11 Apr 2022 19:48:05 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7EA9383EB7; Mon, 11 Apr 2022 21:46:47 +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=1649706407; bh=ZbVCD2khqRPugXllZ6e1tnwgCqe5otR8MM3iwX+aBKQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=s7J3DXcdyq382krsOhLWqfjazIcN0PAvqtFrePx9hVsRbAcDdvHrZmGmbwPsbW/J/ M9eC4V5pIjSTh9L4ijRaGFFhGda1D9Wh0HmTtyPCv/qyuAe3lBT0dKVVb6Gv8+ajrc EVlDv5Z2fxeKa7p6hoY8ugKHZoTPvC3VxKLnXBAaFUydhpBgKladF4dYxytI7Gq52y nBgqrciNoLIrsNrkhWvQYbxJgqSZ3QDlOUXcluNY05K4s+4H7H+5zBR170sL7HTxXY Ex9w2mUEIMC1EEb1zJtkc0bk+9g6O4cPlv6qZgkJaDzSK4GpdqQ2uxRUHOKsHSGqp7 /BsOPe1IuDPTQ== 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 2967783E3D; Mon, 11 Apr 2022 21:46:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1649706375; bh=ZbVCD2khqRPugXllZ6e1tnwgCqe5otR8MM3iwX+aBKQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DpyDFUv9QRDmncTBHnMBzrbaHgyurpT4f8rGfb0E0vNFAgDown30aZUOy6aqP1wne GR9EVn6ioXj9Dl6p4hBW5DUXmhnM2QWlErG5ZN8/AYGSqcCT1atzs7bPUhkK+Qw+O+ eW8O95abySTWakNA75yS+MCc44OScPQY3e5xJBNg544qs7pLO3f9/zx212zlrg9h6Z FpDJ3GXRmAIztQASv8eMGcnDWXEOe/SO88PVFEUmoifXdxv9PLcTzOYUdWAWAyWlmF ouE06T/98VhpRrk9yX3LiPlg5/6MnMpGCh4LASJM92JDFzsCsgb371NwESzkMLdZue xd1loZEb8SkJg== From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Peng Fan , Fabio Estevam , Stefano Babic Subject: [PATCH v2 11/23] ARM: imx: Get rid of only i.MX8M SMCCC arch call Date: Mon, 11 Apr 2022 21:45:31 +0200 Message-Id: <20220411194543.730647-11-marex@denx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411194543.730647-1-marex@denx.de> References: <20220411194543.730647-1-marex@denx.de> 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 --- 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 8e972d9b0cb..79b26d8ce5a 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -28,7 +28,6 @@ #include #include #include -#include #include DECLARE_GLOBAL_DATA_PTR; @@ -1196,27 +1195,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