Skip to contentSkip to conversation

mmc: sdhci-brcmstb: Add ARCH_BCM2835 option

PATCH In review Peter Robinson 3 participants 7 messages Jun 20, 2024 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: sdhci-brcmstb: Add ARCH_BCM2835 option

The Raspberry Pi devices have to date all used ARCH_BCM2835 as their SoC arch dependency so configurations that use this and not BRCMSTB won't end up with this module in their config.

Cc Andrea della Porta <[email protected]>
Cc Stefan Wahren <[email protected]>
Cc Adrian Hunter <[email protected]>
Cc Ulf Hansson <[email protected]>
Fixes 40f22df5269e6 ("mmc: sdhci-brcmstb: Add BCM2712 support")
---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/Kconfig +1 -1
index bb0d4fb0892ae..eb3ecfe055910 100644
@@ -1016,7 +1016,7 @@ config MMC_SDHCI_MICROCHIP_PIC32
 
 config MMC_SDHCI_BRCMSTB
 	tristate "Broadcom SDIO/SD/MMC support"
-	depends on ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST
+	depends on ARCH_BRCMSTB || ARCH_BCM2835 || BMIPS_GENERIC || COMPILE_TEST
 	depends on MMC_SDHCI_PLTFM
 	select MMC_CQHCI
 	default ARCH_BRCMSTB || BMIPS_GENERIC
Signature · 1 line
2.45.2
#1 lore raw

Hi Peter,

Quoted 3 lines · Peter Robinson

The Raspberry Pi devices have to date all used ARCH_BCM2835 as their SoC arch dependency so configurations that use this and not BRCMSTB won't end up with this module in their config.

AFAIK the BCM2712 (RPi5) is the only SoC of the Raspberry family that has an MMC host controller that is more or less like the one present on the STB line silicon. Adding ARCH_BCM2835 to the dependency will then allow RPi<=4 to use this driver for which they do not have the relevant hw.
If I'm correct about the aforementioned point, I'd be inclined to avoid this change, then.

Many thanks,
Andrea

Quoted 27 lines
Cc Andrea della Porta <[email protected]>
Cc Stefan Wahren <[email protected]>
Cc Adrian Hunter <[email protected]>
Cc Ulf Hansson <[email protected]>
Fixes 40f22df5269e6 ("mmc: sdhci-brcmstb: Add BCM2712 support")
---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/Kconfig +1 -1
index bb0d4fb0892ae..eb3ecfe055910 100644
@@ -1016,7 +1016,7 @@ config MMC_SDHCI_MICROCHIP_PIC32
 
 config MMC_SDHCI_BRCMSTB
 	tristate "Broadcom SDIO/SD/MMC support"
-	depends on ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST
+	depends on ARCH_BRCMSTB || ARCH_BCM2835 || BMIPS_GENERIC || COMPILE_TEST
 	depends on MMC_SDHCI_PLTFM
 	select MMC_CQHCI
 	default ARCH_BRCMSTB || BMIPS_GENERIC
Signature · 1 line
2.45.2
#2 lore raw

Hi Andrea,

Quoted 10 lines · Peter Robinson
Quoted 3 lines

The Raspberry Pi devices have to date all used ARCH_BCM2835 as their SoC arch dependency so configurations that use this and not BRCMSTB won't end up with this module in their config.

AFAIK the BCM2712 (RPi5) is the only SoC of the Raspberry family that has an MMC host controller that is more or less like the one present on the STB line silicon. Adding ARCH_BCM2835 to the dependency will then allow RPi<=4 to use this driver for which they do not have the relevant hw.

It won't use the driver due to the different compatibles, it just allows the driver to be available. The various different gens of RPi now have around 4 different types of MMC controller in use.

Quoted 33 lines

If I'm correct about the aforementioned point, I'd be inclined to avoid this change, then.

Many thanks,
Andrea

Quoted 27 lines
Cc Andrea della Porta <[email protected]>
Cc Stefan Wahren <[email protected]>
Cc Adrian Hunter <[email protected]>
Cc Ulf Hansson <[email protected]>
Fixes 40f22df5269e6 ("mmc: sdhci-brcmstb: Add BCM2712 support")
---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/Kconfig +1 -2
index bb0d4fb0892ae..eb3ecfe055910 100644
@@ -1016,7 +1016,7 @@ config MMC_SDHCI_MICROCHIP_PIC32
 
 config MMC_SDHCI_BRCMSTB
      tristate "Broadcom SDIO/SD/MMC support"
-     depends on ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST
+     depends on ARCH_BRCMSTB || ARCH_BCM2835 || BMIPS_GENERIC || COMPILE_TEST
      depends on MMC_SDHCI_PLTFM
      select MMC_CQHCI
      default ARCH_BRCMSTB || BMIPS_GENERIC
--

2.45.2

#3 lore raw

Hi Peter,

Quoted 13 lines · Peter Robinson

Hi Andrea,

Quoted 10 lines · Peter Robinson
Quoted 3 lines

The Raspberry Pi devices have to date all used ARCH_BCM2835 as their SoC arch dependency so configurations that use this and not BRCMSTB won't end up with this module in their config.

AFAIK the BCM2712 (RPi5) is the only SoC of the Raspberry family that has an MMC host controller that is more or less like the one present on the STB line silicon. Adding ARCH_BCM2835 to the dependency will then allow RPi<=4 to use this driver for which they do not have the relevant hw.

Quoted 3 lines

It won't use the driver due to the different compatibles, it just allows the driver to be available. The various different gens of RPi now have around 4 different types of MMC controller in use.

True, so why make a driver available if I can't use it anyway? No other SoC served by ARCH_BCM2835 have that hw, but as you said, every one of them have different controllers best served by anything else but SDHCI_BRCMSTB.

Thanks,
Andrea

Quoted 34 lines
Quoted 34 lines

If I'm correct about the aforementioned point, I'd be inclined to avoid this change, then.

Many thanks,
Andrea

Quoted 27 lines
Cc Andrea della Porta <[email protected]>
Cc Stefan Wahren <[email protected]>
Cc Adrian Hunter <[email protected]>
Cc Ulf Hansson <[email protected]>
Fixes 40f22df5269e6 ("mmc: sdhci-brcmstb: Add BCM2712 support")
---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/Kconfig +1 -2
index bb0d4fb0892ae..eb3ecfe055910 100644
@@ -1016,7 +1016,7 @@ config MMC_SDHCI_MICROCHIP_PIC32
 
 config MMC_SDHCI_BRCMSTB
      tristate "Broadcom SDIO/SD/MMC support"
-     depends on ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST
+     depends on ARCH_BRCMSTB || ARCH_BCM2835 || BMIPS_GENERIC || COMPILE_TEST
      depends on MMC_SDHCI_PLTFM
      select MMC_CQHCI
      default ARCH_BRCMSTB || BMIPS_GENERIC
--

2.45.2

#4 lore raw
Quoted 17 lines · Andrea della Porta

Hi Peter,

Quoted 13 lines · Peter Robinson

Hi Andrea,

Quoted 10 lines · Peter Robinson
Quoted 3 lines

The Raspberry Pi devices have to date all used ARCH_BCM2835 as their SoC arch dependency so configurations that use this and not BRCMSTB won't end up with this module in their config.

AFAIK the BCM2712 (RPi5) is the only SoC of the Raspberry family that has an MMC host controller that is more or less like the one present on the STB line silicon. Adding ARCH_BCM2835 to the dependency will then allow RPi<=4 to use this driver for which they do not have the relevant hw.

Quoted 7 lines
Quoted 3 lines

It won't use the driver due to the different compatibles, it just allows the driver to be available. The various different gens of RPi now have around 4 different types of MMC controller in use.

True, so why make a driver available if I can't use it anyway? No other SoC served by ARCH_BCM2835 have that hw, but as you said, every one of them have different controllers best served by anything else but SDHCI_BRCMSTB.

We, at least in Fedora, don't enable ARCH_BRCMSTB as it brings a lot of HW and drivers we can't support.

Quoted 37 lines

Thanks,
Andrea

Quoted 34 lines
Quoted 34 lines

If I'm correct about the aforementioned point, I'd be inclined to avoid this change, then.

Many thanks,
Andrea

Quoted 27 lines
Cc Andrea della Porta <[email protected]>
Cc Stefan Wahren <[email protected]>
Cc Adrian Hunter <[email protected]>
Cc Ulf Hansson <[email protected]>
Fixes 40f22df5269e6 ("mmc: sdhci-brcmstb: Add BCM2712 support")
---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/Kconfig +1 -2
index bb0d4fb0892ae..eb3ecfe055910 100644
@@ -1016,7 +1016,7 @@ config MMC_SDHCI_MICROCHIP_PIC32
 
 config MMC_SDHCI_BRCMSTB
      tristate "Broadcom SDIO/SD/MMC support"
-     depends on ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST
+     depends on ARCH_BRCMSTB || ARCH_BCM2835 || BMIPS_GENERIC || COMPILE_TEST
      depends on MMC_SDHCI_PLTFM
      select MMC_CQHCI
      default ARCH_BRCMSTB || BMIPS_GENERIC
--

2.45.2

Reviewed-by
#5 lore raw

Hi Peter,

Quoted 22 lines · Peter Robinson
Quoted 21 lines · Andrea della Porta

Hi Peter,

Quoted 16 lines · Peter Robinson

Hi Andrea,

Quoted 10 lines · Peter Robinson
Quoted 3 lines

The Raspberry Pi devices have to date all used ARCH_BCM2835 as their SoC arch dependency so configurations that use this and not BRCMSTB won't end up with this module in their config.

AFAIK the BCM2712 (RPi5) is the only SoC of the Raspberry family that has an MMC host controller that is more or less like the one present on the STB line silicon. Adding ARCH_BCM2835 to the dependency will then allow RPi<=4 to use this driver for which they do not have the relevant hw.

It won't use the driver due to the different compatibles, it just allows the driver to be available. The various different gens of RPi now have around 4 different types of MMC controller in use.

Quoted 6 lines
Quoted 3 lines

True, so why make a driver available if I can't use it anyway? No other SoC served by ARCH_BCM2835 have that hw, but as you said, every one of them have different controllers best served by anything else but SDHCI_BRCMSTB.

We, at least in Fedora, don't enable ARCH_BRCMSTB as it brings a lot of HW and drivers we can't support.

I see the point. It makes sense to me and after all there seems to be no drawback except maybe including some drivers that cannot be used on all platforms, but as you stated they wouldn't be loaded anyway unless put into devicetree. After all those drivers will be compiled in anyway due to current default config options, and on several platforms won't be usable still.

Thanks.

Quoted 38 lines
Quoted 38 lines

Thanks,
Andrea

Quoted 34 lines
Quoted 34 lines

If I'm correct about the aforementioned point, I'd be inclined to avoid this change, then.

Many thanks,
Andrea

Quoted 27 lines
Cc Andrea della Porta <[email protected]>
Cc Stefan Wahren <[email protected]>
Cc Adrian Hunter <[email protected]>
Cc Ulf Hansson <[email protected]>
Fixes 40f22df5269e6 ("mmc: sdhci-brcmstb: Add BCM2712 support")
---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/Kconfig +1 -2
index bb0d4fb0892ae..eb3ecfe055910 100644
@@ -1016,7 +1016,7 @@ config MMC_SDHCI_MICROCHIP_PIC32
 
 config MMC_SDHCI_BRCMSTB
      tristate "Broadcom SDIO/SD/MMC support"
-     depends on ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST
+     depends on ARCH_BRCMSTB || ARCH_BCM2835 || BMIPS_GENERIC || COMPILE_TEST
      depends on MMC_SDHCI_PLTFM
      select MMC_CQHCI
      default ARCH_BRCMSTB || BMIPS_GENERIC
--

2.45.2

#6 lore raw
In reply to Peter Robinson
Quoted 11 lines · Peter Robinson

The Raspberry Pi devices have to date all used ARCH_BCM2835 as their SoC arch dependency so configurations that use this and not BRCMSTB won't end up with this module in their config.

Cc Andrea della Porta <[email protected]>
Cc Stefan Wahren <[email protected]>
Cc Adrian Hunter <[email protected]>
Cc Ulf Hansson <[email protected]>
Fixes 40f22df5269e6 ("mmc: sdhci-brcmstb: Add BCM2712 support")

Applied for next, thanks!

Kind regards
Uffe

Quoted 20 lines
---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/Kconfig +1 -2
index bb0d4fb0892ae..eb3ecfe055910 100644
@@ -1016,7 +1016,7 @@ config MMC_SDHCI_MICROCHIP_PIC32
 
 config MMC_SDHCI_BRCMSTB
        tristate "Broadcom SDIO/SD/MMC support"
-       depends on ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST
+       depends on ARCH_BRCMSTB || ARCH_BCM2835 || BMIPS_GENERIC || COMPILE_TEST
        depends on MMC_SDHCI_PLTFM
        select MMC_CQHCI
        default ARCH_BRCMSTB || BMIPS_GENERIC
--

2.45.2