mmc: tmio: add hook for custom busy_wait calculation
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 25 Nov 2020 21:30:00 +0000 (22:30 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Fri, 4 Dec 2020 12:30:04 +0000 (13:30 +0100)
commit58959f89dd3d8cc8bedcd2d665496603098b29a2
tree3843a3c0575b4f51f0edfee06d81362fbb2fbef0
parent30ae3e13caeaa47884c222ebf5711ce27ed25f19
mmc: tmio: add hook for custom busy_wait calculation

Newer SDHI variants can 'wait while busy' longer than the generic TMIO.
Provide a hook to get the maximum cycle count to wait for. If the hook
is not populated, fall back to a generic version which works well with
all older TMIO/SDHI variants.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20201125213001.15003-3-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/tmio_mmc.h
drivers/mmc/host/tmio_mmc_core.c