summaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorAndreas Bießmann <andreas.devel@googlemail.com>2011-06-12 01:49:11 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-07-04 10:55:27 +0200
commitc3a383f5bd26dfb429b68aa446d68f9d5bff21f9 (patch)
tree031b5024f5fb13c8e95705ebba46f7f9268f23a4 /arch/arm/include
parent876ef43d2a5df2546fc30f50469135b4b335e72d (diff)
downloadblackbird-obmc-uboot-c3a383f5bd26dfb429b68aa446d68f9d5bff21f9.tar.gz
blackbird-obmc-uboot-c3a383f5bd26dfb429b68aa446d68f9d5bff21f9.zip
arm920t/at91: add clock.c
This patch adds an copy of arm926ejs/at91/clock.c to arm920t/at91. The arm926ejs specialities are removed from arm920t version and vice versa. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/arch-at91/clk.h42
1 files changed, 36 insertions, 6 deletions
diff --git a/arch/arm/include/asm/arch-at91/clk.h b/arch/arm/include/asm/arch-at91/clk.h
index 457e6c9b2b..f6453275c4 100644
--- a/arch/arm/include/asm/arch-at91/clk.h
+++ b/arch/arm/include/asm/arch-at91/clk.h
@@ -26,13 +26,43 @@
#define __ASM_ARM_ARCH_CLK_H__
#include <asm/arch/hardware.h>
+#include <asm/global_data.h>
-unsigned long get_cpu_clk_rate(void);
-unsigned long get_main_clk_rate(void);
-unsigned long get_mck_clk_rate(void);
-unsigned long get_plla_clk_rate(void);
-unsigned long get_pllb_clk_rate(void);
-unsigned int get_pllb_init(void);
+static inline unsigned long get_cpu_clk_rate(void)
+{
+ DECLARE_GLOBAL_DATA_PTR;
+ return gd->cpu_clk_rate_hz;
+}
+
+static inline unsigned long get_main_clk_rate(void)
+{
+ DECLARE_GLOBAL_DATA_PTR;
+ return gd->main_clk_rate_hz;
+}
+
+static inline unsigned long get_mck_clk_rate(void)
+{
+ DECLARE_GLOBAL_DATA_PTR;
+ return gd->mck_rate_hz;
+}
+
+static inline unsigned long get_plla_clk_rate(void)
+{
+ DECLARE_GLOBAL_DATA_PTR;
+ return gd->plla_rate_hz;
+}
+
+static inline unsigned long get_pllb_clk_rate(void)
+{
+ DECLARE_GLOBAL_DATA_PTR;
+ return gd->pllb_rate_hz;
+}
+
+static inline u32 get_pllb_init(void)
+{
+ DECLARE_GLOBAL_DATA_PTR;
+ return gd->at91_pllb_usb_init;
+}
static inline unsigned long get_macb_pclk_rate(unsigned int dev_id)
{
OpenPOWER on IntegriCloud