From 387b5b07edf48b324c2ca96ae7e436423665d695 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Wed, 18 Mar 2026 05:40:24 +0200 Subject: [PATCH] bdk: sdmmc: rename bkops define And remove dead code. --- bdk/storage/mmc_def.h | 4 ++-- bdk/storage/sdmmc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bdk/storage/mmc_def.h b/bdk/storage/mmc_def.h index c7d6106f..5bcafe4b 100644 --- a/bdk/storage/mmc_def.h +++ b/bdk/storage/mmc_def.h @@ -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 diff --git a/bdk/storage/sdmmc.c b/bdk/storage/sdmmc.c index dba05f81..622cb780 100644 --- a/bdk/storage/sdmmc.c +++ b/bdk/storage/sdmmc.c @@ -786,7 +786,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");