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 D2C78C433FE for ; Tue, 22 Nov 2022 14:48:58 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AE41185425; Tue, 22 Nov 2022 15:48:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="mGgEomXD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9497283600; Tue, 22 Nov 2022 15:48:54 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5C77A85442 for ; Tue, 22 Nov 2022 15:48:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jitloonl@ecsmtp.png.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669128531; x=1700664531; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=lHRFsl5sSUWcWXWZwIcJUeKywDh2X154r1U479AaAqQ=; b=mGgEomXDibkdbge4XUL+ezFmW3q+oMoqvv6mvHbHzRyw5NA+UOQVOBoo LuRcH5AVLN6hHotdHAVbQT97KcOUPURfnYI7oYPendJJzaM33B8216niF l7vVq+jc5JOGrc29CTcpzhVe9zfDF67HMl4IKdpTLLoT2Bznfn+a4kZWa RuhD6I8XXS2GVqJNHQrna7VhusLxBs8mRrwu9sJxgYygBaHq5bqrB3CMM CDxUbAq5+9qGfu1KnM+0SAjUKBodayGIS5SQ7bwfJje1YG62iCkCsTVlu IO1sTCNnf0TPeRmS20dK5S8Q0lu1AIg5OoKTPHnJA3/V50jxhFryUTWO4 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10539"; a="378088380" X-IronPort-AV: E=Sophos;i="5.96,184,1665471600"; d="scan'208";a="378088380" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 06:48:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10539"; a="730418869" X-IronPort-AV: E=Sophos;i="5.96,184,1665471600"; d="scan'208";a="730418869" Received: from pglmail07.png.intel.com ([10.221.193.207]) by FMSMGA003.fm.intel.com with ESMTP; 22 Nov 2022 06:48:44 -0800 Received: from localhost (pgli0028.png.intel.com [10.221.84.177]) by pglmail07.png.intel.com (Postfix) with ESMTP id A49CB482A; Tue, 22 Nov 2022 22:48:43 +0800 (+08) Received: by localhost (Postfix, from userid 12048045) id 8A2C6E00214; Tue, 22 Nov 2022 22:48:43 +0800 (+08) From: Jit Loon Lim To: u-boot@lists.denx.de Cc: Jagan Teki , Vignesh R , Marek , Simon , Tien Fong , Kok Kiang , Siew Chin , Sin Hui , Raaj , Dinesh , Boon Khai , Alif , Teik Heng , Hazim , Jit Loon Lim , Sieu Mun Tang Subject: [PATCH] arm: socfpga: Add boolean use_fit to run specific commands when using fit image Date: Tue, 22 Nov 2022 22:48:41 +0800 Message-Id: <20221122144841.18100-1-jit.loon.lim@intel.com> X-Mailer: git-send-email 2.26.2 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.6 at phobos.denx.de X-Virus-Status: Clean From: Sin Hui Kho Since board_prep_linux() can be called in legacy boot flow using "bootm" command, a boolean type variable use_fit is added. This is to run specific commands, "linux_qspi_enable" and "rsu_status" commands when a fit image is used in "bootm". Signed-off-by: Sin Hui Kho Signed-off-by: Jit Loon Lim --- arch/arm/mach-socfpga/board.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c index 7267163222..914a44970d 100644 --- a/arch/arm/mach-socfpga/board.c +++ b/arch/arm/mach-socfpga/board.c @@ -116,6 +116,8 @@ void board_fit_image_post_process(const void *fit, int node, void **p_image, #if !IS_ENABLED(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_FIT) void board_prep_linux(bootm_headers_t *images) { + bool use_fit = false; + if (!images->fit_uname_cfg) { if (IS_ENABLED(CONFIG_SOCFPGA_SECURE_VAB_AUTH) && !IS_ENABLED(CONFIG_SOCFPGA_SECURE_VAB_AUTH_ALLOW_NON_FIT_IMAGE)) { @@ -127,12 +129,13 @@ void board_prep_linux(bootm_headers_t *images) hang(); } } else { + use_fit = true; /* Update fdt_addr in enviroment variable */ env_set_hex("fdt_addr", (ulong)images->ft_addr); debug("images->ft_addr = 0x%08lx\n", (ulong)images->ft_addr); } - if (IS_ENABLED(CONFIG_CADENCE_QSPI)) { + if (use_fit && IS_ENABLED(CONFIG_CADENCE_QSPI)) { if (env_get("linux_qspi_enable")) run_command(env_get("linux_qspi_enable"), 0); } -- 2.26.2