Skip to content

Commit

Permalink
platform/x86/intel: Move intel_pmt from MFD to Auxiliary Bus
Browse files Browse the repository at this point in the history
Intel Platform Monitoring Technology (PMT) support is indicated by presence
of an Intel defined PCIe DVSEC structure with a PMT ID. However DVSEC
structures may also be used by Intel to indicate support for other
capabilities unrelated to PMT.  The Out Of Band Management Services Module
(OOBMSM) is an example of a device that can have both PMT and non-PMT
capabilities. In order to support these capabilities it is necessary to
modify the intel_pmt driver to handle the creation of platform devices more
generically. To that end the following changes are made.

Convert the driver and child drivers from MFD to the Auxiliary Bus. This
architecture is more suitable anyway since the driver partitions a
multifunctional PCIe device. This also moves the driver out of the MFD
subsystem and into platform/x86/intel.

Before, devices were named by their capability (e.g. pmt_telemetry).
Instead, generically name them by their capability ID (e.g.
intel_extended_cap.2). This allows the IDs to be created automatically,
minimizing the code needed to support future capabilities. However, to
ensure that unsupported devices aren't created, use an allow list to
specify supported capabilities. Along these lines, rename the driver from
intel_pmt to intel_extended_caps to better reflect the purpose.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
  • Loading branch information
debox1 authored and intel-lab-lkp committed Oct 1, 2021
1 parent 3ea1a5e commit d63e761
Show file tree
Hide file tree
Showing 13 changed files with 475 additions and 329 deletions.
10 changes: 7 additions & 3 deletions MAINTAINERS
Expand Up @@ -9369,6 +9369,11 @@ S: Supported
F: drivers/infiniband/hw/irdma/
F: include/uapi/rdma/irdma-abi.h

INTEL EXTENDED CAPABILITIES DRIVER
M: "David E. Box" <david.e.box@linux.intel.com>
S: Supported
F: drivers/platform/x86/intel/extended_caps.*

INTEL FRAMEBUFFER DRIVER (excluding 810 and 815)
M: Maik Broemme <mbroemme@libmpq.org>
L: linux-fbdev@vger.kernel.org
Expand Down Expand Up @@ -9578,10 +9583,9 @@ S: Maintained
F: drivers/mfd/intel_soc_pmic*
F: include/linux/mfd/intel_soc_pmic*

INTEL PMT DRIVER
INTEL PMT DRIVERS
M: "David E. Box" <david.e.box@linux.intel.com>
S: Maintained
F: drivers/mfd/intel_pmt.c
S: Supported
F: drivers/platform/x86/intel/pmt/

INTEL PRO/WIRELESS 2100, 2200BG, 2915ABG NETWORK CONNECTION SUPPORT
Expand Down
10 changes: 0 additions & 10 deletions drivers/mfd/Kconfig
Expand Up @@ -690,16 +690,6 @@ config MFD_INTEL_PMC_BXT
Register and P-unit access. In addition this creates devices
for iTCO watchdog and telemetry that are part of the PMC.

config MFD_INTEL_PMT
tristate "Intel Platform Monitoring Technology (PMT) support"
depends on PCI
select MFD_CORE
help
The Intel Platform Monitoring Technology (PMT) is an interface that
provides access to hardware monitor registers. This driver supports
Telemetry, Watcher, and Crashlog PMT capabilities/devices for
platforms starting from Tiger Lake.

config MFD_IPAQ_MICRO
bool "Atmel Micro ASIC (iPAQ h3100/h3600/h3700) Support"
depends on SA1100_H3100 || SA1100_H3600
Expand Down
1 change: 0 additions & 1 deletion drivers/mfd/Makefile
Expand Up @@ -212,7 +212,6 @@ obj-$(CONFIG_MFD_INTEL_LPSS) += intel-lpss.o
obj-$(CONFIG_MFD_INTEL_LPSS_PCI) += intel-lpss-pci.o
obj-$(CONFIG_MFD_INTEL_LPSS_ACPI) += intel-lpss-acpi.o
obj-$(CONFIG_MFD_INTEL_PMC_BXT) += intel_pmc_bxt.o
obj-$(CONFIG_MFD_INTEL_PMT) += intel_pmt.o
obj-$(CONFIG_MFD_PALMAS) += palmas.o
obj-$(CONFIG_MFD_VIPERBOARD) += viperboard.o
obj-$(CONFIG_MFD_NTXEC) += ntxec.o
Expand Down
261 changes: 0 additions & 261 deletions drivers/mfd/intel_pmt.c

This file was deleted.

11 changes: 11 additions & 0 deletions drivers/platform/x86/intel/Kconfig
Expand Up @@ -26,6 +26,17 @@ source "drivers/platform/x86/intel/speed_select_if/Kconfig"
source "drivers/platform/x86/intel/telemetry/Kconfig"
source "drivers/platform/x86/intel/wmi/Kconfig"

config INTEL_EXTENDED_CAPS
tristate "Intel Extended Capabilities support"
depends on PCI
select AUXILIARY_BUS
help
Adds support for feature drivers exposed using Intel PCIe VSEC and
DVSEC.

To compile this driver as a module, choose M here: the module will
be called intel_extended_caps.

config INTEL_HID_EVENT
tristate "Intel HID Event"
depends on ACPI
Expand Down
2 changes: 2 additions & 0 deletions drivers/platform/x86/intel/Makefile
Expand Up @@ -21,6 +21,8 @@ intel-vbtn-y := vbtn.o
obj-$(CONFIG_INTEL_VBTN) += intel-vbtn.o

# Intel miscellaneous drivers
intel_extended_caps-y := extended_caps.o
obj-$(CONFIG_INTEL_EXTENDED_CAPS) += intel_extended_caps.o
intel_int0002_vgpio-y := int0002_vgpio.o
obj-$(CONFIG_INTEL_INT0002_VGPIO) += intel_int0002_vgpio.o
intel_oaktrail-y := oaktrail.o
Expand Down

0 comments on commit d63e761

Please sign in to comment.