From 5a89947ab3ef8541b7adb6058af9ef141073043d Mon Sep 17 00:00:00 2001 From: Mikael Olsson Date: Wed, 11 Jan 2023 10:36:22 +0100 Subject: [PATCH] fix(ethos-n): add workaround for erratum 2838783 To workaround Arm(R) Ethos(TM)-N NPU erratum 2838783, the NPU has been configured to allow being woken up by both secure and non-secure events to make sure that an event always wakes up the NPU. The API version has been given a minor version bump with this change to indicate that this fix is included. Signed-off-by: Mikael Olsson Change-Id: I429cdd6bf1e633b4dedf2e94af28937dd892a0ba --- drivers/arm/ethosn/ethosn_smc.c | 3 ++- include/drivers/arm/ethosn.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/arm/ethosn/ethosn_smc.c b/drivers/arm/ethosn/ethosn_smc.c index 7604b8b56..cf3491055 100644 --- a/drivers/arm/ethosn/ethosn_smc.c +++ b/drivers/arm/ethosn/ethosn_smc.c @@ -39,7 +39,8 @@ #define SEC_DEL_EXCC_MASK U(0x20) #define SEC_SECCTLR_REG U(0x0010) -#define SEC_SECCTLR_VAL U(0x3) +/* Set bit[10] = 1 to workaround erratum 2838783 */ +#define SEC_SECCTLR_VAL U(0x403) #define SEC_DEL_ADDR_EXT_REG U(0x201C) #define SEC_DEL_ADDR_EXT_VAL U(0x15) diff --git a/include/drivers/arm/ethosn.h b/include/drivers/arm/ethosn.h index 95244c71f..9f1b499d0 100644 --- a/include/drivers/arm/ethosn.h +++ b/include/drivers/arm/ethosn.h @@ -40,7 +40,7 @@ /* Service version */ #define ETHOSN_VERSION_MAJOR U(2) -#define ETHOSN_VERSION_MINOR U(2) +#define ETHOSN_VERSION_MINOR U(3) /* Return codes for function calls */ #define ETHOSN_SUCCESS 0 -- 2.39.5