Skip to contentSkip to conversation

PCI support for SOC_MT7621

PATCH Superseded Sergio Paracuellos 2 participants 5 messages Oct 16, 2019 – Oct 19, 2019

Subsystems (4)
lore
Share & tools
lore

Sergio Paracuellos

author maintainer
#0 lore raw

Hi all,

I have a concern about commit:

c4d48cf5e2f0 ("MIPS: ralink: deactivate PCI support for SOC_MT7621")

This commit make a regression for my kernel configuration for gnubee board which is mt7621 SOC based and also has PCI. With this applied PCI_DRIVERS_GENERIC is not selectable anymore and it becomes into a PCI_DRIVERS_LEGACY configuration making impossible to compile mt7621-pci driver for this board.

I think this should be reverted. Am I missing something here?

Thanks in advance for your time.

Best regards,
Sergio Paracuellos

#1 lore raw
Quoted 6 lines · Sergio Paracuellos

Hi all,

I have a concern about commit:

c4d48cf5e2f0 ("MIPS: ralink: deactivate PCI support for SOC_MT7621")

Quoted 7 lines

This commit make a regression for my kernel configuration for gnubee board which is mt7621 SOC based and also has PCI. With this applied PCI_DRIVERS_GENERIC is not selectable anymore and it becomes into a PCI_DRIVERS_LEGACY configuration making impossible to compile mt7621-pci driver for this board.

I think this should be reverted. Am I missing something here?

The commit reports a build error without the patch, and we don't want that.
Maybe change the
select HAVE_PCI
to
select HAVE_PCI if STAGING
or
select HAVE_PCI if PCI_MT7621

Hauke: do either of those fix your compile error?

Thanks,
NeilBrown

Quoted 5 lines

Thanks in advance for your time.

Best regards,
Sergio Paracuellos

author maintainer
#2 lore raw

Hi Neil,

Quoted 15 lines · NeilBrown
Quoted 12 lines · Sergio Paracuellos

Hi all,

I have a concern about commit:

c4d48cf5e2f0 ("MIPS: ralink: deactivate PCI support for SOC_MT7621")

This commit make a regression for my kernel configuration for gnubee board which is mt7621 SOC based and also has PCI. With this applied PCI_DRIVERS_GENERIC is not selectable anymore and it becomes into a PCI_DRIVERS_LEGACY configuration making impossible to compile mt7621-pci driver for this board.

Quoted 4 lines
Quoted 1 line

I think this should be reverted. Am I missing something here?

The commit reports a build error without the patch, and we don't want that.

I didn't understand properly the commit message. Yes, of course we don't want a build
fail :).

Quoted 6 lines

Maybe change the
select HAVE_PCI
to
select HAVE_PCI if STAGING
or
select HAVE_PCI if PCI_MT7621

I think the second one could be more accurate in this case.

Quoted 3 lines

Hauke: do either of those fix your compile error?

If so, I don't have any problem to send a patch with this fixed if you are busy. Just let me know.

Quoted 2 lines

Thanks,
NeilBrown

Best regards,
Sergio Paracuellos

Quoted 7 lines
Quoted 7 lines

Thanks in advance for your time.

Best regards,
Sergio Paracuellos

author maintainer
#3 lore raw
Quoted 28 lines · Sergio Paracuellos

Hi Neil,

Quoted 15 lines · NeilBrown
Quoted 12 lines · Sergio Paracuellos

Hi all,

I have a concern about commit:

c4d48cf5e2f0 ("MIPS: ralink: deactivate PCI support for SOC_MT7621")

This commit make a regression for my kernel configuration for gnubee board which is mt7621 SOC based and also has PCI. With this applied PCI_DRIVERS_GENERIC is not selectable anymore and it becomes into a PCI_DRIVERS_LEGACY configuration making impossible to compile mt7621-pci driver for this board.

Quoted 4 lines
Quoted 1 line

I think this should be reverted. Am I missing something here?

The commit reports a build error without the patch, and we don't want that.

I didn't understand properly the commit message. Yes, of course we don't want a build
fail :).

Quoted 8 lines
Quoted 6 lines

Maybe change the
select HAVE_PCI
to
select HAVE_PCI if STAGING
or
select HAVE_PCI if PCI_MT7621

I think the second one could be more accurate in this case.

Actually I tested this two changes with my current configuration. PCI_MT7621 depends on PCI so the second one gets into a recursive dependency problem. We can skip depends on PCI and only select PCI_DRIVERS_GENERIC in mt7621_pci Kconfig file to avoid this. The following change works, but I don't know if this is the correct thing to do:

$ git diff arch/mips/ralink/Kconfig drivers/staging/mt7621-pci/Kconfig
arch/mips/ralink/Kconfig +1 -0
index 1434fa60f3db..94e9ce994494 100644
@@ -51,6 +51,7 @@ choice
                select MIPS_GIC
                select COMMON_CLK
                select CLKSRC_MIPS_GIC
+               select HAVE_PCI if PCI_MT7621
 endchoice
 
 choice
(quoted diff) +0 -0

b/drivers/staging/mt7621-pci/Kconfig
index af928b75a940..ce58042f2f21 100644

drivers/staging/mt7621-pci/Kconfig +0 -1
@@ -2,7 +2,6 @@
 config PCI_MT7621
        tristate "MediaTek MT7621 PCI Controller"
        depends on RALINK
-       depends on PCI
        select PCI_DRIVERS_GENERIC
        help
          This selects a driver for the MediaTek MT7621 PCI Controller.

In the other hand, the "select HAVE_PCI if STAGING" one works as it is.

Thanks,
Sergio Paracuellos

Quoted 20 lines
Quoted 4 lines

Hauke: do either of those fix your compile error?

If so, I don't have any problem to send a patch with this fixed if you are busy. Just let me know.

Quoted 2 lines

Thanks,
NeilBrown

Best regards,
Sergio Paracuellos

Quoted 7 lines
Quoted 7 lines

Thanks in advance for your time.

Best regards,
Sergio Paracuellos

author maintainer
#4 lore raw

PATCH 1/1 MIPS: ralink: enable PCI support only if driver for mt7621 SoC is selected

In reply to NeilBrown

Some versions of SoC MT7621 have three PCI express hosts. Some boards make use of those PCI through the staging driver mt7621-pci. Recently PCI support has been removed from MT7621 Soc kernel configuration due to a build error. This makes imposible to compile staging driver and produces a regression for gnubee based boards. Enable support for PCI again but enable it only if staging mt7621-pci driver is selected.

Fixes c4d48cf5e2f0 ("MIPS: ralink: deactivate PCI support for SOC_MT7621")
---
 arch/mips/ralink/Kconfig           | 1 +
 drivers/staging/mt7621-pci/Kconfig | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)
arch/mips/ralink/Kconfig +1 -0
index 1434fa60f3db..94e9ce994494 100644
@@ -51,6 +51,7 @@ choice
 		select MIPS_GIC
 		select COMMON_CLK
 		select CLKSRC_MIPS_GIC
+		select HAVE_PCI if PCI_MT7621
 endchoice
 
 choice
drivers/staging/mt7621-pci/Kconfig +0 -1
index af928b75a940..ce58042f2f21 100644
@@ -2,7 +2,6 @@
 config PCI_MT7621
 	tristate "MediaTek MT7621 PCI Controller"
 	depends on RALINK
-	depends on PCI
 	select PCI_DRIVERS_GENERIC
 	help
 	  This selects a driver for the MediaTek MT7621 PCI Controller.
Signature · 1 line
2.19.1