[U-Boot] [PATCH] Allow AM335x MPU core clock speed to be specified in the board config file

Peter Korsgaard jacmet at sunsite.dk
Fri Mar 1 15:44:10 CET 2013


>>>>> "Mark" == Mark Jackson <mpfj-list at mimc.co.uk> writes:

 Mark> Allow AM335x MPU core clock speed to be specified in the board config file.
 Mark> To use, add the following to the board's config file:-

 Mark> #define V_MPUCLK	<desired clock freq in Hz>

 Mark> Signed-off-by: Mark Jackson <mpfj at newflow.co.uk>
 Mark> ---
 Mark>  arch/arm/include/asm/arch-am33xx/clocks_am33xx.h |    4 ++++
 Mark>  1 file changed, 4 insertions(+)

 Mark> diff --git a/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h b/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h
 Mark> index d748dd2..acfa355 100644
 Mark> --- a/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h
 Mark> +++ b/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h
 Mark> @@ -22,7 +22,11 @@
 Mark>  #define OSC	(V_OSCK/1000000)
 
 Mark>  /* MAIN PLL Fdll = 550 MHZ, */
 Mark> +#ifdef V_MPUCLK
 Mark> +#define MPUPLL_M	(V_MPUCLK/1000000)
 Mark> +#else
 Mark>  #define MPUPLL_M	550
 Mark> +#endif

It would imho be more readable to do:

/* default to 550 MHz */
#ifndef V_MPUCLK
#define V_MPUCLK        550000000
#endif

and then always use it below.

-- 
Bye, Peter Korsgaard


More information about the U-Boot mailing list