diff options
author | Jonny Svärd <jonny.svaerd@arm.com> | 2021-11-30 14:54:07 +0100 |
---|---|---|
committer | Kristofer Jonsson <kristofer.jonsson@arm.com> | 2021-12-08 14:27:14 +0000 |
commit | 6d5b083e2e4279284f406d73c7f92e48ef28b218 (patch) | |
tree | ad71253ed293384c96c3ca93c3d795cfaa56000e /src/ethosu_device_u55_u65.c | |
parent | 1975b8d9845efdc9a3e2b997ace0a05fdaa11ed0 (diff) | |
download | ethos-u-core-driver-6d5b083e2e4279284f406d73c7f92e48ef28b218.tar.gz |
Minor bugfixes and clean up
Change error message to LOG_ERR from LOG_DEBUG and simplify
error checks
Remove redundant code in driver
Disable the PMU before enabling power/clock gating
Change-Id: I3092113250c1b165d985194ca2da213622629488
Diffstat (limited to 'src/ethosu_device_u55_u65.c')
-rw-r--r-- | src/ethosu_device_u55_u65.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ethosu_device_u55_u65.c b/src/ethosu_device_u55_u65.c index 06c6afb..f5a72b2 100644 --- a/src/ethosu_device_u55_u65.c +++ b/src/ethosu_device_u55_u65.c @@ -166,16 +166,18 @@ bool ethosu_dev_handle_interrupt(struct ethosu_device *dev) // If a fault has occured, the NPU needs to be reset if (dev->reg->STATUS.bus_status || dev->reg->STATUS.cmd_parse_error || dev->reg->STATUS.wd_fault || - dev->reg->STATUS.ecc_fault) + dev->reg->STATUS.ecc_fault || !dev->reg->STATUS.cmd_end_reached) { - LOG_DEBUG("NPU fault. status=0x%08x, qread=%" PRIu32, dev->reg->STATUS.word, dev->reg->QREAD.word); + LOG_ERR("NPU fault. status=0x%08x, qread=%" PRIu32 ", cmd_end_reached=%" PRIu32, + dev->reg->STATUS.word, + dev->reg->QREAD.word, + dev->reg->STATUS.cmd_end_reached); ethosu_dev_soft_reset(dev); ethosu_dev_set_clock_and_power(dev, ETHOSU_CLOCK_Q_UNCHANGED, ETHOSU_POWER_Q_DISABLE); return false; } - // Verify that the cmd stream finished executing - return dev->reg->STATUS.cmd_end_reached ? true : false; + return true; } bool ethosu_dev_verify_access_state(struct ethosu_device *dev) |