bdk: sdmmc: rename bkops define

And remove dead code.
This commit is contained in:
CTCaer
2026-03-18 05:40:24 +02:00
parent c6c89ce0b1
commit ef1ce85735
3 changed files with 4 additions and 8 deletions

View File

@@ -416,8 +416,8 @@
/*
* BKOPS modes
*/
#define EXT_CSD_MANUAL_BKOPS_MASK 0x01
#define EXT_CSD_AUTO_BKOPS_MASK 0x02
#define EXT_CSD_BKOPS_MANUAL 0x01 /* STICKY! */
#define EXT_CSD_BKOPS_AUTO 0x02
/*
* Command Queue

View File

@@ -717,7 +717,7 @@ hs52_mode:
/*
static int _mmc_storage_enable_auto_bkops(sdmmc_storage_t *storage)
{
if (_mmc_storage_switch(storage, SDMMC_SWITCH(MMC_SWITCH_MODE_SET_BITS, EXT_CSD_BKOPS_EN, EXT_CSD_AUTO_BKOPS_MASK)))
if (_mmc_storage_switch(storage, SDMMC_SWITCH(MMC_SWITCH_MODE_SET_BITS, EXT_CSD_BKOPS_EN, EXT_CSD_BKOPS_AUTO)))
return 1;
return _sdmmc_storage_check_status(storage);
@@ -787,7 +787,7 @@ int sdmmc_storage_init_mmc(sdmmc_storage_t *storage, sdmmc_t *sdmmc, u32 bus_wid
_mmc_storage_parse_cid(storage); // This needs to be after csd and ext_csd.
/*
if (storage->ext_csd.bkops & 0x1 && !(storage->ext_csd.bkops_en & EXT_CSD_AUTO_BKOPS_MASK))
if (storage->cid.manfid == 0x11 && storage->ext_csd.bkops && !(storage->ext_csd.bkops_en & EXT_CSD_BKOPS_AUTO))
{
_mmc_storage_enable_auto_bkops(storage);
DPRINTF("[MMC] BKOPS enabled\n");

View File

@@ -1147,10 +1147,6 @@ static int _sdmmc_execute_cmd_inner(sdmmc_t *sdmmc, sdmmc_cmd_t *cmd, sdmmc_req_
{
sdmmc->expected_rsp_type = cmd->rsp_type;
res = _sdmmc_cache_rsp(sdmmc, sdmmc->rsp, cmd->rsp_type);
#ifdef ERROR_EXTRA_PRINTING
if (res)
EPRINTFARGS("SDMMC%d: Unknown response type!", sdmmc->id + 1);
#endif
}
if (request && !res)
{