sdmmc: identify SD Express cards

This commit is contained in:
CTCaer
2026-06-09 07:01:21 +03:00
committed by naga
parent de7cf0cf83
commit e69ef9ee0d
2 changed files with 6 additions and 1 deletions

View File

@@ -971,7 +971,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))
@@ -997,7 +997,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 1;
}
return 0;
}

View File

@@ -201,6 +201,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;