arch/nrf53_gpio: MCUSEL is available only for the app core

This commit is contained in:
raiden00pl 2023-03-03 17:30:10 +01:00 committed by Masayuki Ishikawa
parent 7cbaa98d88
commit e3008e13f3
2 changed files with 17 additions and 2 deletions

View File

@ -5,6 +5,8 @@
comment "NRF53 Configuration Options"
# NRF53 Families
choice
prompt "NRF53 Chip Selection"
default ARCH_CHIP_NRF5340
@ -15,8 +17,13 @@ config ARCH_CHIP_NRF5340
endchoice # NRF53 Chip Selection
# NRF53 Families
config NRF53_APPCORE
bool
default n
config NRF53_NETCORE
bool
default n
choice
prompt "NRF5340 Core Selection"
@ -25,9 +32,12 @@ choice
config ARCH_CHIP_NRF5340_CPUAPP
bool "NRF53 App core"
select NRF53_APPCORE
select ARCH_HAVE_FPU
config ARCH_CHIP_NRF5340_CPUNET
bool "NRF53 Net core"
select NRF53_NETCORE
endchoice # NRF5340 Core Selection

View File

@ -253,6 +253,8 @@ static inline void nrf53_gpio_drive(nrf53_pinset_t cfgset,
putreg32(regval, offset);
}
#ifdef CONFIG_NRF53_APPCORE
/****************************************************************************
* Name: nrf53_gpio_mcusel
*
@ -293,6 +295,7 @@ static inline void nrf53_gpio_mcusel(nrf53_pinset_t cfgset,
putreg32(regval, offset);
}
#endif
/****************************************************************************
* Public Functions
@ -344,11 +347,13 @@ int nrf53_gpio_config(nrf53_pinset_t cfgset)
nrf53_gpio_drive(cfgset, port, pin);
#ifdef CONFIG_NRF53_APPCORE
/* Select which MCU/Subsystem controls this pin.
* NOTE: accessible only from secure code.
* NOTE: accessible only from secure code and from the app core.
*/
nrf53_gpio_mcusel(cfgset, port, pin);
#endif
/* Handle according to pin function */