From 0fa1ab16472ff12df68e8bc1115704e62e976654 Mon Sep 17 00:00:00 2001 From: Bjarki Arge Andreasen Date: Mon, 27 Jan 2025 13:19:24 +0100 Subject: [PATCH] [nrf fromtree] soc: nordic: nrf54h: gpd: yield() to not block if main is coop The main thread, if configured with coop priority (don't do that :D) breaks gpd since it has a non yielding while loop (also don't do that) Add an explicit yield() to allow other threads to run if main or other threads use gpd with coop prio. Signed-off-by: Bjarki Arge Andreasen (cherry picked from commit 7e0e583f9e303f9f457f9e6310b8a8ed2cda07c1) --- soc/nordic/nrf54h/gpd/gpd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/soc/nordic/nrf54h/gpd/gpd.c b/soc/nordic/nrf54h/gpd/gpd.c index 5c7efcf543a..5e5f0b2dae1 100644 --- a/soc/nordic/nrf54h/gpd/gpd.c +++ b/soc/nordic/nrf54h/gpd/gpd.c @@ -139,6 +139,8 @@ static int nrf_gpd_sync(struct gpd_onoff_manager *gpd_mgr) if (atomic_test_bit(&gpd_service_status, GPD_SERVICE_REQ_OK)) { return 0; } + + k_yield(); } LOG_ERR("nRFs GDPWR request timed out");