diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2020-04-08 12:02:07 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2020-04-14 13:16:42 +0200 |
commit | 9657841010cae49b1f903adf198ec334cfc92f11 (patch) | |
tree | 704e02a6847350e2c82ebffc59155c202f93c569 /board/CZ.NIC/turris_mox/turris_mox.c | |
parent | 9e4cdbabac1b38da30838701dca9f70935c7e095 (diff) |
arm: mvebu: turris_mox: don't use hardcoded addresses
Use macro MVEBU_REGISTER to access register addresses instead of
hardcoded addresses.
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/CZ.NIC/turris_mox/turris_mox.c')
-rw-r--r-- | board/CZ.NIC/turris_mox/turris_mox.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c index 6e937826d0..cd39b1c01f 100644 --- a/board/CZ.NIC/turris_mox/turris_mox.c +++ b/board/CZ.NIC/turris_mox/turris_mox.c @@ -5,6 +5,7 @@ #include <common.h> #include <init.h> +#include <asm/arch/soc.h> #include <asm/gpio.h> #include <asm/io.h> #include <dm.h> @@ -28,11 +29,11 @@ #define MOX_MODULE_USB3 0x5 #define MOX_MODULE_PASSPCI 0x6 -#define ARMADA_37XX_NB_GPIO_SEL 0xd0013830 -#define ARMADA_37XX_SPI_CTRL 0xd0010600 -#define ARMADA_37XX_SPI_CFG 0xd0010604 -#define ARMADA_37XX_SPI_DOUT 0xd0010608 -#define ARMADA_37XX_SPI_DIN 0xd001060c +#define ARMADA_37XX_NB_GPIO_SEL (MVEBU_REGISTER(0x13830)) +#define ARMADA_37XX_SPI_CTRL (MVEBU_REGISTER(0x10600)) +#define ARMADA_37XX_SPI_CFG (MVEBU_REGISTER(0x10604)) +#define ARMADA_37XX_SPI_DOUT (MVEBU_REGISTER(0x10608)) +#define ARMADA_37XX_SPI_DIN (MVEBU_REGISTER(0x1060c)) #define ETH1_PATH "/soc/internal-regs@d0000000/ethernet@40000" #define MDIO_PATH "/soc/internal-regs@d0000000/mdio@32004" |