]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: core: Convert to mmc_poll_for_busy() for HPI commands
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 4 Feb 2020 08:54:47 +0000 (09:54 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 24 Mar 2020 13:35:40 +0000 (14:35 +0100)
commit5ada55a737d7779b9b2734e0a58b43b553bff4fb
treea967edb18f3d0aab43101892b8f71dd887064d69
parent36bf54da28fdc49f21c27d916c657bfa9ce3fc06
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: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Baolin Wang <baolin.wang7@gmail.com>
Tested-by: Ludovic Barre <ludovic.barre@st.com>
Reviewed-by: Ludovic Barre <ludovic.barre@st.com>
Link: https://lore.kernel.org/r/20200204085449.32585-11-ulf.hansson@linaro.org
drivers/mmc/core/mmc_ops.c
drivers/mmc/core/mmc_ops.h