Skip to content

Commit

Permalink
dts: nordic: nrf9160: Remove redundant aliases
Browse files Browse the repository at this point in the history
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 3fbe282
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
5 changes: 0 additions & 5 deletions dts/arm/nordic/nrf9160.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions dts/arm/nordic/nrf9160ns.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
20 changes: 10 additions & 10 deletions ext/hal/nordic/nrfx_config_nrf9160.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3fbe282

Please sign in to comment.