Skip to content

Commit 660fc73

Browse files
anholtstorulf
authored andcommitted
mmc: bcm2835: Add new driver for the sdhost controller.
The 2835 has two SD controllers: The Arasan sdhci controller (supported by the iproc driver) and a custom sdhost controller. This patch adds a driver for the latter. The sdhci controller supports both sdcard and sdio. The sdhost controller supports the sdcard only, but has better performance. Also note that the rpi3 has sdio wifi, so driving the sdcard with the sdhost controller allows to use the sdhci controller for wifi support. The configuration is done by devicetree via pin muxing. Both SD controller are available on the same pins (2 pin groups = pin 22 to 27 + pin 48 to 53). So it's possible to use both SD controllers at the same time with different pin groups. The code was originally written by Phil Elwell in the downstream Rasbperry Pi tree. In preparation for the upstream merge it was cleaned up and the code base was moderized by Eric Anholt, Stefan Wahren and Gerd Hoffmann. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent ebdb4d8 commit 660fc73

File tree

3 files changed

+1480
-0
lines changed

3 files changed

+1480
-0
lines changed

drivers/mmc/host/Kconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,20 @@ config MMC_TOSHIBA_PCI
799799
depends on PCI
800800
help
801801

802+
config MMC_BCM2835
803+
tristate "Broadcom BCM2835 SDHOST MMC Controller support"
804+
depends on ARCH_BCM2835 || COMPILE_TEST
805+
depends on HAS_DMA
806+
help
807+
This selects the BCM2835 SDHOST MMC controller. If you have
808+
a BCM2835 platform with SD or MMC devices, say Y or M here.
809+
810+
Note that the BCM2835 has two SD controllers: The Arasan
811+
sdhci controller (supported by MMC_SDHCI_IPROC) and a custom
812+
sdhost controller (supported by this driver).
813+
814+
If unsure, say N.
815+
802816
config MMC_MTK
803817
tristate "MediaTek SD/MMC Card Interface support"
804818
depends on HAS_DMA

drivers/mmc/host/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ obj-$(CONFIG_MMC_MOXART) += moxart-mmc.o
5959
obj-$(CONFIG_MMC_SUNXI) += sunxi-mmc.o
6060
obj-$(CONFIG_MMC_USDHI6ROL0) += usdhi6rol0.o
6161
obj-$(CONFIG_MMC_TOSHIBA_PCI) += toshsd.o
62+
obj-$(CONFIG_MMC_BCM2835) += bcm2835.o
6263

6364
obj-$(CONFIG_MMC_REALTEK_PCI) += rtsx_pci_sdmmc.o
6465
obj-$(CONFIG_MMC_REALTEK_USB) += rtsx_usb_sdmmc.o

0 commit comments

Comments
 (0)