Commit ffe10833 authored by Gerard Marull-Paretas's avatar Gerard Marull-Paretas Committed by Fabio Baltieri
Browse files

drivers: bluetooth: hci: nrf53: use nrf_spu_extdomain_set



Instead of hardcoded values and device instances.

Signed-off-by: default avatarGerard Marull-Paretas <gerard@teslabs.com>
parent f611fdd6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -6,9 +6,12 @@

#include <soc.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <nrf53_cpunet_mgmt.h>
#include <../subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/debug.h>

#include <hal/nrf_spu.h>

#define LOG_LEVEL CONFIG_BT_HCI_DRIVER_LOG_LEVEL
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(bt_hci_nrf53_support);
@@ -34,7 +37,7 @@ int bt_hci_transport_setup(const struct device *dev)
	/* Retain nRF5340 Network MCU in Secure domain (bus
	 * accesses by Network MCU will have Secure attribute set).
	 */
	NRF_SPU->EXTDOMAIN[0].PERM = 1 << 4;
	nrf_spu_extdomain_set((NRF_SPU_Type *)DT_REG_ADDR(DT_NODELABEL(spu)), 0, true, false);
#endif /* !defined(CONFIG_TRUSTED_EXECUTION_NONSECURE) */

	/* Release the Network MCU, 'Release force off signal' */