From e6498f0aa2e51b652a40b5f27e5991bd65422326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=85strand?= Date: Mon, 9 Nov 2020 15:33:12 +0100 Subject: Add API to set secure and privilege level of NPU Change-Id: I8ca309ea4e5885865d5c9cf848500f45f83e08a2 --- include/ethosu_device.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/ethosu_device.h') diff --git a/include/ethosu_device.h b/include/ethosu_device.h index 91aa877..dd34201 100644 --- a/include/ethosu_device.h +++ b/include/ethosu_device.h @@ -63,6 +63,8 @@ struct ethosu_device uint32_t pmccntr_cfg; uint32_t pmu_evcntr[ETHOSU_PMU_NCOUNTERS]; uint32_t pmu_evtypr[ETHOSU_PMU_NCOUNTERS]; + uint32_t secure; + uint32_t privileged; }; struct ethosu_id @@ -143,7 +145,10 @@ enum ethosu_power_q_request /** * Initialize the device. */ -enum ethosu_error_codes ethosu_dev_init(struct ethosu_device *dev, const void *base_address); +enum ethosu_error_codes ethosu_dev_init(struct ethosu_device *dev, + const void *base_address, + uint32_t secure_enable, + uint32_t privilege_enable); /** * Get device id. -- cgit v1.2.1