[U-Boot] [PATCH] mmc: seperate block number into small parts for multi-write cmd
Lei Wen
adrian.wenl at gmail.com
Mon Sep 6 11:31:30 CEST 2010
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
>> should be limited to 65535, and the max buffer size should
>> not excceed 512k bytes.
>
> 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).
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.
>
> And, 65535 blocks (of 512) are already near 32 MB.
>
> TOP9000> mmci
> mci: setting clock 194000 Hz, block size 512
> mci: setting clock 24832000 Hz, block size 512
> mci: setting clock 194000 Hz, block size 512
> mci: setting clock 194000 Hz, block size 512
> mci: setting clock 24832000 Hz, block size 512
> Device: mci
> Manufacturer ID: 3
> OEM: 5344
> Name: SD32G
> Tran Speed: 25000000
> Rd Block Len: 512
> SD version 2.0
> High Capacity: Yes
> Capacity: 31914983424
> Bus Width: 4-bit
> TOP9000> mmc write 0 20000000 1000 18000
>
> MMC write: dev # 0, block # 4096, count 98304 ... mci: setting clock 194000 Hz,
> block size 512
> mci: setting clock 24832000 Hz, block size 512
> mci: setting clock 194000 Hz, block size 512
> mci: setting clock 194000 Hz, block size 512
> mci: setting clock 24832000 Hz, block size 512
> 98304 blocks written: OK
> TOP9000>
>
> Reinhard
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
More information about the U-Boot
mailing list