staging: mt7621-mmc: Relax cpu while waiting for stable clock
authorChristian Lütke-Stetzkamp <christian@lkamp.de>
Wed, 18 Apr 2018 15:27:28 +0000 (17:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 13:37:49 +0000 (15:37 +0200)
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 <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-mmc/sd.c

index 52e6de51a91b331caf255bc54e19947ebb584ad6..124a763f604945d7fe0425283d9161d58408ebbb 100644 (file)
@@ -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;