From: Reinhard Meyer Date: Sun, 19 Sep 2010 06:32:03 +0200 Subject: [U-Boot] [PATCH] mmc: fix capacity calculation with high capacity mmc In-Reply-To: <20100918214947.C0939157D71@gemini.denx.de> References: <1283781548-13961-1-git-send-email-leiwen@marvell.com> <4C84F592.4060905@emk-elektronik.de> <20100918214947.C0939157D71@gemini.denx.de> Message-ID: <4C959243.9010004@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 Dear Wolfgang Denk, Lei Wen, Andy Fleming, > Dear Lei Wen, > > In message you wrote: >> >> How about merge this patch? :-) > > I will wait for a pull request from the responsible custodian. > > Maybe you should have put him on cc: ... (done now). @@ -441,6 +441,11 @@ int mmc_change_freq(struct mmc *mmc) >>> if (!ext_csd[185]) >>> return 0; >>> >>> + if (!IS_SD(mmc) && mmc->high_capacity) { >>> + mmc->capacity = ext_csd[212] | (ext_csd[213] << 8) >>> + | (ext_csd[214] << 16) | (ext_csd[215] << 24); >>> + mmc->capacity *= mmc->read_bl_len; >>> + } >>> /* High Speed is set, there are two types: 52MHz and 26MHz */ >>> I am still convinced "mmc_change_freq()" is the wrong place to do that calculation. All other card types do it around line 700... Best Regards, Reinhard