Skip to content
Commit 490ff95f authored by Ulf Hansson's avatar Ulf Hansson
Browse files

mmc: core: Convert to mmc_poll_for_busy() for HPI commands



Rather than open coding the polling loop in mmc_interrupt_hpi(), let's
convert to use mmc_poll_for_busy().

Note that, moving to mmc_poll_for_busy() for HPI also improves the
behaviour according to below.

- Adds support for polling via the optional ->card_busy() host ops.
- Require R1_READY_FOR_DATA to be set in the CMD13 response before exiting
  the polling loop.
- Adds a throttling mechanism to avoid CPU hogging when polling.

Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Tested-by: default avatarBaolin Wang <baolin.wang7@gmail.com>
Tested-by: default avatarLudovic Barre <ludovic.barre@st.com>
Reviewed-by: default avatarLudovic Barre <ludovic.barre@st.com>
Link: https://lore.kernel.org/r/20200204085449.32585-11-ulf.hansson@linaro.org
parent 9f94d047
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment