summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2012-11-21 15:48:24 -0500
committerTom Rini <trini@ti.com>2013-02-22 10:09:50 -0500
commit8d5e69a7d78ae6e3b3a81d2ba2be746d2d22aede (patch)
tree369a05922f7038535acfbee4e77f5f2e4b008f12
parent7388ae9e67da8a792ff570eee59fd698f710312a (diff)
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 <trini@ti.com>
-rw-r--r--arch/arm/cpu/armv7/am33xx/clock.c7
-rw-r--r--arch/arm/include/asm/arch-am33xx/clocks_am33xx.h2
-rw-r--r--arch/arm/include/asm/arch-am33xx/sys_proto.h2
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 d7d98d1111..74f98d7403 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 d748dd2787..417f84c55f 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 588d8de82f..510d07ee10 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);