
On Mon, Sep 6, 2010 at 5:23 PM, Reinhard Meyer u-boot@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@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot