On Fri, May 15, 2020 at 04:04:45PM +0200, Ulf Hansson wrote: > Before calling tmio_mmc_host_probe(), the caller is required to enable > clocks for its device, as to make it accessible when reading/writing > registers during probe. > > Therefore, the responsibility to disable these clocks, in the error path of > ->probe() and during ->remove(), is better managed outside > tmio_mmc_host_remove(). As a matter of fact, callers of > tmio_mmc_host_remove() already expects this to be the behaviour. > > However, there's a problem with tmio_mmc_host_remove() when the Kconfig > option, CONFIG_PM, is set. More precisely, tmio_mmc_host_remove() may then > disable the clock via runtime PM, which leads to clock enable/disable > imbalance problems, when the caller of tmio_mmc_host_remove() also tries to > disable the same clocks. > > Reported-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> > Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx> Works fine on my Lager board, too. Imbalance is gone when rebinding, and I can access large files on the SD card. Reviewed-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx> Tested-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature