[U-Boot] [U-BOOT] [PATCH] mmc: enable switch partition function
Lei Wen
adrian.wenl at gmail.com
Tue Feb 8 16:03:37 CET 2011
Hi Wolfgang,
On Tue, Feb 8, 2011 at 10:27 PM, Wolfgang Denk <wd at denx.de> wrote:
> Dear Lei Wen,
>
> In message <1296463665-26551-1-git-send-email-leiwen at marvell.com> you wrote:
>> For emmc, it may has upto 7 partitions: two boot partitions, one
>> user partition, one RPMB partition and four general purpose partitions.
>> (Refer to JESD84-A44.pdf/page 154)
>>
>> As bootloader may need to read out or reflashing images on those
>> different partitions, it is better to enable the partition switch with
>> console command support.
>
> Other devices - say, USB mass storage devices, IDE disks, etc. - have
> partitions, too, and do not need any such special command.
EMMC is sightly different witht the other device with partition.
For IDE as example, we could copy file between part A and B without problem.
It is for the different partition start at different offset in the
physical media.
Just adding the offset with the read address would make this works, so it is
some kind of software implementation.
But for EMMC, the boot partition is different with the normal partition.
We need to send a special command to do the switch, not with the
different offset.
If we need to copy file between those two partition, we need to send
switch command
before copy operation.
It is a hardware one. IDE or usb masstorage has no such ability...
>
>> @@ -247,5 +268,6 @@ U_BOOT_CMD(
>> "mmc write <device num> addr blk# cnt\n"
>> "mmc rescan <device num>\n"
>> "mmc part <device num> - lists available partition on mmc\n"
>> + "mmc sw_part <device num> <part_num> - switch part support for emmc\n"
>> "mmc list - lists available devices");
>
> Why would we need a separate command here?
>
>
> Please rework this so it uses the same mechanism we use on all other
> storage devices, without an extra command here.
>
The problem here is that the need to switch this hardware partition
only make sense
to the emmc. If make it generic to the other mmc command, it seems a
bit of weird for the
sd/mmc...
Also add additional command here is the minimual change. If insert
this into already existed
mmc command would make the fat command hard to work.
For mmc may change the hardware partition, but fat command cannot...
It is because
it need to be compatiable with other devices that have no hardware partition...
Best regards,
Lei
More information about the U-Boot
mailing list