mmc: tmio: factor out common parts of the reset routine
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 20 Aug 2020 13:25:36 +0000 (15:25 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 7 Sep 2020 07:11:31 +0000 (09:11 +0200)
commit576146ea4ed986f44a4406ec32a5d3363216b3d2
treecb0d9aad1e3de08b0c8b04d8a66331c2cc3ca6a2
parenta8c83064e73382d6bb069bd51c56074d1e4f4eec
mmc: tmio: factor out common parts of the reset routine

Some TMIO variants need specific actions in their reset routine, but
they are all based on a generic reset routine. So, the optional 'reset'
callback will now only take care of the additional stuff and we will
have a generic function around it. Less code, easier to maintain, and
much more readable. Code in tmio_mmc.c is untested but in my TC6387XB
datasheet the SDIO part is reset independently from the SD part, too.

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/20200820132538.24758-5-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/renesas_sdhi_core.c
drivers/mmc/host/tmio_mmc.c
drivers/mmc/host/tmio_mmc_core.c