aboutsummaryrefslogtreecommitdiff
path: root/kernel/ethosu_device.h
diff options
context:
space:
mode:
authorKristofer Jonsson <kristofer.jonsson@arm.com>2023-01-23 13:05:36 +0100
committerKristofer Jonsson <kristofer.jonsson@arm.com>2023-02-02 16:30:40 +0100
commit074ef905e834cff238e708f2e673e100884218ba (patch)
treea99762832b461441b0319e984b3ecdb908efe433 /kernel/ethosu_device.h
parentec47704ab3fd50a9ef8339f33139ddae4caa00b6 (diff)
downloadethos-u-linux-driver-stack-074ef905e834cff238e708f2e673e100884218ba.tar.gz
Create device for Ethos-U kernel driver
When the Ethos-U kernel driver is probed it creates a /dev/ethosu<nr> device node, which user space use ioctl to communicate with. When the driver is removed the Ethos-U resources must live on until all open file handles have been closed. The rpmsg device can be removed for a number of reasons, for example if the firmware is stopped or the remoteproc driver is removed. To allow the remove to complete without waiting for all file handles to close, a new 'struct device' is created by the kernel driver. This device will be used to memory allocations and will live on until the last file handle has been closed. Change-Id: I790d8219960f25fe64f58c11a865eb65c7b08974
Diffstat (limited to 'kernel/ethosu_device.h')
-rw-r--r--kernel/ethosu_device.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/ethosu_device.h b/kernel/ethosu_device.h
index d02f29d..d866514 100644
--- a/kernel/ethosu_device.h
+++ b/kernel/ethosu_device.h
@@ -42,11 +42,11 @@
* 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;
- dev_t devt;
struct ethosu_mailbox mailbox;
};