mbox series

[v2,0/3] Add hardware unbusy interrupt support for dw_mmc

Message ID 1552376109-126335-1-git-send-email-shawn.lin@rock-chips.com (mailing list archive)
Headers show
Series Add hardware unbusy interrupt support for dw_mmc | expand

Message

Shawn Lin March 12, 2019, 7:35 a.m. UTC
DesignWare MMC controler lacks proper hardware wait
busy support, so the software must check the busy
state if the following tranfser need use data line.
And dw_mci_wait_while_busy() now use busy check mostly
with host's lock hold, and we can't relinguish CPU
at this moment, which makes it rather painful when used
in low-end platform. To solve this, Rockchip invent
a new hardware unbusy interrupt module, which could
generate interrupt if the state machine runs from
busy state into idle state.


Changes in v2:
- add tag from Ziyuan Xu
- remove lock for checking event since it's already atomic operation

Shawn Lin (3):
  mmc: dw_mmc: Check busy state in dw_mci_request()
  mmc: dw_mmc: Add hardware unbusy interrupt support
  mmc: dw_mmc-rockchip: Enable hardware unbusy interrupt support

 drivers/mmc/host/dw_mmc-rockchip.c | 30 ++++++++++++++++++++
 drivers/mmc/host/dw_mmc.c          | 56 +++++++++++++++++++++++++++++++++++++-
 drivers/mmc/host/dw_mmc.h          |  6 ++++
 3 files changed, 91 insertions(+), 1 deletion(-)

Comments

Ulf Hansson March 18, 2019, 10:51 a.m. UTC | #1
On Tue, 12 Mar 2019 at 08:36, Shawn Lin <shawn.lin@rock-chips.com> wrote:
>
>
> DesignWare MMC controler lacks proper hardware wait
> busy support, so the software must check the busy
> state if the following tranfser need use data line.
> And dw_mci_wait_while_busy() now use busy check mostly
> with host's lock hold, and we can't relinguish CPU
> at this moment, which makes it rather painful when used
> in low-end platform. To solve this, Rockchip invent
> a new hardware unbusy interrupt module, which could
> generate interrupt if the state machine runs from
> busy state into idle state.
>
>
> Changes in v2:
> - add tag from Ziyuan Xu
> - remove lock for checking event since it's already atomic operation
>
> Shawn Lin (3):
>   mmc: dw_mmc: Check busy state in dw_mci_request()
>   mmc: dw_mmc: Add hardware unbusy interrupt support
>   mmc: dw_mmc-rockchip: Enable hardware unbusy interrupt support
>
>  drivers/mmc/host/dw_mmc-rockchip.c | 30 ++++++++++++++++++++
>  drivers/mmc/host/dw_mmc.c          | 56 +++++++++++++++++++++++++++++++++++++-
>  drivers/mmc/host/dw_mmc.h          |  6 ++++
>  3 files changed, 91 insertions(+), 1 deletion(-)
>
> --
> 1.9.1
>
>
>

Applied for next, thanks!

Kind regards
Uffe