Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mmc: dw_mmc: Move rstc from struct dw_mci_board to struct dw_mci

Nobody using dw_mci_board passes in rstc, move it to the common struct
dw_mci needed by all users.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Shawn Lin and committed by
Ulf Hansson
d917f35c cea6e1a1

+12 -10
+8 -8
drivers/mmc/host/dw_mmc.c
··· 3166 3166 return ERR_PTR(-ENOMEM); 3167 3167 3168 3168 /* find reset controller when exist */ 3169 - pdata->rstc = devm_reset_control_get_optional_exclusive(dev, "reset"); 3170 - if (IS_ERR(pdata->rstc)) 3171 - return ERR_CAST(pdata->rstc); 3169 + host->rstc = devm_reset_control_get_optional_exclusive(dev, "reset"); 3170 + if (IS_ERR(host->rstc)) 3171 + return ERR_CAST(host->rstc); 3172 3172 3173 3173 if (device_property_read_u32(dev, "fifo-depth", &pdata->fifo_depth)) 3174 3174 dev_info(dev, ··· 3299 3299 goto err_clk_ciu; 3300 3300 } 3301 3301 3302 - if (host->pdata->rstc) { 3303 - reset_control_assert(host->pdata->rstc); 3302 + if (host->rstc) { 3303 + reset_control_assert(host->rstc); 3304 3304 usleep_range(10, 50); 3305 - reset_control_deassert(host->pdata->rstc); 3305 + reset_control_deassert(host->rstc); 3306 3306 } 3307 3307 3308 3308 if (drv_data && drv_data->init) { ··· 3443 3443 if (host->use_dma && host->dma_ops->exit) 3444 3444 host->dma_ops->exit(host); 3445 3445 3446 - reset_control_assert(host->pdata->rstc); 3446 + reset_control_assert(host->rstc); 3447 3447 3448 3448 err_clk_ciu: 3449 3449 clk_disable_unprepare(host->ciu_clk); ··· 3470 3470 if (host->use_dma && host->dma_ops->exit) 3471 3471 host->dma_ops->exit(host); 3472 3472 3473 - reset_control_assert(host->pdata->rstc); 3473 + reset_control_assert(host->rstc); 3474 3474 3475 3475 clk_disable_unprepare(host->ciu_clk); 3476 3476 clk_disable_unprepare(host->biu_clk);
+4 -2
drivers/mmc/host/dw_mmc.h
··· 130 130 * @ctype: Card type for this host. 131 131 * @clock: Clock rate configured by set_ios(). Protected by host->lock. 132 132 * @clk_old: The last clock value that was requested from core. 133 + * @pdev: platform_device registered 134 + * @rstc: Reset controller for this host. 133 135 * 134 136 * Locking 135 137 * ======= ··· 251 249 u32 ctype; 252 250 unsigned int clock; 253 251 unsigned int clk_old; 252 + struct platform_device *pdev; 253 + struct reset_control *rstc; 254 254 }; 255 255 256 256 /* DMA ops for Internal/External DMAC interface */ ··· 280 276 281 277 /* delay in mS before detecting cards after interrupt */ 282 278 u32 detect_delay_ms; 283 - 284 - struct reset_control *rstc; 285 279 }; 286 280 287 281 /* Support for longer data read timeout */