
Hi,
On 11/3/20 1:16 AM, Biju Das wrote:
Add SDHI quirks for R-Car H3 and RZ/G2H SoC.
Does it needs to use quirks? IMO, Using fixup for each SoC is better than quirks.
Best Regards, Jaehoon Chung
Signed-off-by: Biju Das biju.das.jz@bp.renesas.com Reviewed-by: Lad Prabhakar prabhakar.mahadev-lad.rj@bp.renesas.com
v6: New patch. Quirks using soc_device_match.
drivers/mmc/renesas-sdhi.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c index 0e4a44d973..e19daf8bf8 100644 --- a/drivers/mmc/renesas-sdhi.c +++ b/drivers/mmc/renesas-sdhi.c @@ -875,6 +875,16 @@ static const struct renesas_sdhi_quirks sdhi_quirks_4tap_nohs400 = { .hs400_4taps = true, };
+static const struct renesas_sdhi_quirks sdhi_quirks_4tap = {
- .hs400_4taps = true,
- .hs400_bad_taps = BIT(2) | BIT(3) | BIT(6) | BIT(7),
+};
+static const struct renesas_sdhi_quirks sdhi_quirks_r8a7795_es30 = {
- .hs400_bad_taps = BIT(2) | BIT(3) | BIT(6) | BIT(7),
- .hs400_calib_table = r8a7795_calib_table,
+};
static const struct renesas_sdhi_quirks sdhi_quirks_r8a7796_es12 = { .hs400_4taps = true, .hs400_bad_taps = BIT(2) | BIT(3) | BIT(6) | BIT(7), @@ -916,6 +926,30 @@ static const struct soc_attr sdhi_quirks_match[] = { { .soc_id = "r8a774b1", .data = &sdhi_quirks_r8a77965 },
- { .soc_id = "r8a774e1",
.revision = "ES2.0",
.data = &sdhi_quirks_4tap
- },
- { .soc_id = "r8a774e1",
.revision = "ES3.0",
.data = &sdhi_quirks_r8a7795_es30
- },
- { .soc_id = "r8a7795",
.revision = "ES1.0",
.data = &sdhi_quirks_4tap_nohs400_b17_dtrend
- },
- { .soc_id = "r8a7795",
.revision = "ES1.1",
.data = &sdhi_quirks_4tap_nohs400_b17_dtrend
- },
- { .soc_id = "r8a7795",
.revision = "ES2.0",
.data = &sdhi_quirks_4tap
- },
- { .soc_id = "r8a7795",
.revision = "ES3.0",
.data = &sdhi_quirks_r8a7795_es30
- }, { .soc_id = "r8a7796", .revision = "ES1.0", .data = &sdhi_quirks_4tap_nohs400_b17_dtrend
@@ -965,7 +999,8 @@ static void renesas_sdhi_add_quirks(struct tmio_sd_plat *plat, if (quirks == &sdhi_quirks_r8a7796_es12 || quirks == &sdhi_quirks_r8a77965) priv->adjust_hs400_offset = 3;
else if (quirks == &sdhi_quirks_r8a7796_es13)
else if (quirks == &sdhi_quirks_r8a7796_es13 ||
}quirks == &sdhi_quirks_r8a7795_es30) priv->adjust_hs400_offset = 0;
}