Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: dw_mmc: display the clock message only one time when card is polling

When card is polling (broken-cd), there is a spamming messge related to
clock.
After applied this patch, display the message only one time at boot
time. It's enough to check which clock values is used.
Also prevent to display the spamming message.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Jaehoon Chung and committed by
Ulf Hansson
e6cd7a8e d10111cf

+13 -1
+12 -1
drivers/mmc/host/dw_mmc.c
··· 1176 1176 1177 1177 div = (host->bus_hz != clock) ? DIV_ROUND_UP(div, 2) : 0; 1178 1178 1179 - if (clock != slot->__clk_old || force_clkinit) 1179 + if ((clock != slot->__clk_old && 1180 + !test_bit(DW_MMC_CARD_NEEDS_POLL, &slot->flags)) || 1181 + force_clkinit) { 1180 1182 dev_info(&slot->mmc->class_dev, 1181 1183 "Bus speed (slot %d) = %dHz (slot req %dHz, actual %dHZ div = %d)\n", 1182 1184 slot->id, host->bus_hz, clock, 1183 1185 div ? ((host->bus_hz / div) >> 1) : 1184 1186 host->bus_hz, div); 1187 + 1188 + /* 1189 + * If card is polling, display the message only 1190 + * one time at boot time. 1191 + */ 1192 + if (slot->mmc->caps & MMC_CAP_NEEDS_POLL && 1193 + slot->mmc->f_min == clock) 1194 + set_bit(DW_MMC_CARD_NEEDS_POLL, &slot->flags); 1195 + } 1185 1196 1186 1197 /* disable clock */ 1187 1198 mci_writel(host, CLKENA, 0);
+1
drivers/mmc/host/dw_mmc.h
··· 272 272 #define DW_MMC_CARD_NEED_INIT 1 273 273 #define DW_MMC_CARD_NO_LOW_PWR 2 274 274 #define DW_MMC_CARD_NO_USE_HOLD 3 275 + #define DW_MMC_CARD_NEEDS_POLL 4 275 276 int id; 276 277 int sdio_id; 277 278 };