diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/include/uapi/ethosu.h | 15 | ||||
-rw-r--r-- | kernel/rpmsg/ethosu_rpmsg_capabilities.c | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/kernel/include/uapi/ethosu.h b/kernel/include/uapi/ethosu.h index 58b9c34..699ef7e 100644 --- a/kernel/include/uapi/ethosu.h +++ b/kernel/include/uapi/ethosu.h @@ -194,15 +194,30 @@ struct ethosu_uapi_device_hw_id { }; /** + * enum ethosu_dev_type - NPU device type + * @ETHOSU_DEV_UNKNOWN: Unknown NPU device type + * @ETHOSU_DEV_SUBSYSTEM: NPU managed by a subsystem communicated with via a + * mailbox + * @ETHOSU_DEV_DIRECT: NPU directly managed by the kernel driver + */ +enum ethosu_dev_type { + ETHOSU_DEV_UNKNOWN = 0, + ETHOSU_DEV_SUBSYSTEM, + ETHOSU_DEV_DIRECT, +}; + +/** * struct ethosu_uapi_device_hw_cfg - Device hardware configuration * @macs_per_cc: MACs per clock cycle * @cmd_stream_version: NPU command stream version * @custom_dma: Custom DMA enabled + * @type: NPU device type */ struct ethosu_uapi_device_hw_cfg { __u32 macs_per_cc; __u32 cmd_stream_version; __u32 custom_dma; + __u32 type; }; /** diff --git a/kernel/rpmsg/ethosu_rpmsg_capabilities.c b/kernel/rpmsg/ethosu_rpmsg_capabilities.c index 3c21d3e..30a9aef 100644 --- a/kernel/rpmsg/ethosu_rpmsg_capabilities.c +++ b/kernel/rpmsg/ethosu_rpmsg_capabilities.c @@ -97,6 +97,7 @@ void ethosu_capability_rsp(struct ethosu_rpmsg_mailbox *mailbox, cap->uapi->hw_cfg.macs_per_cc = rsp->macs_per_cc; cap->uapi->hw_cfg.cmd_stream_version = rsp->cmd_stream_version; cap->uapi->hw_cfg.custom_dma = rsp->custom_dma; + cap->uapi->hw_cfg.type = ETHOSU_DEV_SUBSYSTEM; cap->errno = 0; complete(&cap->done); |