linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] scsi: ufs: Misc improvements for DesignWare drivers and UFS
@ 2020-04-24 13:44 Jose Abreu
  2020-04-24 13:44 ` [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version Jose Abreu
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Jose Abreu @ 2020-04-24 13:44 UTC (permalink / raw)
  To: linux-scsi
  Cc: Joao Pinto, Jose Abreu, Winkler, Tomas, Joao Lima, Alim Akhtar,
	Avri Altman, James E.J. Bottomley, Martin K. Petersen,
	linux-kernel

v2 Address review comments from Tomas and adds r-b tag provided by Alim.

---

Misc set of improvements for Synopsys DesignWare drivers and UFS core.

Patch 1/5, allows UFS 3.0 as a valid version for a given Host.

Patch 2/5, removes all mention of G210 to the DesignWare drivers so that we
can use same driver among different Test Chips.

Patch 3/5, re-arranges the initialization sequence of PCI driver to be more
modular.

Patch 4/5, allows MSI as a valid interrupt type.

Finally at 5/5, we change the Maintainers for UFS DesignWare drivers.

---
Cc: "Winkler, Tomas" <tomas.winkler@intel.com>
Cc: Joao Lima <Joao.Lima@synopsys.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---

Jose Abreu (5):
  scsi: ufs: Allow UFS 3.0 as a valid version
  scsi: ufs: Rename tc-dwc-g210 -> tc-dwc
  scsi: ufs: tc-dwc-pci: Use PDI ID to match Test Chip type
  scsi: ufs: tc-dwc-pci: Allow for MSI interrupt type
  MAINTAINERS: Change Maintainers for SCSI UFS DWC Drivers

 MAINTAINERS                                        |   3 +-
 drivers/scsi/ufs/Kconfig                           |   4 +-
 drivers/scsi/ufs/Makefile                          |   4 +-
 drivers/scsi/ufs/tc-dwc-g210-pci.c                 | 176 ------------------
 drivers/scsi/ufs/tc-dwc-pci.c                      | 204 +++++++++++++++++++++
 .../ufs/{tc-dwc-g210-pltfrm.c => tc-dwc-pltfrm.c}  |  37 ++--
 drivers/scsi/ufs/{tc-dwc-g210.c => tc-dwc.c}       |   6 +-
 drivers/scsi/ufs/{tc-dwc-g210.h => tc-dwc.h}       |   6 +-
 drivers/scsi/ufs/ufshcd.c                          |   3 +-
 drivers/scsi/ufs/ufshci.h                          |   1 +
 10 files changed, 238 insertions(+), 206 deletions(-)
 delete mode 100644 drivers/scsi/ufs/tc-dwc-g210-pci.c
 create mode 100644 drivers/scsi/ufs/tc-dwc-pci.c
 rename drivers/scsi/ufs/{tc-dwc-g210-pltfrm.c => tc-dwc-pltfrm.c} (70%)
 rename drivers/scsi/ufs/{tc-dwc-g210.c => tc-dwc.c} (98%)
 rename drivers/scsi/ufs/{tc-dwc-g210.h => tc-dwc.h} (78%)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version
  2020-04-24 13:44 [PATCH v2 0/5] scsi: ufs: Misc improvements for DesignWare drivers and UFS Jose Abreu
@ 2020-04-24 13:44 ` Jose Abreu
  2020-04-24 15:57   ` [EXT] " Bean Huo (beanhuo)
  2020-04-24 13:44 ` [PATCH v2 2/5] scsi: ufs: Rename tc-dwc-g210 -> tc-dwc Jose Abreu
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Jose Abreu @ 2020-04-24 13:44 UTC (permalink / raw)
  To: linux-scsi
  Cc: Joao Pinto, Jose Abreu, Joao Lima, Alim Akhtar, Avri Altman,
	James E.J. Bottomley, Martin K. Petersen, linux-kernel

Add a define for UFS version 3.0 and do not print an error message upon
probe when using this version.

Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Joao Lima <Joao.Lima@synopsys.com>
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>

---
Cc: Joao Lima <Joao.Lima@synopsys.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/scsi/ufs/ufshcd.c | 3 ++-
 drivers/scsi/ufs/ufshci.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 7d1fa1349d40..2e5c200e915b 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -8441,7 +8441,8 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
 	if ((hba->ufs_version != UFSHCI_VERSION_10) &&
 	    (hba->ufs_version != UFSHCI_VERSION_11) &&
 	    (hba->ufs_version != UFSHCI_VERSION_20) &&
-	    (hba->ufs_version != UFSHCI_VERSION_21))
+	    (hba->ufs_version != UFSHCI_VERSION_21) &&
+	    (hba->ufs_version != UFSHCI_VERSION_30))
 		dev_err(hba->dev, "invalid UFS version 0x%x\n",
 			hba->ufs_version);
 
diff --git a/drivers/scsi/ufs/ufshci.h b/drivers/scsi/ufs/ufshci.h
index c2961d37cc1c..f2ee81669b00 100644
--- a/drivers/scsi/ufs/ufshci.h
+++ b/drivers/scsi/ufs/ufshci.h
@@ -104,6 +104,7 @@ enum {
 	UFSHCI_VERSION_11 = 0x00010100, /* 1.1 */
 	UFSHCI_VERSION_20 = 0x00000200, /* 2.0 */
 	UFSHCI_VERSION_21 = 0x00000210, /* 2.1 */
+	UFSHCI_VERSION_30 = 0x00000300, /* 3.0 */
 };
 
 /*
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 2/5] scsi: ufs: Rename tc-dwc-g210 -> tc-dwc
  2020-04-24 13:44 [PATCH v2 0/5] scsi: ufs: Misc improvements for DesignWare drivers and UFS Jose Abreu
  2020-04-24 13:44 ` [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version Jose Abreu
@ 2020-04-24 13:44 ` Jose Abreu
  2020-04-24 13:44 ` [PATCH v2 3/5] scsi: ufs: tc-dwc-pci: Use PDI ID to match Test Chip type Jose Abreu
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: Jose Abreu @ 2020-04-24 13:44 UTC (permalink / raw)
  To: linux-scsi
  Cc: Joao Pinto, Jose Abreu, Joao Lima, Alim Akhtar, Avri Altman,
	James E.J. Bottomley, Martin K. Petersen, linux-kernel

In preparation for the addition of new Synopsys Test Chips versions we
remove all G210 mentions in files and Kconfig entries so that we can
re-use the same driver for different Test Chips.

As the PCI ID for these chips is different and as we will have different
DT bindings, there is no reason to add new drivers for them and we can
just re-use the existing ones.

No functional change.

Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>

---
Cc: Joao Lima <Joao.Lima@synopsys.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/scsi/ufs/Kconfig                           |  4 +-
 drivers/scsi/ufs/Makefile                          |  4 +-
 .../scsi/ufs/{tc-dwc-g210-pci.c => tc-dwc-pci.c}   | 70 +++++++++++-----------
 .../ufs/{tc-dwc-g210-pltfrm.c => tc-dwc-pltfrm.c}  | 37 ++++++------
 drivers/scsi/ufs/{tc-dwc-g210.c => tc-dwc.c}       |  6 +-
 drivers/scsi/ufs/{tc-dwc-g210.h => tc-dwc.h}       |  6 +-
 6 files changed, 64 insertions(+), 63 deletions(-)
 rename drivers/scsi/ufs/{tc-dwc-g210-pci.c => tc-dwc-pci.c} (60%)
 rename drivers/scsi/ufs/{tc-dwc-g210-pltfrm.c => tc-dwc-pltfrm.c} (70%)
 rename drivers/scsi/ufs/{tc-dwc-g210.c => tc-dwc.c} (98%)
 rename drivers/scsi/ufs/{tc-dwc-g210.h => tc-dwc.h} (78%)

diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig
index e2005aeddc2d..d0b73b1dec18 100644
--- a/drivers/scsi/ufs/Kconfig
+++ b/drivers/scsi/ufs/Kconfig
@@ -62,7 +62,7 @@ config SCSI_UFSHCD_PCI
 	  If unsure, say N.
 
 config SCSI_UFS_DWC_TC_PCI
-	tristate "DesignWare pci support using a G210 Test Chip"
+	tristate "DesignWare PCI support using a Synopsys Test Chip"
 	depends on SCSI_UFSHCD_PCI
 	---help---
 	  Synopsys Test Chip is a PHY for prototyping purposes.
@@ -89,7 +89,7 @@ config SCSI_UFS_CDNS_PLATFORM
 	  If unsure, say N.
 
 config SCSI_UFS_DWC_TC_PLATFORM
-	tristate "DesignWare platform support using a G210 Test Chip"
+	tristate "DesignWare platform support using a Synopsys Test Chip"
 	depends on SCSI_UFSHCD_PLATFORM
 	---help---
 	  Synopsys Test Chip is a PHY for prototyping purposes.
diff --git a/drivers/scsi/ufs/Makefile b/drivers/scsi/ufs/Makefile
index 94c6c5d7334b..2005307b2934 100644
--- a/drivers/scsi/ufs/Makefile
+++ b/drivers/scsi/ufs/Makefile
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 # UFSHCD makefile
-obj-$(CONFIG_SCSI_UFS_DWC_TC_PCI) += tc-dwc-g210-pci.o ufshcd-dwc.o tc-dwc-g210.o
-obj-$(CONFIG_SCSI_UFS_DWC_TC_PLATFORM) += tc-dwc-g210-pltfrm.o ufshcd-dwc.o tc-dwc-g210.o
+obj-$(CONFIG_SCSI_UFS_DWC_TC_PCI) += tc-dwc-pci.o ufshcd-dwc.o tc-dwc.o
+obj-$(CONFIG_SCSI_UFS_DWC_TC_PLATFORM) += tc-dwc-pltfrm.o ufshcd-dwc.o tc-dwc.o
 obj-$(CONFIG_SCSI_UFS_CDNS_PLATFORM) += cdns-pltfrm.o
 obj-$(CONFIG_SCSI_UFS_QCOM) += ufs-qcom.o
 obj-$(CONFIG_SCSI_UFSHCD) += ufshcd-core.o
diff --git a/drivers/scsi/ufs/tc-dwc-g210-pci.c b/drivers/scsi/ufs/tc-dwc-pci.c
similarity index 60%
rename from drivers/scsi/ufs/tc-dwc-g210-pci.c
rename to drivers/scsi/ufs/tc-dwc-pci.c
index 67a6a61154b7..aeb11f7f0c91 100644
--- a/drivers/scsi/ufs/tc-dwc-g210-pci.c
+++ b/drivers/scsi/ufs/tc-dwc-pci.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- * Synopsys G210 Test Chip driver
+ * Synopsys Test Chip driver
  *
  * Copyright (C) 2015-2016 Synopsys, Inc. (www.synopsys.com)
  *
@@ -9,7 +9,7 @@
 
 #include "ufshcd.h"
 #include "ufshcd-dwc.h"
-#include "tc-dwc-g210.h"
+#include "tc-dwc.h"
 
 #include <linux/pci.h>
 #include <linux/pm_runtime.h>
@@ -23,27 +23,27 @@ static int tc_type = TC_G210_INV;
 module_param(tc_type, int, 0);
 MODULE_PARM_DESC(tc_type, "Test Chip Type (20 = 20-bit, 40 = 40-bit)");
 
-static int tc_dwc_g210_pci_suspend(struct device *dev)
+static int tc_dwc_pci_suspend(struct device *dev)
 {
 	return ufshcd_system_suspend(dev_get_drvdata(dev));
 }
 
-static int tc_dwc_g210_pci_resume(struct device *dev)
+static int tc_dwc_pci_resume(struct device *dev)
 {
 	return ufshcd_system_resume(dev_get_drvdata(dev));
 }
 
-static int tc_dwc_g210_pci_runtime_suspend(struct device *dev)
+static int tc_dwc_pci_runtime_suspend(struct device *dev)
 {
 	return ufshcd_runtime_suspend(dev_get_drvdata(dev));
 }
 
-static int tc_dwc_g210_pci_runtime_resume(struct device *dev)
+static int tc_dwc_pci_runtime_resume(struct device *dev)
 {
 	return ufshcd_runtime_resume(dev_get_drvdata(dev));
 }
 
-static int tc_dwc_g210_pci_runtime_idle(struct device *dev)
+static int tc_dwc_pci_runtime_idle(struct device *dev)
 {
 	return ufshcd_runtime_idle(dev_get_drvdata(dev));
 }
@@ -51,26 +51,26 @@ static int tc_dwc_g210_pci_runtime_idle(struct device *dev)
 /*
  * struct ufs_hba_dwc_vops - UFS DWC specific variant operations
  */
-static struct ufs_hba_variant_ops tc_dwc_g210_pci_hba_vops = {
-	.name                   = "tc-dwc-g210-pci",
+static struct ufs_hba_variant_ops tc_dwc_pci_hba_vops = {
+	.name                   = "tc-dwc-pci",
 	.link_startup_notify	= ufshcd_dwc_link_startup_notify,
 };
 
 /**
- * tc_dwc_g210_pci_shutdown - main function to put the controller in reset state
+ * tc_dwc_pci_shutdown - main function to put the controller in reset state
  * @pdev: pointer to PCI device handle
  */
-static void tc_dwc_g210_pci_shutdown(struct pci_dev *pdev)
+static void tc_dwc_pci_shutdown(struct pci_dev *pdev)
 {
 	ufshcd_shutdown((struct ufs_hba *)pci_get_drvdata(pdev));
 }
 
 /**
- * tc_dwc_g210_pci_remove - de-allocate PCI/SCSI host and host memory space
+ * tc_dwc_pci_remove - de-allocate PCI/SCSI host and host memory space
  *		data structure memory
  * @pdev: pointer to PCI handle
  */
-static void tc_dwc_g210_pci_remove(struct pci_dev *pdev)
+static void tc_dwc_pci_remove(struct pci_dev *pdev)
 {
 	struct ufs_hba *hba = pci_get_drvdata(pdev);
 
@@ -80,14 +80,14 @@ static void tc_dwc_g210_pci_remove(struct pci_dev *pdev)
 }
 
 /**
- * tc_dwc_g210_pci_probe - probe routine of the driver
+ * tc_dwc_pci_probe - probe routine of the driver
  * @pdev: pointer to PCI device handle
  * @id: PCI device id
  *
  * Returns 0 on success, non-zero value on failure
  */
 static int
-tc_dwc_g210_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+tc_dwc_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 {
 	struct ufs_hba *hba;
 	void __iomem *mmio_base;
@@ -95,10 +95,10 @@ tc_dwc_g210_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	/* Check Test Chip type and set the specific setup routine */
 	if (tc_type == TC_G210_20BIT) {
-		tc_dwc_g210_pci_hba_vops.phy_initialization =
+		tc_dwc_pci_hba_vops.phy_initialization =
 						tc_dwc_g210_config_20_bit;
 	} else if (tc_type == TC_G210_40BIT) {
-		tc_dwc_g210_pci_hba_vops.phy_initialization =
+		tc_dwc_pci_hba_vops.phy_initialization =
 						tc_dwc_g210_config_40_bit;
 	} else {
 		dev_err(&pdev->dev, "test chip version not specified\n");
@@ -127,7 +127,7 @@ tc_dwc_g210_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		return err;
 	}
 
-	hba->vops = &tc_dwc_g210_pci_hba_vops;
+	hba->vops = &tc_dwc_pci_hba_vops;
 
 	err = ufshcd_init(hba, mmio_base, pdev->irq);
 	if (err) {
@@ -142,35 +142,35 @@ tc_dwc_g210_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	return 0;
 }
 
-static const struct dev_pm_ops tc_dwc_g210_pci_pm_ops = {
-	.suspend	= tc_dwc_g210_pci_suspend,
-	.resume		= tc_dwc_g210_pci_resume,
-	.runtime_suspend = tc_dwc_g210_pci_runtime_suspend,
-	.runtime_resume  = tc_dwc_g210_pci_runtime_resume,
-	.runtime_idle    = tc_dwc_g210_pci_runtime_idle,
+static const struct dev_pm_ops tc_dwc_pci_pm_ops = {
+	.suspend	 = tc_dwc_pci_suspend,
+	.resume		 = tc_dwc_pci_resume,
+	.runtime_suspend = tc_dwc_pci_runtime_suspend,
+	.runtime_resume  = tc_dwc_pci_runtime_resume,
+	.runtime_idle    = tc_dwc_pci_runtime_idle,
 };
 
-static const struct pci_device_id tc_dwc_g210_pci_tbl[] = {
+static const struct pci_device_id tc_dwc_pci_tbl[] = {
 	{ PCI_VENDOR_ID_SYNOPSYS, 0xB101, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ PCI_VENDOR_ID_SYNOPSYS, 0xB102, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ }	/* terminate list */
 };
 
-MODULE_DEVICE_TABLE(pci, tc_dwc_g210_pci_tbl);
+MODULE_DEVICE_TABLE(pci, tc_dwc_pci_tbl);
 
-static struct pci_driver tc_dwc_g210_pci_driver = {
-	.name = "tc-dwc-g210-pci",
-	.id_table = tc_dwc_g210_pci_tbl,
-	.probe = tc_dwc_g210_pci_probe,
-	.remove = tc_dwc_g210_pci_remove,
-	.shutdown = tc_dwc_g210_pci_shutdown,
+static struct pci_driver tc_dwc_pci_driver = {
+	.name = "tc-dwc-pci",
+	.id_table = tc_dwc_pci_tbl,
+	.probe = tc_dwc_pci_probe,
+	.remove = tc_dwc_pci_remove,
+	.shutdown = tc_dwc_pci_shutdown,
 	.driver = {
-		.pm = &tc_dwc_g210_pci_pm_ops
+		.pm = &tc_dwc_pci_pm_ops
 	},
 };
 
-module_pci_driver(tc_dwc_g210_pci_driver);
+module_pci_driver(tc_dwc_pci_driver);
 
 MODULE_AUTHOR("Joao Pinto <Joao.Pinto@synopsys.com>");
-MODULE_DESCRIPTION("Synopsys Test Chip G210 PCI glue driver");
+MODULE_DESCRIPTION("Synopsys Test Chip PCI glue driver");
 MODULE_LICENSE("Dual BSD/GPL");
diff --git a/drivers/scsi/ufs/tc-dwc-g210-pltfrm.c b/drivers/scsi/ufs/tc-dwc-pltfrm.c
similarity index 70%
rename from drivers/scsi/ufs/tc-dwc-g210-pltfrm.c
rename to drivers/scsi/ufs/tc-dwc-pltfrm.c
index a1268e4f44d6..7a561ee21586 100644
--- a/drivers/scsi/ufs/tc-dwc-g210-pltfrm.c
+++ b/drivers/scsi/ufs/tc-dwc-pltfrm.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- * Synopsys G210 Test Chip driver
+ * Synopsys Test Chip driver
  *
  * Copyright (C) 2015-2016 Synopsys, Inc. (www.synopsys.com)
  *
@@ -15,7 +15,7 @@
 
 #include "ufshcd-pltfrm.h"
 #include "ufshcd-dwc.h"
-#include "tc-dwc-g210.h"
+#include "tc-dwc.h"
 
 /*
  * UFS DWC specific variant operations
@@ -32,7 +32,7 @@ static struct ufs_hba_variant_ops tc_dwc_g210_40bit_pltfm_hba_vops = {
 	.phy_initialization = tc_dwc_g210_config_40_bit,
 };
 
-static const struct of_device_id tc_dwc_g210_pltfm_match[] = {
+static const struct of_device_id tc_dwc_pltfm_match[] = {
 	{
 		.compatible = "snps,g210-tc-6.00-20bit",
 		.data = &tc_dwc_g210_20bit_pltfm_hba_vops,
@@ -43,21 +43,21 @@ static const struct of_device_id tc_dwc_g210_pltfm_match[] = {
 	},
 	{ },
 };
-MODULE_DEVICE_TABLE(of, tc_dwc_g210_pltfm_match);
+MODULE_DEVICE_TABLE(of, tc_dwc_pltfm_match);
 
 /**
- * tc_dwc_g210_pltfm_probe()
+ * tc_dwc_pltfm_probe()
  * @pdev: pointer to platform device structure
  *
  */
-static int tc_dwc_g210_pltfm_probe(struct platform_device *pdev)
+static int tc_dwc_pltfm_probe(struct platform_device *pdev)
 {
 	int err;
 	const struct of_device_id *of_id;
 	struct ufs_hba_variant_ops *vops;
 	struct device *dev = &pdev->dev;
 
-	of_id = of_match_node(tc_dwc_g210_pltfm_match, dev->of_node);
+	of_id = of_match_node(tc_dwc_pltfm_match, dev->of_node);
 	vops = (struct ufs_hba_variant_ops *)of_id->data;
 
 	/* Perform generic probe */
@@ -69,11 +69,11 @@ static int tc_dwc_g210_pltfm_probe(struct platform_device *pdev)
 }
 
 /**
- * tc_dwc_g210_pltfm_remove()
+ * tc_dwc_pltfm_remove()
  * @pdev: pointer to platform device structure
  *
  */
-static int tc_dwc_g210_pltfm_remove(struct platform_device *pdev)
+static int tc_dwc_pltfm_remove(struct platform_device *pdev)
 {
 	struct ufs_hba *hba =  platform_get_drvdata(pdev);
 
@@ -83,7 +83,7 @@ static int tc_dwc_g210_pltfm_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static const struct dev_pm_ops tc_dwc_g210_pltfm_pm_ops = {
+static const struct dev_pm_ops tc_dwc_pltfm_pm_ops = {
 	.suspend	= ufshcd_pltfrm_suspend,
 	.resume		= ufshcd_pltfrm_resume,
 	.runtime_suspend = ufshcd_pltfrm_runtime_suspend,
@@ -91,20 +91,21 @@ static const struct dev_pm_ops tc_dwc_g210_pltfm_pm_ops = {
 	.runtime_idle    = ufshcd_pltfrm_runtime_idle,
 };
 
-static struct platform_driver tc_dwc_g210_pltfm_driver = {
-	.probe		= tc_dwc_g210_pltfm_probe,
-	.remove		= tc_dwc_g210_pltfm_remove,
+static struct platform_driver tc_dwc_pltfm_driver = {
+	.probe		= tc_dwc_pltfm_probe,
+	.remove		= tc_dwc_pltfm_remove,
 	.shutdown = ufshcd_pltfrm_shutdown,
 	.driver		= {
-		.name	= "tc-dwc-g210-pltfm",
-		.pm	= &tc_dwc_g210_pltfm_pm_ops,
-		.of_match_table	= of_match_ptr(tc_dwc_g210_pltfm_match),
+		.name	= "tc-dwc-pltfm",
+		.pm	= &tc_dwc_pltfm_pm_ops,
+		.of_match_table	= of_match_ptr(tc_dwc_pltfm_match),
 	},
 };
 
-module_platform_driver(tc_dwc_g210_pltfm_driver);
+module_platform_driver(tc_dwc_pltfm_driver);
 
 MODULE_ALIAS("platform:tc-dwc-g210-pltfm");
-MODULE_DESCRIPTION("Synopsys Test Chip G210 platform glue driver");
+MODULE_ALIAS("platform:tc-dwc-pltfm");
+MODULE_DESCRIPTION("Synopsys Test Chip platform glue driver");
 MODULE_AUTHOR("Joao Pinto <Joao.Pinto@synopsys.com>");
 MODULE_LICENSE("Dual BSD/GPL");
diff --git a/drivers/scsi/ufs/tc-dwc-g210.c b/drivers/scsi/ufs/tc-dwc.c
similarity index 98%
rename from drivers/scsi/ufs/tc-dwc-g210.c
rename to drivers/scsi/ufs/tc-dwc.c
index f954a68f6b4c..d67b5b4b4b17 100644
--- a/drivers/scsi/ufs/tc-dwc-g210.c
+++ b/drivers/scsi/ufs/tc-dwc.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- * Synopsys G210 Test Chip driver
+ * Synopsys Test Chip driver
  *
  * Copyright (C) 2015-2016 Synopsys, Inc. (www.synopsys.com)
  *
@@ -12,7 +12,7 @@
 
 #include "ufshcd-dwc.h"
 #include "ufshci-dwc.h"
-#include "tc-dwc-g210.h"
+#include "tc-dwc.h"
 
 /**
  * tc_dwc_g210_setup_40bit_rmmi()
@@ -313,5 +313,5 @@ int tc_dwc_g210_config_20_bit(struct ufs_hba *hba)
 EXPORT_SYMBOL(tc_dwc_g210_config_20_bit);
 
 MODULE_AUTHOR("Joao Pinto <Joao.Pinto@synopsys.com>");
-MODULE_DESCRIPTION("Synopsys G210 Test Chip driver");
+MODULE_DESCRIPTION("Synopsys Test Chip driver");
 MODULE_LICENSE("Dual BSD/GPL");
diff --git a/drivers/scsi/ufs/tc-dwc-g210.h b/drivers/scsi/ufs/tc-dwc.h
similarity index 78%
rename from drivers/scsi/ufs/tc-dwc-g210.h
rename to drivers/scsi/ufs/tc-dwc.h
index 5a506da03f4a..e3c28a21a993 100644
--- a/drivers/scsi/ufs/tc-dwc-g210.h
+++ b/drivers/scsi/ufs/tc-dwc.h
@@ -1,14 +1,14 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
- * Synopsys G210 Test Chip driver
+ * Synopsys Test Chip driver
  *
  * Copyright (C) 2015-2016 Synopsys, Inc. (www.synopsys.com)
  *
  * Authors: Joao Pinto <jpinto@synopsys.com>
  */
 
-#ifndef _TC_DWC_G210_H
-#define _TC_DWC_G210_H
+#ifndef _TC_DWC_H
+#define _TC_DWC_H
 
 int tc_dwc_g210_config_40_bit(struct ufs_hba *hba);
 int tc_dwc_g210_config_20_bit(struct ufs_hba *hba);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 3/5] scsi: ufs: tc-dwc-pci: Use PDI ID to match Test Chip type
  2020-04-24 13:44 [PATCH v2 0/5] scsi: ufs: Misc improvements for DesignWare drivers and UFS Jose Abreu
  2020-04-24 13:44 ` [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version Jose Abreu
  2020-04-24 13:44 ` [PATCH v2 2/5] scsi: ufs: Rename tc-dwc-g210 -> tc-dwc Jose Abreu
@ 2020-04-24 13:44 ` Jose Abreu
  2020-04-24 13:44 ` [PATCH v2 4/5] scsi: ufs: tc-dwc-pci: Allow for MSI interrupt type Jose Abreu
  2020-04-24 13:44 ` [PATCH v2 5/5] MAINTAINERS: Change Maintainers for SCSI UFS DWC Drivers Jose Abreu
  4 siblings, 0 replies; 12+ messages in thread
From: Jose Abreu @ 2020-04-24 13:44 UTC (permalink / raw)
  To: linux-scsi
  Cc: Joao Pinto, Jose Abreu, Joao Lima, Alim Akhtar, Avri Altman,
	James E.J. Bottomley, Martin K. Petersen, linux-kernel

In preparation for the addition of new Test Chips, we re-arrange the
initialization sequence so that we rely on PCI ID to match for given
Test Chip type.

Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>

---
Cc: Joao Lima <Joao.Lima@synopsys.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/scsi/ufs/tc-dwc-pci.c | 68 ++++++++++++++++++++++++++++---------------
 1 file changed, 44 insertions(+), 24 deletions(-)

diff --git a/drivers/scsi/ufs/tc-dwc-pci.c b/drivers/scsi/ufs/tc-dwc-pci.c
index aeb11f7f0c91..74a2d80d32bd 100644
--- a/drivers/scsi/ufs/tc-dwc-pci.c
+++ b/drivers/scsi/ufs/tc-dwc-pci.c
@@ -14,6 +14,11 @@
 #include <linux/pci.h>
 #include <linux/pm_runtime.h>
 
+struct tc_dwc_data {
+	struct ufs_hba_variant_ops ops;
+	int (*setup)(struct pci_dev *pdev, struct tc_dwc_data *data);
+};
+
 /* Test Chip type expected values */
 #define TC_G210_20BIT 20
 #define TC_G210_40BIT 40
@@ -23,6 +28,20 @@ static int tc_type = TC_G210_INV;
 module_param(tc_type, int, 0);
 MODULE_PARM_DESC(tc_type, "Test Chip Type (20 = 20-bit, 40 = 40-bit)");
 
+static int tc_dwc_g210_set_config(struct pci_dev *pdev, struct tc_dwc_data *data)
+{
+	if (tc_type == TC_G210_20BIT) {
+		data->ops.phy_initialization = tc_dwc_g210_config_20_bit;
+	} else if (tc_type == TC_G210_40BIT) {
+		data->ops.phy_initialization = tc_dwc_g210_config_40_bit;
+	} else {
+		dev_err(&pdev->dev, "test chip version not specified\n");
+		return -EPERM;
+	}
+
+	return 0;
+}
+
 static int tc_dwc_pci_suspend(struct device *dev)
 {
 	return ufshcd_system_suspend(dev_get_drvdata(dev));
@@ -48,14 +67,6 @@ static int tc_dwc_pci_runtime_idle(struct device *dev)
 	return ufshcd_runtime_idle(dev_get_drvdata(dev));
 }
 
-/*
- * struct ufs_hba_dwc_vops - UFS DWC specific variant operations
- */
-static struct ufs_hba_variant_ops tc_dwc_pci_hba_vops = {
-	.name                   = "tc-dwc-pci",
-	.link_startup_notify	= ufshcd_dwc_link_startup_notify,
-};
-
 /**
  * tc_dwc_pci_shutdown - main function to put the controller in reset state
  * @pdev: pointer to PCI device handle
@@ -89,22 +100,11 @@ static void tc_dwc_pci_remove(struct pci_dev *pdev)
 static int
 tc_dwc_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 {
-	struct ufs_hba *hba;
+	struct tc_dwc_data *data = (struct tc_dwc_data *)id->driver_data;
 	void __iomem *mmio_base;
+	struct ufs_hba *hba;
 	int err;
 
-	/* Check Test Chip type and set the specific setup routine */
-	if (tc_type == TC_G210_20BIT) {
-		tc_dwc_pci_hba_vops.phy_initialization =
-						tc_dwc_g210_config_20_bit;
-	} else if (tc_type == TC_G210_40BIT) {
-		tc_dwc_pci_hba_vops.phy_initialization =
-						tc_dwc_g210_config_40_bit;
-	} else {
-		dev_err(&pdev->dev, "test chip version not specified\n");
-		return -EPERM;
-	}
-
 	err = pcim_enable_device(pdev);
 	if (err) {
 		dev_err(&pdev->dev, "pcim_enable_device failed\n");
@@ -127,7 +127,16 @@ tc_dwc_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		return err;
 	}
 
-	hba->vops = &tc_dwc_pci_hba_vops;
+	/* Check Test Chip type and set the specific setup routine */
+	if (data && data->setup) {
+		err = data->setup(pdev, data);
+		if (err)
+			return err;
+	} else {
+		return -ENOENT;
+	}
+
+	hba->vops = &data->ops;
 
 	err = ufshcd_init(hba, mmio_base, pdev->irq);
 	if (err) {
@@ -150,9 +159,20 @@ static const struct dev_pm_ops tc_dwc_pci_pm_ops = {
 	.runtime_idle    = tc_dwc_pci_runtime_idle,
 };
 
+static struct tc_dwc_data tc_dwc_g210_data = {
+	.setup = tc_dwc_g210_set_config,
+	.ops = {
+		.name = "tc-dwc-g210-pci",
+		.link_startup_notify = ufshcd_dwc_link_startup_notify,
+	},
+};
+
+#define PCI_DEVICE_ID_SYNOPSYS_TC_G210_1	0xB101
+#define PCI_DEVICE_ID_SYNOPSYS_TC_G210_2	0xB102
+
 static const struct pci_device_id tc_dwc_pci_tbl[] = {
-	{ PCI_VENDOR_ID_SYNOPSYS, 0xB101, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
-	{ PCI_VENDOR_ID_SYNOPSYS, 0xB102, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_DEVICE_DATA(SYNOPSYS, TC_G210_1, &tc_dwc_g210_data) },
+	{ PCI_DEVICE_DATA(SYNOPSYS, TC_G210_2, &tc_dwc_g210_data) },
 	{ }	/* terminate list */
 };
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 4/5] scsi: ufs: tc-dwc-pci: Allow for MSI interrupt type
  2020-04-24 13:44 [PATCH v2 0/5] scsi: ufs: Misc improvements for DesignWare drivers and UFS Jose Abreu
                   ` (2 preceding siblings ...)
  2020-04-24 13:44 ` [PATCH v2 3/5] scsi: ufs: tc-dwc-pci: Use PDI ID to match Test Chip type Jose Abreu
@ 2020-04-24 13:44 ` Jose Abreu
  2020-04-24 13:44 ` [PATCH v2 5/5] MAINTAINERS: Change Maintainers for SCSI UFS DWC Drivers Jose Abreu
  4 siblings, 0 replies; 12+ messages in thread
From: Jose Abreu @ 2020-04-24 13:44 UTC (permalink / raw)
  To: linux-scsi
  Cc: Joao Pinto, Jose Abreu, Winkler, Tomas, Joao Lima, Alim Akhtar,
	Avri Altman, James E.J. Bottomley, Martin K. Petersen,
	linux-kernel

Newer Test Chips boards have MSI support. It does no harm to try to
request it as the function will fallback to legacy interrupts if MSI is
not supported.

Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>

---

Changes from v1:
- Do not try to request MSIX vectors (Tomas)
- Add missing call to pci_free_irq_vectors() (Tomas)

Cc: "Winkler, Tomas" <tomas.winkler@intel.com>
Cc: Joao Lima <Joao.Lima@synopsys.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Avri Altman <avri.altman@wdc.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/scsi/ufs/tc-dwc-pci.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/ufs/tc-dwc-pci.c b/drivers/scsi/ufs/tc-dwc-pci.c
index 74a2d80d32bd..78dc6c484e84 100644
--- a/drivers/scsi/ufs/tc-dwc-pci.c
+++ b/drivers/scsi/ufs/tc-dwc-pci.c
@@ -88,6 +88,7 @@ static void tc_dwc_pci_remove(struct pci_dev *pdev)
 	pm_runtime_forbid(&pdev->dev);
 	pm_runtime_get_noresume(&pdev->dev);
 	ufshcd_remove(hba);
+	pci_free_irq_vectors(pdev);
 }
 
 /**
@@ -136,11 +137,18 @@ tc_dwc_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		return -ENOENT;
 	}
 
+	err = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_LEGACY | PCI_IRQ_MSI);
+	if (err < 0) {
+		dev_err(&pdev->dev, "Allocation failed\n");
+		return err;
+	}
+
 	hba->vops = &data->ops;
 
-	err = ufshcd_init(hba, mmio_base, pdev->irq);
+	err = ufshcd_init(hba, mmio_base, pci_irq_vector(pdev, 0));
 	if (err) {
 		dev_err(&pdev->dev, "Initialization failed\n");
+		pci_free_irq_vectors(pdev);
 		return err;
 	}
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH v2 5/5] MAINTAINERS: Change Maintainers for SCSI UFS DWC Drivers
  2020-04-24 13:44 [PATCH v2 0/5] scsi: ufs: Misc improvements for DesignWare drivers and UFS Jose Abreu
                   ` (3 preceding siblings ...)
  2020-04-24 13:44 ` [PATCH v2 4/5] scsi: ufs: tc-dwc-pci: Allow for MSI interrupt type Jose Abreu
@ 2020-04-24 13:44 ` Jose Abreu
  4 siblings, 0 replies; 12+ messages in thread
From: Jose Abreu @ 2020-04-24 13:44 UTC (permalink / raw)
  To: linux-scsi; +Cc: Joao Pinto, Jose Abreu, Joao Lima, linux-kernel

Pedro Sousa is no longer with Synopsys. Joao Lima and me have been
working internally with our UFS Controller so we are able to help and
we are volunteering as Maintainers for UFS DWC Drivers.

Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>

---
Cc: Joao Lima <Joao.Lima@synopsys.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: linux-kernel@vger.kernel.org
---
 MAINTAINERS | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index e64e5db31497..61c6579e7d80 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17307,7 +17307,8 @@ F:	Documentation/scsi/ufs.rst
 F:	drivers/scsi/ufs/
 
 UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER DWC HOOKS
-M:	Pedro Sousa <pedrom.sousa@synopsys.com>
+M:	Joao Lima <Joao.Lima@synopsys.com>
+M:	Jose Abreu <Jose.Abreu@synopsys.com>
 L:	linux-scsi@vger.kernel.org
 S:	Supported
 F:	drivers/scsi/ufs/*dwc*
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* RE: [EXT] [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version
  2020-04-24 13:44 ` [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version Jose Abreu
@ 2020-04-24 15:57   ` Bean Huo (beanhuo)
  2020-04-29  6:49     ` Jose Abreu
  0 siblings, 1 reply; 12+ messages in thread
From: Bean Huo (beanhuo) @ 2020-04-24 15:57 UTC (permalink / raw)
  To: Jose Abreu, linux-scsi
  Cc: Joao Pinto, Joao Lima, Alim Akhtar, Avri Altman,
	James E.J. Bottomley, Martin K. Petersen, linux-kernel

Hi, Jose

> @@ -8441,7 +8441,8 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem
> *mmio_base, unsigned int irq)
>  	if ((hba->ufs_version != UFSHCI_VERSION_10) &&
>  	    (hba->ufs_version != UFSHCI_VERSION_11) &&
>  	    (hba->ufs_version != UFSHCI_VERSION_20) &&
> -	    (hba->ufs_version != UFSHCI_VERSION_21))
> +	    (hba->ufs_version != UFSHCI_VERSION_21) &&
> +	    (hba->ufs_version != UFSHCI_VERSION_30))

I don't think these checkups of UFSHCI version is necessary,  does the UFSHCI have other version number except these?
Is there somebody still v1.0 and v1.1?


> @@ -104,6 +104,7 @@ enum {
>  	UFSHCI_VERSION_11 = 0x00010100, /* 1.1 */
>  	UFSHCI_VERSION_20 = 0x00000200, /* 2.0 */
>  	UFSHCI_VERSION_21 = 0x00000210, /* 2.1 */
> +	UFSHCI_VERSION_30 = 0x00000300, /* 3.0 */
>  };
> 
>  /*
> --
> 2.7.4

//Bean


^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [EXT] [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version
  2020-04-24 15:57   ` [EXT] " Bean Huo (beanhuo)
@ 2020-04-29  6:49     ` Jose Abreu
  2020-04-29 12:59       ` Bean Huo (beanhuo)
  0 siblings, 1 reply; 12+ messages in thread
From: Jose Abreu @ 2020-04-29  6:49 UTC (permalink / raw)
  To: Bean Huo (beanhuo), linux-scsi
  Cc: Joao Pinto, Joao Lima, Alim Akhtar, Avri Altman,
	James E.J. Bottomley, Martin K. Petersen, linux-kernel

From: Bean Huo (beanhuo) <beanhuo@micron.com>
Date: Apr/24/2020, 16:57:07 (UTC+00:00)

> Hi, Jose
> 
> > @@ -8441,7 +8441,8 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem
> > *mmio_base, unsigned int irq)
> >  	if ((hba->ufs_version != UFSHCI_VERSION_10) &&
> >  	    (hba->ufs_version != UFSHCI_VERSION_11) &&
> >  	    (hba->ufs_version != UFSHCI_VERSION_20) &&
> > -	    (hba->ufs_version != UFSHCI_VERSION_21))
> > +	    (hba->ufs_version != UFSHCI_VERSION_21) &&
> > +	    (hba->ufs_version != UFSHCI_VERSION_30))
> 
> I don't think these checkups of UFSHCI version is necessary,  does the UFSHCI have other version number except these?
> Is there somebody still v1.0 and v1.1?

Probably. I think we can leave them or change the dev_err to a dev_warn. 
This way we have logs in case someone is using a non-supported version.

What do you think ?

---
Thanks,
Jose Miguel Abreu

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [EXT] [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version
  2020-04-29  6:49     ` Jose Abreu
@ 2020-04-29 12:59       ` Bean Huo (beanhuo)
  2020-04-30  8:14         ` Jose Abreu
  0 siblings, 1 reply; 12+ messages in thread
From: Bean Huo (beanhuo) @ 2020-04-29 12:59 UTC (permalink / raw)
  To: Jose Abreu, linux-scsi
  Cc: Joao Pinto, Joao Lima, Alim Akhtar, Avri Altman,
	James E.J. Bottomley, Martin K. Petersen, linux-kernel

> > > @@ -8441,7 +8441,8 @@ int ufshcd_init(struct ufs_hba *hba, void
> > > __iomem *mmio_base, unsigned int irq)
> > >  	if ((hba->ufs_version != UFSHCI_VERSION_10) &&
> > >  	    (hba->ufs_version != UFSHCI_VERSION_11) &&
> > >  	    (hba->ufs_version != UFSHCI_VERSION_20) &&
> > > -	    (hba->ufs_version != UFSHCI_VERSION_21))
> > > +	    (hba->ufs_version != UFSHCI_VERSION_21) &&
> > > +	    (hba->ufs_version != UFSHCI_VERSION_30))
> >
> > I don't think these checkups of UFSHCI version is necessary,  does the UFSHCI
> have other version number except these?
> > Is there somebody still v1.0 and v1.1?
> 
> Probably. I think we can leave them or change the dev_err to a dev_warn.
> This way we have logs in case someone is using a non-supported version.
> 
> What do you think ?
> 
Hi, Jose
Seems after your patch, all of current released UFS control versions will be supported except the
version suffix is non-zero. Right?

> ---
> Thanks,
> Jose Miguel Abreu

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [EXT] [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version
  2020-04-29 12:59       ` Bean Huo (beanhuo)
@ 2020-04-30  8:14         ` Jose Abreu
  2020-06-10  3:39           ` Alim Akhtar
  0 siblings, 1 reply; 12+ messages in thread
From: Jose Abreu @ 2020-04-30  8:14 UTC (permalink / raw)
  To: Bean Huo (beanhuo), linux-scsi
  Cc: Joao Pinto, Joao Lima, Alim Akhtar, Avri Altman,
	James E.J. Bottomley, Martin K. Petersen, linux-kernel

From: Bean Huo (beanhuo) <beanhuo@micron.com>
Date: Apr/29/2020, 13:59:08 (UTC+00:00)

> > > > @@ -8441,7 +8441,8 @@ int ufshcd_init(struct ufs_hba *hba, void
> > > > __iomem *mmio_base, unsigned int irq)
> > > >  	if ((hba->ufs_version != UFSHCI_VERSION_10) &&
> > > >  	    (hba->ufs_version != UFSHCI_VERSION_11) &&
> > > >  	    (hba->ufs_version != UFSHCI_VERSION_20) &&
> > > > -	    (hba->ufs_version != UFSHCI_VERSION_21))
> > > > +	    (hba->ufs_version != UFSHCI_VERSION_21) &&
> > > > +	    (hba->ufs_version != UFSHCI_VERSION_30))
> > >
> > > I don't think these checkups of UFSHCI version is necessary,  does the UFSHCI
> > have other version number except these?
> > > Is there somebody still v1.0 and v1.1?
> > 
> > Probably. I think we can leave them or change the dev_err to a dev_warn.
> > This way we have logs in case someone is using a non-supported version.
> > 
> > What do you think ?
> > 
> Hi, Jose
> Seems after your patch, all of current released UFS control versions will be supported except the
> version suffix is non-zero. Right?

I think we cover all versions with this patch.

---
Thanks,
Jose Miguel Abreu

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [EXT] [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version
  2020-04-30  8:14         ` Jose Abreu
@ 2020-06-10  3:39           ` Alim Akhtar
  2020-06-12  9:40             ` Jose Abreu
  0 siblings, 1 reply; 12+ messages in thread
From: Alim Akhtar @ 2020-06-10  3:39 UTC (permalink / raw)
  To: Jose Abreu
  Cc: Bean Huo (beanhuo),
	linux-scsi, Joao Pinto, Joao Lima, Alim Akhtar, Avri Altman,
	James E.J. Bottomley, Martin K. Petersen, linux-kernel

Hi Jose

On Thu, Apr 30, 2020 at 1:44 PM Jose Abreu <Jose.Abreu@synopsys.com> wrote:
>
> From: Bean Huo (beanhuo) <beanhuo@micron.com>
> Date: Apr/29/2020, 13:59:08 (UTC+00:00)
> > > Probably. I think we can leave them or change the dev_err to a dev_warn.
> > > This way we have logs in case someone is using a non-supported version.
> > >
> > > What do you think ?
> > >
> > Hi, Jose
> > Seems after your patch, all of current released UFS control versions will be supported except the
> > version suffix is non-zero. Right?
>
> I think we cover all versions with this patch.
>
Are you still on this?

> ---
> Thanks,
> Jose Miguel Abreu



-- 
Regards,
Alim

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [EXT] [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version
  2020-06-10  3:39           ` Alim Akhtar
@ 2020-06-12  9:40             ` Jose Abreu
  0 siblings, 0 replies; 12+ messages in thread
From: Jose Abreu @ 2020-06-12  9:40 UTC (permalink / raw)
  To: Alim Akhtar
  Cc: Bean Huo (beanhuo),
	linux-scsi, Joao Pinto, Joao Lima, Alim Akhtar, Avri Altman,
	James E.J. Bottomley, Martin K. Petersen, linux-kernel,
	Jose Abreu

From: Alim Akhtar <alim.akhtar@gmail.com>
Date: Jun/10/2020, 04:39:48 (UTC+00:00)

> Are you still on this?

Yes, apologies but I was caught on some other things. I'll try to 
re-submit once possible.

---
Thanks,
Jose Miguel Abreu

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-06-12  9:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 13:44 [PATCH v2 0/5] scsi: ufs: Misc improvements for DesignWare drivers and UFS Jose Abreu
2020-04-24 13:44 ` [PATCH v2 1/5] scsi: ufs: Allow UFS 3.0 as a valid version Jose Abreu
2020-04-24 15:57   ` [EXT] " Bean Huo (beanhuo)
2020-04-29  6:49     ` Jose Abreu
2020-04-29 12:59       ` Bean Huo (beanhuo)
2020-04-30  8:14         ` Jose Abreu
2020-06-10  3:39           ` Alim Akhtar
2020-06-12  9:40             ` Jose Abreu
2020-04-24 13:44 ` [PATCH v2 2/5] scsi: ufs: Rename tc-dwc-g210 -> tc-dwc Jose Abreu
2020-04-24 13:44 ` [PATCH v2 3/5] scsi: ufs: tc-dwc-pci: Use PDI ID to match Test Chip type Jose Abreu
2020-04-24 13:44 ` [PATCH v2 4/5] scsi: ufs: tc-dwc-pci: Allow for MSI interrupt type Jose Abreu
2020-04-24 13:44 ` [PATCH v2 5/5] MAINTAINERS: Change Maintainers for SCSI UFS DWC Drivers Jose Abreu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).