Skip to contentSkip to conversation

Allow AM335x MPU core clock speed to be specified in the board config file

PATCH Superseded Mark Jackson 2 participants 2 messages Mar 1, 2013 Arm (32-bit)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow AM335x MPU core clock speed to be specified in the board config file

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

#define V_MPUCLK <desired clock freq in Hz>

---
 arch/arm/include/asm/arch-am33xx/clocks_am33xx.h |    4 ++++
 1 file changed, 4 insertions(+)
arch/arm/include/asm/arch-am33xx/clocks_am33xx.h +4 -0
index d748dd2..acfa355 100644
@@ -22,7 +22,11 @@
 #define OSC	(V_OSCK/1000000)
 
 /* MAIN PLL Fdll = 550 MHZ, */
+#ifdef V_MPUCLK
+#define MPUPLL_M	(V_MPUCLK/1000000)
+#else
 #define MPUPLL_M	550
+#endif
 #define MPUPLL_N	(OSC-1)
 #define MPUPLL_M2	1
 
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 Allow AM335x MPU core clock speed to be specified in the board config file

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Mark" == Mark Jackson <[email protected]> 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 <[email protected]> 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.

Signature · 1 line
Bye, Peter Korsgaard