[PATCH] cmd: mmc: Expand bkops handling

Marek Vasut marex at denx.de
Thu Jan 5 15:14:23 CET 2023


On 12/27/22 00:55, Jaehoon Chung wrote:
> Hi,

Hi,

[...]

>> @@ -1040,7 +1036,41 @@ static int do_mmc_bkops_enable(struct cmd_tbl *cmdtp, int flag,
>>   		return CMD_RET_FAILURE;
>>   	}
>>
>> -	return mmc_set_bkops_enable(mmc);
>> +	return mmc_set_bkops_enable(mmc, autobkops, enable);
>> +}
>> +
>> +static int do_mmc_bkops(struct cmd_tbl *cmdtp, int flag,
>> +			int argc, char * const argv[])
>> +{
>> +	bool autobkops, enable;
>> +
>> +	if (argc != 4)
>> +		return CMD_RET_USAGE;
>> +
>> +	if (!strcmp(argv[2], "manual"))
>> +		autobkops = false;
>> +	else if (!strcmp(argv[2], "auto"))
>> +		autobkops = true;
>> +	else
>> +		return CMD_RET_FAILURE;
>> +
>> +	if (!strcmp(argv[3], "disable"))
>> +		enable = false;
> 
> AFAIK, "manual" enable is one time programmable. It can't disable again after enabled, isn't it?

Indeed the bkops are all OTP.


More information about the U-Boot mailing list