]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
mmc: renesas_sdhi: align compatibility properties for H3 and M3-W
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Wed, 28 Nov 2018 16:18:28 +0000 (17:18 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 17 Dec 2018 07:26:24 +0000 (08:26 +0100)
It was though all ES revisions of H3 and M3-W SoCs required the
TMIO_MMC_HAVE_4TAP_HS400 flag. Recent datasheet updates tells us this is
not true, only early ES revisions of the SoC do.

Since quirk matching based on ES revisions is now used to handle the
flag it's possible to align all Gen3 compatibility properties. This will
allow later ES revisions of H3 and M3-W to use the correct 8-tap HS400
mode.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/renesas_sdhi_internal_dmac.c
drivers/mmc/host/renesas_sdhi_sys_dmac.c

index 57e829223c40e0ee4ae3499da10cd2c9421fa9c0..332c5c60edb3d9c4dc3cc93e713e2835cc463ba7 100644 (file)
@@ -99,22 +99,6 @@ static const struct renesas_sdhi_of_data of_rza2_compatible = {
        .max_segs       = 1,
 };
 
-static const struct renesas_sdhi_of_data of_rcar_r8a7795_compatible = {
-       .tmio_flags     = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_CLK_ACTUAL |
-                         TMIO_MMC_HAVE_CBSY | TMIO_MMC_MIN_RCAR2 |
-                         TMIO_MMC_HAVE_4TAP_HS400,
-       .capabilities   = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
-                         MMC_CAP_CMD23,
-       .capabilities2  = MMC_CAP2_NO_WRITE_PROTECT,
-       .bus_shift      = 2,
-       .scc_offset     = 0x1000,
-       .taps           = rcar_gen3_scc_taps,
-       .taps_num       = ARRAY_SIZE(rcar_gen3_scc_taps),
-       /* DMAC can handle 0xffffffff blk count but only 1 segment */
-       .max_blk_count  = 0xffffffff,
-       .max_segs       = 1,
-};
-
 static const struct renesas_sdhi_of_data of_rcar_gen3_compatible = {
        .tmio_flags     = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_CLK_ACTUAL |
                          TMIO_MMC_HAVE_CBSY | TMIO_MMC_MIN_RCAR2,
@@ -133,8 +117,8 @@ 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-r7s9210", .data = &of_rza2_compatible, },
        { .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,sdhi-r8a7795", .data = &of_rcar_gen3_compatible, },
+       { .compatible = "renesas,sdhi-r8a7796", .data = &of_rcar_gen3_compatible, },
        { .compatible = "renesas,rcar-gen3-sdhi", .data = &of_rcar_gen3_compatible, },
        {},
 };
index 1a4016f635d398c28ca9edc5cf202eae6776ffa7..8471160316e073c5fee142b3393ea57c9d9f4e0a 100644 (file)
@@ -75,19 +75,6 @@ static struct renesas_sdhi_scc rcar_gen3_scc_taps[] = {
        },
 };
 
-static const struct renesas_sdhi_of_data of_rcar_r8a7795_compatible = {
-       .tmio_flags     = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_CLK_ACTUAL |
-                         TMIO_MMC_HAVE_CBSY | TMIO_MMC_MIN_RCAR2 |
-                         TMIO_MMC_HAVE_4TAP_HS400,
-       .capabilities   = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
-                         MMC_CAP_CMD23,
-       .capabilities2  = MMC_CAP2_NO_WRITE_PROTECT,
-       .bus_shift      = 2,
-       .scc_offset     = 0x1000,
-       .taps           = rcar_gen3_scc_taps,
-       .taps_num       = ARRAY_SIZE(rcar_gen3_scc_taps),
-};
-
 static const struct renesas_sdhi_of_data of_rcar_gen3_compatible = {
        .tmio_flags     = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_CLK_ACTUAL |
                          TMIO_MMC_HAVE_CBSY | TMIO_MMC_MIN_RCAR2,
@@ -114,8 +101,8 @@ static const struct of_device_id renesas_sdhi_sys_dmac_of_match[] = {
        { .compatible = "renesas,sdhi-r8a7792", .data = &of_rcar_gen2_compatible, },
        { .compatible = "renesas,sdhi-r8a7793", .data = &of_rcar_gen2_compatible, },
        { .compatible = "renesas,sdhi-r8a7794", .data = &of_rcar_gen2_compatible, },
-       { .compatible = "renesas,sdhi-r8a7795", .data = &of_rcar_r8a7795_compatible, },
-       { .compatible = "renesas,sdhi-r8a7796", .data = &of_rcar_r8a7795_compatible, },
+       { .compatible = "renesas,sdhi-r8a7795", .data = &of_rcar_gen3_compatible, },
+       { .compatible = "renesas,sdhi-r8a7796", .data = &of_rcar_gen3_compatible, },
        { .compatible = "renesas,rcar-gen1-sdhi", .data = &of_rcar_gen1_compatible, },
        { .compatible = "renesas,rcar-gen2-sdhi", .data = &of_rcar_gen2_compatible, },
        { .compatible = "renesas,rcar-gen3-sdhi", .data = &of_rcar_gen3_compatible, },
@@ -493,8 +480,7 @@ static const struct soc_device_attribute gen3_soc_whitelist[] = {
 
 static int renesas_sdhi_sys_dmac_probe(struct platform_device *pdev)
 {
-       if ((of_device_get_match_data(&pdev->dev) == &of_rcar_gen3_compatible ||
-           of_device_get_match_data(&pdev->dev) == &of_rcar_r8a7795_compatible) &&
+       if (of_device_get_match_data(&pdev->dev) == &of_rcar_gen3_compatible &&
            !soc_device_match(gen3_soc_whitelist))
                return -ENODEV;