aboutsummaryrefslogtreecommitdiff
path: root/kernel/uapi/ethosu.h
diff options
context:
space:
mode:
authorKristofer Jonsson <kristofer.jonsson@arm.com>2022-03-08 13:25:45 +0100
committerKristofer Jonsson <kristofer.jonsson@arm.com>2022-03-10 15:20:57 +0100
commit35de9e63d9c2fe0a557637ac104d7d73382d2d4a (patch)
tree41fa348f46f7f76b00625ad3b9768c1ddae5c83b /kernel/uapi/ethosu.h
parent118b05990af26026a1ac2b6d5dfae32ea342a7f4 (diff)
downloadethos-u-linux-driver-stack-35de9e63d9c2fe0a557637ac104d7d73382d2d4a.tar.gz
Firmware resident model
Support referencing a network model by index that has been built into the firmware binary. Change-Id: Idd5294376ea82503dfeafe1203dcc0694d296dfe
Diffstat (limited to 'kernel/uapi/ethosu.h')
-rw-r--r--kernel/uapi/ethosu.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/kernel/uapi/ethosu.h b/kernel/uapi/ethosu.h
index 903316d..335c769 100644
--- a/kernel/uapi/ethosu.h
+++ b/kernel/uapi/ethosu.h
@@ -1,5 +1,5 @@
/*
- * (C) COPYRIGHT 2020 ARM Limited. All rights reserved.
+ * Copyright (c) 2020-2022 Arm Limited.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -97,11 +97,28 @@ struct ethosu_uapi_buffer {
};
/**
+ * enum ethosu_uapi_network_create - Network buffer type.
+ * @ETHOSU_UAPI_NETWORK_BUFFER: Network is stored in a buffer handle.
+ * @ETHOSU_UAPI_NETWORK_INDEX: Network is built into firmware and referenced by
+ * index.
+ */
+enum ethosu_uapi_network_type {
+ ETHOSU_UAPI_NETWORK_BUFFER = 1,
+ ETHOSU_UAPI_NETWORK_INDEX
+};
+
+/**
* struct ethosu_uapi_network_create - Create network request
+ * @type: Buffer type. See @ethosu_uapi_network_type.
* @fd: Buffer file descriptor
+ * @index: Buffer index compiled into firmware binary.
*/
struct ethosu_uapi_network_create {
- __u32 fd;
+ uint32_t type;
+ union {
+ __u32 fd;
+ __u32 index;
+ };
};
/**