diff options
author | Davide Grohmann <davide.grohmann@arm.com> | 2021-06-01 15:03:51 +0200 |
---|---|---|
committer | Kristofer Jonsson <kristofer.jonsson@arm.com> | 2021-06-10 14:58:49 +0000 |
commit | 35ce6c809ccf637c6bb8a00ad14b051b87d9884a (patch) | |
tree | e999250ca985ac5b00ba9162ee1782de02983c03 /kernel/uapi/ethosu.h | |
parent | 0c79f896caf1a0ac16dd92810c4b15bfff00bdb3 (diff) | |
download | ethos-u-linux-driver-stack-35ce6c809ccf637c6bb8a00ad14b051b87d9884a.tar.gz |
Add support for handling capabilities requests
Change-Id: Id5aa197312c88b0c448dc085d8477ed67da24724
Diffstat (limited to 'kernel/uapi/ethosu.h')
-rw-r--r-- | kernel/uapi/ethosu.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/kernel/uapi/ethosu.h b/kernel/uapi/ethosu.h index 1e53c91..3e4e7a3 100644 --- a/kernel/uapi/ethosu.h +++ b/kernel/uapi/ethosu.h @@ -44,6 +44,7 @@ namespace EthosU { #define ETHOSU_IOCTL_PING ETHOSU_IO(0x00) #define ETHOSU_IOCTL_VERSION_REQ ETHOSU_IO(0x01) +#define ETHOSU_IOCTL_CAPABILITIES_REQ ETHOSU_IO(0x02) #define ETHOSU_IOCTL_BUFFER_CREATE ETHOSU_IOR(0x10, \ struct ethosu_uapi_buffer_create) #define ETHOSU_IOCTL_BUFFER_SET ETHOSU_IOR(0x11, \ @@ -125,6 +126,56 @@ struct ethosu_uapi_pmu_counts { }; /** + * struct ethosu_uapi_device_hw_id - Device hardware identification + * @version_status: Version status + * @version_minor: Version minor + * @version_major: Version major + * @product_major: Product major + * @arch_patch_rev: Architecture version patch + * @arch_minor_rev: Architecture version minor + * @arch_major_rev: Architecture version major + */ +struct ethosu_uapi_device_hw_id { + __u32 version_status; + __u32 version_minor; + __u32 version_major; + __u32 product_major; + __u32 arch_patch_rev; + __u32 arch_minor_rev; + __u32 arch_major_rev; +}; + +/** + * struct ethosu_uapi_device_hw_cfg - Device hardware configuration + * @macs_per_cc: MACs per clock cycle + * @cmd_stream_version: NPU command stream version + * @shram_size: SHRAM size + * @custom_dma: Custom DMA enabled + */ +struct ethosu_uapi_device_hw_cfg { + __u32 macs_per_cc; + __u32 cmd_stream_version; + __u32 shram_size; + __u32 custom_dma; +}; + +/** + * struct ethosu_uapi_capabilities - Device capabilities + * @hw_id: Hardware identification + * @hw_cfg: Hardware configuration + * @driver_patch_rev: Driver version patch + * @driver_minor_rev: Driver version minor + * @driver_major_rev: Driver version major + */ +struct ethosu_uapi_device_capabilities { + struct ethosu_uapi_device_hw_id hw_id; + struct ethosu_uapi_device_hw_cfg hw_cfg; + __u32 driver_patch_rev; + __u32 driver_minor_rev; + __u32 driver_major_rev; +}; + +/** * struct ethosu_uapi_inference_create - Create network request * @ifm_count: Number of IFM file descriptors * @ifm_fd: IFM buffer file descriptors |