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 88EDDC38142 for ; Thu, 19 Jan 2023 17:42:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 43C5A85689; Thu, 19 Jan 2023 18:41:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=kicherer.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=kicherer.org header.i=@kicherer.org header.b="L6OGZtYe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 16FE785657; Thu, 19 Jan 2023 18:40:01 +0100 (CET) Received: from mail.zeus06.de (www.zeus06.de [194.117.254.36]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6CD7785606 for ; Thu, 19 Jan 2023 18:39:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=kicherer.org Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=dev@kicherer.org DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=kicherer.org; h=from:to :cc:subject:date:message-id:mime-version :content-transfer-encoding; s=k1; bh=o0s3RA98PrZuVmC4/GrNHUM9uNY MOIduwvcqW939jps=; b=L6OGZtYeK+PczVMgiigwwOARwGD8V8QYR5ZMOny498r BO5mEAwAe4SV4vQicE40KOoAYWxx2O+8iHE0355EF4qIuytZEh9AWGsUWD4UMdOl +J38BWvl0RSNrqEPtYxUiRDpg4panirtSlbv6XFjfkJx0P/uelxSlnap62VT7Ee8 = Received: (qmail 2011819 invoked from network); 19 Jan 2023 18:39:57 +0100 Received: by mail.zeus06.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 19 Jan 2023 18:39:57 +0100 X-UD-Smtp-Session: l3s6476p2@vuTFa6HyasJd7WR9 From: Mario Kicherer To: u-boot@lists.denx.de Cc: sean.anderson@seco.com, ran.wang_1@nxp.com, priyanka.jain@nxp.com, sjg@chromium.org, Mario Kicherer Subject: [PATCH] armv7: ls102xa: make QSPI clock selection optional during SoC init Date: Thu, 19 Jan 2023 18:39:48 +0100 Message-Id: <20230119173948.1730773-1-dev@kicherer.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 19 Jan 2023 18:41:30 +0100 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 To improve startup times when booting from QSPI flash, the QSPI frequency can be configured very early in the boot process [1] to reduce loading times of U-Boot itself. This patch adds an option to disable setting the frequency to a default value during SoC initialization. [1] https://www.nxp.com/docs/en/application-note/AN12279.pdf Signed-off-by: Mario Kicherer --- arch/arm/cpu/armv7/ls102xa/Kconfig | 9 +++++++++ arch/arm/cpu/armv7/ls102xa/soc.c | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/ls102xa/Kconfig b/arch/arm/cpu/armv7/ls102xa/Kconfig index e75a895e00..f6b07b6026 100644 --- a/arch/arm/cpu/armv7/ls102xa/Kconfig +++ b/arch/arm/cpu/armv7/ls102xa/Kconfig @@ -98,4 +98,13 @@ config SYS_FSL_IFC_BANK_COUNT config SYS_FSL_ERRATUM_A008407 bool +config SYS_FSL_QSPI_SKIP_CLKSEL + bool "Skip setting QSPI clock during SoC init" + default 0 + help + To improve startup times when booting from QSPI flash, the QSPI + frequency can be set very early in the boot process. If this option + is enabled, the QSPI frequency will not be changed by U-Boot during + SoC initialization. + endmenu diff --git a/arch/arm/cpu/armv7/ls102xa/soc.c b/arch/arm/cpu/armv7/ls102xa/soc.c index 21570204b0..84d4ea3a8f 100644 --- a/arch/arm/cpu/armv7/ls102xa/soc.c +++ b/arch/arm/cpu/armv7/ls102xa/soc.c @@ -169,8 +169,8 @@ int arch_soc_init(void) #ifdef CONFIG_LAYERSCAPE_NS_ACCESS enable_layerscape_ns_access(); #endif - -#if defined(CONFIG_FSL_QSPI) + +#if defined(CONFIG_FSL_QSPI) && !defined(CONFIG_SYS_FSL_QSPI_SKIP_CLKSEL) out_be32(&scfg->qspi_cfg, SCFG_QSPI_CLKSEL); #endif -- 2.34.1