misc: rtsx: Add SD Express mode support for RTS5261
authorRui Feng <rui_feng@realsil.com.cn>
Thu, 29 Oct 2020 01:57:48 +0000 (09:57 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 16 Nov 2020 10:59:28 +0000 (11:59 +0100)
commit5afe802132f242f5520d2acac09ea05d31e3c7cf
treecdcf4af682254aee57971e5b2a791c2569e59937
parentead49373d2916080509f51fc6a4ee8f9bc021b9b
misc: rtsx: Add SD Express mode support for RTS5261

RTS5261 support SD mode and PCIe/NVMe mode. The workflow is as follows.
1.RTS5261 work in SD mode and set MMC_CAPS2_SD_EXP flag.
2.If card is plugged in, Host send CMD8 to ask card's PCIe availability.
3.If the card has PCIe availability and WP is not set, init_sd_express() will be invoked,
RTS5261 switch to PCIe/NVMe mode.
4.Mmc driver handover it to NVMe driver.
5.If card is unplugged, RTS5261 will switch to SD mode.

Signed-off-by: Rui Feng <rui_feng@realsil.com.cn>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/1603936668-3363-1-git-send-email-rui_feng@realsil.com.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/misc/cardreader/rts5261.c
drivers/misc/cardreader/rts5261.h
drivers/misc/cardreader/rtsx_pcr.c
include/linux/rtsx_pci.h