History

Merge tag 'mmc-v4.8-rc7' of git://git.linaro.org/people/ulf.hansson/mmc

Pull MMC fix from Ulf Hansson: "MMC host: - dw_mmc: fix the spamming log message" * tag 'mmc-v4.8-rc7' of git://git.linaro.org/people/ulf.hansson/mmc: mmc: dw_mmc: fix the spamming log message

Linus Torvalds committed 10 years ago

Commit e7c54122 parents e47f2e5 005d6752 files · +12 −5Browse files

Unified · Split

2 files
  1. drivers/mmc/host/dw_mmc.c +9 −5
  2. drivers/mmc/host/dw_mmc.h +3 −0
drivers/mmc/host/dw_mmc.c+9−5
@@ -1112,11 +1112,12 @@ static void dw_mci_setup_bus(struct dw_mci_slot *slot, bool force_clkinit) · 1111 unmodified lines
11121112
11131113 div = (host->bus_hz != clock) ? DIV_ROUND_UP(div, 2) : 0;
11141114
1115− dev_info(&slot->mmc->class_dev,
1116− "Bus speed (slot %d) = %dHz (slot req %dHz, actual %dHZ div = %d)\n",
1117− slot->id, host->bus_hz, clock,
1118− div ? ((host->bus_hz / div) >> 1) :
1119− host->bus_hz, div);
1115+ if (clock != slot->__clk_old || force_clkinit)
1116+ dev_info(&slot->mmc->class_dev,
1117+ "Bus speed (slot %d) = %dHz (slot req %dHz, actual %dHZ div = %d)\n",
1118+ slot->id, host->bus_hz, clock,
1119+ div ? ((host->bus_hz / div) >> 1) :
1120+ host->bus_hz, div);
11201121
11211122 /* disable clock */
11221123 mci_writel(host, CLKENA, 0);
@@ -1139,6 +1140,9 @@ static void dw_mci_setup_bus(struct dw_mci_slot *slot, bool force_clkinit) · 16 unmodified lines
11391140
11401141 /* inform CIU */
11411142 mci_send_cmd(slot, sdmmc_cmd_bits, 0);
1143+
1144+ /* keep the last clock value that was requested from core */
1145+ slot->__clk_old = clock;
11421146 }
11431147
11441148 host->current_speed = clock;
drivers/mmc/host/dw_mmc.h+3−0
@@ -249,6 +249,8 @@ extern int dw_mci_resume(struct dw_mci *host); · 248 unmodified lines
249249 * @queue_node: List node for placing this node in the @queue list of
250250 * &struct dw_mci.
251251 * @clock: Clock rate configured by set_ios(). Protected by host->lock.
252+ * @__clk_old: The last clock value that was requested from core.
253+ * Keeping track of this helps us to avoid spamming the console.
252254 * @flags: Random state bits associated with the slot.
253255 * @id: Number of this slot.
254256 * @sdio_id: Number of this slot in the SDIO interrupt registers.
@@ -263,6 +265,7 @@ struct dw_mci_slot { · 8 unmodified lines
263265 struct list_head queue_node;
264266
265267 unsigned int clock;
268+ unsigned int __clk_old;
266269
267270 unsigned long flags;
268271 #define DW_MMC_CARD_PRESENT 0

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t