Skip to contentSkip to conversation

arm: socfpga: Ensure the DTS QSPI clock is set correctly

PATCH New Jit Loon Lim 1 participant 1 message Sep 2, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: socfpga: Ensure the DTS QSPI clock is set correctly

From: Tien Fong Chee <[email protected]>

The clocking section of Linux device tree was changed between 4.9.78-ltsi and 4.14.73-ltsi. This patch ensures that QSPI clock can be set correctly despite of different clocking section location in both Linux 4.9.78-ltsi and 4.14.73-ltsi.

---
 include/configs/socfpga_soc64_common.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
include/configs/socfpga_soc64_common.h +4 -2
index 06198ddd82..14506ac2b2 100644
@@ -57,8 +57,10 @@
 		"echo Enabling QSPI at Linux DTB...;" \
 		"fdt addr ${fdt_addr}; fdt resize;" \
 		"fdt set /soc/spi@ff8d2000 status okay;" \
-		"fdt set /soc/clkmgr/clocks/qspi_clk clock-frequency " \
-		" ${qspi_clock}; fi; \0" \
+		"if fdt set /soc/clocks/qspi-clk clock-frequency" \
+		" ${qspi_clock}; then" \
+		" else fdt set /soc/clkmgr/clocks/qspi_clk clock-frequency" \
+		" ${qspi_clock}; fi; fi\0" \
 	"scriptaddr=0x02100000\0" \
 	"scriptfile=u-boot.scr\0" \
 	"fatscript=if fatload mmc 0:1 ${scriptaddr} ${scriptfile};" \
Signature · 1 line
2.26.2