From 01ca78b227fceef84b8064e9fe5cac95c12d96e0 Mon Sep 17 00:00:00 2001 From: Derek Snell Date: Wed, 23 Apr 2025 09:14:57 -0400 Subject: [PATCH] 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 --- boards/nxp/frdm_mcxn947/board.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/boards/nxp/frdm_mcxn947/board.c b/boards/nxp/frdm_mcxn947/board.c index 40efcb3ab81..c1384e6c183 100644 --- a/boards/nxp/frdm_mcxn947/board.c +++ b/boards/nxp/frdm_mcxn947/board.c @@ -1,5 +1,5 @@ /* - * Copyright 2024-2025 NXP + * Copyright 2024 NXP * SPDX-License-Identifier: Apache-2.0 */ #include @@ -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))