X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=drivers%2Fmmc%2Fhost%2Fbcm2835.c;h=0d3b7473bc218b563c71706b40b7987099ac1dec;hb=adb76b70cba59d2fe131dd526a20d409f01fe4d2;hp=229dc18f0581beb26733222be97f981b2038fb60;hpb=0f0d12728e56c94d3289c6831243b6faeae8a19d;p=mirror_ubuntu-bionic-kernel.git diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index 229dc18f0581..0d3b7473bc21 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c @@ -1265,7 +1265,8 @@ static int bcm2835_add_host(struct bcm2835_host *host) char pio_limit_string[20]; int ret; - mmc->f_max = host->max_clk; + if (!mmc->f_max || mmc->f_max > host->max_clk) + mmc->f_max = host->max_clk; mmc->f_min = host->max_clk / SDCDIV_MAX_CDIV; mmc->max_busy_timeout = ~0 / (mmc->f_max / 1000); @@ -1426,6 +1427,8 @@ static int bcm2835_probe(struct platform_device *pdev) err: dev_dbg(dev, "%s -> err %d\n", __func__, ret); + if (host->dma_chan_rxtx) + dma_release_channel(host->dma_chan_rxtx); mmc_free_host(mmc); return ret;