From d1eade674e2edc68e5b23d26c70440a4f0cc3750 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20L=C3=BCtke-Stetzkamp?= Date: Wed, 18 Apr 2018 17:27:28 +0200 Subject: [PATCH] staging: mt7621-mmc: Relax cpu while waiting for stable clock MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Greg Kroah-Hartman --- 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 52e6de51a91b..124a763f6049 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.34.1