2021-12-08 01:50:43

by David E. Box

[permalink] [raw]
Subject: [PATCH RESEND V2 0/6] Auxiliary bus driver support for Intel PCIe VSEC/DVSEC

This series makes changes to the current intel_pmt driver to give it
broader support for Intel defined PCIe VSEC and DVSEC features. It
moves the implementation from MFD to the auxiliary bus and creates a
generic framework for enumerating the extended capabilities. It also
adds support for a new VSEC, Software Defined Silicon (SDSi).

Version 2 adds two new patches, sample code and testing.

Resend due to missing 'PATCH' in Subject of previous series.

David E. Box (6):
PCI: Add #defines for accessing PCIe DVSEC fields
driver core: auxiliary bus: Add driver data helpers
platform/x86/intel: Move intel_pmt from MFD to Auxiliary Bus
platform/x86: Add Intel Software Defined Silicon driver
sample/sdsi: Sample of SDSi provisiong using sysfs
selftests: sdsi: test sysfs setup

.../ABI/testing/sysfs-driver-intel_sdsi | 77 +++
MAINTAINERS | 19 +-
drivers/mfd/Kconfig | 10 -
drivers/mfd/Makefile | 1 -
drivers/mfd/intel_pmt.c | 261 --------
drivers/platform/x86/intel/Kconfig | 23 +
drivers/platform/x86/intel/Makefile | 4 +
drivers/platform/x86/intel/pmt/Kconfig | 4 +-
drivers/platform/x86/intel/pmt/class.c | 21 +-
drivers/platform/x86/intel/pmt/class.h | 5 +-
drivers/platform/x86/intel/pmt/crashlog.c | 47 +-
drivers/platform/x86/intel/pmt/telemetry.c | 46 +-
drivers/platform/x86/intel/sdsi.c | 571 ++++++++++++++++++
drivers/platform/x86/intel/vsec.c | 418 +++++++++++++
drivers/platform/x86/intel/vsec.h | 43 ++
include/linux/auxiliary_bus.h | 10 +
include/uapi/linux/pci_regs.h | 4 +
samples/sdsi/Makefile | 9 +
samples/sdsi/sdsi-sample.c | 399 ++++++++++++
tools/testing/selftests/drivers/sdsi/sdsi.sh | 18 +
.../selftests/drivers/sdsi/sdsi_test.py | 166 +++++
21 files changed, 1821 insertions(+), 335 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-driver-intel_sdsi
delete mode 100644 drivers/mfd/intel_pmt.c
create mode 100644 drivers/platform/x86/intel/sdsi.c
create mode 100644 drivers/platform/x86/intel/vsec.c
create mode 100644 drivers/platform/x86/intel/vsec.h
create mode 100644 samples/sdsi/Makefile
create mode 100644 samples/sdsi/sdsi-sample.c
create mode 100755 tools/testing/selftests/drivers/sdsi/sdsi.sh
create mode 100644 tools/testing/selftests/drivers/sdsi/sdsi_test.py

--
2.25.1



2021-12-08 01:50:44

by David E. Box

[permalink] [raw]
Subject: [PATCH RESEND V2 1/6] PCI: Add #defines for accessing PCIe DVSEC fields

Add #defines for accessing Vendor ID, Revision, Length, and ID offsets
in the Designated Vendor Specific Extended Capability (DVSEC). Defined
in PCIe r5.0, sec 7.9.6.

Signed-off-by: David E. Box <[email protected]>
Acked-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Rafael J. Wysocki <[email protected]>
---
V2
- No changes

include/uapi/linux/pci_regs.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
index ff6ccbc6efe9..318f3f1f9e92 100644
--- a/include/uapi/linux/pci_regs.h
+++ b/include/uapi/linux/pci_regs.h
@@ -1086,7 +1086,11 @@

/* Designated Vendor-Specific (DVSEC, PCI_EXT_CAP_ID_DVSEC) */
#define PCI_DVSEC_HEADER1 0x4 /* Designated Vendor-Specific Header1 */
+#define PCI_DVSEC_HEADER1_VID(x) ((x) & 0xffff)
+#define PCI_DVSEC_HEADER1_REV(x) (((x) >> 16) & 0xf)
+#define PCI_DVSEC_HEADER1_LEN(x) (((x) >> 20) & 0xfff)
#define PCI_DVSEC_HEADER2 0x8 /* Designated Vendor-Specific Header2 */
+#define PCI_DVSEC_HEADER2_ID(x) ((x) & 0xffff)

/* Data Link Feature */
#define PCI_DLF_CAP 0x04 /* Capabilities Register */
--
2.25.1