arch/risc-v/src/mpfs: Add a configuration flag for SD-card card detect line

Make existence of the card detect line configurable

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
Jukka Laitinen
2022-10-03 12:03:19 +04:00
committed by Xiang Xiao
parent 96d8e833ed
commit 67a60d77dd
2 changed files with 10 additions and 0 deletions
+6
View File
@@ -181,6 +181,12 @@ config MPFS_EMMCSD_MUX_EMMC
endchoice
config MPFS_EMMCSD_CD
bool "Board supports card detect"
default y
---help---
Set to n if SD-card detect line is not connected
config MPFS_ROMFS_MOUNT
bool "Mount the ROMFS file system"
depends on FS_ROMFS
+4
View File
@@ -1448,7 +1448,9 @@ static bool mpfs_device_reset(struct sdio_dev_s *dev)
irqstate_t flags;
uint32_t regval;
uint32_t cap;
#ifdef CONFIG_MPFS_EMMCSD_CD
uint32_t srs09;
#endif
bool retval = true;
int status = MPFS_EMMCSD_INITIALIZED;
@@ -1600,6 +1602,7 @@ static bool mpfs_device_reset(struct sdio_dev_s *dev)
/* Card state stable */
#ifdef CONFIG_MPFS_EMMCSD_CD
srs09 = getreg32(MPFS_EMMCSD_SRS09);
DEBUGASSERT(srs09 & MPFS_EMMCSD_SRS09_CSS);
@@ -1614,6 +1617,7 @@ static bool mpfs_device_reset(struct sdio_dev_s *dev)
retval = false;
}
}
#endif
/* Set 1-bit bus mode */