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
Unified · Split
| @@ -1112,11 +1112,12 @@ static void dw_mci_setup_bus(struct dw_mci_slot *slot, bool force_clkinit) · 1111 unmodified lines | |||
| 1112 | 1112 | ||
| 1113 | div = (host->bus_hz != clock) ? DIV_ROUND_UP(div, 2) : 0; | 1113 | div = (host->bus_hz != clock) ? DIV_ROUND_UP(div, 2) : 0; |
| 1114 | 1114 | ||
| 1115 | dev_info(&slot->mmc->class_dev, | 1115 | if (clock != slot->__clk_old || force_clkinit) |
| 1116 | "Bus speed (slot %d) = %dHz (slot req %dHz, actual %dHZ div = %d)\n", | 1116 | dev_info(&slot->mmc->class_dev, |
| 1117 | slot->id, host->bus_hz, clock, | 1117 | "Bus speed (slot %d) = %dHz (slot req %dHz, actual %dHZ div = %d)\n", |
| 1118 | div ? ((host->bus_hz / div) >> 1) : | 1118 | slot->id, host->bus_hz, clock, |
| 1119 | host->bus_hz, div); | 1119 | div ? ((host->bus_hz / div) >> 1) : |
| 1120 | host->bus_hz, div); | ||
| 1120 | 1121 | ||
| 1121 | /* disable clock */ | 1122 | /* disable clock */ |
| 1122 | mci_writel(host, CLKENA, 0); | 1123 | 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 | |||
| 1139 | 1140 | ||
| 1140 | /* inform CIU */ | 1141 | /* inform CIU */ |
| 1141 | mci_send_cmd(slot, sdmmc_cmd_bits, 0); | 1142 | 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; | ||
| 1142 | } | 1146 | } |
| 1143 | 1147 | ||
| 1144 | host->current_speed = clock; | 1148 | host->current_speed = clock; |
| @@ -249,6 +249,8 @@ extern int dw_mci_resume(struct dw_mci *host); · 248 unmodified lines | |||
| 249 | * @queue_node: List node for placing this node in the @queue list of | 249 | * @queue_node: List node for placing this node in the @queue list of |
| 250 | * &struct dw_mci. | 250 | * &struct dw_mci. |
| 251 | * @clock: Clock rate configured by set_ios(). Protected by host->lock. | 251 | * @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. | ||
| 252 | * @flags: Random state bits associated with the slot. | 254 | * @flags: Random state bits associated with the slot. |
| 253 | * @id: Number of this slot. | 255 | * @id: Number of this slot. |
| 254 | * @sdio_id: Number of this slot in the SDIO interrupt registers. | 256 | * @sdio_id: Number of this slot in the SDIO interrupt registers. |
| @@ -263,6 +265,7 @@ struct dw_mci_slot { · 8 unmodified lines | |||
| 263 | struct list_head queue_node; | 265 | struct list_head queue_node; |
| 264 | 266 | ||
| 265 | unsigned int clock; | 267 | unsigned int clock; |
| 268 | unsigned int __clk_old; | ||
| 266 | 269 | ||
| 267 | unsigned long flags; | 270 | unsigned long flags; |
| 268 | #define DW_MMC_CARD_PRESENT 0 | 271 | #define DW_MMC_CARD_PRESENT 0 |