diff options
author | Bhavik Patel <bhavik.patel@arm.com> | 2020-09-30 09:06:52 +0200 |
---|---|---|
committer | Bhavik Patel <bhavik.patel@arm.com> | 2020-10-16 12:52:43 +0200 |
commit | 5f8dad185b3e3a381fe2e3d16580a8a8e99f9db0 (patch) | |
tree | b7f7686f5fa9ee6b5850b9a273d6e383ec0d0a06 /include/ethosu_device.h | |
parent | 51c18bac97dc3ae3393a786999f4602ca11c22f7 (diff) | |
download | ethos-u-core-driver-5f8dad185b3e3a381fe2e3d16580a8a8e99f9db0.tar.gz |
MLBEDSW-3094 Improve soft reset of ETHOSU when running jobs
The ETHOSU is soft-reset only if the previous job failed or if
the current privilege level is not user or if the current security
level is not secure.
Change-Id: Id10b96058d67805d179ac693537606d55e10379b
Diffstat (limited to 'include/ethosu_device.h')
-rw-r--r-- | include/ethosu_device.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/ethosu_device.h b/include/ethosu_device.h index e08aa3d..5edba94 100644 --- a/include/ethosu_device.h +++ b/include/ethosu_device.h @@ -55,6 +55,7 @@ enum ethosu_error_codes struct ethosu_device { uintptr_t base_address; + uint32_t reset; uint32_t pmcr; uint64_t pmccntr; uint32_t pmcnten; @@ -392,6 +393,14 @@ enum ethosu_error_codes ethosu_save_pmu_config(struct ethosu_device *dev); */ enum ethosu_error_codes ethosu_restore_pmu_config(struct ethosu_device *dev); +/** + * Check if the STATUS register has any error bits set or not. + * \param[in] dev Ethos-U device to check. + * \return true if any error bits set, + * false otherwise. + */ +bool ethosu_status_has_error(struct ethosu_device *dev); + #ifdef __cplusplus } #endif |