summaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2021-08-12 22:38:31 +0200
committerArnd Bergmann <arnd@arndb.de>2021-08-12 22:38:31 +0200
commit1bb24be00c8c360e5e3072301d5f49eac86b384f (patch)
tree2901d4c8d7ecf7c3a8b4335d738ad761582c8b14 /include/uapi
parentMerge tag 'drivers_soc_for_5.15' of git://git.kernel.org/pub/scm/linux/kernel... (diff)
parentfirmware: arm_scmi: Use WARN_ON() to check configured transports (diff)
downloadlinux-1bb24be00c8c360e5e3072301d5f49eac86b384f.tar.xz
linux-1bb24be00c8c360e5e3072301d5f49eac86b384f.zip
Merge tag 'scmi-updates-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/drivers
SCMI Updates for v5.15 The bulk of the addition this time is mainly refactoring to add support for Virtio transport for SCMI and the addition of the support itself. The refactoring includes allowing transport specific init/exit calls, making each transport as compile time configurable, supporting monotonically increasing tokens instead of using the next available free buffer index as the token for scmi messages which eases handling concurrent and out-of-order messages which is a must have for virtio transport. Virtio support itself is conformant to the virtio SCMI device spec [1]. Virtio device id 32 has been reserved for the SCMI device [2]. Other than the virtio support, there is one bug fix in the probe failure clean up path. [1] https://github.com/oasis-tcs/virtio-spec/blob/master/virtio-scmi.tex [2] https://www.oasis-open.org/committees/ballot.php?id=3496 * tag 'scmi-updates-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Use WARN_ON() to check configured transports firmware: arm_scmi: Fix boolconv.cocci warnings firmware: arm_scmi: Free mailbox channels if probe fails firmware: arm_scmi: Add virtio transport firmware: arm_scmi: Add priv parameter to scmi_rx_callback dt-bindings: arm: Add virtio transport for SCMI firmware: arm_scmi: Add optional link_supplier() transport op firmware: arm_scmi: Add message passing abstractions for transports firmware: arm_scmi: Add method to override max message number firmware: arm_scmi: Make shmem support optional for transports firmware: arm_scmi: Make SCMI transports configurable firmware: arm_scmi: Make polling mode optional firmware: arm_scmi: Make .clear_channel optional firmware: arm_scmi: Handle concurrent and out-of-order messages firmware: arm_scmi: Introduce monotonically increasing tokens firmware: arm_scmi: Add optional transport_init/exit support firmware: arm_scmi: Remove scmi_dump_header_dbg() helper firmware: arm_scmi: Add support for type handling in common functions Link: https://lore.kernel.org/r/20210811075743.707961-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/virtio_ids.h1
-rw-r--r--include/uapi/linux/virtio_scmi.h24
2 files changed, 25 insertions, 0 deletions
diff --git a/include/uapi/linux/virtio_ids.h b/include/uapi/linux/virtio_ids.h
index 70a8057ad4bb..f74155f6882d 100644
--- a/include/uapi/linux/virtio_ids.h
+++ b/include/uapi/linux/virtio_ids.h
@@ -55,6 +55,7 @@
#define VIRTIO_ID_FS 26 /* virtio filesystem */
#define VIRTIO_ID_PMEM 27 /* virtio pmem */
#define VIRTIO_ID_MAC80211_HWSIM 29 /* virtio mac80211-hwsim */
+#define VIRTIO_ID_SCMI 32 /* virtio SCMI */
#define VIRTIO_ID_BT 40 /* virtio bluetooth */
/*
diff --git a/include/uapi/linux/virtio_scmi.h b/include/uapi/linux/virtio_scmi.h
new file mode 100644
index 000000000000..f8ddd04a3ace
--- /dev/null
+++ b/include/uapi/linux/virtio_scmi.h
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
+/*
+ * Copyright (C) 2020-2021 OpenSynergy GmbH
+ * Copyright (C) 2021 ARM Ltd.
+ */
+
+#ifndef _UAPI_LINUX_VIRTIO_SCMI_H
+#define _UAPI_LINUX_VIRTIO_SCMI_H
+
+#include <linux/virtio_types.h>
+
+/* Device implements some SCMI notifications, or delayed responses. */
+#define VIRTIO_SCMI_F_P2A_CHANNELS 0
+
+/* Device implements any SCMI statistics shared memory region */
+#define VIRTIO_SCMI_F_SHARED_MEMORY 1
+
+/* Virtqueues */
+
+#define VIRTIO_SCMI_VQ_TX 0 /* cmdq */
+#define VIRTIO_SCMI_VQ_RX 1 /* eventq */
+#define VIRTIO_SCMI_VQ_MAX_CNT 2
+
+#endif /* _UAPI_LINUX_VIRTIO_SCMI_H */