
On Fri, Jul 5, 2019 at 11:59 AM Bin Meng bmeng.cn@gmail.com wrote:
On Sat, Jun 29, 2019 at 2:57 PM Anup Patel Anup.Patel@wdc.com wrote:
From: Bhargav Shah bhargavshah1988@gmail.com
This patch rewrites MMC SPI driver using U-Boot DM framework and get it's working on SiFive Unleashed board.
Signed-off-by: Bhargav Shah bhargavshah1988@gmail.com Signed-off-by: Anup Patel anup.patel@wdc.com
drivers/mmc/Kconfig | 18 ++ drivers/mmc/mmc_spi.c | 469 +++++++++++++++++++++++++++--------------- 2 files changed, 320 insertions(+), 167 deletions(-)
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index c23299ea96..f750dad00a 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -46,6 +46,24 @@ config SPL_DM_MMC
if MMC
+config MMC_SPI
bool "Support for SPI-based MMC controller"
depends on DM_MMC && DM_SPI
help
This selects SPI-based MMC controllers.
If you have an MMC controller on a SPI bus, say Y here.
If unsure, say N.
+config MMC_SPI_CRC_ON
bool "Support CRC for SPI-based MMC controller"
depends on MMC_SPI
default y
help
This enables CRC for SPI-based MMC controllers.
If unsure, say N.
scripts/config_whitelist.txt should be updated to remove the non-DM version macros: CONFIG_MMC_SPI_xxx
Okay, I will update.
cmd/mmc_spi.c should be completely dropped as it is for non-DM version MMC SPI driver.
mmc_spi_init() declaration in mmc.h should be removed.
Okay, I will drop cmd/mmc_spi.c and also remove mmc_spi_init() from mmc.h as a separate patch.
With commit: f51d7fc8ce455ef201f86e1fab4d380444b96789 ("board: Arcturus: DM: Disable drivers without DM support"), UCP1020 board removes most legacy non-DM SPI MMC support, but still has CONFIG_MMC_SPI in UCP1020.h. That should be removed too. +Oleksandr Zhadan and Michael Durrant who maintains UCP1020 board for the awareness.
Okay, I will remove CONFIG_MMC_SPI from UCP1020.h
[snip]
Other than above, Reviewed-by: Bin Meng bmeng.cn@gmail.com Tested-by: Bin Meng bmeng.cn@gmail.com
Regards, Bin
Thanks, Anup