mmc: sdhci: Do not use spin lock in set_ios paths
The spin lock is not necessary in set_ios. Anything that is racing with changes to the I/O state is already broken. The mmc core already provides synchronization via "claiming" the host. So remove spin_lock and friends from sdhci_set_ios and related callbacks. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
This commit is contained in:

committed by
Ulf Hansson

parent
0c62e6752d
commit
d1e4f74f91
@@ -190,9 +190,7 @@ static unsigned int sdhci_s3c_consider_clock(struct sdhci_s3c *ourhost,
|
||||
* speed possible with selected clock source and skip the division.
|
||||
*/
|
||||
if (ourhost->no_divider) {
|
||||
spin_unlock_irq(&ourhost->host->lock);
|
||||
rate = clk_round_rate(clksrc, wanted);
|
||||
spin_lock_irq(&ourhost->host->lock);
|
||||
return wanted - rate;
|
||||
}
|
||||
|
||||
@@ -389,9 +387,7 @@ static void sdhci_cmu_set_clock(struct sdhci_host *host, unsigned int clock)
|
||||
clk &= ~SDHCI_CLOCK_CARD_EN;
|
||||
sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
|
||||
|
||||
spin_unlock_irq(&host->lock);
|
||||
ret = clk_set_rate(ourhost->clk_bus[ourhost->cur_clk], clock);
|
||||
spin_lock_irq(&host->lock);
|
||||
if (ret != 0) {
|
||||
dev_err(dev, "%s: failed to set clock rate %uHz\n",
|
||||
mmc_hostname(host->mmc), clock);
|
||||
|
Reference in New Issue
Block a user