[PATCH] cmd: mmc: Expand bkops handling
Marek Vasut
marex at denx.de
Thu Jan 5 15:20:22 CET 2023
On 12/22/22 18:47, Simon Glass wrote:
[...]
>> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
>> index 210703ea46b..afbc497b12c 100644
>> --- a/drivers/mmc/mmc.c
>> +++ b/drivers/mmc/mmc.c
>> @@ -3127,9 +3127,10 @@ int mmc_init_device(int num)
>> #endif
>>
>> #ifdef CONFIG_CMD_BKOPS_ENABLE
>
> We shouldn't really need this #ifdef, since if it is not called it
> won't be included in the binary.
You would get "function defined but not used" maybe-unused warning.
>> -int mmc_set_bkops_enable(struct mmc *mmc)
>> +int mmc_set_bkops_enable(struct mmc *mmc, bool autobkops, bool enable)
>> {
>> int err;
>> + u32 bit = autobkops ? BIT(1) : BIT(0);
>> ALLOC_CACHE_ALIGN_BUFFER(u8, ext_csd, MMC_MAX_BLOCK_LEN);
>>
>> err = mmc_send_ext_csd(mmc, ext_csd);
[...]
More information about the U-Boot
mailing list