diff options
author | Jean-Jacques Hiblot <jjhiblot@ti.com> | 2019-07-02 10:53:52 +0200 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2019-07-15 10:16:49 +0800 |
commit | 863d10044aae5ee40a9cf9a76aed62822cf45c30 (patch) | |
tree | 2f187064b64757fe5f0bbb0bd6b03271818190b2 /drivers/mmc/mmc_write.c | |
parent | c2c22b9df3f7e01a60a01a4b4a5d3dda95bac0bc (diff) |
mmc: add mmc_poll_for_busy() and change the purpose of mmc_send_status()
mmc_send_status() is currently used to poll the card until it is ready, not
actually returning the status of the card.
Make it return the status and add another function to poll the card.
Also remove the 'extern' declaration in the mmc-private.h header to comply
with the coding standard.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Diffstat (limited to 'drivers/mmc/mmc_write.c')
-rw-r--r-- | drivers/mmc/mmc_write.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/mmc_write.c b/drivers/mmc/mmc_write.c index c8c83c9188..02648b0f50 100644 --- a/drivers/mmc/mmc_write.c +++ b/drivers/mmc/mmc_write.c @@ -119,7 +119,7 @@ ulong mmc_berase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt) blk += blk_r; /* Waiting for the ready status */ - if (mmc_send_status(mmc, timeout)) + if (mmc_poll_for_busy(mmc, timeout)) return 0; } @@ -177,7 +177,7 @@ static ulong mmc_write_blocks(struct mmc *mmc, lbaint_t start, } /* Waiting for the ready status */ - if (mmc_send_status(mmc, timeout)) + if (mmc_poll_for_busy(mmc, timeout)) return 0; return blkcnt; |