Skip to contentSkip to conversation

platform:x86: add Intel Apollo Lake PMC IPC driver

PATCH New qipeng.zha 1 participant 1 message Jun 26, 2015

Subsystems (2)
lore
Share & tools
lore

qipeng.zha

author
#0 lore raw

PATCH v7 1/1 platform:x86: add Intel Apollo Lake PMC IPC driver

From: "qipeng.zha" <[email protected]>

This driver provides support for PMC control on Apollo Lake platforms, The PMC is an ARC processor which defines some IPC commands for communication with other entities in the CPU.

---
Changes from v7:
update MAINTAINER file;
fix one code style issue;

Changes from v6:
update driver description in Kconfig and commit message; update some comments with grammatical fixes;
align argument list in function definition and call;
export all exported APIs as GPL;
refine error handling and logic in probe function;
fix compile warnings due to wrong variable type;
validate inlen and outlen parameters in intel_pmc_ipc_raw_cmd(), to avoid
access outside of data buffer;
add type cast on return variable in attribute functions;

Changes from v5:
add credit to intel_scu_ipc.c in driver description; replace Fail with Failed in error messages; fix typos;
remove read access of attribute device;
add comment for fs_initcall.

Changes from before versions:
fix compile errors when build as module;
fix typos;
use iplock mutex to sync access of command APIs;
confirm to be applicable of regmap APIs;
add comments for exported APIs;
order local variable declaration.

---
 MAINTAINERS                          |   7 +
 arch/x86/include/asm/intel_pmc_ipc.h |  82 ++++
 drivers/platform/x86/Kconfig         |   7 +
 drivers/platform/x86/Makefile        |   1 +
 drivers/platform/x86/intel_pmc_ipc.c | 768 +++++++++++++++++++++++++++++++++++
 5 files changed, 865 insertions(+)
 create mode 100644 arch/x86/include/asm/intel_pmc_ipc.h
 create mode 100644 drivers/platform/x86/intel_pmc_ipc.c
MAINTAINERS +7 -0
index eaf9996..13ac861 100644
@@ -5207,6 +5207,13 @@ F:	include/uapi/linux/mei.h
 F:	drivers/misc/mei/*
 F:	Documentation/misc-devices/mei/*
 
+INTEL PMC IPC DRIVER
+M:	Zha Qipeng<[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	drivers/platform/x86/intel_pmc_ipc.c
+F:	arch/x86/include/asm/intel_pmc_ipc.h
+
 IOC3 ETHERNET DRIVER
 M:	Ralf Baechle <[email protected]>
 L:	[email protected]
arch/x86/include/asm/intel_pmc_ipc.h new file +82 -0

82 lines not on this page · raw message

drivers/platform/x86/Kconfig +7 -0
index 9752761..346f1fd 100644
@@ -884,4 +884,11 @@ config PVPANIC
 	  a paravirtualized device provided by QEMU; it lets a virtual machine
 	  (guest) communicate panic events to the host.
 
+config INTEL_PMC_IPC
+	tristate "Intel PMC IPC Driver"
+	---help---
+	This driver provides support for PMC control on some Intel platforms.
+	The PMC is an ARC processor which defines IPC commands for communication
+	with other entities in the CPU.
+
 endif # X86_PLATFORM_DEVICES
drivers/platform/x86/Makefile +1 -0
index f82232b..1051372 100644
@@ -58,3 +58,4 @@ obj-$(CONFIG_INTEL_SMARTCONNECT)	+= intel-smartconnect.o
 
 obj-$(CONFIG_PVPANIC)           += pvpanic.o
 obj-$(CONFIG_ALIENWARE_WMI)	+= alienware-wmi.o
+obj-$(CONFIG_INTEL_PMC_IPC)	+= intel_pmc_ipc.o
drivers/platform/x86/intel_pmc_ipc.c new file +768 -0

768 lines not on this page · raw message

Signature · 1 line
1.8.3.2