
Hi Wolfgang,
On Tue, Feb 8, 2011 at 11:13 PM, Wolfgang Denk wd@denx.de wrote:
Dear Lei Wen,
In message AANLkTikdUN37v6tvYpy0hyJrB9OJ4XK-LyNPSida7Dyf@mail.gmail.com you wrote:
EMMC is sightly different witht the other device with partition.
Maybe. But does this really require a different iunterface in the U-Boot context? I doubt that.
For IDE as example, we could copy file between part A and B without problem.
No, we cannot. U-Boot can only read _or_ write form mass storage operations, so a copy operation would always require a "read from device to RAM buffer", "write to device from RAM buffer" sequence. The same can obviously be done with EMMC as well.
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.
Thisis an internal implementation detail. As a user, I do not want to know about it. I just want to read or write data to some partition. The rest is driver internals.
If we need to copy file between those two partition, we need to send switch command before copy operation.
So where is the problem? See above. We always have TWO separate operations, and each of them will select a device/partition.
It is a hardware one. IDE or usb masstorage has no such ability...
I see no difference from the user point of view. The internal implementation may be different, but that doesn't matter.
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...
I don;t understand what you want to tell me here. My complaint is that your new code is _not_ compatible with other divices, and I see no reason for such an incompatibility.
I am thinking now approach for this. How about adding addtitional member in the mmc structure, like part. During mmc probe, the driver could know whether the device support partition switch or not, if it support, we could register three other "faked" mmc device corresponding to two boot partition, and RPMB partition.
Then we could use the current command to access the different hardware partition in the emmc. Like if we are accessing one hardware partition, we need to send switch command first. If the part member in the mmc is a invalid value, we then don't send that switch partition command.
Could this approach be acceptable?
Best regards, Lei