summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/stv0991/clock.c
diff options
context:
space:
mode:
authorVikas Manocha <vikas.manocha@st.com>2014-11-18 10:42:22 -0800
committerTom Rini <trini@ti.com>2014-12-09 15:16:01 -0500
commit9fa32b12370236a39090d4e42b013910d123db61 (patch)
tree4f160f2e5df2ec420f44bd05a1ad7a1931c4aef0 /arch/arm/cpu/armv7/stv0991/clock.c
parent32fdf0e4d82bdca5d64d86330e461e59685f9959 (diff)
stv0991: Add basic stv0991 architecture support
stv0991 architecture support added. It contains the support for following blocks - Timer - uart Signed-off-by: Vikas Manocha <vikas.manocha@st.com> [trini: Add arch/arm/cpu/armv7/Makefile hunk] Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'arch/arm/cpu/armv7/stv0991/clock.c')
-rw-r--r--arch/arm/cpu/armv7/stv0991/clock.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/stv0991/clock.c b/arch/arm/cpu/armv7/stv0991/clock.c
new file mode 100644
index 0000000000..aca6aba414
--- /dev/null
+++ b/arch/arm/cpu/armv7/stv0991/clock.c
@@ -0,0 +1,27 @@
+/*
+ * (C) Copyright 2014
+ * Vikas Manocha, ST Micoelectronics, vikas.manocha@st.com.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <asm/io.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/stv0991_cgu.h>
+#include<asm/arch/stv0991_periph.h>
+
+static struct stv0991_cgu_regs *const stv0991_cgu_regs = \
+ (struct stv0991_cgu_regs *) (CGU_BASE_ADDR);
+
+void clock_setup(int peripheral)
+{
+ switch (peripheral) {
+ case UART_CLOCK_CFG:
+ writel(UART_CLK_CFG, &stv0991_cgu_regs->uart_freq);
+ break;
+ case ETH_CLOCK_CFG:
+ break;
+ default:
+ break;
+ }
+}