[PATCH v3] cmd: mmc: Allow using partition name in mmc erase command
Quentin Schulz
quentin.schulz at cherry.de
Thu Sep 5 12:49:36 CEST 2024
Hi Tomas,
On 9/3/24 12:14 PM, Tomas Paukrt wrote:
>> Same question as for v1, are we sure that the partition block size is
>> the same as the MMC erase block size? Is this guaranteed by all
>> standards (all MMC standards, and all partition table standards)?
>> Otherwise I assume we should do some maths here to figure out the MMC
>> start block AND block size based on the partition start block AND block
>> size and to pass the correct information to blk_derase(). I hope they
>> also are guaranteed to be aligned somehow and that a partition block
>> size is a multiple of an MMC erase block size? This maths seems to be
>> done in mmc_berase() (at a quick glance, not sure it's appropriate).
>
> Hi Quentin,
>
> I'm no expert on U-Boot internals, but if you look e.g. to part_get_info_whole_disk()
> then you can see that blksz is directly copied from struct blk_desc to struct disk_partition.
> Both the start block and block size in struct disk_partition are multiples of blksz, so I think that
> they can be passed directly to blk_derase(), which later calls mmc_berase().
>
Makes sense, thanks for the pointers.
Looks good to me,
Reviewed-by: Quentin Schulz <quentin.schulz at cherry.de>
Thanks!
Quentin
More information about the U-Boot
mailing list