linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: mediatek: Update entries to distinguish MediaTek PCIe controller
@ 2022-03-26  3:27 Jianjun Wang
  2022-03-28 13:54 ` AngeloGioacchino Del Regno
  0 siblings, 1 reply; 2+ messages in thread
From: Jianjun Wang @ 2022-03-26  3:27 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Rob Herring, Krzysztof Wilczyński, Bjorn Helgaas
  Cc: Ryder Lee, Jianjun Wang, Matthias Brugger, linux-pci,
	linux-kernel, linux-mediatek, linux-arm-kernel

Add model numbers in Kconfig and update driver name in
pcie-mediatek-gen3.c to distinguish the MediaTek PCIe controllers.

Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
---
 drivers/pci/controller/Kconfig              | 11 +++++++----
 drivers/pci/controller/pcie-mediatek-gen3.c | 12 ++++++------
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
index 601f2531ee91..dd7a2caf8da9 100644
--- a/drivers/pci/controller/Kconfig
+++ b/drivers/pci/controller/Kconfig
@@ -237,8 +237,11 @@ config PCIE_MEDIATEK
 	depends on OF
 	depends on PCI_MSI_IRQ_DOMAIN
 	help
-	  Say Y here if you want to enable PCIe controller support on
-	  MediaTek SoCs.
+	  Adds support for PCIe MAC controller for MediaTek SoCs.
+
+	  The following SoCs are supported for this PCIe controller:
+	  MT2701 and MT7623 with no MSI supported.
+	  MT2712, MT7622 and MT7629 support up to 32 MSI interrupt numbers.
 
 config PCIE_MEDIATEK_GEN3
 	tristate "MediaTek Gen3 PCIe controller"
@@ -250,8 +253,8 @@ config PCIE_MEDIATEK_GEN3
 	  and support up to 256 MSI interrupt numbers for
 	  multi-function devices.
 
-	  Say Y here if you want to enable Gen3 PCIe controller support on
-	  MediaTek SoCs.
+	  The following SoCs are supported for this PCIe controller:
+	  MT8192 and MT8195.
 
 config VMD
 	depends on PCI_MSI && X86_64 && SRCU && !UML
diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
index 7705d61fba4c..6745076a02b9 100644
--- a/drivers/pci/controller/pcie-mediatek-gen3.c
+++ b/drivers/pci/controller/pcie-mediatek-gen3.c
@@ -1011,21 +1011,21 @@ static const struct dev_pm_ops mtk_pcie_pm_ops = {
 				      mtk_pcie_resume_noirq)
 };
 
-static const struct of_device_id mtk_pcie_of_match[] = {
+static const struct of_device_id mtk_pcie_gen3_of_match[] = {
 	{ .compatible = "mediatek,mt8192-pcie" },
 	{},
 };
-MODULE_DEVICE_TABLE(of, mtk_pcie_of_match);
+MODULE_DEVICE_TABLE(of, mtk_pcie_gen3_of_match);
 
-static struct platform_driver mtk_pcie_driver = {
+static struct platform_driver mtk_pcie_driver_gen3 = {
 	.probe = mtk_pcie_probe,
 	.remove = mtk_pcie_remove,
 	.driver = {
-		.name = "mtk-pcie",
-		.of_match_table = mtk_pcie_of_match,
+		.name = "mtk-pcie-gen3",
+		.of_match_table = mtk_pcie_gen3_of_match,
 		.pm = &mtk_pcie_pm_ops,
 	},
 };
 
-module_platform_driver(mtk_pcie_driver);
+module_platform_driver(mtk_pcie_driver_gen3);
 MODULE_LICENSE("GPL v2");
-- 
2.18.0


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

* Re: [PATCH] PCI: mediatek: Update entries to distinguish MediaTek PCIe controller
  2022-03-26  3:27 [PATCH] PCI: mediatek: Update entries to distinguish MediaTek PCIe controller Jianjun Wang
@ 2022-03-28 13:54 ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 2+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-03-28 13:54 UTC (permalink / raw)
  To: Jianjun Wang, Lorenzo Pieralisi, Rob Herring,
	Krzysztof Wilczyński, Bjorn Helgaas
  Cc: Ryder Lee, Matthias Brugger, linux-pci, linux-kernel,
	linux-mediatek, linux-arm-kernel

Il 26/03/22 04:27, Jianjun Wang ha scritto:
> Add model numbers in Kconfig and update driver name in
> pcie-mediatek-gen3.c to distinguish the MediaTek PCIe controllers.
> 
> Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
> ---
>   drivers/pci/controller/Kconfig              | 11 +++++++----
>   drivers/pci/controller/pcie-mediatek-gen3.c | 12 ++++++------
>   2 files changed, 13 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
> index 601f2531ee91..dd7a2caf8da9 100644
> --- a/drivers/pci/controller/Kconfig
> +++ b/drivers/pci/controller/Kconfig
> @@ -237,8 +237,11 @@ config PCIE_MEDIATEK
>   	depends on OF
>   	depends on PCI_MSI_IRQ_DOMAIN
>   	help
> -	  Say Y here if you want to enable PCIe controller support on
> -	  MediaTek SoCs.
> +	  Adds support for PCIe MAC controller for MediaTek SoCs.
> +
> +	  The following SoCs are supported for this PCIe controller:
> +	  MT2701 and MT7623 with no MSI supported.
> +	  MT2712, MT7622 and MT7629 support up to 32 MSI interrupt numbers.
>   
>   config PCIE_MEDIATEK_GEN3
>   	tristate "MediaTek Gen3 PCIe controller"
> @@ -250,8 +253,8 @@ config PCIE_MEDIATEK_GEN3
>   	  and support up to 256 MSI interrupt numbers for
>   	  multi-function devices.
>   
> -	  Say Y here if you want to enable Gen3 PCIe controller support on
> -	  MediaTek SoCs.
> +	  The following SoCs are supported for this PCIe controller:
> +	  MT8192 and MT8195.

I agree with the pcie-mediatek-gen3 naming change, it's good to differentiate,
but I don't think that updating the Kconfig description is a good idea.

Everyone can get the list of supported SoCs by reading the dt-bindings for these
drivers, so it's unnecessary to make a list of SoCs in Kconfig... this is also
to avoid updating these entries everytime support for a new chip is added to the
gen3 (or the other) driver.

If nobody opposes to my proposal - please drop that description change.

Regards,
Angelo

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

end of thread, other threads:[~2022-03-28 13:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-26  3:27 [PATCH] PCI: mediatek: Update entries to distinguish MediaTek PCIe controller Jianjun Wang
2022-03-28 13:54 ` AngeloGioacchino Del Regno

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).