Re[2]: [PATCH 03/11] ARM: clps711x: Adds config option for CPU PLL multiplier

Alexander Shiyan shc_work at mail.ru
Fri Feb 8 06:58:52 EST 2013


Hello.

...
> > +menu "CLPS711X specific settings"
> > +
> > +config CLPS711X_CPU_PLL_MULT
> > +	int "CPU PLL multiplier (20-50)"
> > +	range 20 50
> > +	default "40"
> > +	help
> > +	  Define CPU PLL multiplier. PLL is calculated by formula:
> > +	    PLL Frequency = (PLL Multiplier / 2) * 3686400 Hz
> > +	  Default value is 40, for achieve 73 MHz.
> > +
> this board specific put this in c code
> kconfig is too easy to break
> 
> check how we do on at91

This is not board-specific, this is CPU-specific. PLL multiplier is set up
at the start and we not touch it anymore since all system frequencies is
depends on it, including SDRAM refresh.
How to place this configurable parameter in C code i am not understand.
For Kconfig, we can add additional compile-time checker into lowlevel unit
which uses this symbol:

#if (CLPS711X_CPU_PLL_MULT < 20) || (CLPS711X_CPU_PLL_MULT > 50)
#error "CPU PLL multiplier out of range"
#endif

Thanks!

---


More information about the barebox mailing list