mirror of
https://github.com/apache/nuttx.git
synced 2026-05-18 17:18:28 +08:00
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:
committed by
Xiang Xiao
parent
96d8e833ed
commit
67a60d77dd
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user