[PATCH] armv7: ls102xa: make QSPI clock selection optional during SoC init
Mario Kicherer
dev at kicherer.org
Thu Jan 19 18:39:48 CET 2023
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 <dev at kicherer.org>
---
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
More information about the U-Boot
mailing list