mbox series

[v2,0/3] mmc: renesas_sdhi: extend quirk selection to handle ES revisions

Message ID 20181031231340.1958-1-niklas.soderlund@ragnatech.se (mailing list archive)
Headers show
Series mmc: renesas_sdhi: extend quirk selection to handle ES revisions | expand

Message

Niklas Söderlund Oct. 31, 2018, 11:13 p.m. UTC
From: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Hi,

Recent datasheet updates have made it clear that some quirks are not SoC
specific but SoC + ES version specific. Currently the quirks are
selected using compatibility values but whit this new information that
is not enough.

Patch 1/3 adds support to select quirks based on SoC + ES revision using 
soc_device_match() and converts the only existing quirk. Patch 2/3 
Removes the old method to select quirk based on compatibility string.  
While Patch 3/3 adds a new quirk from the BSP which blacklists some 
known problematic ES versions for HS400. HS400 is not yet enabled 
upstream so blacklisting these ES versions is not a regression of 
functionality.

Based on mmc/next and tested on H3 and M3-N.

Niklas Söderlund (3):
  mmc: renesas_sdhi: handle 4tap hs400 mode quirk based on SoC revision
  mmc: renesas_sdhi: align compatibility properties for H3 and M3-W
  mmc: renesas_sdhi: disable HS400 on H3 ES1.x and M3-W ES1.x

 drivers/mmc/host/renesas_sdhi_core.c          | 36 +++++++++++++++++++
 drivers/mmc/host/renesas_sdhi_internal_dmac.c | 20 ++---------
 drivers/mmc/host/renesas_sdhi_sys_dmac.c      | 20 ++---------
 3 files changed, 41 insertions(+), 35 deletions(-)

Comments

Wolfram Sang Nov. 1, 2018, 7:34 p.m. UTC | #1
> Patch 1/3 adds support to select quirks based on SoC + ES revision using 
> soc_device_match() and converts the only existing quirk. Patch 2/3 
> Removes the old method to select quirk based on compatibility string.  
> While Patch 3/3 adds a new quirk from the BSP which blacklists some 
> known problematic ES versions for HS400. HS400 is not yet enabled 
> upstream so blacklisting these ES versions is not a regression of 
> functionality.

This will allow us even to get rid of the TMIO_MMC_HAVE_4TAP_HS400 flag
entirely because we now use it only within the Renesas part of SDHI. We
want to do this incrementally, though, because we first want to get the
HS400 feature enabled as the first step.
Wolfram Sang Nov. 1, 2018, 7:36 p.m. UTC | #2
All patches tested on M3N:

Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Simon Horman Nov. 2, 2018, 11:54 a.m. UTC | #3
On Thu, Nov 01, 2018 at 08:34:16PM +0100, Wolfram Sang wrote:
> 
> > Patch 1/3 adds support to select quirks based on SoC + ES revision using 
> > soc_device_match() and converts the only existing quirk. Patch 2/3 
> > Removes the old method to select quirk based on compatibility string.  
> > While Patch 3/3 adds a new quirk from the BSP which blacklists some 
> > known problematic ES versions for HS400. HS400 is not yet enabled 
> > upstream so blacklisting these ES versions is not a regression of 
> > functionality.
> 
> This will allow us even to get rid of the TMIO_MMC_HAVE_4TAP_HS400 flag
> entirely because we now use it only within the Renesas part of SDHI. We
> want to do this incrementally, though, because we first want to get the
> HS400 feature enabled as the first step.

Thanks, this looks good to me.

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Ulf Hansson Nov. 19, 2018, 12:08 p.m. UTC | #4
On 1 November 2018 at 00:13, Niklas Söderlund
<niklas.soderlund@ragnatech.se> wrote:
> From: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
>
> Hi,
>
> Recent datasheet updates have made it clear that some quirks are not SoC
> specific but SoC + ES version specific. Currently the quirks are
> selected using compatibility values but whit this new information that
> is not enough.
>
> Patch 1/3 adds support to select quirks based on SoC + ES revision using
> soc_device_match() and converts the only existing quirk. Patch 2/3
> Removes the old method to select quirk based on compatibility string.
> While Patch 3/3 adds a new quirk from the BSP which blacklists some
> known problematic ES versions for HS400. HS400 is not yet enabled
> upstream so blacklisting these ES versions is not a regression of
> functionality.
>
> Based on mmc/next and tested on H3 and M3-N.
>
> Niklas Söderlund (3):
>   mmc: renesas_sdhi: handle 4tap hs400 mode quirk based on SoC revision
>   mmc: renesas_sdhi: align compatibility properties for H3 and M3-W
>   mmc: renesas_sdhi: disable HS400 on H3 ES1.x and M3-W ES1.x
>
>  drivers/mmc/host/renesas_sdhi_core.c          | 36 +++++++++++++++++++
>  drivers/mmc/host/renesas_sdhi_internal_dmac.c | 20 ++---------
>  drivers/mmc/host/renesas_sdhi_sys_dmac.c      | 20 ++---------
>  3 files changed, 41 insertions(+), 35 deletions(-)
>
> --
> 2.19.1
>

Applied for next, thanks!

I noticed there were a minor comment from Geert, however I decided to
pick this as is and leave further improvements to be made on top.

Kind regards
Uffe
Wolfram Sang Nov. 19, 2018, 12:15 p.m. UTC | #5
> I noticed there were a minor comment from Geert, however I decided to
> pick this as is and leave further improvements to be made on top.

Same here; could we wait for v2?