mmc: sh_mobile_sdhi: improve prerequisites for tuning
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Mon, 12 Dec 2016 19:51:22 +0000 (20:51 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 13 Feb 2017 12:19:49 +0000 (13:19 +0100)
commite831ead3b3ddc4227cef10dc63d919fd7242d7b8
tree448b37fc34e829e33f324a6d8fd8d6d4ad86ee9b
parent6ade9a2c2da855ff38e74c4298976400feca968e
mmc: sh_mobile_sdhi: improve prerequisites for tuning

Prerequisites for tuning are the same as for hw_reset. We need an SCC
and a supported mode. Populate the tuning related functions only when
those conditions are met. This also removes a tiny race window.
Previously, the functions were populated when the SCC offset was not
initialized which could have led to an OOPS.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sh_mobile_sdhi.c