summaryrefslogtreecommitdiff
path: root/board/CZ.NIC/turris_mox/mox_sp.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-04-14 08:47:07 -0400
committerTom Rini <trini@konsulko.com>2020-04-14 08:47:07 -0400
commit142a07f2a44262d76fec609e1fcde51794a456eb (patch)
treefc2304595e16ff9315c84e76e9a12b6fbb8a01e7 /board/CZ.NIC/turris_mox/mox_sp.c
parent2af31afc7ac55b2d11676da51599c6dd679e77c3 (diff)
parentc64ac3b3185aeb3846297ad7391fc6df8ecd73bf (diff)
Merge branch 'master' of git://git.denx.de/u-boot-marvell
- Misc enhancements to Clearfog, including board variant detection (Joel) - Misc enhancements to Turris Mox, including generalization of the ARMADA37xx DDR size detection (Marek)
Diffstat (limited to 'board/CZ.NIC/turris_mox/mox_sp.c')
-rw-r--r--board/CZ.NIC/turris_mox/mox_sp.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/board/CZ.NIC/turris_mox/mox_sp.c b/board/CZ.NIC/turris_mox/mox_sp.c
index 0b29ffcc67..3c23471e65 100644
--- a/board/CZ.NIC/turris_mox/mox_sp.c
+++ b/board/CZ.NIC/turris_mox/mox_sp.c
@@ -4,15 +4,17 @@
*/
#include <common.h>
+#include <asm/arch/soc.h>
#include <asm/io.h>
-#define RWTM_CMD_PARAM(i) (size_t)(0xd00b0000 + (i) * 4)
-#define RWTM_CMD 0xd00b0040
-#define RWTM_CMD_RETSTATUS 0xd00b0080
-#define RWTM_CMD_STATUS(i) (size_t)(0xd00b0084 + (i) * 4)
+#define RWTM_BASE (MVEBU_REGISTER(0xb0000))
+#define RWTM_CMD_PARAM(i) (size_t)(RWTM_BASE + (i) * 4)
+#define RWTM_CMD (RWTM_BASE + 0x40)
+#define RWTM_CMD_RETSTATUS (RWTM_BASE + 0x80)
+#define RWTM_CMD_STATUS(i) (size_t)(RWTM_BASE + 0x84 + (i) * 4)
-#define RWTM_HOST_INT_RESET 0xd00b00c8
-#define RWTM_HOST_INT_MASK 0xd00b00cc
+#define RWTM_HOST_INT_RESET (RWTM_BASE + 0xc8)
+#define RWTM_HOST_INT_MASK (RWTM_BASE + 0xcc)
#define SP_CMD_COMPLETE BIT(0)
#define MBOX_STS_SUCCESS (0x0 << 30)