mmc: renesas_sdhi: Add r8a77470 SDHI1 support
authorFabrizio Castro <fabrizio.castro@bp.renesas.com>
Mon, 8 Oct 2018 08:51:49 +0000 (09:51 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 15 Oct 2018 12:39:17 +0000 (14:39 +0200)
The RZ/G1C (a.k.a. R8A77470) comes with three SDHI interfaces,
SDHI0 and SDHI2 are compatible with the R-Car Gen2 SDHIs, SDHI1
is compatible with R-Car Gen3 SDHIs and it can be used as
eMMC as well. This patch adds driver compatibility, and makes
sure both drivers get compiled for the R8A77470.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Biju Das <biju.das@bp.renesas.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/Kconfig
drivers/mmc/host/renesas_sdhi_internal_dmac.c

index b321e2c..1b58739 100644 (file)
@@ -646,9 +646,9 @@ config MMC_SDHI_SYS_DMAC
 
 config MMC_SDHI_INTERNAL_DMAC
        tristate "DMA for SDHI SD/SDIO controllers using on-chip bus mastering"
-       depends on ARM64 || COMPILE_TEST
+       depends on ARM64 || ARCH_R8A77470 || COMPILE_TEST
        depends on MMC_SDHI
-       default MMC_SDHI if ARM64
+       default MMC_SDHI if (ARM64 || ARCH_R8A77470)
        help
          This provides DMA support for SDHI SD/SDIO controllers
          using on-chip bus mastering. This supports the controllers
index e5e5015..e729c39 100644 (file)
@@ -113,6 +113,7 @@ static const struct renesas_sdhi_of_data of_rcar_gen3_compatible = {
 };
 
 static const struct of_device_id renesas_sdhi_internal_dmac_of_match[] = {
+       { .compatible = "renesas,sdhi-mmc-r8a77470", .data = &of_rcar_gen3_compatible, },
        { .compatible = "renesas,sdhi-r8a7795", .data = &of_rcar_r8a7795_compatible, },
        { .compatible = "renesas,sdhi-r8a7796", .data = &of_rcar_r8a7795_compatible, },
        { .compatible = "renesas,rcar-gen3-sdhi", .data = &of_rcar_gen3_compatible, },
@@ -288,7 +289,7 @@ static const struct tmio_mmc_dma_ops renesas_sdhi_internal_dmac_dma_ops = {
  * Whitelist of specific R-Car Gen3 SoC ES versions to use this DMAC
  * implementation as others may use a different implementation.
  */
-static const struct soc_device_attribute gen3_soc_whitelist[] = {
+static const struct soc_device_attribute soc_whitelist[] = {
        /* specific ones */
        { .soc_id = "r8a7795", .revision = "ES1.*",
          .data = (void *)BIT(SDHI_INTERNAL_DMAC_ONE_RX_ONLY) },
@@ -296,6 +297,7 @@ static const struct soc_device_attribute gen3_soc_whitelist[] = {
          .data = (void *)BIT(SDHI_INTERNAL_DMAC_ONE_RX_ONLY) },
        /* generic ones */
        { .soc_id = "r8a774a1" },
+       { .soc_id = "r8a77470" },
        { .soc_id = "r8a7795" },
        { .soc_id = "r8a7796" },
        { .soc_id = "r8a77965" },
@@ -307,7 +309,7 @@ static const struct soc_device_attribute gen3_soc_whitelist[] = {
 
 static int renesas_sdhi_internal_dmac_probe(struct platform_device *pdev)
 {
-       const struct soc_device_attribute *soc = soc_device_match(gen3_soc_whitelist);
+       const struct soc_device_attribute *soc = soc_device_match(soc_whitelist);
        struct device *dev = &pdev->dev;
 
        if (!soc)