Re: [PATCH v3] cmd: mmc: Allow using partition name in mmc erase command
Tomas Paukrt
tomaspaukrt at email.cz
Tue Sep 3 12:14:17 CEST 2024
> 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().
Best regards
Tomas
More information about the U-Boot
mailing list