aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Moberg <anton.moberg@arm.com>2021-04-13 13:32:17 +0200
committerAnton Moberg <anton.moberg@arm.com>2021-04-13 13:32:17 +0200
commit35b5d0eebf9709a3439d362a0b53d6270cbc4a94 (patch)
treed715a8a7b75db14ea7d4a6e46f1423b7958b725f
parentb8bcf1351d6d1260595f515ead22bc2abe4e08c8 (diff)
downloadethos-u-core-driver-35b5d0eebf9709a3439d362a0b53d6270cbc4a94.tar.gz
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
-rw-r--r--src/ethosu_driver.c3
1 files changed, 2 insertions, 1 deletions
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);