sdmmc: identify SD Express cards

This commit is contained in:
CTCaer
2026-06-09 07:01:21 +03:00
parent 0eb287bc18
commit b857af7cd0
2 changed files with 6 additions and 1 deletions

View File

@@ -972,7 +972,7 @@ void _sd_storage_debug_print_ssr(const u8 *raw_ssr)
static int _sd_storage_send_if_cond(sdmmc_storage_t *storage, bool *is_sd_v1)
{
sdmmc_cmd_t cmdbuf;
u16 icr = SD_ICR_VHS_27_36 | SD_ICR_PATTERN;
u16 icr = SD_ICR_PCIE | SD_ICR_VHS_27_36 | SD_ICR_PATTERN;
sdmmc_init_cmd(&cmdbuf, SD_SEND_IF_COND, icr, SDMMC_RSP_TYPE_7, 0);
if (sdmmc_execute_cmd(storage->sdmmc, &cmdbuf, NULL, NULL))
@@ -998,7 +998,11 @@ static int _sd_storage_send_if_cond(sdmmc_storage_t *storage, bool *is_sd_v1)
// Check if VHS was accepted and pattern was properly returned.
if ((ricr & 0xFFF) == (icr & 0xFFF))
{
storage->has_pcie = ricr & SD_ICR_PCIE;
return 0;
}
return 1;
}

View File

@@ -196,6 +196,7 @@ typedef struct _sdmmc_storage_t
int initialized;
int is_low_voltage;
int has_sector_access;
int has_pcie;
u32 rca;
u32 sec_cnt;
u32 partition;