Hi Niklas, On Thu, Nov 1, 2018 at 12:15 AM Niklas Söderlund <niklas.soderlund@xxxxxxxxxxxx> wrote: > From: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx> > > Latest datasheet makes it clear that not all ES revisions of the H3 and > M3-W have the 4-tap HS400 mode quirk, currently the quirk is set > unconditionally for these two SoCs. Prepare to handle the quirk based on > SoC revision instead of compatibility value by using soc_device_match() > and set the TMIO_MMC_HAVE_4TAP_HS400 flag explicitly. > > The reason for adding a new quirks struct instead of just a flag is that > looking ahead it seems more quirks needs to be handled in a SoC revision > basis. > > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx> Thanks for your patch! > @@ -602,11 +607,25 @@ static void renesas_sdhi_enable_dma(struct tmio_mmc_host *host, bool enable) > renesas_sdhi_sdbuf_width(host, enable ? width : 16); > } > > +static const struct renesas_sdhi_quirks sdhi_quirks_h3_m3w = { I know this variable is renamed later, but sdhi_quirks_h3_m3w gives the impression it applies to all H3/M3-W variants. What about sdhi_quirks_4tap instead? > + .hs400_4taps = true, > +}; > + > +static const struct soc_device_attribute sdhi_quirks_match[] = { > + { .soc_id = "r8a7795", .revision = "ES1.*", .data = &sdhi_quirks_h3_m3w }, > + { .soc_id = "r8a7795", .revision = "ES2.0", .data = &sdhi_quirks_h3_m3w }, > + { .soc_id = "r8a7796", .revision = "ES1.0", .data = &sdhi_quirks_h3_m3w }, > + { .soc_id = "r8a7796", .revision = "ES1.1", .data = &sdhi_quirks_h3_m3w }, > + { /* Sentinel. */ }, > +}; Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds