From 35b5d0eebf9709a3439d362a0b53d6270cbc4a94 Mon Sep 17 00:00:00 2001 From: Anton Moberg Date: Tue, 13 Apr 2021 13:32:17 +0200 Subject: Power request bit fix Changed so that power_request bit will be set if ETHOSU_POWER_Q_DISABLE instead of ETHOSU_CLOCK_Q_DISABLE. Change-Id: I571ab165f8856ed71f6e932be401312d43e9cca8 --- src/ethosu_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ethosu_driver.c b/src/ethosu_driver.c index e99376a..201eeff 100644 --- a/src/ethosu_driver.c +++ b/src/ethosu_driver.c @@ -650,7 +650,7 @@ enum ethosu_error_codes set_clock_and_power_request(struct ethosu_driver *drv, clock_request = drv->clock_request == 0 ? ETHOSU_CLOCK_Q_ENABLE : ETHOSU_CLOCK_Q_DISABLE; // Set power request bit for client - if (power_request == ETHOSU_CLOCK_Q_DISABLE) + if (power_request == ETHOSU_POWER_Q_DISABLE) { drv->power_request |= (1 << client); } @@ -660,6 +660,7 @@ enum ethosu_error_codes set_clock_and_power_request(struct ethosu_driver *drv, } // Get current power request (ENABLE if both PMU and INFERENCE asks for power request, else DISABLE) power_request = drv->power_request == 0 ? ETHOSU_POWER_Q_ENABLE : ETHOSU_POWER_Q_DISABLE; + // Set clock and power enum ethosu_error_codes ret = ethosu_set_clock_and_power(&drv->dev, clock_request, power_request); -- cgit v1.2.1