diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2016-12-30 06:30:18 (GMT) |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2017-01-11 10:40:13 (GMT) |
commit | 62226b68631b5767814224f70f1afc253474d999 (patch) | |
tree | c3da6d4022e642c8cb0c52a66660f837b215fa71 /drivers/mmc/s5p_sdhci.c | |
parent | f73b33ff94a01a9818b04f4d4850ddbf2b144f49 (diff) | |
download | u-boot-fsl-qoriq-62226b68631b5767814224f70f1afc253474d999.tar.xz |
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/s5p_sdhci.c')
-rw-r--r-- | drivers/mmc/s5p_sdhci.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c index 2a4cdc0..1f1d2ed 100644 --- a/drivers/mmc/s5p_sdhci.c +++ b/drivers/mmc/s5p_sdhci.c @@ -79,6 +79,11 @@ static void s5p_set_clock(struct sdhci_host *host, u32 div) set_mmc_clk(host->index, div); } +static const struct sdhci_ops s5p_sdhci_ops = { + .set_clock = &s5p_set_clock, + .set_control_reg = &s5p_sdhci_set_control_reg, +}; + static int s5p_sdhci_core_init(struct sdhci_host *host) { host->name = S5P_NAME; @@ -87,9 +92,7 @@ static int s5p_sdhci_core_init(struct sdhci_host *host) SDHCI_QUIRK_32BIT_DMA_ADDR | SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_USE_WIDE8; host->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195; - - host->set_control_reg = &s5p_sdhci_set_control_reg; - host->set_clock = &s5p_set_clock; + host->ops = &s5p_sdhci_ops; if (host->bus_width == 8) host->host_caps |= MMC_MODE_8BIT; |