On Fri, May 13, 2016 at 11:28:11AM +0900, Simon Horman wrote: > On Thu, May 12, 2016 at 06:50:05PM +0200, Wolfram Sang wrote: > > Hi Simon, > > > > nice you got it working with upstream! Thanks. It still looks a bit too > > much like BSP code, though, so we need to clean it up. I found 'git log > > --grep=tuning drivers/mmc/host' to be useful to get an idea of current > > best practices. > > > > > + bool (*inquiry_tuning)(struct tmio_mmc_host *host); > > > > Do we really need this? I'd think the core will check that tuning only > > gets called when needed. > > Thanks, I'll look into that and in general updating the approach taken > to tuning to reflect that currently taken in mainline. [...] > > Note to self: this is copied from sdhci.c > > It also seems to be copied from an old version of sdhci.c. > So at the very least there seem some updates to be incorporated. On closer inspection I don't think that the loop in sdhci_execute_tuning() implements the correct logic for the R-Car SCC. I'll look into reworking it accordingly.