From mboxrd@z Thu Jan 1 00:00:00 1970 From: Reinhard Meyer Date: Mon, 06 Sep 2010 13:50:49 +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> <4C84BF66.8080704@emk-elektronik.de> Message-ID: <4C84D599.4030100@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: >>>> 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 are right, this comes from HOST, not card. But since the host spec > define so, then is there any host don't follow the sepc? ... Any that use bit banging, or SPI, and at least: ATMELs MCI. Probably any number of others that do not copy Intel/PC centered register structures... If you had read my first mail on this, there was an example of a 98304 blocks transfer... > >> And you still do not explain why the buffer size shall be limited to 512KB? > > The 512 KB comes from the SDMA boundary, and this value is also adopt by Linux. > You could refer to drivers/mmc/host/sdhci.c in Linux code. What hardware, again? sdhci.c? SDMA? You are trying to change a GENERIC function of U-Boot here to suit a particular hardware, not a particular hardware driver. As such, changes should be generic/configurable and not suited to a specific hardware. If a specific hardware needs the generic part to obey some limitations, those limitations should be configurable, like maybe: #define CONFIG_SYS_MMC_BLOCKLIMIT 65535 #define CONFIG_SYS_MMC_BUFFERLIMIT (512<<10) Or maybe the splitting/chunking could be resolved in the hardware driver? Also a clarification of those reasons in the patch comment would be appropriate. That's my 2 cents for this. Let the community decide if there shall be a general limitation be put into the generic part... Best Regards, Reinhard