Distinguish mediatek drivers
Subsystems (2)
We have two MediaTek drivers: pcie-mediatek.c, which claims:
.compatible = "mediatek,mt2701-pcie"
.compatible = "mediatek,mt7623-pcie"
.compatible = "mediatek,mt2712-pcie"
.compatible = "mediatek,mt7622-pcie"
.compatible = "mediatek,mt7629-pcie"
and pcie-mediatek-gen3.c, which claims:
.compatible = "mediatek,mt8192-pcie"
The Kconfig text does not distinguish them. Can somebody update these entries so they do? It's nice if we can mention model numbers or product names that a user would recognize.
config PCIE_MEDIATEK
tristate "MediaTek PCIe controller"
depends on ARCH_MEDIATEK || COMPILE_TEST
depends on OF
depends on PCI_MSI_IRQ_DOMAIN
help
Say Y here if you want to enable PCIe controller support on MediaTek SoCs.
config PCIE_MEDIATEK_GEN3
tristate "MediaTek Gen3 PCIe controller"
depends on ARCH_MEDIATEK || COMPILE_TEST
depends on PCI_MSI_IRQ_DOMAIN
help
Adds support for PCIe Gen3 MAC controller for MediaTek SoCs. This PCIe controller is compatible with Gen3, Gen2 and Gen1 speed, 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.
Both drivers are also named "mtk-pcie" and use the same internal "mtk_" prefix on structs and functions. Not a *huge* problem, but not really ideal either.
Bjorn
Hi Bjorn,
Thanks for the reminder, I will send patches to update these entries.
Thanks.
Quoted 48 lines · Bjorn Helgaas
We have two MediaTek drivers:
pcie-mediatek.c, which claims:.compatible = "mediatek,mt2701-pcie"
.compatible = "mediatek,mt7623-pcie"
.compatible = "mediatek,mt2712-pcie"
.compatible = "mediatek,mt7622-pcie"
.compatible = "mediatek,mt7629-pcie"and
pcie-mediatek-gen3.c, which claims:.compatible = "mediatek,mt8192-pcie"
The
Kconfigtext does not distinguish them. Can somebody update these
entries so they do? It's nice if we can mention model numbers or product names that a user would recognize.config
PCIE_MEDIATEK
tristate "MediaTek PCIe controller"
depends onARCH_MEDIATEK||COMPILE_TEST
depends on OF
depends onPCI_MSI_IRQ_DOMAIN
help
Say Y here if you want to enable PCIe controller support on MediaTek SoCs.config
PCIE_MEDIATEK_GEN3
tristate "MediaTek Gen3 PCIe controller"
depends onARCH_MEDIATEK||COMPILE_TEST
depends onPCI_MSI_IRQ_DOMAIN
help
Adds support for PCIe Gen3 MAC controller for MediaTek
SoCs.
This PCIe controller is compatible with Gen3, Gen2 and Gen1
speed,
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.Both drivers are also named "mtk-pcie" and use the same internal "
mtk_" prefix on structs and functions. Not a *huge* problem, but not
really ideal either.Bjorn
Hello,
[...]
Quoted 3 lines
Quoted 3 lines
Both drivers are also named "mtk-pcie" and use the same internal "
mtk_" prefix on structs and functions. Not a *huge* problem, but not really ideal either.
[...]
Quoted 1 line
Thanks for the reminder, I will send patches to update these entries.
Perhaps a silly question, but would it be possible to combine both drivers into a single one that handless devices across all generations?
Krzysztof
Hi Krzysztof,
That's really a good idea, yes, we can combine both drivers into a single one.
But the real problem is that the old driver has been used to a lot of platforms and it works stable for now. When we combine these drivers, we will have a very huge effort to adjust the driver style and test it in all platforms.
We will check the possibilities but it may take more time to finish the work.
Thanks.
Quoted 17 lines · Krzysztof Wilczyński
Hello,
[...]
Quoted 4 lines
Quoted 4 lines
Both drivers are also named "mtk-pcie" and use the same internal "
mtk_" prefix on structs and functions. Not a *huge* problem, but
not really ideal either.[...]
Quoted 2 lines
Thanks for the reminder, I will send patches to update these entries.
Perhaps a silly question, but would it be possible to combine both drivers
into a single one that handless devices across all generations?Krzysztof
Hello!
Quoted 7 lines
That's really a good idea, yes, we can combine both drivers into a single one.
But the real problem is that the old driver has been used to a lot of platforms and it works stable for now. When we combine these drivers, we will have a very huge effort to adjust the driver style and test it in all platforms.
Some very good points, indeed. The idea seems like a good idea, but in reality it's not feasible, like you say.
Thank you!
Krzysztof