mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
MMC: added alternative MMC driver
mmc: Disable CMD23 transfers on all cards Pending wire-level investigation of these types of transfers and associated errors on bcm2835-mmc, disable for now. Fallback of CMD18/CMD25 transfers will be used automatically by the MMC layer. Reported/Tested-by: Gellert Weisz <gellert@raspberrypi.org> mmc: bcm2835-mmc: enable DT support for all architectures Both ARCH_BCM2835 and ARCH_BCM270x are built with OF now. Enable Device Tree support for all architectures. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> mmc: bcm2835-mmc: fix probe error handling Probe error handling is broken in several places. Simplify error handling by using device managed functions. Replace pr_{err,info} with dev_{err,info}. Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
This commit is contained in:
@@ -399,6 +399,34 @@ static struct platform_device bcm2708_systemtimer_device = {
|
||||
},
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MMC_BCM2835 /* Arasan emmc SD (new) */
|
||||
static struct resource bcm2835_emmc_resources[] = {
|
||||
[0] = {
|
||||
.start = EMMC_BASE,
|
||||
.end = EMMC_BASE + SZ_256 - 1, /* we only need this area */
|
||||
/* the memory map actually makes SZ_4K available */
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = IRQ_ARASANSDIO,
|
||||
.end = IRQ_ARASANSDIO,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static u64 bcm2835_emmc_dmamask = 0xffffffffUL;
|
||||
|
||||
struct platform_device bcm2835_emmc_device = {
|
||||
.name = "mmc-bcm2835",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(bcm2835_emmc_resources),
|
||||
.resource = bcm2835_emmc_resources,
|
||||
.dev = {
|
||||
.dma_mask = &bcm2835_emmc_dmamask,
|
||||
.coherent_dma_mask = 0xffffffffUL},
|
||||
};
|
||||
#endif /* CONFIG_MMC_BCM2835 */
|
||||
|
||||
static struct resource bcm2708_powerman_resources[] = {
|
||||
[0] = {
|
||||
.start = PM_BASE,
|
||||
@@ -524,6 +552,9 @@ void __init bcm2708_init(void)
|
||||
bcm_register_device(&bcm2708_uart1_device);
|
||||
bcm_register_device(&bcm2708_powerman_device);
|
||||
|
||||
#ifdef CONFIG_MMC_BCM2835
|
||||
bcm_register_device(&bcm2835_emmc_device);
|
||||
#endif
|
||||
bcm2708_init_led();
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
|
||||
|
||||
@@ -95,5 +95,9 @@ void mmc_fixup_device(struct mmc_card *card, const struct mmc_fixup *table)
|
||||
f->vendor_fixup(card, f->data);
|
||||
}
|
||||
}
|
||||
/* SDHCI on BCM2708 - bug causes a certain sequence of CMD23 operations to fail.
|
||||
* Disable this flag for all cards (fall-back to CMD25/CMD18 multi-block transfers).
|
||||
*/
|
||||
card->quirks |= MMC_QUIRK_BLK_NO_CMD23;
|
||||
}
|
||||
EXPORT_SYMBOL(mmc_fixup_device);
|
||||
|
||||
@@ -4,6 +4,35 @@
|
||||
|
||||
comment "MMC/SD/SDIO Host Controller Drivers"
|
||||
|
||||
config MMC_BCM2835
|
||||
tristate "MMC support on BCM2835"
|
||||
depends on (MACH_BCM2708 || MACH_BCM2709)
|
||||
help
|
||||
This selects the MMC Interface on BCM2835.
|
||||
|
||||
If you have a controller with this interface, say Y or M here.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config MMC_BCM2835_DMA
|
||||
bool "DMA support on BCM2835 Arasan controller"
|
||||
depends on MMC_BCM2835
|
||||
help
|
||||
Enable DMA support on the Arasan SDHCI controller in Broadcom 2708
|
||||
based chips.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config MMC_BCM2835_PIO_DMA_BARRIER
|
||||
int "Block count limit for PIO transfers"
|
||||
depends on MMC_BCM2835 && MMC_BCM2835_DMA
|
||||
range 0 256
|
||||
default 2
|
||||
help
|
||||
The inclusive limit in bytes under which PIO will be used instead of DMA
|
||||
|
||||
If unsure, say 2 here.
|
||||
|
||||
config MMC_ARMMMCI
|
||||
tristate "ARM AMBA Multimedia Card Interface support"
|
||||
depends on ARM_AMBA
|
||||
|
||||
@@ -18,6 +18,7 @@ obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o
|
||||
obj-$(CONFIG_MMC_SDHCI_SIRF) += sdhci-sirf.o
|
||||
obj-$(CONFIG_MMC_SDHCI_F_SDH30) += sdhci_f_sdh30.o
|
||||
obj-$(CONFIG_MMC_SDHCI_SPEAR) += sdhci-spear.o
|
||||
obj-$(CONFIG_MMC_BCM2835) += bcm2835-mmc.o
|
||||
obj-$(CONFIG_MMC_WBSD) += wbsd.o
|
||||
obj-$(CONFIG_MMC_AU1X) += au1xmmc.o
|
||||
obj-$(CONFIG_MMC_OMAP) += omap.o
|
||||
|
||||
1506
drivers/mmc/host/bcm2835-mmc.c
Normal file
1506
drivers/mmc/host/bcm2835-mmc.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user