Skip to contentSkip to conversation

scsi: ufs: ufs-pci: Add support for Intel ADL

PATCH Applied Adrian Hunter 3 participants 5 messages Nov 24, 2021 – Nov 30, 2021 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 scsi: ufs: ufs-pci: Add support for Intel ADL

Add PCI ID and callbacks to support Intel Alder Lake.

---

Changes in V2:

Spell out Alder Lake in the commit message.

 drivers/scsi/ufs/ufshcd-pci.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
drivers/scsi/ufs/ufshcd-pci.c +18 -0
index 51424557810d..f725248ba57f 100644
@@ -421,6 +421,13 @@ static int ufs_intel_lkf_init(struct ufs_hba *hba)
 	return err;
 }
 
+static int ufs_intel_adl_init(struct ufs_hba *hba)
+{
+	hba->nop_out_timeout = 200;
+	hba->quirks |= UFSHCD_QUIRK_BROKEN_AUTO_HIBERN8;
+	return ufs_intel_common_init(hba);
+}
+
 static struct ufs_hba_variant_ops ufs_intel_cnl_hba_vops = {
 	.name                   = "intel-pci",
 	.init			= ufs_intel_common_init,
@@ -449,6 +456,15 @@ static struct ufs_hba_variant_ops ufs_intel_lkf_hba_vops = {
 	.device_reset		= ufs_intel_device_reset,
 };
 
+static struct ufs_hba_variant_ops ufs_intel_adl_hba_vops = {
+	.name			= "intel-pci",
+	.init			= ufs_intel_adl_init,
+	.exit			= ufs_intel_common_exit,
+	.link_startup_notify	= ufs_intel_link_startup_notify,
+	.resume			= ufs_intel_resume,
+	.device_reset		= ufs_intel_device_reset,
+};
+
 #ifdef CONFIG_PM_SLEEP
 static int ufshcd_pci_restore(struct device *dev)
 {
@@ -563,6 +579,8 @@ static const struct pci_device_id ufshcd_pci_tbl[] = {
 	{ PCI_VDEVICE(INTEL, 0x4B41), (kernel_ulong_t)&ufs_intel_ehl_hba_vops },
 	{ PCI_VDEVICE(INTEL, 0x4B43), (kernel_ulong_t)&ufs_intel_ehl_hba_vops },
 	{ PCI_VDEVICE(INTEL, 0x98FA), (kernel_ulong_t)&ufs_intel_lkf_hba_vops },
+	{ PCI_VDEVICE(INTEL, 0x51FF), (kernel_ulong_t)&ufs_intel_adl_hba_vops },
+	{ PCI_VDEVICE(INTEL, 0x54FF), (kernel_ulong_t)&ufs_intel_adl_hba_vops },
 	{ }	/* terminate list */
 };
 
Signature · 1 line
2.25.1
#2 lore raw
Quoted 7 lines · Bart Van Assche
Quoted 4 lines · Adrian Hunter

Add PCI ID and callbacks to support Intel Alder Lake.

Not sure Greg will agree with the "Cc: stable" tag for new functionality. Anyway:

It is normal to add new PCI Ids to stable trees:

$ grep -i 'device id' Documentation/process/stable-kernel-rules.rst
 - New device IDs and quirks are also accepted.
Quoted 2 lines

Thank you!