[PATCH 09/31] staging: mt7621-mmc: Relax cpu while waiting for stable clock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
---
 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
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux