aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/misc/amd-apml.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/uapi/misc/amd-apml.h')
-rw-r--r--include/uapi/misc/amd-apml.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/uapi/misc/amd-apml.h b/include/uapi/misc/amd-apml.h
index f718675d3966..745b3338fc06 100644
--- a/include/uapi/misc/amd-apml.h
+++ b/include/uapi/misc/amd-apml.h
@@ -58,6 +58,21 @@ struct apml_mcamsr_msg {
__u32 pad;
};
+struct apml_reg_xfer_msg {
+ /*
+ * RMI register address offset
+ */
+ __u16 reg_addr;
+ /*
+ * Register data for read/write
+ */
+ __u8 data_in_out;
+ /*
+ * Register read or write
+ */
+ __u8 rflag;
+};
+
/*
* AMD sideband interface base IOCTL
*/
@@ -118,4 +133,20 @@ struct apml_mcamsr_msg {
*/
#define SBRMI_IOCTL_MCAMSR_CMD _IOWR(SB_BASE_IOCTL_NR, 2, struct apml_mcamsr_msg)
+/**
+ * DOC: SBRMI_IOCTL_REG_XFER_CMD
+ *
+ * @Parameters
+ *
+ * @struct apml_reg_xfer_msg
+ * Pointer to the &struct apml_reg_xfer_msg that will contain the protocol
+ * information
+ *
+ * @Description
+ * IOCTL command for APML messages using generic _IOWR
+ * The IOCTL provides userspace access to AMD sideband register xfer protocol
+ * - Register xfer protocol to get/set hardware register for given offset
+ */
+#define SBRMI_IOCTL_REG_XFER_CMD _IOWR(SB_BASE_IOCTL_NR, 3, struct apml_reg_xfer_msg)
+
#endif /*_AMD_APML_H_*/