diff options
author | Jonny Svärd <jonny.svaerd@arm.com> | 2022-04-26 18:31:24 +0200 |
---|---|---|
committer | Kristofer Jonsson <kristofer.jonsson@arm.com> | 2022-05-05 12:56:33 +0000 |
commit | 301399d9e0b619fb2e229c9a9223aaf31ec6bcfa (patch) | |
tree | 5dbbfa41d5186add0e28b6d6b3e07b2267856c4f /src/ethosu_device_u55_u65.c | |
parent | c6505f3f8df8a5f00197f0eee5cc502e4e59c6a4 (diff) | |
download | ethos-u-core-driver-301399d9e0b619fb2e229c9a9223aaf31ec6bcfa.tar.gz |
Refactor power handling22.05-rc1
Add reference counted ethosu_request_power(),
ethosu_release_power() functions. While there are
active requests, disable the Q-channel power gating
of the Ethos-U device, leaving the device powered on.
Note that clock gating is implemented to follow the
state of the power gating.
Add ethosu_soft_reset() function. Restore power-
and clock gating state after reset.
Refactor and simplify driver code to use the new
functions.
Change-Id: I9756572c5c3e51b2be244bcea856d88e890e2d40
Diffstat (limited to 'src/ethosu_device_u55_u65.c')
-rw-r--r-- | src/ethosu_device_u55_u65.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ethosu_device_u55_u65.c b/src/ethosu_device_u55_u65.c index 31379fc..f16f9f8 100644 --- a/src/ethosu_device_u55_u65.c +++ b/src/ethosu_device_u55_u65.c @@ -209,6 +209,9 @@ bool ethosu_dev_verify_access_state(struct ethosu_device *dev) enum ethosu_error_codes ethosu_dev_soft_reset(struct ethosu_device *dev) { + // Note that after a soft-reset, the NPU is unconditionally + // powered until the next CMD gets written. + struct reset_r reset; reset.word = 0; |