Current code just busy waits with nop for clock becoming stable,
relaxing the cpu here improves readability and portability and also
removes a unnecessary difference with the mtk-sd driver.

Signed-off-by: Christian Lütke-Stetzkamp <christ...@lkamp.de>
---
 drivers/staging/mt7621-mmc/sd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 69c554b69566..d702d4d845d1 100644
--- a/drivers/staging/mt7621-mmc/sd.c
+++ b/drivers/staging/mt7621-mmc/sd.c
@@ -618,7 +618,7 @@ static void msdc_set_mclk(struct msdc_host *host, int ddr, 
unsigned int hz)
 
        /* wait clock stable */
        while (!(sdr_read32(MSDC_CFG) & MSDC_CFG_CKSTB))
-               ;
+               cpu_relax();
 
        host->sclk = sclk;
        host->mclk = hz;
-- 
2.16.1

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to