mmc: core: Add host specific tuning support for SD HS mode
authorWenchao Chen <wenchao.chen@unisoc.com>
Fri, 25 Aug 2023 09:17:42 +0000 (17:17 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Fri, 25 Aug 2023 09:45:51 +0000 (11:45 +0200)
commitbac806830fde94ccf41482535fc442c02656febc
tree6a900259ed6315b5f725a8f94869de418b660600
parent48fe8fadbe5e03edfd83315c331b171a9ae245a4
mmc: core: Add host specific tuning support for SD HS mode

To support the need for host specific tuning for SD high-speed mode, let's
add two new optional callbacks, ->prepare|execute_sd_hs_tuning() and let's
call them when switching into the SD high-speed mode.

Note that, during the tuning process it's also needed for host drivers to
send commands to the SD card to verify that the tuning process succeeds.
Therefore, let's also share the corresponding functions from the core to
allow this.

Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com>
Link: https://lore.kernel.org/r/20230825091743.15613-2-wenchao.chen@unisoc.com
[Ulf: Dropped unnecessary function declarations and updated the commit msg]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/mmc_ops.h
drivers/mmc/core/sd.c
drivers/mmc/core/sd_ops.c
drivers/mmc/core/sd_ops.h
include/linux/mmc/host.h