summaryrefslogtreecommitdiff
path: root/cpu/arm1136/mx31/generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/arm1136/mx31/generic.c')
-rw-r--r--cpu/arm1136/mx31/generic.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/cpu/arm1136/mx31/generic.c b/cpu/arm1136/mx31/generic.c
index 67c0cc6..c9bbc9c 100644
--- a/cpu/arm1136/mx31/generic.c
+++ b/cpu/arm1136/mx31/generic.c
@@ -22,6 +22,7 @@
*/
#include <common.h>
+#include <asm/arch/mx31.h>
#include <asm/arch/mx31-regs.h>
static u32 mx31_decode_pll(u32 reg, u32 infreq)
@@ -77,6 +78,20 @@ void mx31_dump_clocks(void)
printf("ipg clock : %dHz\n", mx31_get_ipg_clk());
}
+int mxc_get_clock(enum mxc_clock clk)
+{
+ switch (clk) {
+ case MXC_ARM_CLK:
+ return mx31_get_mcu_main_clk();
+ case MXC_UART_CLK:
+ return mx31_get_ipg_clk();
+ default:
+ break;
+ }
+
+ return -1;
+}
+
void mx31_gpio_mux(unsigned long mode)
{
unsigned long reg, shift, tmp;