diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2016-12-30 15:30:18 +0900 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2017-01-11 19:40:13 +0900 |
commit | 62226b68631b5767814224f70f1afc253474d999 (patch) | |
tree | c3da6d4022e642c8cb0c52a66660f837b215fa71 /drivers/mmc/sdhci.c | |
parent | f73b33ff94a01a9818b04f4d4850ddbf2b144f49 (diff) | |
download | u-boot-imx-62226b68631b5767814224f70f1afc253474d999.zip u-boot-imx-62226b68631b5767814224f70f1afc253474d999.tar.gz u-boot-imx-62226b68631b5767814224f70f1afc253474d999.tar.bz2 |
mmc: sdhci: move the callback function into sdhci_ops
callback function should be moved into sdhci_ops struct.
Other controller can use these ops for controlling clock or their own
specific register.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'drivers/mmc/sdhci.c')
-rw-r--r-- | drivers/mmc/sdhci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 9125e5d..6ce5e8f 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -359,8 +359,8 @@ static int sdhci_set_clock(struct mmc *mmc, unsigned int clock) div >>= 1; } - if (host->set_clock) - host->set_clock(host->index, div); + if (host->ops->set_clock) + host->ops->set_clock(host, div); clk |= (div & SDHCI_DIV_MASK) << SDHCI_DIVIDER_SHIFT; clk |= ((div & SDHCI_DIV_HI_MASK) >> SDHCI_DIV_MASK_LEN) @@ -430,8 +430,8 @@ static int sdhci_set_ios(struct mmc *mmc) u32 ctrl; struct sdhci_host *host = mmc->priv; - if (host->set_control_reg) - host->set_control_reg(host); + if (host->ops->set_control_reg) + host->ops->set_control_reg(host); if (mmc->clock != host->clock) sdhci_set_clock(mmc, mmc->clock); |