From mboxrd@z Thu Jan 1 00:00:00 1970 From: Reinhard Meyer Date: Mon, 06 Sep 2010 12:16:06 +0200 Subject: [U-Boot] [PATCH] mmc: seperate block number into small parts for multi-write cmd In-Reply-To: References: <1283757567-15161-1-git-send-email-leiwen@marvell.com> <4C84B322.1000500@emk-elektronik.de> Message-ID: <4C84BF66.8080704@emk-elektronik.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Lei Wen schrieb: > On Mon, Sep 6, 2010 at 5:23 PM, Reinhard Meyer 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