diff options
author | Josh Cartwright <josh.cartwright@ni.com> | 2012-11-08 13:04:26 -0500 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2012-11-14 10:10:32 -0500 |
commit | 0f586fbf6f6a9119392a5cb0f193ac11c753b09e (patch) | |
tree | 67557d9ef960e1acb598a5325f079037108c9464 | |
parent | 45aa2c27ada4829bc91bd80455bc67059ac06bc5 (diff) |
ARM: zynq: use zynq clk bindings
Make the Zynq platform use the newly created zynq clk bindings.
Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/boot/dts/zynq-7000.dtsi | 56 | ||||
-rw-r--r-- | arch/arm/boot/dts/zynq-zc702.dts | 4 | ||||
-rw-r--r-- | arch/arm/mach-zynq/common.c | 11 | ||||
-rw-r--r-- | drivers/clk/Makefile | 1 |
5 files changed, 73 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 21ed87bc3503..ccfe0ab8c877 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -959,6 +959,7 @@ config ARCH_ZYNQ | |||
959 | bool "Xilinx Zynq ARM Cortex A9 Platform" | 959 | bool "Xilinx Zynq ARM Cortex A9 Platform" |
960 | select ARM_AMBA | 960 | select ARM_AMBA |
961 | select ARM_GIC | 961 | select ARM_GIC |
962 | select COMMON_CLK | ||
962 | select CPU_V7 | 963 | select CPU_V7 |
963 | select GENERIC_CLOCKEVENTS | 964 | select GENERIC_CLOCKEVENTS |
964 | select ICST | 965 | select ICST |
diff --git a/arch/arm/boot/dts/zynq-7000.dtsi b/arch/arm/boot/dts/zynq-7000.dtsi index 8b30e596deab..bb3085ca4f06 100644 --- a/arch/arm/boot/dts/zynq-7000.dtsi +++ b/arch/arm/boot/dts/zynq-7000.dtsi | |||
@@ -53,5 +53,61 @@ | |||
53 | interrupts = <0 50 4>; | 53 | interrupts = <0 50 4>; |
54 | clock = <50000000>; | 54 | clock = <50000000>; |
55 | }; | 55 | }; |
56 | |||
57 | slcr: slcr@f8000000 { | ||
58 | compatible = "xlnx,zynq-slcr"; | ||
59 | reg = <0xF8000000 0x1000>; | ||
60 | |||
61 | clocks { | ||
62 | #address-cells = <1>; | ||
63 | #size-cells = <0>; | ||
64 | |||
65 | ps_clk: ps_clk { | ||
66 | #clock-cells = <0>; | ||
67 | compatible = "fixed-clock"; | ||
68 | /* clock-frequency set in board-specific file */ | ||
69 | clock-output-names = "ps_clk"; | ||
70 | }; | ||
71 | armpll: armpll { | ||
72 | #clock-cells = <0>; | ||
73 | compatible = "xlnx,zynq-pll"; | ||
74 | clocks = <&ps_clk>; | ||
75 | reg = <0x100 0x110>; | ||
76 | clock-output-names = "armpll"; | ||
77 | }; | ||
78 | ddrpll: ddrpll { | ||
79 | #clock-cells = <0>; | ||
80 | compatible = "xlnx,zynq-pll"; | ||
81 | clocks = <&ps_clk>; | ||
82 | reg = <0x104 0x114>; | ||
83 | clock-output-names = "ddrpll"; | ||
84 | }; | ||
85 | iopll: iopll { | ||
86 | #clock-cells = <0>; | ||
87 | compatible = "xlnx,zynq-pll"; | ||
88 | clocks = <&ps_clk>; | ||
89 | reg = <0x108 0x118>; | ||
90 | clock-output-names = "iopll"; | ||
91 | }; | ||
92 | uart_clk: uart_clk { | ||
93 | #clock-cells = <1>; | ||
94 | compatible = "xlnx,zynq-periph-clock"; | ||
95 | clocks = <&iopll &armpll &ddrpll>; | ||
96 | reg = <0x154>; | ||
97 | clock-output-names = "uart0_ref_clk", | ||
98 | "uart1_ref_clk"; | ||
99 | }; | ||
100 | cpu_clk: cpu_clk { | ||
101 | #clock-cells = <1>; | ||
102 | compatible = "xlnx,zynq-cpu-clock"; | ||
103 | clocks = <&iopll &armpll &ddrpll>; | ||
104 | reg = <0x120 0x1C4>; | ||
105 | clock-output-names = "cpu_6x4x", | ||
106 | "cpu_3x2x", | ||
107 | "cpu_2x", | ||
108 | "cpu_1x"; | ||
109 | }; | ||
110 | }; | ||
111 | }; | ||
56 | }; | 112 | }; |
57 | }; | 113 | }; |
diff --git a/arch/arm/boot/dts/zynq-zc702.dts b/arch/arm/boot/dts/zynq-zc702.dts index e25a307438ad..86f44d5b0265 100644 --- a/arch/arm/boot/dts/zynq-zc702.dts +++ b/arch/arm/boot/dts/zynq-zc702.dts | |||
@@ -28,3 +28,7 @@ | |||
28 | }; | 28 | }; |
29 | 29 | ||
30 | }; | 30 | }; |
31 | |||
32 | &ps_clk { | ||
33 | clock-frequency = <33333330>; | ||
34 | }; | ||
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c index 5441323e2a68..79bf5fb4dad3 100644 --- a/arch/arm/mach-zynq/common.c +++ b/arch/arm/mach-zynq/common.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/cpumask.h> | 19 | #include <linux/cpumask.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/clk/zynq.h> | ||
23 | #include <linux/of_address.h> | ||
22 | #include <linux/of_irq.h> | 24 | #include <linux/of_irq.h> |
23 | #include <linux/of_platform.h> | 25 | #include <linux/of_platform.h> |
24 | #include <linux/of.h> | 26 | #include <linux/of.h> |
@@ -96,6 +98,15 @@ static struct map_desc io_desc[] __initdata = { | |||
96 | 98 | ||
97 | static void __init xilinx_zynq_timer_init(void) | 99 | static void __init xilinx_zynq_timer_init(void) |
98 | { | 100 | { |
101 | struct device_node *np; | ||
102 | void __iomem *slcr; | ||
103 | |||
104 | np = of_find_compatible_node(NULL, NULL, "xlnx,zynq-slcr"); | ||
105 | slcr = of_iomap(np, 0); | ||
106 | WARN_ON(!slcr); | ||
107 | |||
108 | xilinx_zynq_clocks_init(slcr); | ||
109 | |||
99 | xttcpss_timer_init(); | 110 | xttcpss_timer_init(); |
100 | } | 111 | } |
101 | 112 | ||
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index 71a25b91de00..d35a34c58369 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile | |||
@@ -19,6 +19,7 @@ endif | |||
19 | obj-$(CONFIG_MACH_LOONGSON1) += clk-ls1x.o | 19 | obj-$(CONFIG_MACH_LOONGSON1) += clk-ls1x.o |
20 | obj-$(CONFIG_ARCH_U8500) += ux500/ | 20 | obj-$(CONFIG_ARCH_U8500) += ux500/ |
21 | obj-$(CONFIG_ARCH_VT8500) += clk-vt8500.o | 21 | obj-$(CONFIG_ARCH_VT8500) += clk-vt8500.o |
22 | obj-$(CONFIG_ARCH_ZYNQ) += clk-zynq.o | ||
22 | 23 | ||
23 | # Chip specific | 24 | # Chip specific |
24 | obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o | 25 | obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o |