mmc: sdhci-pci-gli: Add support SD Express card for GL9767
authorVictor Shih <victor.shih@genesyslogic.com.tw>
Fri, 9 Jun 2023 07:14:41 +0000 (15:14 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 12 Jun 2023 13:20:08 +0000 (15:20 +0200)
commit0e92aec2efa04a9e0a5b3a927dab06773dd814ca
treee6f6ed6eb63aa35a53caa756548bc751de8e2ead
parent17b492117b00ead1fa0a53035b2fb98b04ba35f4
mmc: sdhci-pci-gli: Add support SD Express card for GL9767

Add support SD Express card for GL9767. The workflow of the
SD Express card in GL9767 is as below.
1. GL9767 operates in SD mode and set MMC_CAP2_SD_EXP flag.
2. If card is inserted, Host send CMD8 to ask the capabilities
   of the card.
3. If the card has PCIe capability, then init_sd_express()
   will be invoked.
4. If the card has been put in write protect state then the
   SD features supported by SD mode but not supported by
   PCIe mode, therefore GL9767 switch to SD mode.
5. If the card has not been put in write protect state then
   GL9767 switch from SD mode to PCIe/NVMe mode and mmc driver
   handover control to NVMe driver.
6. If card is removed, GL9767 will return to SD mode.

Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230609071441.451464-5-victorshihgli@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-pci-gli.c