aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Moberg <anton.moberg@arm.com>2021-05-03 09:25:06 +0200
committerAnton Moberg <anton.moberg@arm.com>2021-05-03 09:28:34 +0200
commiteffc7aa8b9272fb20cdd1a7d1097818af70acc93 (patch)
treef549b59734b56fbd081d740c41525fb9473fcbe7 /src
parent61ec36b7f85991f83e3729e2997ef8d2cd6cc0f2 (diff)
downloadethos-u-core-driver-21.05-rc2.tar.gz
[Core driver] Update to support removal of "_v"-functions21.05-rc221.05-rc1
NPU driver interface currently have functions which have been stepped each time a compatibilty breaking changed has been introduced. Old entrypoints have been redefined with macro to use the latest version for backwards compatibility. This series of patches will remove any such functions and macro to unify the interface. Update: Remove all "_v"-functions and make the latest version the base entrypoint Update: Remove all redefine macros to only allow base entrypoint Note: static inline ethosu_invoke_v2() is kept as it is needed for tensorflow backwards compatibility. Will be removed in later patches. Change-Id: Ifa331daab35af24dc29e0d0007096902b8efc319
Diffstat (limited to 'src')
-rw-r--r--src/ethosu_driver.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/ethosu_driver.c b/src/ethosu_driver.c
index 22c15c2..1442621 100644
--- a/src/ethosu_driver.c
+++ b/src/ethosu_driver.c
@@ -216,7 +216,7 @@ void __attribute__((weak)) ethosu_semaphore_give(void *sem)
static int ethosu_soft_reset_and_restore(struct ethosu_driver *drv);
-void __attribute__((weak)) ethosu_irq_handler_v2(struct ethosu_driver *drv)
+void __attribute__((weak)) ethosu_irq_handler(struct ethosu_driver *drv)
{
uint8_t irq_raised = 0;
@@ -273,12 +273,12 @@ static void dump_command_stream(const uint32_t *cmd_stream, const int cms_length
static void npu_axi_init(struct ethosu_driver *drv);
static struct ethosu_driver *ethosu_find_and_reserve_driver(void);
-int ethosu_init_v4(struct ethosu_driver *drv,
- const void *base_address,
- const void *fast_memory,
- const size_t fast_memory_size,
- uint32_t secure_enable,
- uint32_t privilege_enable)
+int ethosu_init(struct ethosu_driver *drv,
+ const void *base_address,
+ const void *fast_memory,
+ const size_t fast_memory_size,
+ uint32_t secure_enable,
+ uint32_t privilege_enable)
{
int return_code = 0;
@@ -336,7 +336,7 @@ int ethosu_init_v4(struct ethosu_driver *drv,
return return_code;
}
-int ethosu_get_version_v2(struct ethosu_driver *drv, struct ethosu_version *version)
+int ethosu_get_version(struct ethosu_driver *drv, struct ethosu_version *version)
{
int return_code = 0;
@@ -370,12 +370,12 @@ int ethosu_get_version_v2(struct ethosu_driver *drv, struct ethosu_version *vers
return return_code;
}
-int ethosu_invoke_v3(struct ethosu_driver *drv,
- const void *custom_data_ptr,
- const int custom_data_size,
- const uint64_t *base_addr,
- const size_t *base_addr_size,
- const int num_base_addr)
+int ethosu_invoke(struct ethosu_driver *drv,
+ const void *custom_data_ptr,
+ const int custom_data_size,
+ const uint64_t *base_addr,
+ const size_t *base_addr_size,
+ const int num_base_addr)
{
const struct custom_data_s *data_ptr = custom_data_ptr;
const struct custom_data_s *data_end = custom_data_ptr + custom_data_size;
@@ -505,12 +505,12 @@ int ethosu_invoke_v3(struct ethosu_driver *drv,
return return_code;
}
-void ethosu_abort_v2(struct ethosu_driver *drv)
+void ethosu_abort(struct ethosu_driver *drv)
{
drv->abort_inference = true;
}
-void ethosu_set_power_mode_v2(struct ethosu_driver *drv, bool always_on)
+void ethosu_set_power_mode(struct ethosu_driver *drv, bool always_on)
{
drv->dev_power_always_on = always_on;