forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
soc: nordic: nrf54h20: Disable USBHS core cache
Configure USBHS core registers as non-cachable to prevent D-Cache from inhibiting volatile accesses to the USBHS core registers. Signed-off-by: Tomasz Moń <[email protected]>
- Loading branch information
1 parent
d77dc62
commit 149df6b
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright (c) 2024 Nordic Semiconductor ASA. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <zephyr/devicetree.h> | ||
#include <zephyr/arch/arm/cortex_m/arm_mpu_mem_cfg.h> | ||
|
||
#define USBHS_BASE DT_REG_ADDR_BY_NAME(DT_NODELABEL(usbhs), core) | ||
#define USBHS_SIZE DT_REG_SIZE_BY_NAME(DT_NODELABEL(usbhs), core) | ||
|
||
static struct arm_mpu_region mpu_regions[] = { | ||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(usbhs), okay) | ||
MPU_REGION_ENTRY("USBHS_CORE", USBHS_BASE, | ||
REGION_RAM_NOCACHE_ATTR(USBHS_BASE, USBHS_SIZE)), | ||
#endif | ||
}; | ||
|
||
const struct arm_mpu_config mpu_config = { | ||
.num_regions = ARRAY_SIZE(mpu_regions), | ||
.mpu_regions = mpu_regions, | ||
}; |