mmc: tmio: move clk_enable/disable out of tmio_mmc_host_probe()
The clock is enabled in the tmio_mmc_host_probe(). It also prevents drivers from performing platform-specific settings before mmc_add_host() because the register access generally requires a clock. Enable/disable the clock in drivers' probe/remove. Also, I passed tmio_mmc_data to tmio_mmc_host_alloc() because renesas_sdhi_clk_enable() needs it to get the private data from tmio_mmc_host. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
此提交包含在:
@@ -92,7 +92,7 @@ static int tmio_mmc_probe(struct platform_device *pdev)
|
||||
|
||||
pdata->flags |= TMIO_MMC_HAVE_HIGH_REG;
|
||||
|
||||
host = tmio_mmc_host_alloc(pdev);
|
||||
host = tmio_mmc_host_alloc(pdev, pdata);
|
||||
if (IS_ERR(host)) {
|
||||
ret = PTR_ERR(host);
|
||||
goto cell_disable;
|
||||
@@ -101,7 +101,10 @@ static int tmio_mmc_probe(struct platform_device *pdev)
|
||||
/* SD control register space size is 0x200, 0x400 for bus_shift=1 */
|
||||
host->bus_shift = resource_size(res) >> 10;
|
||||
|
||||
ret = tmio_mmc_host_probe(host, pdata, NULL);
|
||||
host->mmc->f_max = pdata->hclk;
|
||||
host->mmc->f_min = pdata->hclk / 512;
|
||||
|
||||
ret = tmio_mmc_host_probe(host, NULL);
|
||||
if (ret)
|
||||
goto host_free;
|
||||
|
||||
|
新增問題並參考
封鎖使用者