summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/arch-keystone/clock.h
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-07-28 12:26:21 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-07-28 12:26:21 +0200
commitb1cdd8baa14f518288ceddb391d6587c1ecb3174 (patch)
treec3d00b3193b2ee86b9679baf1933b10a7d07a13d /arch/arm/include/asm/arch-keystone/clock.h
parent48b3ed217f58487c583d59575d7dfe2aafbb738d (diff)
parent434f2cfcad9f70231ad5a096325ba72ef0d2a2cc (diff)
downloadu-boot-b1cdd8baa14f518288ceddb391d6587c1ecb3174.tar.gz
u-boot-b1cdd8baa14f518288ceddb391d6587c1ecb3174.tar.xz
u-boot-b1cdd8baa14f518288ceddb391d6587c1ecb3174.zip
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
Diffstat (limited to 'arch/arm/include/asm/arch-keystone/clock.h')
-rw-r--r--arch/arm/include/asm/arch-keystone/clock.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-keystone/clock.h b/arch/arm/include/asm/arch-keystone/clock.h
index 324501b75a..1513c76b6a 100644
--- a/arch/arm/include/asm/arch-keystone/clock.h
+++ b/arch/arm/include/asm/arch-keystone/clock.h
@@ -10,8 +10,40 @@
#ifndef __ASM_ARCH_CLOCK_H
#define __ASM_ARCH_CLOCK_H
+#ifndef __ASSEMBLY__
+
#ifdef CONFIG_SOC_K2HK
#include <asm/arch/clock-k2hk.h>
#endif
+#ifdef CONFIG_SOC_K2E
+#include <asm/arch/clock-k2e.h>
+#endif
+
+#define MAIN_PLL CORE_PLL
+
+#include <asm/types.h>
+
+struct keystone_pll_regs {
+ u32 reg0;
+ u32 reg1;
+};
+
+/* PLL configuration data */
+struct pll_init_data {
+ int pll;
+ int pll_m; /* PLL Multiplier */
+ int pll_d; /* PLL divider */
+ int pll_od; /* PLL output divider */
+};
+
+extern const struct keystone_pll_regs keystone_pll_regs[];
+
+void init_plls(int num_pll, struct pll_init_data *config);
+void init_pll(const struct pll_init_data *data);
+unsigned long clk_get_rate(unsigned int clk);
+unsigned long clk_round_rate(unsigned int clk, unsigned long hz);
+int clk_set_rate(unsigned int clk, unsigned long hz);
+
+#endif
#endif