Revert "boards: nxp: frdm_mcxn947: enable GPIO in all modes"
This reverts commit feb966df36cbb8b6d847b9f0873bc79195e7fd22. That change makes GPIO registers inaccessible from cpu0. Signed-off-by: Derek Snell <derek.snell@nxp.com>
This commit is contained in:
parent
2d64237f44
commit
01ca78b227
1 changed files with 1 additions and 19 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2024-2025 NXP
|
||||
* Copyright 2024 NXP
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include <zephyr/init.h>
|
||||
|
@ -84,19 +84,6 @@ __ramfunc static void enable_cache64(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void unsecure_gpio(GPIO_Type * base)
|
||||
{
|
||||
/* Enables CPU1 to access GPIO registers
|
||||
* Pins and interrupts can be configured in non-secure access
|
||||
*/
|
||||
base->PCNS = 0xFFFFFFFFU;
|
||||
base->ICNS = GPIO_ICNS_NSE1_MASK | GPIO_ICNS_NSE0_MASK;
|
||||
|
||||
/* Pins and interrupts can be configured in non-privilege access */
|
||||
base->PCNP = 0xFFFFFFFFU;
|
||||
base->ICNP = GPIO_ICNP_NPE1_MASK | GPIO_ICNP_NPE0_MASK;
|
||||
}
|
||||
|
||||
void board_early_init_hook(void)
|
||||
{
|
||||
power_mode_od();
|
||||
|
@ -196,27 +183,22 @@ void board_early_init_hook(void)
|
|||
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio0))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio0);
|
||||
unsecure_gpio(GPIO0);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio1))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio1);
|
||||
unsecure_gpio(GPIO1);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio2))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio2);
|
||||
unsecure_gpio(GPIO2);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio3))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio3);
|
||||
unsecure_gpio(GPIO3);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpio4))
|
||||
CLOCK_EnableClock(kCLOCK_Gpio4);
|
||||
unsecure_gpio(GPIO4);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dac0))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue