Skip to content
Permalink
Browse files

dts: nordic: nrf9160: Remove redundant aliases

Several aliases were added to nrf9160[ns].dtsi files solely for
the purpose of getting base addresses of certain hardware modules
via DT_ macros generated for these aliases.
Since for one-instance modules the same can be now achieved with
standard DT_INST_0_* macros, there is no need to keep these aliases.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
  • Loading branch information...
anangl authored and ioannisg committed Jul 31, 2019
1 parent 26b4380 commit 3fbe2828ba3c69b9e3ce0d06f6667c02667b5d89
Showing with 10 additions and 18 deletions.
  1. +0 −5 dts/arm/nordic/nrf9160.dtsi
  2. +0 −3 dts/arm/nordic/nrf9160ns.dtsi
  3. +10 −10 ext/hal/nordic/nrfx_config_nrf9160.h
@@ -30,13 +30,8 @@

aliases {
flash-controller = &flash_controller;
ficr = &ficr;
rtc-0 = &rtc0;
rtc-1 = &rtc1;
clock = &clock;
power = &power;
nvmc = &flash_controller;
spu = &spu;
uart-0 = &uart0;
uart-1 = &uart1;
uart-2 = &uart2;
@@ -32,9 +32,6 @@
flash-controller = &flash_controller;
rtc-0 = &rtc0;
rtc-1 = &rtc1;
clock = &clock;
power = &power;
nvmc = &flash_controller;
uart-0 = &uart0;
uart-1 = &uart1;
uart-2 = &uart2;
@@ -41,19 +41,19 @@

#include <generated_dts_board.h>

#ifdef DT_NORDIC_NRF_CLOCK_CLOCK_BASE_ADDRESS
#ifdef DT_INST_0_NORDIC_NRF_CLOCK_BASE_ADDRESS
#define NRF_CLOCK \
((NRF_CLOCK_Type *)DT_NORDIC_NRF_CLOCK_CLOCK_BASE_ADDRESS)
((NRF_CLOCK_Type *)DT_INST_0_NORDIC_NRF_CLOCK_BASE_ADDRESS)
#endif

#ifdef DT_INST_0_NORDIC_NRF_DPPIC_BASE_ADDRESS
#define NRF_DPPIC \
((NRF_DPPIC_Type *)DT_INST_0_NORDIC_NRF_DPPIC_BASE_ADDRESS)
#endif

#ifdef DT_NORDIC_NRF_FICR_FICR_BASE_ADDRESS
#ifdef DT_INST_0_NORDIC_NRF_FICR_BASE_ADDRESS
#define NRF_FICR \
((FICR_INFO_Type *)DT_NORDIC_NRF_FICR_FICR_BASE_ADDRESS)
((FICR_INFO_Type *)DT_INST_0_NORDIC_NRF_FICR_BASE_ADDRESS)
#endif

#ifdef DT_NORDIC_NRF_GPIO_GPIO_0_BASE_ADDRESS
@@ -66,14 +66,14 @@
((NRF_GPIOTE_Type *)DT_NORDIC_NRF_GPIOTE_GPIOTE_0_BASE_ADDRESS)
#endif

#ifdef DT_NORDIC_NRF91_FLASH_CONTROLLER_NVMC_BASE_ADDRESS
#ifdef DT_INST_0_NORDIC_NRF91_FLASH_CONTROLLER_BASE_ADDRESS
#define NRF_NVMC \
((NRF_NVMC_Type *)DT_NORDIC_NRF91_FLASH_CONTROLLER_NVMC_BASE_ADDRESS)
((NRF_NVMC_Type *)DT_INST_0_NORDIC_NRF91_FLASH_CONTROLLER_BASE_ADDRESS)
#endif

#ifdef DT_NORDIC_NRF_POWER_POWER_BASE_ADDRESS
#ifdef DT_INST_0_NORDIC_NRF_POWER_BASE_ADDRESS
#define NRF_POWER \
((NRF_POWER_Type *)DT_NORDIC_NRF_POWER_POWER_BASE_ADDRESS)
((NRF_POWER_Type *)DT_INST_0_NORDIC_NRF_POWER_BASE_ADDRESS)
#endif

#ifdef DT_NORDIC_NRF_PWM_PWM_0_BASE_ADDRESS
@@ -141,9 +141,9 @@
((NRF_SPIS_Type *)DT_NORDIC_NRF_SPIS_SPI_3_BASE_ADDRESS)
#endif

#ifdef DT_NORDIC_NRF_SPU_SPU_BASE_ADDRESS
#ifdef DT_INST_0_NORDIC_NRF_SPU_BASE_ADDRESS
#define NRF_SPU \
((NRF_SPU_Type *)DT_NORDIC_NRF_SPU_SPU_BASE_ADDRESS)
((NRF_SPU_Type *)DT_INST_0_NORDIC_NRF_SPU_BASE_ADDRESS)
#endif

#ifdef DT_NORDIC_NRF_TIMER_TIMER_0_BASE_ADDRESS

0 comments on commit 3fbe282

Please sign in to comment.
You can’t perform that action at this time.