arch/riscv/mpfs: Add a config flag to select SD mux state

This has been previously hard-coded to SD-card. Make it build time configurable.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
Jukka Laitinen 2022-05-13 15:37:09 +04:00 committed by Alan Carvalho de Assis
parent 7790839eb0
commit d8cc1fd76d
2 changed files with 16 additions and 1 deletions

View File

@ -132,6 +132,17 @@ config MPFS_EMMCSD_MUX_GPIO
---help---
External mux GPIO between e.MMC and SD-card
choice MPFS_EMMCSD_MUX
prompt "Configure SD/eMMC mux"
config MPFS_EMMCSD_MUX_SDCARD
bool "SD card"
config MPFS_EMMCSD_MUX_EMMC
bool "eMMC"
endchoice
config MPFS_ROMFS_MOUNT
bool "Mount the ROMFS file system"
depends on FS_ROMFS

View File

@ -442,7 +442,11 @@ struct mpfs_dev_s g_emmcsd_dev =
},
.hw_base = MPFS_EMMC_SD_BASE,
.plic_irq = MPFS_IRQ_MMC_MAIN,
.emmc = false, /* Set true for emmc operation */
#ifdef CONFIG_MPFS_EMMCSD_MUX_EMMC
.emmc = true,
#else
.emmc = false,
#endif
.blocksize = 512,
.onebit = false,
.polltransfer = true,