[U-Boot] [PATCH] mmc: seperate block number into small parts for multi-write cmd

Reinhard Meyer u-boot at emk-elektronik.de
Mon Sep 6 12:16:06 CEST 2010


Lei Wen schrieb:
> On Mon, Sep 6, 2010 at 5:23 PM, Reinhard Meyer <u-boot at emk-elektronik.de> wrote:
>> Dear Lei Wen,
>>> As mmc host limitation, the max number of block in one go

You already write it's a HOST limitation.

>>> should be limited to 65535, and the max buffer size should
>>> not excceed 512k bytes.

Which would limit the #blocks to 1024 (assuming a 512 byte blocks)

>> Where does this limitation supposedly come from?
> 
> This limitation comes from the SD/MMC sepc. You could find one and
> check the 0x6 offset register(BLOCK COUNT REGISTER).

This might refer to certain HOST controllers, but not to Cards!

> You could get that register is only 16bit width and only cound contain
> the 65535 block.
> 
> This register is only validate for multi-operation, like multi-read or
> multi-write command.

Hmm, CMD25 states: "Continuously writes blocks of data until a
STOP_TRANSMISSION follows."

So the Card itself does not limit the number of blocks written in one go.

I do not mind the transfer to be split into chunks if required by some hosts,
but the "number of blocks in a go" should be configurable.

And you still do not explain why the buffer size shall be limited to 512KB?

Best Regards,
Reinhard



More information about the U-Boot mailing list