aboutsummaryrefslogtreecommitdiff
path: root/kernel/ethosu_device.h
diff options
context:
space:
mode:
authorMikael Olsson <mikael.olsson@arm.com>2023-05-29 18:07:55 +0200
committerMikael Olsson <mikael.olsson@arm.com>2023-05-29 19:04:23 +0200
commit252ed6a0f9af7a002d70a9c7644fec5b0b78ead5 (patch)
tree6dd144a787cf247c45a7bd763950d4730c567137 /kernel/ethosu_device.h
parent5fcc28c7a90fc3f4ebc16a3697f14c9c668dda62 (diff)
downloadethos-u-linux-driver-stack-252ed6a0f9af7a002d70a9c7644fec5b0b78ead5.tar.gz
Add device capabilities caching in kernel driver
To not have to fetch the capabilities from the device for each time they are requested with the UAPI, the kernel driver will now fetch and save the capabilities during the device initialization and use the saved copy for the UAPI requests. With this change, the character device creation in the device initialization has been moved to be the last step so the capabilities are fetched and saved before the character device is created. Change-Id: I57956aedb983fbc1765d45906a1c6182e2cd5b96
Diffstat (limited to 'kernel/ethosu_device.h')
-rw-r--r--kernel/ethosu_device.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/kernel/ethosu_device.h b/kernel/ethosu_device.h
index bcf973d..af14c85 100644
--- a/kernel/ethosu_device.h
+++ b/kernel/ethosu_device.h
@@ -42,12 +42,13 @@
* struct ethosu_device - Device structure
*/
struct ethosu_device {
- struct device dev;
- struct rpmsg_device *rpdev;
- struct rpmsg_endpoint *ept;
- struct cdev cdev;
- struct class *class;
- struct ethosu_mailbox mailbox;
+ struct device dev;
+ struct rpmsg_device *rpdev;
+ struct rpmsg_endpoint *ept;
+ struct cdev cdev;
+ struct class *class;
+ struct ethosu_mailbox mailbox;
+ struct ethosu_uapi_device_capabilities capabilities;
};
/****************************************************************************