Skip to content

Commit 3fc7eae

Browse files
shawn1221storulf
authored andcommitted
mmc: dw_mmc: Add external dma interface support
DesignWare MMC Controller can supports two types of DMA mode: external dma and internal dma. We get a RK312x platform integrated dw_mmc and ARM pl330 dma controller. This patch add edmac ops to support these platforms. I've tested it on RK31xx platform with edmac mode and RK3288 platform with idmac mode. Signed-off-by: Shawn Lin <[email protected]> Signed-off-by: Jaehoon Chung <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
1 parent 9e4703d commit 3fc7eae

File tree

5 files changed

+246
-64
lines changed

5 files changed

+246
-64
lines changed

drivers/mmc/host/Kconfig

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -615,15 +615,7 @@ config MMC_DW
615615
help
616616
This selects support for the Synopsys DesignWare Mobile Storage IP
617617
block, this provides host support for SD and MMC interfaces, in both
618-
PIO and external DMA modes.
619-
620-
config MMC_DW_IDMAC
621-
bool "Internal DMAC interface"
622-
depends on MMC_DW
623-
help
624-
This selects support for the internal DMAC block within the Synopsys
625-
Designware Mobile Storage IP block. This disables the external DMA
626-
interface.
618+
PIO, internal DMA mode and external DMA mode.
627619

628620
config MMC_DW_PLTFM
629621
tristate "Synopsys Designware MCI Support as platform device"
@@ -652,7 +644,6 @@ config MMC_DW_K3
652644
tristate "K3 specific extensions for Synopsys DW Memory Card Interface"
653645
depends on MMC_DW
654646
select MMC_DW_PLTFM
655-
select MMC_DW_IDMAC
656647
help
657648
This selects support for Hisilicon K3 SoC specific extensions to the
658649
Synopsys DesignWare Memory Card Interface driver. Select this option

drivers/mmc/host/dw_mmc-pltfm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ int dw_mci_pltfm_register(struct platform_device *pdev,
5959
host->pdata = pdev->dev.platform_data;
6060

6161
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
62+
/* Get registers' physical base address */
63+
host->phy_regs = (void *)(regs->start);
6264
host->regs = devm_ioremap_resource(&pdev->dev, regs);
6365
if (IS_ERR(host->regs))
6466
return PTR_ERR(host->regs);

0 commit comments

Comments
 (0)