mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 04:23:35 +02:00
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>
This commit is contained in:
parent
cea6e1a151
commit
d917f35c33
|
|
@ -3166,9 +3166,9 @@ static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host)
|
|||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
/* find reset controller when exist */
|
||||
pdata->rstc = devm_reset_control_get_optional_exclusive(dev, "reset");
|
||||
if (IS_ERR(pdata->rstc))
|
||||
return ERR_CAST(pdata->rstc);
|
||||
host->rstc = devm_reset_control_get_optional_exclusive(dev, "reset");
|
||||
if (IS_ERR(host->rstc))
|
||||
return ERR_CAST(host->rstc);
|
||||
|
||||
if (device_property_read_u32(dev, "fifo-depth", &pdata->fifo_depth))
|
||||
dev_info(dev,
|
||||
|
|
@ -3299,10 +3299,10 @@ int dw_mci_probe(struct dw_mci *host)
|
|||
goto err_clk_ciu;
|
||||
}
|
||||
|
||||
if (host->pdata->rstc) {
|
||||
reset_control_assert(host->pdata->rstc);
|
||||
if (host->rstc) {
|
||||
reset_control_assert(host->rstc);
|
||||
usleep_range(10, 50);
|
||||
reset_control_deassert(host->pdata->rstc);
|
||||
reset_control_deassert(host->rstc);
|
||||
}
|
||||
|
||||
if (drv_data && drv_data->init) {
|
||||
|
|
@ -3443,7 +3443,7 @@ int dw_mci_probe(struct dw_mci *host)
|
|||
if (host->use_dma && host->dma_ops->exit)
|
||||
host->dma_ops->exit(host);
|
||||
|
||||
reset_control_assert(host->pdata->rstc);
|
||||
reset_control_assert(host->rstc);
|
||||
|
||||
err_clk_ciu:
|
||||
clk_disable_unprepare(host->ciu_clk);
|
||||
|
|
@ -3470,7 +3470,7 @@ void dw_mci_remove(struct dw_mci *host)
|
|||
if (host->use_dma && host->dma_ops->exit)
|
||||
host->dma_ops->exit(host);
|
||||
|
||||
reset_control_assert(host->pdata->rstc);
|
||||
reset_control_assert(host->rstc);
|
||||
|
||||
clk_disable_unprepare(host->ciu_clk);
|
||||
clk_disable_unprepare(host->biu_clk);
|
||||
|
|
|
|||
|
|
@ -130,6 +130,8 @@ struct dw_mci_dma_slave {
|
|||
* @ctype: Card type for this host.
|
||||
* @clock: Clock rate configured by set_ios(). Protected by host->lock.
|
||||
* @clk_old: The last clock value that was requested from core.
|
||||
* @pdev: platform_device registered
|
||||
* @rstc: Reset controller for this host.
|
||||
*
|
||||
* Locking
|
||||
* =======
|
||||
|
|
@ -249,6 +251,8 @@ struct dw_mci {
|
|||
u32 ctype;
|
||||
unsigned int clock;
|
||||
unsigned int clk_old;
|
||||
struct platform_device *pdev;
|
||||
struct reset_control *rstc;
|
||||
};
|
||||
|
||||
/* DMA ops for Internal/External DMAC interface */
|
||||
|
|
@ -276,8 +280,6 @@ struct dw_mci_board {
|
|||
|
||||
/* delay in mS before detecting cards after interrupt */
|
||||
u32 detect_delay_ms;
|
||||
|
||||
struct reset_control *rstc;
|
||||
};
|
||||
|
||||
/* Support for longer data read timeout */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user