summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/arch-sunxi/clock.h
diff options
context:
space:
mode:
authorIan Campbell <ijc@hellion.org.uk>2014-05-05 11:52:23 +0100
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-05-25 16:12:12 +0200
commit643cf0ea027744edec9619d31cb001f3b2444099 (patch)
tree41d28bccd518350da1b7012d44e1ed8d19de6c9b /arch/arm/include/asm/arch-sunxi/clock.h
parent4f7f4041c4fe8bd31d3c4404af0cb2befa760e60 (diff)
downloadtalos-obmc-uboot-643cf0ea027744edec9619d31cb001f3b2444099.tar.gz
talos-obmc-uboot-643cf0ea027744edec9619d31cb001f3b2444099.zip
sunxi: add sun7i clocks and timer support.
This patch adds the basic clocks and timer support for the Allwinner A20 (sun7i) processor. This code will not been compiled until the build is hooked up in a later patch. It has been split out to keep the patches manageable. Some of the code here is common to multiple sunxi subarchtectures, hence files are named sun4i which is the earliest similar variant. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Emilio López <emilio@elopez.com.ar> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net> Signed-off-by: Jens Kuske <jenskuske@gmail.com> Signed-off-by: Luke Leighton <lkcl@lkcl.net> Signed-off-by: Oliver Schinagl <oliver@schinagl.nl> Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Cc: Stefan Roese <sr@denx.de> Cc: Tom Cubie <Mr.hipboi@gmail.com> Reviewed-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'arch/arm/include/asm/arch-sunxi/clock.h')
-rw-r--r--arch/arm/include/asm/arch-sunxi/clock.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-sunxi/clock.h b/arch/arm/include/asm/arch-sunxi/clock.h
new file mode 100644
index 0000000000..5669f392fa
--- /dev/null
+++ b/arch/arm/include/asm/arch-sunxi/clock.h
@@ -0,0 +1,29 @@
+/*
+ * (C) Copyright 2007-2011
+ * Allwinner Technology Co., Ltd. <www.allwinnertech.com>
+ * Tom Cubie <tangliang@allwinnertech.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _SUNXI_CLOCK_H
+#define _SUNXI_CLOCK_H
+
+#include <linux/types.h>
+
+#define CLK_GATE_OPEN 0x1
+#define CLK_GATE_CLOSE 0x0
+
+/* clock control module regs definition */
+#include <asm/arch/clock_sun4i.h>
+
+#ifndef __ASSEMBLY__
+int clock_init(void);
+int clock_twi_onoff(int port, int state);
+void clock_set_pll1(unsigned int hz);
+unsigned int clock_get_pll6(void);
+void clock_init_safe(void);
+void clock_init_uart(void);
+#endif
+
+#endif /* _SUNXI_CLOCK_H */
OpenPOWER on IntegriCloud