On Mon, Mar 26, 2012 at 03:17:21PM +0900, Magnus Damm wrote: > On Mon, Mar 26, 2012 at 2:52 PM, Simon Horman <horms@xxxxxxxxxxxx> wrote: > > On Mon, Mar 26, 2012 at 02:45:30PM +0900, Yusuke Goda wrote: > >> Hi Simon-san, Guennadi-san > >> > >> (2012/03/26 7:30), Simon Horman wrote: > >> > On Sat, Mar 24, 2012 at 07:06:31PM +0100, Guennadi Liakhovetski wrote: > >> >> On Wed, 21 Mar 2012, Simon Horman wrote: > >> >> > >> >>> mmc->f_max should be half of the bus clock. > >> >>> And now that mmc->f_max is not equal to the bus clock the > >> >>> latter should be used directly to calculate mmc->f_min. > >> >> > >> >> The patch seems correct as it stands, however, looking at it - does anyone > >> >> understands why that "close to 400kHz" comment and such a complicated > >> >> calculation? Shouldn't it be just host->clk / 512 always? Maybe this > >> >> should be a separate patch, so, for this one > >> >> > >> >> Acked-by: Guennadi Liakhovetski <g.liakhovetski@xxxxxx> > >> > > >> > Hi Guennadi, > >> > > >> > that code seems to date back to the original driver submission > >> > made by Goda-san. I have CCed him as perhaps he recalls why > >> > the code is like it is. > >> I thought to get closer to 400kHz if possible. > >> Probably even host->clk / 512 does not have any problem. > > > > Sorry for my ignorance, is ~400kHz desirable for some reason? > > The 400kHz frequency is used during initialization of the SD card. > Simply put, the SD frequency starts low out low and is then changed to > something higher depending on the capability of the memory card and > the host controller. Please have a look at the simplified SD > specification for more details. Thanks, got it. Do you have a feeling of if it it worth trying to start with a value close to 400kHz or if it would be better to simplify the code? I can try and measure the difference in start up time for particular hardware combinations, but I'm not sure how far that will get us. -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html