Re: [PATCH 3/3 v2] sh, mmc: Use defines when setting CE_CLK_CTRL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 27, 2010 at 12:54:41PM +0100, MichaÅ MirosÅaw wrote:
> 2010/11/27 Simon Horman <horms@xxxxxxxxxxxx>:
> > The 16-19th bits of CE_CLK_CTRL set the
> > MMC clock frequency.
> >
> > Cc: Yusuke Goda <yusuke.goda.sx@xxxxxxxxxxx>
> > Cc: Magnus Damm <magnus.damm@xxxxxxxxx>
> > Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
> > ---
> > Âinclude/linux/mmc/sh_mmcif.h | Â 17 +++++++++--------
> > Â1 files changed, 9 insertions(+), 8 deletions(-)
> >
> > diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h
> > index 519a2cd..44fc534 100644
> > --- a/include/linux/mmc/sh_mmcif.h
> > +++ b/include/linux/mmc/sh_mmcif.h
> > @@ -77,6 +77,9 @@ struct sh_mmcif_plat_data {
> > Â#define CLK_ENABLE Â Â Â Â Â Â (1 << 24) /* 1: output mmc clock */
> > Â#define CLK_CLEAR Â Â Â Â Â Â Â((1 << 19) | (1 << 18) | (1 << 17) | (1 << 16))
> > Â#define CLK_SUP_PCLK Â Â Â Â Â ((1 << 19) | (1 << 18) | (1 << 17) | (1 << 16))
> > +#define CLKDIV_4 Â Â Â Â Â Â Â (1<<16) /* mmc clock frequency.
> > + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â* n: bus clock/(2^(n+1)) */
> > +#define CLKDIV_256 Â Â Â Â Â Â (7<<16) /* mmc clock frequency. (see above) */
> > Â#define SRSPTO_256 Â Â Â Â Â Â ((1 << 13) | (0 << 12)) /* resp timeout */
> > Â#define SRBSYTO_29 Â Â Â Â Â Â ((1 << 11) | (1 << 10) | Â Â Â Â\
> > Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â (1 << 9) | (1 << 8)) /* resp busy timeout */
> [...]
> 
> Maybe zero is a valid value here meaning CLKDIV = 2.

Hi MichaÅ,

Yes, it is. I intended to provide defines only for values that are used.
But I can provide all the valid values (there are only 9) it that
makes thing clearer. Or perhaps change the comment to:

					    /* CLKDIV_n
					     * mmc clock frequency.
					     * n: bus clock/(2^(m+1))
					     *    where 0 <= m <= 8 */

--
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


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux