summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2019-06-26 15:38:46 -0700
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-07-02 18:41:16 +0300
commitd3a23584294c1f379239a3b52bac13e03fecd147 (patch)
treecb8961a51aa295fa176ece63a9db16eae2c28f8c /include
parentfb5b36a413b9f30fba573fc2a596ab7142dfaf12 (diff)
downloadlinux-stable-d3a23584294c1f379239a3b52bac13e03fecd147.tar.gz
linux-stable-d3a23584294c1f379239a3b52bac13e03fecd147.tar.bz2
linux-stable-d3a23584294c1f379239a3b52bac13e03fecd147.zip
platform/x86: ISST: Add Intel Speed Select mmio interface
Added MMIO interface to read/write specific offsets in PUNIT PCI device which export core priortization. This MMIO interface can be used using ioctl interface on /dev/isst_interface using IOCTL ISST_IF_IO_CMD. This MMIO interface is used by the intel-speed-select tool under tools/x86/power to enumerate and set core priority. The MMIO offsets and semantics of the message can be checked from the source code of the tool. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/isst_if.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/uapi/linux/isst_if.h b/include/uapi/linux/isst_if.h
index 15d1f286a830..fe2492ade078 100644
--- a/include/uapi/linux/isst_if.h
+++ b/include/uapi/linux/isst_if.h
@@ -63,7 +63,40 @@ struct isst_if_cpu_maps {
struct isst_if_cpu_map cpu_map[1];
};
+/**
+ * struct isst_if_io_reg - Read write PUNIT IO register
+ * @read_write: Value 0: Read, 1: Write
+ * @logical_cpu: Logical CPU number to get target PCI device.
+ * @reg: PUNIT register offset
+ * @value: For write operation value to write and for
+ * for read placeholder read value
+ *
+ * Structure to specify read/write data to PUNIT registers.
+ */
+struct isst_if_io_reg {
+ __u32 read_write; /* Read:0, Write:1 */
+ __u32 logical_cpu;
+ __u32 reg;
+ __u32 value;
+};
+
+/**
+ * struct isst_if_io_regs - structure for IO register commands
+ * @cmd_count: Number of io reg commands in io_reg[]
+ * @io_reg[]: Holds one or more io_reg command structure
+ *
+ * This structure used with ioctl ISST_IF_IO_CMD to send
+ * one or more read/write commands to PUNIT. Here IOCTL return value
+ * indicates number of requests sent or error number if no requests have
+ * been sent.
+ */
+struct isst_if_io_regs {
+ __u32 req_count;
+ struct isst_if_io_reg io_reg[1];
+};
+
#define ISST_IF_MAGIC 0xFE
#define ISST_IF_GET_PLATFORM_INFO _IOR(ISST_IF_MAGIC, 0, struct isst_if_platform_info *)
#define ISST_IF_GET_PHY_ID _IOWR(ISST_IF_MAGIC, 1, struct isst_if_cpu_map *)
+#define ISST_IF_IO_CMD _IOW(ISST_IF_MAGIC, 2, struct isst_if_io_regs *)
#endif