aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/sdhci.c
diff options
context:
space:
mode:
authorAshok Reddy Soma2021-08-02 23:20:41 -0600
committerMichal Simek2021-08-06 09:35:34 +0200
commit16b593bec7b965044b6157c54b89669894fc2d54 (patch)
tree80f3705042f17f98d42fd633eaff77038cc46383 /drivers/mmc/sdhci.c
parent5ab5d9a44283e90a41185c744be0a11934348970 (diff)
mmc: sdhci: Change prototype of set_delay to return errors
set_delay() has return type as void. If there are any errors while setting tapdelay's it won't be able to return them. Change the prototype of set_delay() in sdhci_ops structure and return the errors from wherever it is called. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers/mmc/sdhci.c')
-rw-r--r--drivers/mmc/sdhci.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index eea4701d8af..2f78da61beb 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -366,6 +366,7 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock)
{
struct sdhci_host *host = mmc->priv;
unsigned int div, clk = 0, timeout;
+ int ret;
/* Wait max 20 ms */
timeout = 200;
@@ -386,8 +387,13 @@ int sdhci_set_clock(struct mmc *mmc, unsigned int clock)
if (clock == 0)
return 0;
- if (host->ops && host->ops->set_delay)
- host->ops->set_delay(host);
+ if (host->ops && host->ops->set_delay) {
+ ret = host->ops->set_delay(host);
+ if (ret) {
+ printf("%s: Error while setting tap delay\n", __func__);
+ return ret;
+ }
+ }
if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
/*