Skip to contentSkip to conversation

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

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

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

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

---
Changes in v2:
- Tweaked after comments from Peter Korsgaard

 arch/arm/include/asm/arch-am33xx/clocks_am33xx.h |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
arch/arm/include/asm/arch-am33xx/clocks_am33xx.h +5 -2
index d748dd2..f1a8aa7 100644
@@ -21,8 +21,11 @@
 
 #define OSC	(V_OSCK/1000000)
 
-/* MAIN PLL Fdll = 550 MHZ, */
-#define MPUPLL_M	550
+/* MAIN PLL Fdll = 550 MHZ, by default */
+#ifndef V_MPUCLK
+#define V_MPUCLK	550000000
+#endif
+#define MPUPLL_M	(V_MPUCLK/1000000)
 #define MPUPLL_N	(OSC-1)
 #define MPUPLL_M2	1
 
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 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> Changes in v2:
Mark> - Tweaked after comments from Peter Korsgaard

 Mark>  arch/arm/include/asm/arch-am33xx/clocks_am33xx.h |    7 +++++--

Mark> 1 file changed, 5 insertions(+), 2 deletions(-)

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..f1a8aa7 100644
Mark> --- a/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h
Mark> +++ b/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h
Mark> @@ -21,8 +21,11 @@

Mark> #define OSC (V_OSCK/1000000)

Mark> -/* MAIN PLL Fdll = 550 MHZ, */
Mark> -#define MPUPLL_M 550
Mark> +/* MAIN PLL Fdll = 550 MHZ, by default */

It would be good to fix MHZ -> MHz while we're at it. Otherwise it looks good.

Mark> +#ifndef V_MPUCLK
Mark> +#define V_MPUCLK 550000000
Mark> +#endif
Mark> +#define MPUPLL_M (V_MPUCLK/1000000)
Mark> #define MPUPLL_N (OSC-1)
Mark> #define MPUPLL_M2 1

Mark> --
Mark> 1.7.9.5

Mark> _______________________________________________ Mark> U-Boot mailing list
Mark> U-Boot at lists.denx.de
Mark> http://lists.denx.de/mailman/listinfo/u-boot

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

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

In reply to Mark Jackson

Dear Mark Jackson,

Quoted 4 lines · In message <[email protected]> you wrote:

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>

If this is a configurable option, it should be CONFIG_SYS_V_MPUCLK instead.

Quoted 2 lines
 arch/arm/include/asm/arch-am33xx/clocks_am33xx.h |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Also, this new config option must be documented in the README.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Ja, mach' nur einen Plan,    sei nur ein grosses Licht
und mach' dann noch 'nen zweiten Plan,    geh'n tun sie beide nicht."
                                     -- Bert Brecht, Dreigroschenoper
#3 lore raw

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

Quoted 8 lines · Wolfgang Denk

Dear Mark Jackson,

Quoted 4 lines · In message <[email protected]> you wrote:

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>

Quoted 7 lines

If this is a configurable option, it should be CONFIG_SYS_V_MPUCLK instead.

Quoted 2 lines
 arch/arm/include/asm/arch-am33xx/clocks_am33xx.h |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Also, this new config option must be documented in the README.

No problem ... I'll post a v3.