Blob Blame History Raw
From a9d38b339874f00b67cd362a3f50d92eb0f4fb68 Mon Sep 17 00:00:00 2001
From: imititel <ionel-catalin.mititelu@intel.com>
Date: Fri, 27 Mar 2020 21:59:11 +0200
Subject: [PATCH 3/3] mei: Add Denverton HSM & IFSI HECI hw id
Patch-mainline: Never, downstream fix.
References: jsc#EB-390
References: https://lore.kernel.org/all/20210819141053.17a8a540.alex.williamson@redhat.com/T/

The Intel Denverton chip provides HSM & IFSI. In order to access
HSM & IFSI at the same time, provide two HECI hardware IDs for accessing.

We have agreed that the change is tested for specific 
workload so potential harm should be negligible. 
But it is a non-upstream (and likely not upstreamable solution) 
and we cannot really carry it for ever so a different approach 
has to be adopted for future products based on a different base kernel.

Elektrobit is responsible for this patch.

Suggested-by: Ionel-Catalin Mititelu <ionel-catalin.mititelu@intel.com>
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Bogdan Lezhepekov <blezhepekov@suse.de>
Signed-off-by: Peter Kunath <Peter.Kunath@elektrobit.com>
Signed-off-by: Muhammad Faisal <Muhammad.Faisal@elektrobit.com>

---
 drivers/misc/mei/hw-me-regs.h | 3 ++-
 drivers/misc/mei/pci-me.c     | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/misc/mei/hw-me-regs.h b/drivers/misc/mei/hw-me-regs.h
index 9c4042420022..70992cb49a34 100644
--- a/drivers/misc/mei/hw-me-regs.h
+++ b/drivers/misc/mei/hw-me-regs.h
@@ -67,7 +67,8 @@
 #define MEI_DEV_ID_BXT_M      0x1A9A  /* Broxton M */
 #define MEI_DEV_ID_APL_I      0x5A9A  /* Apollo Lake I */
 
-#define MEI_DEV_ID_DNV_IE     0x19E5  /* Denverton IE */
+#define MEI_DEV_ID_DNV_IE	0x19E5  /* Denverton for HECI1 - IFSI */
+#define MEI_DEV_ID_DNV_IE_2	0x19E6  /* Denverton 2 for HECI2 - HSM */
 
 #define MEI_DEV_ID_GLK        0x319A  /* Gemini Lake */
 
diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
index a46e55f813f1..689342a31caf 100644
--- a/drivers/misc/mei/pci-me.c
+++ b/drivers/misc/mei/pci-me.c
@@ -85,6 +85,7 @@ static const struct pci_device_id mei_me_pci_tbl[] = {
 	{MEI_PCI_DEVICE(MEI_DEV_ID_APL_I, MEI_ME_PCH8_CFG)},
 
 	{MEI_PCI_DEVICE(MEI_DEV_ID_DNV_IE, MEI_ME_PCH8_CFG)},
+	{MEI_PCI_DEVICE(MEI_DEV_ID_DNV_IE_2, MEI_ME_PCH8_SPS_4_CFG)},
 
 	{MEI_PCI_DEVICE(MEI_DEV_ID_GLK, MEI_ME_PCH8_CFG)},
 
-- 
2.16.2