diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2014-02-25 19:53:31 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-02-25 19:53:31 -0500 |
commit | 86feafebbec2b510daf36ffbdbe10228ed890b00 (patch) | |
tree | 969a07bf90fde6edf00545db880256f456950511 | |
parent | 1dd4e5991cab573429a5d3b233c7f825d4a63eec (diff) |
ARM: dts: use macros in clock bindings for exynos5440
The patch replaces magic numbers with macros defined in DT header
in exynos5440 clock bindings.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Tomasz Figa <t.figa@samsung.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r-- | Documentation/devicetree/bindings/clock/exynos5440-clock.txt | 45 | ||||
-rw-r--r-- | arch/arm/boot/dts/exynos5440.dtsi | 33 |
2 files changed, 23 insertions, 55 deletions
diff --git a/Documentation/devicetree/bindings/clock/exynos5440-clock.txt b/Documentation/devicetree/bindings/clock/exynos5440-clock.txt index 9955dc9c7d96..5f7005f73058 100644 --- a/Documentation/devicetree/bindings/clock/exynos5440-clock.txt +++ b/Documentation/devicetree/bindings/clock/exynos5440-clock.txt | |||
@@ -12,45 +12,12 @@ Required Properties: | |||
12 | 12 | ||
13 | - #clock-cells: should be 1. | 13 | - #clock-cells: should be 1. |
14 | 14 | ||
15 | The following is the list of clocks generated by the controller. Each clock is | 15 | Each clock is assigned an identifier and client nodes can use this identifier |
16 | assigned an identifier and client nodes use this identifier to specify the | 16 | to specify the clock which they consume. |
17 | clock which they consume. | 17 | |
18 | 18 | All available clocks are defined as preprocessor macros in | |
19 | 19 | dt-bindings/clock/exynos5440.h header and can be used in device | |
20 | [Core Clocks] | 20 | tree sources. |
21 | |||
22 | Clock ID | ||
23 | ---------------------------- | ||
24 | |||
25 | xtal 1 | ||
26 | arm_clk 2 | ||
27 | |||
28 | [Peripheral Clock Gates] | ||
29 | |||
30 | Clock ID | ||
31 | ---------------------------- | ||
32 | |||
33 | spi_baud 16 | ||
34 | pb0_250 17 | ||
35 | pr0_250 18 | ||
36 | pr1_250 19 | ||
37 | b_250 20 | ||
38 | b_125 21 | ||
39 | b_200 22 | ||
40 | sata 23 | ||
41 | usb 24 | ||
42 | gmac0 25 | ||
43 | cs250 26 | ||
44 | pb0_250_o 27 | ||
45 | pr0_250_o 28 | ||
46 | pr1_250_o 29 | ||
47 | b_250_o 30 | ||
48 | b_125_o 31 | ||
49 | b_200_o 32 | ||
50 | sata_o 33 | ||
51 | usb_o 34 | ||
52 | gmac0_o 35 | ||
53 | cs250_o 36 | ||
54 | 21 | ||
55 | Example: An example of a clock controller node is listed below. | 22 | Example: An example of a clock controller node is listed below. |
56 | 23 | ||
diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi index 02a0a1226cef..75c7b89cec2f 100644 --- a/arch/arm/boot/dts/exynos5440.dtsi +++ b/arch/arm/boot/dts/exynos5440.dtsi | |||
@@ -9,6 +9,7 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <dt-bindings/clock/exynos5440.h> | ||
12 | #include "skeleton.dtsi" | 13 | #include "skeleton.dtsi" |
13 | 14 | ||
14 | / { | 15 | / { |
@@ -105,7 +106,7 @@ | |||
105 | compatible = "samsung,exynos4210-uart"; | 106 | compatible = "samsung,exynos4210-uart"; |
106 | reg = <0xB0000 0x1000>; | 107 | reg = <0xB0000 0x1000>; |
107 | interrupts = <0 2 0>; | 108 | interrupts = <0 2 0>; |
108 | clocks = <&clock 21>, <&clock 21>; | 109 | clocks = <&clock CLK_B_125>, <&clock CLK_B_125>; |
109 | clock-names = "uart", "clk_uart_baud0"; | 110 | clock-names = "uart", "clk_uart_baud0"; |
110 | }; | 111 | }; |
111 | 112 | ||
@@ -113,7 +114,7 @@ | |||
113 | compatible = "samsung,exynos4210-uart"; | 114 | compatible = "samsung,exynos4210-uart"; |
114 | reg = <0xC0000 0x1000>; | 115 | reg = <0xC0000 0x1000>; |
115 | interrupts = <0 3 0>; | 116 | interrupts = <0 3 0>; |
116 | clocks = <&clock 21>, <&clock 21>; | 117 | clocks = <&clock CLK_B_125>, <&clock CLK_B_125>; |
117 | clock-names = "uart", "clk_uart_baud0"; | 118 | clock-names = "uart", "clk_uart_baud0"; |
118 | }; | 119 | }; |
119 | 120 | ||
@@ -125,7 +126,7 @@ | |||
125 | #size-cells = <0>; | 126 | #size-cells = <0>; |
126 | samsung,spi-src-clk = <0>; | 127 | samsung,spi-src-clk = <0>; |
127 | num-cs = <1>; | 128 | num-cs = <1>; |
128 | clocks = <&clock 21>, <&clock 16>; | 129 | clocks = <&clock CLK_B_125>, <&clock CLK_SPI_BAUD>; |
129 | clock-names = "spi", "spi_busclk0"; | 130 | clock-names = "spi", "spi_busclk0"; |
130 | }; | 131 | }; |
131 | 132 | ||
@@ -161,7 +162,7 @@ | |||
161 | interrupts = <0 5 0>; | 162 | interrupts = <0 5 0>; |
162 | #address-cells = <1>; | 163 | #address-cells = <1>; |
163 | #size-cells = <0>; | 164 | #size-cells = <0>; |
164 | clocks = <&clock 21>; | 165 | clocks = <&clock CLK_B_125>; |
165 | clock-names = "i2c"; | 166 | clock-names = "i2c"; |
166 | }; | 167 | }; |
167 | 168 | ||
@@ -171,7 +172,7 @@ | |||
171 | interrupts = <0 6 0>; | 172 | interrupts = <0 6 0>; |
172 | #address-cells = <1>; | 173 | #address-cells = <1>; |
173 | #size-cells = <0>; | 174 | #size-cells = <0>; |
174 | clocks = <&clock 21>; | 175 | clocks = <&clock CLK_B_125>; |
175 | clock-names = "i2c"; | 176 | clock-names = "i2c"; |
176 | }; | 177 | }; |
177 | 178 | ||
@@ -179,7 +180,7 @@ | |||
179 | compatible = "samsung,s3c2410-wdt"; | 180 | compatible = "samsung,s3c2410-wdt"; |
180 | reg = <0x110000 0x1000>; | 181 | reg = <0x110000 0x1000>; |
181 | interrupts = <0 1 0>; | 182 | interrupts = <0 1 0>; |
182 | clocks = <&clock 21>; | 183 | clocks = <&clock CLK_B_125>; |
183 | clock-names = "watchdog"; | 184 | clock-names = "watchdog"; |
184 | }; | 185 | }; |
185 | 186 | ||
@@ -190,7 +191,7 @@ | |||
190 | interrupts = <0 31 4>; | 191 | interrupts = <0 31 4>; |
191 | interrupt-names = "macirq"; | 192 | interrupt-names = "macirq"; |
192 | phy-mode = "sgmii"; | 193 | phy-mode = "sgmii"; |
193 | clocks = <&clock 25>; | 194 | clocks = <&clock CLK_GMAC0>; |
194 | clock-names = "stmmaceth"; | 195 | clock-names = "stmmaceth"; |
195 | }; | 196 | }; |
196 | 197 | ||
@@ -206,7 +207,7 @@ | |||
206 | compatible = "samsung,s3c6410-rtc"; | 207 | compatible = "samsung,s3c6410-rtc"; |
207 | reg = <0x130000 0x1000>; | 208 | reg = <0x130000 0x1000>; |
208 | interrupts = <0 17 0>, <0 16 0>; | 209 | interrupts = <0 17 0>, <0 16 0>; |
209 | clocks = <&clock 21>; | 210 | clocks = <&clock CLK_B_125>; |
210 | clock-names = "rtc"; | 211 | clock-names = "rtc"; |
211 | }; | 212 | }; |
212 | 213 | ||
@@ -214,7 +215,7 @@ | |||
214 | compatible = "samsung,exynos5440-tmu"; | 215 | compatible = "samsung,exynos5440-tmu"; |
215 | reg = <0x160118 0x230>, <0x160368 0x10>; | 216 | reg = <0x160118 0x230>, <0x160368 0x10>; |
216 | interrupts = <0 58 0>; | 217 | interrupts = <0 58 0>; |
217 | clocks = <&clock 21>; | 218 | clocks = <&clock CLK_B_125>; |
218 | clock-names = "tmu_apbif"; | 219 | clock-names = "tmu_apbif"; |
219 | }; | 220 | }; |
220 | 221 | ||
@@ -222,7 +223,7 @@ | |||
222 | compatible = "samsung,exynos5440-tmu"; | 223 | compatible = "samsung,exynos5440-tmu"; |
223 | reg = <0x16011C 0x230>, <0x160368 0x10>; | 224 | reg = <0x16011C 0x230>, <0x160368 0x10>; |
224 | interrupts = <0 58 0>; | 225 | interrupts = <0 58 0>; |
225 | clocks = <&clock 21>; | 226 | clocks = <&clock CLK_B_125>; |
226 | clock-names = "tmu_apbif"; | 227 | clock-names = "tmu_apbif"; |
227 | }; | 228 | }; |
228 | 229 | ||
@@ -230,7 +231,7 @@ | |||
230 | compatible = "samsung,exynos5440-tmu"; | 231 | compatible = "samsung,exynos5440-tmu"; |
231 | reg = <0x160120 0x230>, <0x160368 0x10>; | 232 | reg = <0x160120 0x230>, <0x160368 0x10>; |
232 | interrupts = <0 58 0>; | 233 | interrupts = <0 58 0>; |
233 | clocks = <&clock 21>; | 234 | clocks = <&clock CLK_B_125>; |
234 | clock-names = "tmu_apbif"; | 235 | clock-names = "tmu_apbif"; |
235 | }; | 236 | }; |
236 | 237 | ||
@@ -238,7 +239,7 @@ | |||
238 | compatible = "snps,exynos5440-ahci"; | 239 | compatible = "snps,exynos5440-ahci"; |
239 | reg = <0x210000 0x10000>; | 240 | reg = <0x210000 0x10000>; |
240 | interrupts = <0 30 0>; | 241 | interrupts = <0 30 0>; |
241 | clocks = <&clock 23>; | 242 | clocks = <&clock CLK_SATA>; |
242 | clock-names = "sata"; | 243 | clock-names = "sata"; |
243 | }; | 244 | }; |
244 | 245 | ||
@@ -246,7 +247,7 @@ | |||
246 | compatible = "samsung,exynos5440-ohci"; | 247 | compatible = "samsung,exynos5440-ohci"; |
247 | reg = <0x220000 0x1000>; | 248 | reg = <0x220000 0x1000>; |
248 | interrupts = <0 29 0>; | 249 | interrupts = <0 29 0>; |
249 | clocks = <&clock 24>; | 250 | clocks = <&clock CLK_USB>; |
250 | clock-names = "usbhost"; | 251 | clock-names = "usbhost"; |
251 | }; | 252 | }; |
252 | 253 | ||
@@ -254,7 +255,7 @@ | |||
254 | compatible = "samsung,exynos5440-ehci"; | 255 | compatible = "samsung,exynos5440-ehci"; |
255 | reg = <0x221000 0x1000>; | 256 | reg = <0x221000 0x1000>; |
256 | interrupts = <0 29 0>; | 257 | interrupts = <0 29 0>; |
257 | clocks = <&clock 24>; | 258 | clocks = <&clock CLK_USB>; |
258 | clock-names = "usbhost"; | 259 | clock-names = "usbhost"; |
259 | }; | 260 | }; |
260 | 261 | ||
@@ -264,7 +265,7 @@ | |||
264 | 0x270000 0x1000 | 265 | 0x270000 0x1000 |
265 | 0x271000 0x40>; | 266 | 0x271000 0x40>; |
266 | interrupts = <0 20 0>, <0 21 0>, <0 22 0>; | 267 | interrupts = <0 20 0>, <0 21 0>, <0 22 0>; |
267 | clocks = <&clock 28>, <&clock 27>; | 268 | clocks = <&clock CLK_PR0_250_O>, <&clock CLK_PB0_250_O>; |
268 | clock-names = "pcie", "pcie_bus"; | 269 | clock-names = "pcie", "pcie_bus"; |
269 | #address-cells = <3>; | 270 | #address-cells = <3>; |
270 | #size-cells = <2>; | 271 | #size-cells = <2>; |
@@ -285,7 +286,7 @@ | |||
285 | 0x272000 0x1000 | 286 | 0x272000 0x1000 |
286 | 0x271040 0x40>; | 287 | 0x271040 0x40>; |
287 | interrupts = <0 23 0>, <0 24 0>, <0 25 0>; | 288 | interrupts = <0 23 0>, <0 24 0>, <0 25 0>; |
288 | clocks = <&clock 29>, <&clock 27>; | 289 | clocks = <&clock CLK_PR1_250_O>, <&clock CLK_PB0_250_O>; |
289 | clock-names = "pcie", "pcie_bus"; | 290 | clock-names = "pcie", "pcie_bus"; |
290 | #address-cells = <3>; | 291 | #address-cells = <3>; |
291 | #size-cells = <2>; | 292 | #size-cells = <2>; |