Hi Niklas, On Mon, Aug 6, 2018 at 9:43 PM Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx> wrote: > 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. Thanks for your patch! > 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. Do you expect to add a lot? If yes... > --- a/drivers/mmc/host/renesas_sdhi_core.c > +++ b/drivers/mmc/host/renesas_sdhi_core.c > @@ -569,6 +588,10 @@ int renesas_sdhi_probe(struct platform_device *pdev, > > of_data = of_device_get_match_data(&pdev->dev); > > + attr = soc_device_match(sdhi_quirks_match); > + if (attr) > + quirks = attr->data; ... you may consider just storing a plain struct renesas_sdhi_of_data in the sdhi_quirks_match[] table. > + > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > if (!res) > return -EINVAL; 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