summaryrefslogtreecommitdiffstats
path: root/drivers/clk/sunxi-ng/ccu-sun50i-h6-r.h
diff options
context:
space:
mode:
authorIcenowy Zheng2018-05-03 20:38:41 +0200
committerMaxime Ripard2018-05-04 17:05:46 +0200
commitb7c7b05065aa77ae3d7b70b9139ed58970daed78 (patch)
treed241bfa4719e5a3020602704a5ed41c00084b8d3 /drivers/clk/sunxi-ng/ccu-sun50i-h6-r.h
parentLinux 4.17-rc1 (diff)
downloadkernel-qcow2-linux-b7c7b05065aa77ae3d7b70b9139ed58970daed78.tar.gz
kernel-qcow2-linux-b7c7b05065aa77ae3d7b70b9139ed58970daed78.tar.xz
kernel-qcow2-linux-b7c7b05065aa77ae3d7b70b9139ed58970daed78.zip
clk: sunxi-ng: add support for H6 PRCM CCU
The H6 has clock/reset controls in PRCM part, like old SoCs such as H3 and A64. However, the PRCM CCU is rearranged; the register arragement is now similar to the main CCU of H6, and the PRCM now has two APB buses to control -- one is clocked from AHB clock derivde from AR100 clock, the other is clocked from the same mux with AR100 clock. Therefore a new driver is written for it. As there's no official document about the PRCM in H6, all the information are indirectly collected from BSP and parts of the document, and the information source is noted as comments in the driver's source code. If reliable information is provided furtherly, the driver needs to be rechecked. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Diffstat (limited to 'drivers/clk/sunxi-ng/ccu-sun50i-h6-r.h')
-rw-r--r--drivers/clk/sunxi-ng/ccu-sun50i-h6-r.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-h6-r.h b/drivers/clk/sunxi-ng/ccu-sun50i-h6-r.h
new file mode 100644
index 000000000000..782117dc0b28
--- /dev/null
+++ b/drivers/clk/sunxi-ng/ccu-sun50i-h6-r.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright 2017 Icenowy Zheng <icenowy@aosc.xyz>
+ */
+
+#ifndef _CCU_SUN50I_H6_R_H
+#define _CCU_SUN50I_H6_R_H
+
+#include <dt-bindings/clock/sun50i-h6-r-ccu.h>
+#include <dt-bindings/reset/sun50i-h6-r-ccu.h>
+
+/* AHB/APB bus clocks are not exported except APB1 for R_PIO */
+#define CLK_R_AHB 1
+
+#define CLK_R_APB2 3
+
+#define CLK_NUMBER (CLK_W1 + 1)
+
+#endif /* _CCU_SUN50I_H6_R_H */