summaryrefslogtreecommitdiff
path: root/arch/arm/mach-socfpga/mailbox_s10.c
diff options
context:
space:
mode:
authorLey Foon Tan <ley.foon.tan@intel.com>2019-11-08 10:38:20 +0800
committerMarek Vasut <marex@denx.de>2020-01-07 14:38:33 +0100
commitdb5741f7a85ec3ee79b64496172afaa7dc2cb225 (patch)
tree20f749d41ff3c329758f16c1a67f9c5772f35278 /arch/arm/mach-socfpga/mailbox_s10.c
parentbb25aca1343304e0334e9eebfb9d350eaf276882 (diff)
arm: socfpga: Convert system manager from struct to defines
Convert system manager for Gen5, Arria 10 and Stratix 10 from struct to defines. Change to get system manager base address from DT node instead of using #define. Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Diffstat (limited to 'arch/arm/mach-socfpga/mailbox_s10.c')
-rw-r--r--arch/arm/mach-socfpga/mailbox_s10.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/mach-socfpga/mailbox_s10.c b/arch/arm/mach-socfpga/mailbox_s10.c
index 4498ab55df..3b9a2ecb01 100644
--- a/arch/arm/mach-socfpga/mailbox_s10.c
+++ b/arch/arm/mach-socfpga/mailbox_s10.c
@@ -287,9 +287,6 @@ int mbox_qspi_close(void)
int mbox_qspi_open(void)
{
- static const struct socfpga_system_manager *sysmgr_regs =
- (struct socfpga_system_manager *)SOCFPGA_SYSMGR_ADDRESS;
-
int ret;
u32 resp_buf[1];
u32 resp_buf_len;
@@ -318,7 +315,8 @@ int mbox_qspi_open(void)
/* 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], &sysmgr_regs->boot_scratch_cold0);
+ writel(resp_buf[0],
+ socfpga_get_sysmgr_addr() + SYSMGR_S10_BOOT_SCRATCH_COLD0);
return 0;