> I would be very happy if someone with access to > the documentation could shed some further light on this. According to the SH7757 manual, setting the CLKDIV[3:0] in the CE_CLK_CTRL register 0xF selects Pck as the bus clock frequency. So, unlike other devices where Pck/2 (CLKDIV[3:0]=0) is the max bus speed, the SH7757 can run at Pck when CLKDIV=0xF. - Chris -----Original Message----- From: linux-sh-owner@xxxxxxxxxxxxxxx [mailto:linux-sh-owner@xxxxxxxxxxxxxxx] On Behalf Of Simon Horman Sent: Wednesday, June 20, 2012 3:02 AM To: Guennadi Liakhovetski Cc: linux-mmc@xxxxxxxxxxxxxxx; linux-sh@xxxxxxxxxxxxxxx; Chris Ball; Magnus Damm Subject: Re: [PATCH] mmc: sh_mmcif: mmc->f_max heuristic On Wed, Jun 20, 2012 at 08:49:38AM +0200, Guennadi Liakhovetski wrote: > Hi Simon > > Thanks for addressing this issue. > > On Wed, 20 Jun 2012, Simon Horman wrote: > > > In 930f152cc9998388031af577843baae572ac8ab6 ("mmc: sh_mmcif: mmc->f_max > > should be half of the bus clock") I changed the setting of mmc->f_max from > > the bus clock to half the bus clock based on the manual for the sh7372 SoC. > > > > Inspection of sh_mmcif_clock_control() reveals that it relies on > > mmc->f_max being set to the bus speed in order to enable the supplementary > > clock, a feature that does not exist on the sh7372. > > > > Armed with this information implement the following heuristic for setting > > mmc->f_max: > > > > * Use bus clock if the supplementary clock feature is present > > - Assumed to work on the sh7757lcr board, the only board present > > in the tree which has the feature. > > To be able to better understand this change: do we have access to the > sh7757 documentation and does it actually explain how the CLK_SUP_PCLK bit > in MMCIF_CE_CLK_CTRL functions? Does it actually set the MMC bus clock to > be equal to the host clock? My understanding is that neither Magnus nor I have access to the documentation for the sh7757. Thus we could only infer things from examining the source code. I would be very happy if someone with access to the documentation could shed some further light on this. In particular, I would be happy if this heuristic was shown not to be necessary. But in lieu of access to the documentation I think this patch is reasonable. -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html -- 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