From 8d5e69a7d78ae6e3b3a81d2ba2be746d2d22aede Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 Nov 2012 15:48:24 -0500 Subject: am33xx: Make mpu_pll_config callable outside clock.c As part of potentially scaling the core frequency up, this function needs to be visible elsewhere. Signed-off-by: Tom Rini --- arch/arm/cpu/armv7/am33xx/clock.c | 7 ++++--- arch/arm/include/asm/arch-am33xx/clocks_am33xx.h | 2 +- arch/arm/include/asm/arch-am33xx/sys_proto.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/arm/cpu/armv7/am33xx/clock.c b/arch/arm/cpu/armv7/am33xx/clock.c index d7d98d1111e..74f98d7403f 100644 --- a/arch/arm/cpu/armv7/am33xx/clock.c +++ b/arch/arm/cpu/armv7/am33xx/clock.c @@ -212,7 +212,7 @@ static void enable_per_clocks(void) ; } -static void mpu_pll_config(void) +void mpu_pll_config(int mpupll_M) { u32 clkmode, clksel, div_m2; @@ -226,7 +226,7 @@ static void mpu_pll_config(void) ; clksel = clksel & (~CLK_SEL_MASK); - clksel = clksel | ((MPUPLL_M << CLK_SEL_SHIFT) | MPUPLL_N); + clksel = clksel | ((mpupll_M << CLK_SEL_SHIFT) | MPUPLL_N); writel(clksel, &cmwkup->clkseldpllmpu); div_m2 = div_m2 & ~CLK_DIV_MASK; @@ -359,7 +359,8 @@ void enable_emif_clocks(void) */ void pll_init() { - mpu_pll_config(); + /* Start at 550MHz, will be tweaked up if possible. */ + mpu_pll_config(MPUPLL_M_550); core_pll_config(); per_pll_config(); diff --git a/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h b/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h index d748dd27873..417f84c55fa 100644 --- a/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h +++ b/arch/arm/include/asm/arch-am33xx/clocks_am33xx.h @@ -22,7 +22,7 @@ #define OSC (V_OSCK/1000000) /* MAIN PLL Fdll = 550 MHZ, */ -#define MPUPLL_M 550 +#define MPUPLL_M_550 550 #define MPUPLL_N (OSC-1) #define MPUPLL_M2 1 diff --git a/arch/arm/include/asm/arch-am33xx/sys_proto.h b/arch/arm/include/asm/arch-am33xx/sys_proto.h index 588d8de82fb..510d07ee107 100644 --- a/arch/arm/include/asm/arch-am33xx/sys_proto.h +++ b/arch/arm/include/asm/arch-am33xx/sys_proto.h @@ -32,7 +32,7 @@ extern struct ctrl_stat *cstat; u32 get_device_type(void); void setup_clocks_for_console(void); void ddr_pll_config(unsigned int ddrpll_M); - +void mpu_pll_config(int mpupll_M); void sdelay(unsigned long); void gpmc_init(void); void omap_nand_switch_ecc(int); -- cgit v1.2.3