summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-socfpga/mailbox_s10.c
diff options
context:
space:
mode:
authorSiew Chin Lim <elly.siew.chin.lim@intel.com>2021-03-24 17:16:50 +0800
committerLey Foon Tan <ley.foon.tan@intel.com>2021-04-08 17:29:12 +0800
commit404a98b0a49853e02ea342f6873b38702dd122c7 (patch)
treef225593602fe17de7fce1e520b8f8ddb5bb57c96 /arch/arm/mach-socfpga/mailbox_s10.c
parent3aef59f28083e2e3bd0c7ad91230f573123ec848 (diff)
downloadu-boot-404a98b0a49853e02ea342f6873b38702dd122c7.tar.gz
u-boot-404a98b0a49853e02ea342f6873b38702dd122c7.tar.xz
u-boot-404a98b0a49853e02ea342f6873b38702dd122c7.zip
arm: socfpga: Changed to store QSPI reference clock in kHz
Changed to store QSPI reference clock in kHz instead of Hz in boot scratch cold0 register for Stratix10 and Agilex. This patch is in preparation for Intel N5X SDRAM driver support. Reserved 4 bits for Intel N5X SDRAM driver, and there will be 28 bits to store QSPI reference clock. Due to limited bits, QSPI reference clock frequency is converted to kHz from Hz. Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com> Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Diffstat (limited to 'arch/arm/mach-socfpga/mailbox_s10.c')
-rw-r--r--arch/arm/mach-socfpga/mailbox_s10.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/arm/mach-socfpga/mailbox_s10.c b/arch/arm/mach-socfpga/mailbox_s10.c
index 7dcdae8136..101af23855 100644
--- a/arch/arm/mach-socfpga/mailbox_s10.c
+++ b/arch/arm/mach-socfpga/mailbox_s10.c
@@ -5,14 +5,15 @@
*/
#include <common.h>
-#include <hang.h>
-#include <wait_bit.h>
-#include <asm/global_data.h>
-#include <asm/io.h>
+#include <asm/arch/clock_manager.h>
#include <asm/arch/mailbox_s10.h>
#include <asm/arch/system_manager.h>
+#include <asm/global_data.h>
+#include <asm/io.h>
#include <asm/secure.h>
#include <asm/system.h>
+#include <hang.h>
+#include <wait_bit.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -384,10 +385,10 @@ int mbox_qspi_open(void)
if (ret)
goto error;
- /* We are getting QSPI ref clock and set into sysmgr boot register */
- printf("QSPI: Reference clock at %d Hz\n", resp_buf[0]);
- writel(resp_buf[0],
- socfpga_get_sysmgr_addr() + SYSMGR_SOC64_BOOT_SCRATCH_COLD0);
+ /* Store QSPI controller ref clock frequency */
+ ret = cm_set_qspi_controller_clk_hz(resp_buf[0]);
+ if (ret)
+ goto error;
return 0;