aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBhavik Patel <bhavik.patel@arm.com>2020-09-30 09:06:52 +0200
committerBhavik Patel <bhavik.patel@arm.com>2020-10-16 12:52:43 +0200
commit5f8dad185b3e3a381fe2e3d16580a8a8e99f9db0 (patch)
treeb7f7686f5fa9ee6b5850b9a273d6e383ec0d0a06 /include
parent51c18bac97dc3ae3393a786999f4602ca11c22f7 (diff)
downloadethos-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')
-rw-r--r--include/ethosu_device.h9
-rw-r--r--include/ethosu_driver.h1
2 files changed, 10 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
diff --git a/include/ethosu_driver.h b/include/ethosu_driver.h
index d6e9c6d..2594fbe 100644
--- a/include/ethosu_driver.h
+++ b/include/ethosu_driver.h
@@ -43,6 +43,7 @@ struct ethosu_driver
bool abort_inference;
uint64_t fast_memory;
size_t fast_memory_size;
+ bool status_error;
};
struct ethosu_version_id