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
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 @@
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_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