diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-09 17:28:38 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-09 17:28:38 -0500 |
commit | dfc1ebe76663d582a01c9dc572395cf8086d01de (patch) | |
tree | 54a5ac91214a90f82c27b6e38099a4470837729e /arch/arm | |
parent | acc952c1f373bf3f66cc7a10680eee1762bed40b (diff) | |
parent | b001befe58691ef3627458cd814e8cee7f845c5f (diff) |
Merge tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Device tree conversions for samsung and tegra
Both platforms had some initial device tree support, but this adds
much more to actually make it usable.
* tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (45 commits)
ARM: dts: Add intial dts file for EXYNOS4210 SoC, SMDKV310 and ORIGEN
ARM: EXYNOS: Add Exynos4 device tree enabled board file
rtc: rtc-s3c: Add device tree support
input: samsung-keypad: Add device tree support
ARM: S5PV210: Modify platform data for pl330 driver
ARM: S5PC100: Modify platform data for pl330 driver
ARM: S5P64x0: Modify platform data for pl330 driver
ARM: EXYNOS: Add a alias for pdma clocks
ARM: EXYNOS: Limit usage of pl330 device instance to non-dt build
ARM: SAMSUNG: Add device tree support for pl330 dma engine wrappers
DMA: PL330: Add device tree support
ARM: EXYNOS: Modify platform data for pl330 driver
DMA: PL330: Infer transfer direction from transfer request instead of platform data
DMA: PL330: move filter function into driver
serial: samsung: Fix build for non-Exynos4210 devices
serial: samsung: add device tree support
serial: samsung: merge probe() function from all SoC specific extensions
serial: samsung: merge all SoC specific port reset functions
ARM: SAMSUNG: register uart clocks to clock lookup list
serial: samsung: remove all uses of get_clksrc and set_clksrc
...
Fix up fairly trivial conflicts in arch/arm/mach-s3c2440/clock.c and
drivers/tty/serial/Kconfig both due to just adding code close to
changes.
Diffstat (limited to 'arch/arm')
50 files changed, 1999 insertions, 1107 deletions
diff --git a/arch/arm/boot/dts/exynos4210-origen.dts b/arch/arm/boot/dts/exynos4210-origen.dts new file mode 100644 index 000000000000..b8c476384eef --- /dev/null +++ b/arch/arm/boot/dts/exynos4210-origen.dts | |||
@@ -0,0 +1,137 @@ | |||
1 | /* | ||
2 | * Samsung's Exynos4210 based Origen board device tree source | ||
3 | * | ||
4 | * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. | ||
5 | * http://www.samsung.com | ||
6 | * Copyright (c) 2010-2011 Linaro Ltd. | ||
7 | * www.linaro.org | ||
8 | * | ||
9 | * Device tree source file for Insignal's Origen board which is based on | ||
10 | * Samsung's Exynos4210 SoC. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License version 2 as | ||
14 | * published by the Free Software Foundation. | ||
15 | */ | ||
16 | |||
17 | /dts-v1/; | ||
18 | /include/ "exynos4210.dtsi" | ||
19 | |||
20 | / { | ||
21 | model = "Insignal Origen evaluation board based on Exynos4210"; | ||
22 | compatible = "insignal,origen", "samsung,exynos4210"; | ||
23 | |||
24 | memory { | ||
25 | reg = <0x40000000 0x40000000>; | ||
26 | }; | ||
27 | |||
28 | chosen { | ||
29 | bootargs ="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC2,115200 init=/linuxrc"; | ||
30 | }; | ||
31 | |||
32 | sdhci@12530000 { | ||
33 | samsung,sdhci-bus-width = <4>; | ||
34 | linux,mmc_cap_4_bit_data; | ||
35 | samsung,sdhci-cd-internal; | ||
36 | gpio-cd = <&gpk2 2 2 3 3>; | ||
37 | gpios = <&gpk2 0 2 0 3>, | ||
38 | <&gpk2 1 2 0 3>, | ||
39 | <&gpk2 3 2 3 3>, | ||
40 | <&gpk2 4 2 3 3>, | ||
41 | <&gpk2 5 2 3 3>, | ||
42 | <&gpk2 6 2 3 3>; | ||
43 | }; | ||
44 | |||
45 | sdhci@12510000 { | ||
46 | samsung,sdhci-bus-width = <4>; | ||
47 | linux,mmc_cap_4_bit_data; | ||
48 | samsung,sdhci-cd-internal; | ||
49 | gpio-cd = <&gpk0 2 2 3 3>; | ||
50 | gpios = <&gpk0 0 2 0 3>, | ||
51 | <&gpk0 1 2 0 3>, | ||
52 | <&gpk0 3 2 3 3>, | ||
53 | <&gpk0 4 2 3 3>, | ||
54 | <&gpk0 5 2 3 3>, | ||
55 | <&gpk0 6 2 3 3>; | ||
56 | }; | ||
57 | |||
58 | gpio_keys { | ||
59 | compatible = "gpio-keys"; | ||
60 | #address-cells = <1>; | ||
61 | #size-cells = <0>; | ||
62 | |||
63 | up { | ||
64 | label = "Up"; | ||
65 | gpios = <&gpx2 0 0 0 2>; | ||
66 | linux,code = <103>; | ||
67 | }; | ||
68 | |||
69 | down { | ||
70 | label = "Down"; | ||
71 | gpios = <&gpx2 1 0 0 2>; | ||
72 | linux,code = <108>; | ||
73 | }; | ||
74 | |||
75 | back { | ||
76 | label = "Back"; | ||
77 | gpios = <&gpx1 7 0 0 2>; | ||
78 | linux,code = <158>; | ||
79 | }; | ||
80 | |||
81 | home { | ||
82 | label = "Home"; | ||
83 | gpios = <&gpx1 6 0 0 2>; | ||
84 | linux,code = <102>; | ||
85 | }; | ||
86 | |||
87 | menu { | ||
88 | label = "Menu"; | ||
89 | gpios = <&gpx1 5 0 0 2>; | ||
90 | linux,code = <139>; | ||
91 | }; | ||
92 | }; | ||
93 | |||
94 | keypad@100A0000 { | ||
95 | status = "disabled"; | ||
96 | }; | ||
97 | |||
98 | sdhci@12520000 { | ||
99 | status = "disabled"; | ||
100 | }; | ||
101 | |||
102 | sdhci@12540000 { | ||
103 | status = "disabled"; | ||
104 | }; | ||
105 | |||
106 | i2c@13860000 { | ||
107 | status = "disabled"; | ||
108 | }; | ||
109 | |||
110 | i2c@13870000 { | ||
111 | status = "disabled"; | ||
112 | }; | ||
113 | |||
114 | i2c@13880000 { | ||
115 | status = "disabled"; | ||
116 | }; | ||
117 | |||
118 | i2c@13890000 { | ||
119 | status = "disabled"; | ||
120 | }; | ||
121 | |||
122 | i2c@138A0000 { | ||
123 | status = "disabled"; | ||
124 | }; | ||
125 | |||
126 | i2c@138B0000 { | ||
127 | status = "disabled"; | ||
128 | }; | ||
129 | |||
130 | i2c@138C0000 { | ||
131 | status = "disabled"; | ||
132 | }; | ||
133 | |||
134 | i2c@138D0000 { | ||
135 | status = "disabled"; | ||
136 | }; | ||
137 | }; | ||
diff --git a/arch/arm/boot/dts/exynos4210-smdkv310.dts b/arch/arm/boot/dts/exynos4210-smdkv310.dts new file mode 100644 index 000000000000..27afc8e535ca --- /dev/null +++ b/arch/arm/boot/dts/exynos4210-smdkv310.dts | |||
@@ -0,0 +1,182 @@ | |||
1 | /* | ||
2 | * Samsung's Exynos4210 based SMDKV310 board device tree source | ||
3 | * | ||
4 | * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. | ||
5 | * http://www.samsung.com | ||
6 | * Copyright (c) 2010-2011 Linaro Ltd. | ||
7 | * www.linaro.org | ||
8 | * | ||
9 | * Device tree source file for Samsung's SMDKV310 board which is based on | ||
10 | * Samsung's Exynos4210 SoC. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License version 2 as | ||
14 | * published by the Free Software Foundation. | ||
15 | */ | ||
16 | |||
17 | /dts-v1/; | ||
18 | /include/ "exynos4210.dtsi" | ||
19 | |||
20 | / { | ||
21 | model = "Samsung smdkv310 evaluation board based on Exynos4210"; | ||
22 | compatible = "samsung,smdkv310", "samsung,exynos4210"; | ||
23 | |||
24 | memory { | ||
25 | reg = <0x40000000 0x80000000>; | ||
26 | }; | ||
27 | |||
28 | chosen { | ||
29 | bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc"; | ||
30 | }; | ||
31 | |||
32 | sdhci@12530000 { | ||
33 | samsung,sdhci-bus-width = <4>; | ||
34 | linux,mmc_cap_4_bit_data; | ||
35 | samsung,sdhci-cd-internal; | ||
36 | gpio-cd = <&gpk2 2 2 3 3>; | ||
37 | gpios = <&gpk2 0 2 0 3>, | ||
38 | <&gpk2 1 2 0 3>, | ||
39 | <&gpk2 3 2 3 3>, | ||
40 | <&gpk2 4 2 3 3>, | ||
41 | <&gpk2 5 2 3 3>, | ||
42 | <&gpk2 6 2 3 3>; | ||
43 | }; | ||
44 | |||
45 | keypad@100A0000 { | ||
46 | samsung,keypad-num-rows = <2>; | ||
47 | samsung,keypad-num-columns = <8>; | ||
48 | linux,keypad-no-autorepeat; | ||
49 | linux,keypad-wakeup; | ||
50 | |||
51 | row-gpios = <&gpx2 0 3 3 0>, | ||
52 | <&gpx2 1 3 3 0>; | ||
53 | |||
54 | col-gpios = <&gpx1 0 3 0 0>, | ||
55 | <&gpx1 1 3 0 0>, | ||
56 | <&gpx1 2 3 0 0>, | ||
57 | <&gpx1 3 3 0 0>, | ||
58 | <&gpx1 4 3 0 0>, | ||
59 | <&gpx1 5 3 0 0>, | ||
60 | <&gpx1 6 3 0 0>, | ||
61 | <&gpx1 7 3 0 0>; | ||
62 | |||
63 | key_1 { | ||
64 | keypad,row = <0>; | ||
65 | keypad,column = <3>; | ||
66 | linux,code = <2>; | ||
67 | }; | ||
68 | |||
69 | key_2 { | ||
70 | keypad,row = <0>; | ||
71 | keypad,column = <4>; | ||
72 | linux,code = <3>; | ||
73 | }; | ||
74 | |||
75 | key_3 { | ||
76 | keypad,row = <0>; | ||
77 | keypad,column = <5>; | ||
78 | linux,code = <4>; | ||
79 | }; | ||
80 | |||
81 | key_4 { | ||
82 | keypad,row = <0>; | ||
83 | keypad,column = <6>; | ||
84 | linux,code = <5>; | ||
85 | }; | ||
86 | |||
87 | key_5 { | ||
88 | keypad,row = <0>; | ||
89 | keypad,column = <7>; | ||
90 | linux,code = <6>; | ||
91 | }; | ||
92 | |||
93 | key_a { | ||
94 | keypad,row = <1>; | ||
95 | keypad,column = <3>; | ||
96 | linux,code = <30>; | ||
97 | }; | ||
98 | |||
99 | key_b { | ||
100 | keypad,row = <1>; | ||
101 | keypad,column = <4>; | ||
102 | linux,code = <48>; | ||
103 | }; | ||
104 | |||
105 | key_c { | ||
106 | keypad,row = <1>; | ||
107 | keypad,column = <5>; | ||
108 | linux,code = <46>; | ||
109 | }; | ||
110 | |||
111 | key_d { | ||
112 | keypad,row = <1>; | ||
113 | keypad,column = <6>; | ||
114 | linux,code = <32>; | ||
115 | }; | ||
116 | |||
117 | key_e { | ||
118 | keypad,row = <1>; | ||
119 | keypad,column = <7>; | ||
120 | linux,code = <18>; | ||
121 | }; | ||
122 | }; | ||
123 | |||
124 | i2c@13860000 { | ||
125 | #address-cells = <1>; | ||
126 | #size-cells = <0>; | ||
127 | samsung,i2c-sda-delay = <100>; | ||
128 | samsung,i2c-max-bus-freq = <20000>; | ||
129 | gpios = <&gpd1 0 2 3 0>, | ||
130 | <&gpd1 1 2 3 0>; | ||
131 | |||
132 | eeprom@50 { | ||
133 | compatible = "samsung,24ad0xd1"; | ||
134 | reg = <0x50>; | ||
135 | }; | ||
136 | |||
137 | eeprom@52 { | ||
138 | compatible = "samsung,24ad0xd1"; | ||
139 | reg = <0x52>; | ||
140 | }; | ||
141 | }; | ||
142 | |||
143 | sdhci@12510000 { | ||
144 | status = "disabled"; | ||
145 | }; | ||
146 | |||
147 | sdhci@12520000 { | ||
148 | status = "disabled"; | ||
149 | }; | ||
150 | |||
151 | sdhci@12540000 { | ||
152 | status = "disabled"; | ||
153 | }; | ||
154 | |||
155 | i2c@13870000 { | ||
156 | status = "disabled"; | ||
157 | }; | ||
158 | |||
159 | i2c@13880000 { | ||
160 | status = "disabled"; | ||
161 | }; | ||
162 | |||
163 | i2c@13890000 { | ||
164 | status = "disabled"; | ||
165 | }; | ||
166 | |||
167 | i2c@138A0000 { | ||
168 | status = "disabled"; | ||
169 | }; | ||
170 | |||
171 | i2c@138B0000 { | ||
172 | status = "disabled"; | ||
173 | }; | ||
174 | |||
175 | i2c@138C0000 { | ||
176 | status = "disabled"; | ||
177 | }; | ||
178 | |||
179 | i2c@138D0000 { | ||
180 | status = "disabled"; | ||
181 | }; | ||
182 | }; | ||
diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi new file mode 100644 index 000000000000..63d7578856c1 --- /dev/null +++ b/arch/arm/boot/dts/exynos4210.dtsi | |||
@@ -0,0 +1,397 @@ | |||
1 | /* | ||
2 | * Samsung's Exynos4210 SoC device tree source | ||
3 | * | ||
4 | * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. | ||
5 | * http://www.samsung.com | ||
6 | * Copyright (c) 2010-2011 Linaro Ltd. | ||
7 | * www.linaro.org | ||
8 | * | ||
9 | * Samsung's Exynos4210 SoC device nodes are listed in this file. Exynos4210 | ||
10 | * based board files can include this file and provide values for board specfic | ||
11 | * bindings. | ||
12 | * | ||
13 | * Note: This file does not include device nodes for all the controllers in | ||
14 | * Exynos4210 SoC. As device tree coverage for Exynos4210 increases, additional | ||
15 | * nodes can be added to this file. | ||
16 | * | ||
17 | * This program is free software; you can redistribute it and/or modify | ||
18 | * it under the terms of the GNU General Public License version 2 as | ||
19 | * published by the Free Software Foundation. | ||
20 | */ | ||
21 | |||
22 | /include/ "skeleton.dtsi" | ||
23 | |||
24 | / { | ||
25 | compatible = "samsung,exynos4210"; | ||
26 | interrupt-parent = <&gic>; | ||
27 | |||
28 | gic:interrupt-controller@10490000 { | ||
29 | compatible = "arm,cortex-a9-gic"; | ||
30 | #interrupt-cells = <3>; | ||
31 | interrupt-controller; | ||
32 | reg = <0x10490000 0x1000>, <0x10480000 0x100>; | ||
33 | }; | ||
34 | |||
35 | watchdog@10060000 { | ||
36 | compatible = "samsung,s3c2410-wdt"; | ||
37 | reg = <0x10060000 0x100>; | ||
38 | interrupts = <0 43 0>; | ||
39 | }; | ||
40 | |||
41 | rtc@10070000 { | ||
42 | compatible = "samsung,s3c6410-rtc"; | ||
43 | reg = <0x10070000 0x100>; | ||
44 | interrupts = <0 44 0>, <0 45 0>; | ||
45 | }; | ||
46 | |||
47 | keypad@100A0000 { | ||
48 | compatible = "samsung,s5pv210-keypad"; | ||
49 | reg = <0x100A0000 0x100>; | ||
50 | interrupts = <0 109 0>; | ||
51 | }; | ||
52 | |||
53 | sdhci@12510000 { | ||
54 | compatible = "samsung,exynos4210-sdhci"; | ||
55 | reg = <0x12510000 0x100>; | ||
56 | interrupts = <0 73 0>; | ||
57 | }; | ||
58 | |||
59 | sdhci@12520000 { | ||
60 | compatible = "samsung,exynos4210-sdhci"; | ||
61 | reg = <0x12520000 0x100>; | ||
62 | interrupts = <0 74 0>; | ||
63 | }; | ||
64 | |||
65 | sdhci@12530000 { | ||
66 | compatible = "samsung,exynos4210-sdhci"; | ||
67 | reg = <0x12530000 0x100>; | ||
68 | interrupts = <0 75 0>; | ||
69 | }; | ||
70 | |||
71 | sdhci@12540000 { | ||
72 | compatible = "samsung,exynos4210-sdhci"; | ||
73 | reg = <0x12540000 0x100>; | ||
74 | interrupts = <0 76 0>; | ||
75 | }; | ||
76 | |||
77 | serial@13800000 { | ||
78 | compatible = "samsung,exynos4210-uart"; | ||
79 | reg = <0x13800000 0x100>; | ||
80 | interrupts = <0 52 0>; | ||
81 | }; | ||
82 | |||
83 | serial@13810000 { | ||
84 | compatible = "samsung,exynos4210-uart"; | ||
85 | reg = <0x13810000 0x100>; | ||
86 | interrupts = <0 53 0>; | ||
87 | }; | ||
88 | |||
89 | serial@13820000 { | ||
90 | compatible = "samsung,exynos4210-uart"; | ||
91 | reg = <0x13820000 0x100>; | ||
92 | interrupts = <0 54 0>; | ||
93 | }; | ||
94 | |||
95 | serial@13830000 { | ||
96 | compatible = "samsung,exynos4210-uart"; | ||
97 | reg = <0x13830000 0x100>; | ||
98 | interrupts = <0 55 0>; | ||
99 | }; | ||
100 | |||
101 | i2c@13860000 { | ||
102 | compatible = "samsung,s3c2440-i2c"; | ||
103 | reg = <0x13860000 0x100>; | ||
104 | interrupts = <0 58 0>; | ||
105 | }; | ||
106 | |||
107 | i2c@13870000 { | ||
108 | compatible = "samsung,s3c2440-i2c"; | ||
109 | reg = <0x13870000 0x100>; | ||
110 | interrupts = <0 59 0>; | ||
111 | }; | ||
112 | |||
113 | i2c@13880000 { | ||
114 | compatible = "samsung,s3c2440-i2c"; | ||
115 | reg = <0x13880000 0x100>; | ||
116 | interrupts = <0 60 0>; | ||
117 | }; | ||
118 | |||
119 | i2c@13890000 { | ||
120 | compatible = "samsung,s3c2440-i2c"; | ||
121 | reg = <0x13890000 0x100>; | ||
122 | interrupts = <0 61 0>; | ||
123 | }; | ||
124 | |||
125 | i2c@138A0000 { | ||
126 | compatible = "samsung,s3c2440-i2c"; | ||
127 | reg = <0x138A0000 0x100>; | ||
128 | interrupts = <0 62 0>; | ||
129 | }; | ||
130 | |||
131 | i2c@138B0000 { | ||
132 | compatible = "samsung,s3c2440-i2c"; | ||
133 | reg = <0x138B0000 0x100>; | ||
134 | interrupts = <0 63 0>; | ||
135 | }; | ||
136 | |||
137 | i2c@138C0000 { | ||
138 | compatible = "samsung,s3c2440-i2c"; | ||
139 | reg = <0x138C0000 0x100>; | ||
140 | interrupts = <0 64 0>; | ||
141 | }; | ||
142 | |||
143 | i2c@138D0000 { | ||
144 | compatible = "samsung,s3c2440-i2c"; | ||
145 | reg = <0x138D0000 0x100>; | ||
146 | interrupts = <0 65 0>; | ||
147 | }; | ||
148 | |||
149 | amba { | ||
150 | #address-cells = <1>; | ||
151 | #size-cells = <1>; | ||
152 | compatible = "arm,amba-bus"; | ||
153 | interrupt-parent = <&gic>; | ||
154 | ranges; | ||
155 | |||
156 | pdma0: pdma@12680000 { | ||
157 | compatible = "arm,pl330", "arm,primecell"; | ||
158 | reg = <0x12680000 0x1000>; | ||
159 | interrupts = <0 35 0>; | ||
160 | }; | ||
161 | |||
162 | pdma1: pdma@12690000 { | ||
163 | compatible = "arm,pl330", "arm,primecell"; | ||
164 | reg = <0x12690000 0x1000>; | ||
165 | interrupts = <0 36 0>; | ||
166 | }; | ||
167 | }; | ||
168 | |||
169 | gpio-controllers { | ||
170 | #address-cells = <1>; | ||
171 | #size-cells = <1>; | ||
172 | gpio-controller; | ||
173 | ranges; | ||
174 | |||
175 | gpa0: gpio-controller@11400000 { | ||
176 | compatible = "samsung,exynos4-gpio"; | ||
177 | reg = <0x11400000 0x20>; | ||
178 | #gpio-cells = <4>; | ||
179 | }; | ||
180 | |||
181 | gpa1: gpio-controller@11400020 { | ||
182 | compatible = "samsung,exynos4-gpio"; | ||
183 | reg = <0x11400020 0x20>; | ||
184 | #gpio-cells = <4>; | ||
185 | }; | ||
186 | |||
187 | gpb: gpio-controller@11400040 { | ||
188 | compatible = "samsung,exynos4-gpio"; | ||
189 | reg = <0x11400040 0x20>; | ||
190 | #gpio-cells = <4>; | ||
191 | }; | ||
192 | |||
193 | gpc0: gpio-controller@11400060 { | ||
194 | compatible = "samsung,exynos4-gpio"; | ||
195 | reg = <0x11400060 0x20>; | ||
196 | #gpio-cells = <4>; | ||
197 | }; | ||
198 | |||
199 | gpc1: gpio-controller@11400080 { | ||
200 | compatible = "samsung,exynos4-gpio"; | ||
201 | reg = <0x11400080 0x20>; | ||
202 | #gpio-cells = <4>; | ||
203 | }; | ||
204 | |||
205 | gpd0: gpio-controller@114000A0 { | ||
206 | compatible = "samsung,exynos4-gpio"; | ||
207 | reg = <0x114000A0 0x20>; | ||
208 | #gpio-cells = <4>; | ||
209 | }; | ||
210 | |||
211 | gpd1: gpio-controller@114000C0 { | ||
212 | compatible = "samsung,exynos4-gpio"; | ||
213 | reg = <0x114000C0 0x20>; | ||
214 | #gpio-cells = <4>; | ||
215 | }; | ||
216 | |||
217 | gpe0: gpio-controller@114000E0 { | ||
218 | compatible = "samsung,exynos4-gpio"; | ||
219 | reg = <0x114000E0 0x20>; | ||
220 | #gpio-cells = <4>; | ||
221 | }; | ||
222 | |||
223 | gpe1: gpio-controller@11400100 { | ||
224 | compatible = "samsung,exynos4-gpio"; | ||
225 | reg = <0x11400100 0x20>; | ||
226 | #gpio-cells = <4>; | ||
227 | }; | ||
228 | |||
229 | gpe2: gpio-controller@11400120 { | ||
230 | compatible = "samsung,exynos4-gpio"; | ||
231 | reg = <0x11400120 0x20>; | ||
232 | #gpio-cells = <4>; | ||
233 | }; | ||
234 | |||
235 | gpe3: gpio-controller@11400140 { | ||
236 | compatible = "samsung,exynos4-gpio"; | ||
237 | reg = <0x11400140 0x20>; | ||
238 | #gpio-cells = <4>; | ||
239 | }; | ||
240 | |||
241 | gpe4: gpio-controller@11400160 { | ||
242 | compatible = "samsung,exynos4-gpio"; | ||
243 | reg = <0x11400160 0x20>; | ||
244 | #gpio-cells = <4>; | ||
245 | }; | ||
246 | |||
247 | gpf0: gpio-controller@11400180 { | ||
248 | compatible = "samsung,exynos4-gpio"; | ||
249 | reg = <0x11400180 0x20>; | ||
250 | #gpio-cells = <4>; | ||
251 | }; | ||
252 | |||
253 | gpf1: gpio-controller@114001A0 { | ||
254 | compatible = "samsung,exynos4-gpio"; | ||
255 | reg = <0x114001A0 0x20>; | ||
256 | #gpio-cells = <4>; | ||
257 | }; | ||
258 | |||
259 | gpf2: gpio-controller@114001C0 { | ||
260 | compatible = "samsung,exynos4-gpio"; | ||
261 | reg = <0x114001C0 0x20>; | ||
262 | #gpio-cells = <4>; | ||
263 | }; | ||
264 | |||
265 | gpf3: gpio-controller@114001E0 { | ||
266 | compatible = "samsung,exynos4-gpio"; | ||
267 | reg = <0x114001E0 0x20>; | ||
268 | #gpio-cells = <4>; | ||
269 | }; | ||
270 | |||
271 | gpj0: gpio-controller@11000000 { | ||
272 | compatible = "samsung,exynos4-gpio"; | ||
273 | reg = <0x11000000 0x20>; | ||
274 | #gpio-cells = <4>; | ||
275 | }; | ||
276 | |||
277 | gpj1: gpio-controller@11000020 { | ||
278 | compatible = "samsung,exynos4-gpio"; | ||
279 | reg = <0x11000020 0x20>; | ||
280 | #gpio-cells = <4>; | ||
281 | }; | ||
282 | |||
283 | gpk0: gpio-controller@11000040 { | ||
284 | compatible = "samsung,exynos4-gpio"; | ||
285 | reg = <0x11000040 0x20>; | ||
286 | #gpio-cells = <4>; | ||
287 | }; | ||
288 | |||
289 | gpk1: gpio-controller@11000060 { | ||
290 | compatible = "samsung,exynos4-gpio"; | ||
291 | reg = <0x11000060 0x20>; | ||
292 | #gpio-cells = <4>; | ||
293 | }; | ||
294 | |||
295 | gpk2: gpio-controller@11000080 { | ||
296 | compatible = "samsung,exynos4-gpio"; | ||
297 | reg = <0x11000080 0x20>; | ||
298 | #gpio-cells = <4>; | ||
299 | }; | ||
300 | |||
301 | gpk3: gpio-controller@110000A0 { | ||
302 | compatible = "samsung,exynos4-gpio"; | ||
303 | reg = <0x110000A0 0x20>; | ||
304 | #gpio-cells = <4>; | ||
305 | }; | ||
306 | |||
307 | gpl0: gpio-controller@110000C0 { | ||
308 | compatible = "samsung,exynos4-gpio"; | ||
309 | reg = <0x110000C0 0x20>; | ||
310 | #gpio-cells = <4>; | ||
311 | }; | ||
312 | |||
313 | gpl1: gpio-controller@110000E0 { | ||
314 | compatible = "samsung,exynos4-gpio"; | ||
315 | reg = <0x110000E0 0x20>; | ||
316 | #gpio-cells = <4>; | ||
317 | }; | ||
318 | |||
319 | gpl2: gpio-controller@11000100 { | ||
320 | compatible = "samsung,exynos4-gpio"; | ||
321 | reg = <0x11000100 0x20>; | ||
322 | #gpio-cells = <4>; | ||
323 | }; | ||
324 | |||
325 | gpy0: gpio-controller@11000120 { | ||
326 | compatible = "samsung,exynos4-gpio"; | ||
327 | reg = <0x11000120 0x20>; | ||
328 | #gpio-cells = <4>; | ||
329 | }; | ||
330 | |||
331 | gpy1: gpio-controller@11000140 { | ||
332 | compatible = "samsung,exynos4-gpio"; | ||
333 | reg = <0x11000140 0x20>; | ||
334 | #gpio-cells = <4>; | ||
335 | }; | ||
336 | |||
337 | gpy2: gpio-controller@11000160 { | ||
338 | compatible = "samsung,exynos4-gpio"; | ||
339 | reg = <0x11000160 0x20>; | ||
340 | #gpio-cells = <4>; | ||
341 | }; | ||
342 | |||
343 | gpy3: gpio-controller@11000180 { | ||
344 | compatible = "samsung,exynos4-gpio"; | ||
345 | reg = <0x11000180 0x20>; | ||
346 | #gpio-cells = <4>; | ||
347 | }; | ||
348 | |||
349 | gpy4: gpio-controller@110001A0 { | ||
350 | compatible = "samsung,exynos4-gpio"; | ||
351 | reg = <0x110001A0 0x20>; | ||
352 | #gpio-cells = <4>; | ||
353 | }; | ||
354 | |||
355 | gpy5: gpio-controller@110001C0 { | ||
356 | compatible = "samsung,exynos4-gpio"; | ||
357 | reg = <0x110001C0 0x20>; | ||
358 | #gpio-cells = <4>; | ||
359 | }; | ||
360 | |||
361 | gpy6: gpio-controller@110001E0 { | ||
362 | compatible = "samsung,exynos4-gpio"; | ||
363 | reg = <0x110001E0 0x20>; | ||
364 | #gpio-cells = <4>; | ||
365 | }; | ||
366 | |||
367 | gpx0: gpio-controller@11000C00 { | ||
368 | compatible = "samsung,exynos4-gpio"; | ||
369 | reg = <0x11000C00 0x20>; | ||
370 | #gpio-cells = <4>; | ||
371 | }; | ||
372 | |||
373 | gpx1: gpio-controller@11000C20 { | ||
374 | compatible = "samsung,exynos4-gpio"; | ||
375 | reg = <0x11000C20 0x20>; | ||
376 | #gpio-cells = <4>; | ||
377 | }; | ||
378 | |||
379 | gpx2: gpio-controller@11000C40 { | ||
380 | compatible = "samsung,exynos4-gpio"; | ||
381 | reg = <0x11000C40 0x20>; | ||
382 | #gpio-cells = <4>; | ||
383 | }; | ||
384 | |||
385 | gpx3: gpio-controller@11000C60 { | ||
386 | compatible = "samsung,exynos4-gpio"; | ||
387 | reg = <0x11000C60 0x20>; | ||
388 | #gpio-cells = <4>; | ||
389 | }; | ||
390 | |||
391 | gpz: gpio-controller@03860000 { | ||
392 | compatible = "samsung,exynos4-gpio"; | ||
393 | reg = <0x03860000 0x20>; | ||
394 | #gpio-cells = <4>; | ||
395 | }; | ||
396 | }; | ||
397 | }; | ||
diff --git a/arch/arm/boot/dts/tegra-harmony.dts b/arch/arm/boot/dts/tegra-harmony.dts index 0e225b86b652..80afa1b70b80 100644 --- a/arch/arm/boot/dts/tegra-harmony.dts +++ b/arch/arm/boot/dts/tegra-harmony.dts | |||
@@ -1,16 +1,11 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /memreserve/ 0x1c000000 0x04000000; | ||
4 | /include/ "tegra20.dtsi" | 3 | /include/ "tegra20.dtsi" |
5 | 4 | ||
6 | / { | 5 | / { |
7 | model = "NVIDIA Tegra2 Harmony evaluation board"; | 6 | model = "NVIDIA Tegra2 Harmony evaluation board"; |
8 | compatible = "nvidia,harmony", "nvidia,tegra20"; | 7 | compatible = "nvidia,harmony", "nvidia,tegra20"; |
9 | 8 | ||
10 | chosen { | ||
11 | bootargs = "vmalloc=192M video=tegrafb console=ttyS0,115200n8 root=/dev/mmcblk0p2 rw rootwait"; | ||
12 | }; | ||
13 | |||
14 | memory@0 { | 9 | memory@0 { |
15 | reg = < 0x00000000 0x40000000 >; | 10 | reg = < 0x00000000 0x40000000 >; |
16 | }; | 11 | }; |
@@ -52,16 +47,40 @@ | |||
52 | ext-mic-en-gpios = <&gpio 185 0>; | 47 | ext-mic-en-gpios = <&gpio 185 0>; |
53 | }; | 48 | }; |
54 | 49 | ||
50 | serial@70006000 { | ||
51 | status = "disable"; | ||
52 | }; | ||
53 | |||
54 | serial@70006040 { | ||
55 | status = "disable"; | ||
56 | }; | ||
57 | |||
58 | serial@70006200 { | ||
59 | status = "disable"; | ||
60 | }; | ||
61 | |||
55 | serial@70006300 { | 62 | serial@70006300 { |
56 | clock-frequency = < 216000000 >; | 63 | clock-frequency = < 216000000 >; |
57 | }; | 64 | }; |
58 | 65 | ||
66 | serial@70006400 { | ||
67 | status = "disable"; | ||
68 | }; | ||
69 | |||
70 | sdhci@c8000000 { | ||
71 | status = "disable"; | ||
72 | }; | ||
73 | |||
59 | sdhci@c8000200 { | 74 | sdhci@c8000200 { |
60 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ | 75 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ |
61 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ | 76 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ |
62 | power-gpios = <&gpio 155 0>; /* gpio PT3 */ | 77 | power-gpios = <&gpio 155 0>; /* gpio PT3 */ |
63 | }; | 78 | }; |
64 | 79 | ||
80 | sdhci@c8000400 { | ||
81 | status = "disable"; | ||
82 | }; | ||
83 | |||
65 | sdhci@c8000600 { | 84 | sdhci@c8000600 { |
66 | cd-gpios = <&gpio 58 0>; /* gpio PH2 */ | 85 | cd-gpios = <&gpio 58 0>; /* gpio PH2 */ |
67 | wp-gpios = <&gpio 59 0>; /* gpio PH3 */ | 86 | wp-gpios = <&gpio 59 0>; /* gpio PH3 */ |
diff --git a/arch/arm/boot/dts/tegra-paz00.dts b/arch/arm/boot/dts/tegra-paz00.dts new file mode 100644 index 000000000000..1a1d7023b69b --- /dev/null +++ b/arch/arm/boot/dts/tegra-paz00.dts | |||
@@ -0,0 +1,77 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "tegra20.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "Toshiba AC100 / Dynabook AZ"; | ||
7 | compatible = "compal,paz00", "nvidia,tegra20"; | ||
8 | |||
9 | memory@0 { | ||
10 | reg = <0x00000000 0x20000000>; | ||
11 | }; | ||
12 | |||
13 | i2c@7000c000 { | ||
14 | clock-frequency = <400000>; | ||
15 | }; | ||
16 | |||
17 | i2c@7000c400 { | ||
18 | clock-frequency = <400000>; | ||
19 | }; | ||
20 | |||
21 | i2c@7000c500 { | ||
22 | status = "disable"; | ||
23 | }; | ||
24 | |||
25 | nvec@7000c500 { | ||
26 | #address-cells = <1>; | ||
27 | #size-cells = <0>; | ||
28 | compatible = "nvidia,nvec"; | ||
29 | reg = <0x7000C500 0x100>; | ||
30 | interrupts = <0 92 0x04>; | ||
31 | clock-frequency = <80000>; | ||
32 | request-gpios = <&gpio 170 0>; | ||
33 | slave-addr = <138>; | ||
34 | }; | ||
35 | |||
36 | i2c@7000d000 { | ||
37 | clock-frequency = <400000>; | ||
38 | }; | ||
39 | |||
40 | serial@70006000 { | ||
41 | clock-frequency = <216000000>; | ||
42 | }; | ||
43 | |||
44 | serial@70006040 { | ||
45 | status = "disable"; | ||
46 | }; | ||
47 | |||
48 | serial@70006200 { | ||
49 | status = "disable"; | ||
50 | }; | ||
51 | |||
52 | serial@70006300 { | ||
53 | clock-frequency = <216000000>; | ||
54 | }; | ||
55 | |||
56 | serial@70006400 { | ||
57 | status = "disable"; | ||
58 | }; | ||
59 | |||
60 | sdhci@c8000000 { | ||
61 | cd-gpios = <&gpio 173 0>; /* gpio PV5 */ | ||
62 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ | ||
63 | power-gpios = <&gpio 155 0>; /* gpio PT3 */ | ||
64 | }; | ||
65 | |||
66 | sdhci@c8000200 { | ||
67 | status = "disable"; | ||
68 | }; | ||
69 | |||
70 | sdhci@c8000400 { | ||
71 | status = "disable"; | ||
72 | }; | ||
73 | |||
74 | sdhci@c8000600 { | ||
75 | support-8bit; | ||
76 | }; | ||
77 | }; | ||
diff --git a/arch/arm/boot/dts/tegra-seaboard.dts b/arch/arm/boot/dts/tegra-seaboard.dts index a72299b8e668..b55a02e34ba7 100644 --- a/arch/arm/boot/dts/tegra-seaboard.dts +++ b/arch/arm/boot/dts/tegra-seaboard.dts | |||
@@ -1,25 +1,65 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /memreserve/ 0x1c000000 0x04000000; | ||
4 | /include/ "tegra20.dtsi" | 3 | /include/ "tegra20.dtsi" |
5 | 4 | ||
6 | / { | 5 | / { |
7 | model = "NVIDIA Seaboard"; | 6 | model = "NVIDIA Seaboard"; |
8 | compatible = "nvidia,seaboard", "nvidia,tegra20"; | 7 | compatible = "nvidia,seaboard", "nvidia,tegra20"; |
9 | 8 | ||
10 | chosen { | ||
11 | bootargs = "vmalloc=192M video=tegrafb console=ttyS0,115200n8 root=/dev/mmcblk1p3 rw rootwait"; | ||
12 | }; | ||
13 | |||
14 | memory { | 9 | memory { |
15 | device_type = "memory"; | 10 | device_type = "memory"; |
16 | reg = < 0x00000000 0x40000000 >; | 11 | reg = < 0x00000000 0x40000000 >; |
17 | }; | 12 | }; |
18 | 13 | ||
14 | i2c@7000c000 { | ||
15 | clock-frequency = <400000>; | ||
16 | }; | ||
17 | |||
18 | i2c@7000c400 { | ||
19 | clock-frequency = <400000>; | ||
20 | }; | ||
21 | |||
22 | i2c@7000c500 { | ||
23 | clock-frequency = <400000>; | ||
24 | }; | ||
25 | |||
26 | i2c@7000d000 { | ||
27 | clock-frequency = <400000>; | ||
28 | |||
29 | adt7461@4c { | ||
30 | compatible = "adt7461"; | ||
31 | reg = <0x4c>; | ||
32 | }; | ||
33 | }; | ||
34 | |||
35 | serial@70006000 { | ||
36 | status = "disable"; | ||
37 | }; | ||
38 | |||
39 | serial@70006040 { | ||
40 | status = "disable"; | ||
41 | }; | ||
42 | |||
43 | serial@70006200 { | ||
44 | status = "disable"; | ||
45 | }; | ||
46 | |||
19 | serial@70006300 { | 47 | serial@70006300 { |
20 | clock-frequency = < 216000000 >; | 48 | clock-frequency = < 216000000 >; |
21 | }; | 49 | }; |
22 | 50 | ||
51 | serial@70006400 { | ||
52 | status = "disable"; | ||
53 | }; | ||
54 | |||
55 | sdhci@c8000000 { | ||
56 | status = "disable"; | ||
57 | }; | ||
58 | |||
59 | sdhci@c8000200 { | ||
60 | status = "disable"; | ||
61 | }; | ||
62 | |||
23 | sdhci@c8000400 { | 63 | sdhci@c8000400 { |
24 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ | 64 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ |
25 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ | 65 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ |
@@ -29,4 +69,28 @@ | |||
29 | sdhci@c8000600 { | 69 | sdhci@c8000600 { |
30 | support-8bit; | 70 | support-8bit; |
31 | }; | 71 | }; |
72 | |||
73 | usb@c5000000 { | ||
74 | nvidia,vbus-gpio = <&gpio 24 0>; /* PD0 */ | ||
75 | }; | ||
76 | |||
77 | gpio-keys { | ||
78 | compatible = "gpio-keys"; | ||
79 | |||
80 | power { | ||
81 | label = "Power"; | ||
82 | gpios = <&gpio 170 1>; /* gpio PV2, active low */ | ||
83 | linux,code = <116>; /* KEY_POWER */ | ||
84 | gpio-key,wakeup; | ||
85 | }; | ||
86 | |||
87 | lid { | ||
88 | label = "Lid"; | ||
89 | gpios = <&gpio 23 0>; /* gpio PC7 */ | ||
90 | linux,input-type = <5>; /* EV_SW */ | ||
91 | linux,code = <0>; /* SW_LID */ | ||
92 | debounce-interval = <1>; | ||
93 | gpio-key,wakeup; | ||
94 | }; | ||
95 | }; | ||
32 | }; | 96 | }; |
diff --git a/arch/arm/boot/dts/tegra-trimslice.dts b/arch/arm/boot/dts/tegra-trimslice.dts new file mode 100644 index 000000000000..3b3ee7db99f3 --- /dev/null +++ b/arch/arm/boot/dts/tegra-trimslice.dts | |||
@@ -0,0 +1,65 @@ | |||
1 | /dts-v1/; | ||
2 | |||
3 | /include/ "tegra20.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "Compulab TrimSlice board"; | ||
7 | compatible = "compulab,trimslice", "nvidia,tegra20"; | ||
8 | |||
9 | memory@0 { | ||
10 | reg = < 0x00000000 0x40000000 >; | ||
11 | }; | ||
12 | |||
13 | i2c@7000c000 { | ||
14 | clock-frequency = <400000>; | ||
15 | }; | ||
16 | |||
17 | i2c@7000c400 { | ||
18 | clock-frequency = <400000>; | ||
19 | }; | ||
20 | |||
21 | i2c@7000c500 { | ||
22 | clock-frequency = <400000>; | ||
23 | }; | ||
24 | |||
25 | i2c@7000d000 { | ||
26 | status = "disable"; | ||
27 | }; | ||
28 | |||
29 | serial@70006000 { | ||
30 | clock-frequency = < 216000000 >; | ||
31 | }; | ||
32 | |||
33 | serial@70006040 { | ||
34 | status = "disable"; | ||
35 | }; | ||
36 | |||
37 | serial@70006200 { | ||
38 | status = "disable"; | ||
39 | }; | ||
40 | |||
41 | serial@70006300 { | ||
42 | status = "disable"; | ||
43 | }; | ||
44 | |||
45 | serial@70006400 { | ||
46 | status = "disable"; | ||
47 | }; | ||
48 | |||
49 | sdhci@c8000000 { | ||
50 | status = "disable"; | ||
51 | }; | ||
52 | |||
53 | sdhci@c8000200 { | ||
54 | status = "disable"; | ||
55 | }; | ||
56 | |||
57 | sdhci@c8000400 { | ||
58 | status = "disable"; | ||
59 | }; | ||
60 | |||
61 | sdhci@c8000600 { | ||
62 | cd-gpios = <&gpio 121 0>; | ||
63 | wp-gpios = <&gpio 122 0>; | ||
64 | }; | ||
65 | }; | ||
diff --git a/arch/arm/boot/dts/tegra-ventana.dts b/arch/arm/boot/dts/tegra-ventana.dts index 3f9abd6b6964..c7d3b87f29df 100644 --- a/arch/arm/boot/dts/tegra-ventana.dts +++ b/arch/arm/boot/dts/tegra-ventana.dts | |||
@@ -1,24 +1,59 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /memreserve/ 0x1c000000 0x04000000; | ||
4 | /include/ "tegra20.dtsi" | 3 | /include/ "tegra20.dtsi" |
5 | 4 | ||
6 | / { | 5 | / { |
7 | model = "NVIDIA Tegra2 Ventana evaluation board"; | 6 | model = "NVIDIA Tegra2 Ventana evaluation board"; |
8 | compatible = "nvidia,ventana", "nvidia,tegra20"; | 7 | compatible = "nvidia,ventana", "nvidia,tegra20"; |
9 | 8 | ||
10 | chosen { | ||
11 | bootargs = "vmalloc=192M video=tegrafb console=ttyS0,115200n8 root=/dev/ram rdinit=/sbin/init"; | ||
12 | }; | ||
13 | |||
14 | memory { | 9 | memory { |
15 | reg = < 0x00000000 0x40000000 >; | 10 | reg = < 0x00000000 0x40000000 >; |
16 | }; | 11 | }; |
17 | 12 | ||
13 | i2c@7000c000 { | ||
14 | clock-frequency = <400000>; | ||
15 | }; | ||
16 | |||
17 | i2c@7000c400 { | ||
18 | clock-frequency = <400000>; | ||
19 | }; | ||
20 | |||
21 | i2c@7000c500 { | ||
22 | clock-frequency = <400000>; | ||
23 | }; | ||
24 | |||
25 | i2c@7000d000 { | ||
26 | clock-frequency = <400000>; | ||
27 | }; | ||
28 | |||
29 | serial@70006000 { | ||
30 | status = "disable"; | ||
31 | }; | ||
32 | |||
33 | serial@70006040 { | ||
34 | status = "disable"; | ||
35 | }; | ||
36 | |||
37 | serial@70006200 { | ||
38 | status = "disable"; | ||
39 | }; | ||
40 | |||
18 | serial@70006300 { | 41 | serial@70006300 { |
19 | clock-frequency = < 216000000 >; | 42 | clock-frequency = < 216000000 >; |
20 | }; | 43 | }; |
21 | 44 | ||
45 | serial@70006400 { | ||
46 | status = "disable"; | ||
47 | }; | ||
48 | |||
49 | sdhci@c8000000 { | ||
50 | status = "disable"; | ||
51 | }; | ||
52 | |||
53 | sdhci@c8000200 { | ||
54 | status = "disable"; | ||
55 | }; | ||
56 | |||
22 | sdhci@c8000400 { | 57 | sdhci@c8000400 { |
23 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ | 58 | cd-gpios = <&gpio 69 0>; /* gpio PI5 */ |
24 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ | 59 | wp-gpios = <&gpio 57 0>; /* gpio PH1 */ |
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index 65d7e6a333eb..3da7afd45322 100644 --- a/arch/arm/boot/dts/tegra20.dtsi +++ b/arch/arm/boot/dts/tegra20.dtsi | |||
@@ -5,9 +5,9 @@ | |||
5 | interrupt-parent = <&intc>; | 5 | interrupt-parent = <&intc>; |
6 | 6 | ||
7 | intc: interrupt-controller@50041000 { | 7 | intc: interrupt-controller@50041000 { |
8 | compatible = "nvidia,tegra20-gic"; | 8 | compatible = "arm,cortex-a9-gic"; |
9 | interrupt-controller; | 9 | interrupt-controller; |
10 | #interrupt-cells = <1>; | 10 | #interrupt-cells = <3>; |
11 | reg = < 0x50041000 0x1000 >, | 11 | reg = < 0x50041000 0x1000 >, |
12 | < 0x50040100 0x0100 >; | 12 | < 0x50040100 0x0100 >; |
13 | }; | 13 | }; |
@@ -17,7 +17,7 @@ | |||
17 | #size-cells = <0>; | 17 | #size-cells = <0>; |
18 | compatible = "nvidia,tegra20-i2c"; | 18 | compatible = "nvidia,tegra20-i2c"; |
19 | reg = <0x7000C000 0x100>; | 19 | reg = <0x7000C000 0x100>; |
20 | interrupts = < 70 >; | 20 | interrupts = < 0 38 0x04 >; |
21 | }; | 21 | }; |
22 | 22 | ||
23 | i2c@7000c400 { | 23 | i2c@7000c400 { |
@@ -25,7 +25,7 @@ | |||
25 | #size-cells = <0>; | 25 | #size-cells = <0>; |
26 | compatible = "nvidia,tegra20-i2c"; | 26 | compatible = "nvidia,tegra20-i2c"; |
27 | reg = <0x7000C400 0x100>; | 27 | reg = <0x7000C400 0x100>; |
28 | interrupts = < 116 >; | 28 | interrupts = < 0 84 0x04 >; |
29 | }; | 29 | }; |
30 | 30 | ||
31 | i2c@7000c500 { | 31 | i2c@7000c500 { |
@@ -33,38 +33,32 @@ | |||
33 | #size-cells = <0>; | 33 | #size-cells = <0>; |
34 | compatible = "nvidia,tegra20-i2c"; | 34 | compatible = "nvidia,tegra20-i2c"; |
35 | reg = <0x7000C500 0x100>; | 35 | reg = <0x7000C500 0x100>; |
36 | interrupts = < 124 >; | 36 | interrupts = < 0 92 0x04 >; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | i2c@7000d000 { | 39 | i2c@7000d000 { |
40 | #address-cells = <1>; | 40 | #address-cells = <1>; |
41 | #size-cells = <0>; | 41 | #size-cells = <0>; |
42 | compatible = "nvidia,tegra20-i2c"; | 42 | compatible = "nvidia,tegra20-i2c-dvc"; |
43 | reg = <0x7000D000 0x200>; | 43 | reg = <0x7000D000 0x200>; |
44 | interrupts = < 85 >; | 44 | interrupts = < 0 53 0x04 >; |
45 | }; | 45 | }; |
46 | 46 | ||
47 | i2s@70002800 { | 47 | i2s@70002800 { |
48 | #address-cells = <1>; | ||
49 | #size-cells = <0>; | ||
50 | compatible = "nvidia,tegra20-i2s"; | 48 | compatible = "nvidia,tegra20-i2s"; |
51 | reg = <0x70002800 0x200>; | 49 | reg = <0x70002800 0x200>; |
52 | interrupts = < 45 >; | 50 | interrupts = < 0 13 0x04 >; |
53 | dma-channel = < 2 >; | 51 | dma-channel = < 2 >; |
54 | }; | 52 | }; |
55 | 53 | ||
56 | i2s@70002a00 { | 54 | i2s@70002a00 { |
57 | #address-cells = <1>; | ||
58 | #size-cells = <0>; | ||
59 | compatible = "nvidia,tegra20-i2s"; | 55 | compatible = "nvidia,tegra20-i2s"; |
60 | reg = <0x70002a00 0x200>; | 56 | reg = <0x70002a00 0x200>; |
61 | interrupts = < 35 >; | 57 | interrupts = < 0 3 0x04 >; |
62 | dma-channel = < 1 >; | 58 | dma-channel = < 1 >; |
63 | }; | 59 | }; |
64 | 60 | ||
65 | das@70000c00 { | 61 | das@70000c00 { |
66 | #address-cells = <1>; | ||
67 | #size-cells = <0>; | ||
68 | compatible = "nvidia,tegra20-das"; | 62 | compatible = "nvidia,tegra20-das"; |
69 | reg = <0x70000c00 0x80>; | 63 | reg = <0x70000c00 0x80>; |
70 | }; | 64 | }; |
@@ -72,7 +66,13 @@ | |||
72 | gpio: gpio@6000d000 { | 66 | gpio: gpio@6000d000 { |
73 | compatible = "nvidia,tegra20-gpio"; | 67 | compatible = "nvidia,tegra20-gpio"; |
74 | reg = < 0x6000d000 0x1000 >; | 68 | reg = < 0x6000d000 0x1000 >; |
75 | interrupts = < 64 65 66 67 87 119 121 >; | 69 | interrupts = < 0 32 0x04 |
70 | 0 33 0x04 | ||
71 | 0 34 0x04 | ||
72 | 0 35 0x04 | ||
73 | 0 55 0x04 | ||
74 | 0 87 0x04 | ||
75 | 0 89 0x04 >; | ||
76 | #gpio-cells = <2>; | 76 | #gpio-cells = <2>; |
77 | gpio-controller; | 77 | gpio-controller; |
78 | }; | 78 | }; |
@@ -89,59 +89,80 @@ | |||
89 | compatible = "nvidia,tegra20-uart"; | 89 | compatible = "nvidia,tegra20-uart"; |
90 | reg = <0x70006000 0x40>; | 90 | reg = <0x70006000 0x40>; |
91 | reg-shift = <2>; | 91 | reg-shift = <2>; |
92 | interrupts = < 68 >; | 92 | interrupts = < 0 36 0x04 >; |
93 | }; | 93 | }; |
94 | 94 | ||
95 | serial@70006040 { | 95 | serial@70006040 { |
96 | compatible = "nvidia,tegra20-uart"; | 96 | compatible = "nvidia,tegra20-uart"; |
97 | reg = <0x70006040 0x40>; | 97 | reg = <0x70006040 0x40>; |
98 | reg-shift = <2>; | 98 | reg-shift = <2>; |
99 | interrupts = < 69 >; | 99 | interrupts = < 0 37 0x04 >; |
100 | }; | 100 | }; |
101 | 101 | ||
102 | serial@70006200 { | 102 | serial@70006200 { |
103 | compatible = "nvidia,tegra20-uart"; | 103 | compatible = "nvidia,tegra20-uart"; |
104 | reg = <0x70006200 0x100>; | 104 | reg = <0x70006200 0x100>; |
105 | reg-shift = <2>; | 105 | reg-shift = <2>; |
106 | interrupts = < 78 >; | 106 | interrupts = < 0 46 0x04 >; |
107 | }; | 107 | }; |
108 | 108 | ||
109 | serial@70006300 { | 109 | serial@70006300 { |
110 | compatible = "nvidia,tegra20-uart"; | 110 | compatible = "nvidia,tegra20-uart"; |
111 | reg = <0x70006300 0x100>; | 111 | reg = <0x70006300 0x100>; |
112 | reg-shift = <2>; | 112 | reg-shift = <2>; |
113 | interrupts = < 122 >; | 113 | interrupts = < 0 90 0x04 >; |
114 | }; | 114 | }; |
115 | 115 | ||
116 | serial@70006400 { | 116 | serial@70006400 { |
117 | compatible = "nvidia,tegra20-uart"; | 117 | compatible = "nvidia,tegra20-uart"; |
118 | reg = <0x70006400 0x100>; | 118 | reg = <0x70006400 0x100>; |
119 | reg-shift = <2>; | 119 | reg-shift = <2>; |
120 | interrupts = < 123 >; | 120 | interrupts = < 0 91 0x04 >; |
121 | }; | 121 | }; |
122 | 122 | ||
123 | sdhci@c8000000 { | 123 | sdhci@c8000000 { |
124 | compatible = "nvidia,tegra20-sdhci"; | 124 | compatible = "nvidia,tegra20-sdhci"; |
125 | reg = <0xc8000000 0x200>; | 125 | reg = <0xc8000000 0x200>; |
126 | interrupts = < 46 >; | 126 | interrupts = < 0 14 0x04 >; |
127 | }; | 127 | }; |
128 | 128 | ||
129 | sdhci@c8000200 { | 129 | sdhci@c8000200 { |
130 | compatible = "nvidia,tegra20-sdhci"; | 130 | compatible = "nvidia,tegra20-sdhci"; |
131 | reg = <0xc8000200 0x200>; | 131 | reg = <0xc8000200 0x200>; |
132 | interrupts = < 47 >; | 132 | interrupts = < 0 15 0x04 >; |
133 | }; | 133 | }; |
134 | 134 | ||
135 | sdhci@c8000400 { | 135 | sdhci@c8000400 { |
136 | compatible = "nvidia,tegra20-sdhci"; | 136 | compatible = "nvidia,tegra20-sdhci"; |
137 | reg = <0xc8000400 0x200>; | 137 | reg = <0xc8000400 0x200>; |
138 | interrupts = < 51 >; | 138 | interrupts = < 0 19 0x04 >; |
139 | }; | 139 | }; |
140 | 140 | ||
141 | sdhci@c8000600 { | 141 | sdhci@c8000600 { |
142 | compatible = "nvidia,tegra20-sdhci"; | 142 | compatible = "nvidia,tegra20-sdhci"; |
143 | reg = <0xc8000600 0x200>; | 143 | reg = <0xc8000600 0x200>; |
144 | interrupts = < 63 >; | 144 | interrupts = < 0 31 0x04 >; |
145 | }; | ||
146 | |||
147 | usb@c5000000 { | ||
148 | compatible = "nvidia,tegra20-ehci", "usb-ehci"; | ||
149 | reg = <0xc5000000 0x4000>; | ||
150 | interrupts = < 0 20 0x04 >; | ||
151 | phy_type = "utmi"; | ||
152 | }; | ||
153 | |||
154 | usb@c5004000 { | ||
155 | compatible = "nvidia,tegra20-ehci", "usb-ehci"; | ||
156 | reg = <0xc5004000 0x4000>; | ||
157 | interrupts = < 0 21 0x04 >; | ||
158 | phy_type = "ulpi"; | ||
159 | }; | ||
160 | |||
161 | usb@c5008000 { | ||
162 | compatible = "nvidia,tegra20-ehci", "usb-ehci"; | ||
163 | reg = <0xc5008000 0x4000>; | ||
164 | interrupts = < 0 97 0x04 >; | ||
165 | phy_type = "utmi"; | ||
145 | }; | 166 | }; |
146 | }; | 167 | }; |
147 | 168 | ||
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi new file mode 100644 index 000000000000..ee7db9892e02 --- /dev/null +++ b/arch/arm/boot/dts/tegra30.dtsi | |||
@@ -0,0 +1,127 @@ | |||
1 | /include/ "skeleton.dtsi" | ||
2 | |||
3 | / { | ||
4 | compatible = "nvidia,tegra30"; | ||
5 | interrupt-parent = <&intc>; | ||
6 | |||
7 | intc: interrupt-controller@50041000 { | ||
8 | compatible = "arm,cortex-a9-gic"; | ||
9 | interrupt-controller; | ||
10 | #interrupt-cells = <3>; | ||
11 | reg = < 0x50041000 0x1000 >, | ||
12 | < 0x50040100 0x0100 >; | ||
13 | }; | ||
14 | |||
15 | i2c@7000c000 { | ||
16 | #address-cells = <1>; | ||
17 | #size-cells = <0>; | ||
18 | compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c"; | ||
19 | reg = <0x7000C000 0x100>; | ||
20 | interrupts = < 0 38 0x04 >; | ||
21 | }; | ||
22 | |||
23 | i2c@7000c400 { | ||
24 | #address-cells = <1>; | ||
25 | #size-cells = <0>; | ||
26 | compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c"; | ||
27 | reg = <0x7000C400 0x100>; | ||
28 | interrupts = < 0 84 0x04 >; | ||
29 | }; | ||
30 | |||
31 | i2c@7000c500 { | ||
32 | #address-cells = <1>; | ||
33 | #size-cells = <0>; | ||
34 | compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c"; | ||
35 | reg = <0x7000C500 0x100>; | ||
36 | interrupts = < 0 92 0x04 >; | ||
37 | }; | ||
38 | |||
39 | i2c@7000c700 { | ||
40 | #address-cells = <1>; | ||
41 | #size-cells = <0>; | ||
42 | compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c"; | ||
43 | reg = <0x7000c700 0x100>; | ||
44 | interrupts = < 0 120 0x04 >; | ||
45 | }; | ||
46 | |||
47 | i2c@7000d000 { | ||
48 | #address-cells = <1>; | ||
49 | #size-cells = <0>; | ||
50 | compatible = "nvidia,tegra30-i2c", "nvidia,tegra20-i2c"; | ||
51 | reg = <0x7000D000 0x100>; | ||
52 | interrupts = < 0 53 0x04 >; | ||
53 | }; | ||
54 | |||
55 | gpio: gpio@6000d000 { | ||
56 | compatible = "nvidia,tegra30-gpio", "nvidia,tegra20-gpio"; | ||
57 | reg = < 0x6000d000 0x1000 >; | ||
58 | interrupts = < 0 32 0x04 0 33 0x04 0 34 0x04 0 35 0x04 0 55 0x04 0 87 0x04 0 89 0x04 >; | ||
59 | #gpio-cells = <2>; | ||
60 | gpio-controller; | ||
61 | }; | ||
62 | |||
63 | serial@70006000 { | ||
64 | compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart"; | ||
65 | reg = <0x70006000 0x40>; | ||
66 | reg-shift = <2>; | ||
67 | interrupts = < 0 36 0x04 >; | ||
68 | }; | ||
69 | |||
70 | serial@70006040 { | ||
71 | compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart"; | ||
72 | reg = <0x70006040 0x40>; | ||
73 | reg-shift = <2>; | ||
74 | interrupts = < 0 37 0x04 >; | ||
75 | }; | ||
76 | |||
77 | serial@70006200 { | ||
78 | compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart"; | ||
79 | reg = <0x70006200 0x100>; | ||
80 | reg-shift = <2>; | ||
81 | interrupts = < 0 46 0x04 >; | ||
82 | }; | ||
83 | |||
84 | serial@70006300 { | ||
85 | compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart"; | ||
86 | reg = <0x70006300 0x100>; | ||
87 | reg-shift = <2>; | ||
88 | interrupts = < 0 90 0x04 >; | ||
89 | }; | ||
90 | |||
91 | serial@70006400 { | ||
92 | compatible = "nvidia,tegra30-uart", "nvidia,tegra20-uart"; | ||
93 | reg = <0x70006400 0x100>; | ||
94 | reg-shift = <2>; | ||
95 | interrupts = < 0 91 0x04 >; | ||
96 | }; | ||
97 | |||
98 | sdhci@78000000 { | ||
99 | compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci"; | ||
100 | reg = <0x78000000 0x200>; | ||
101 | interrupts = < 0 14 0x04 >; | ||
102 | }; | ||
103 | |||
104 | sdhci@78000200 { | ||
105 | compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci"; | ||
106 | reg = <0x78000200 0x200>; | ||
107 | interrupts = < 0 15 0x04 >; | ||
108 | }; | ||
109 | |||
110 | sdhci@78000400 { | ||
111 | compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci"; | ||
112 | reg = <0x78000400 0x200>; | ||
113 | interrupts = < 0 19 0x04 >; | ||
114 | }; | ||
115 | |||
116 | sdhci@78000600 { | ||
117 | compatible = "nvidia,tegra30-sdhci", "nvidia,tegra20-sdhci"; | ||
118 | reg = <0x78000600 0x200>; | ||
119 | interrupts = < 0 31 0x04 >; | ||
120 | }; | ||
121 | |||
122 | pinmux: pinmux@70000000 { | ||
123 | compatible = "nvidia,tegra30-pinmux"; | ||
124 | reg = < 0x70000868 0xd0 /* Pad control registers */ | ||
125 | 0x70003000 0x3e0 >; /* Mux registers */ | ||
126 | }; | ||
127 | }; | ||
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index e1efbca2a539..b4bdf297e9fa 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig | |||
@@ -59,6 +59,11 @@ config EXYNOS4_MCT | |||
59 | help | 59 | help |
60 | Use MCT (Multi Core Timer) as kernel timers | 60 | Use MCT (Multi Core Timer) as kernel timers |
61 | 61 | ||
62 | config EXYNOS4_DEV_DMA | ||
63 | bool | ||
64 | help | ||
65 | Compile in amba device definitions for DMA controller | ||
66 | |||
62 | config EXYNOS4_DEV_AHCI | 67 | config EXYNOS4_DEV_AHCI |
63 | bool | 68 | bool |
64 | help | 69 | help |
@@ -179,6 +184,7 @@ config MACH_SMDKV310 | |||
179 | select SAMSUNG_DEV_BACKLIGHT | 184 | select SAMSUNG_DEV_BACKLIGHT |
180 | select EXYNOS4_DEV_AHCI | 185 | select EXYNOS4_DEV_AHCI |
181 | select SAMSUNG_DEV_KEYPAD | 186 | select SAMSUNG_DEV_KEYPAD |
187 | select EXYNOS4_DEV_DMA | ||
182 | select EXYNOS4_DEV_PD | 188 | select EXYNOS4_DEV_PD |
183 | select SAMSUNG_DEV_PWM | 189 | select SAMSUNG_DEV_PWM |
184 | select EXYNOS4_DEV_SYSMMU | 190 | select EXYNOS4_DEV_SYSMMU |
@@ -199,6 +205,7 @@ config MACH_ARMLEX4210 | |||
199 | select S3C_DEV_HSMMC2 | 205 | select S3C_DEV_HSMMC2 |
200 | select S3C_DEV_HSMMC3 | 206 | select S3C_DEV_HSMMC3 |
201 | select EXYNOS4_DEV_AHCI | 207 | select EXYNOS4_DEV_AHCI |
208 | select EXYNOS4_DEV_DMA | ||
202 | select EXYNOS4_DEV_SYSMMU | 209 | select EXYNOS4_DEV_SYSMMU |
203 | select EXYNOS4_SETUP_SDHCI | 210 | select EXYNOS4_SETUP_SDHCI |
204 | help | 211 | help |
@@ -224,6 +231,7 @@ config MACH_UNIVERSAL_C210 | |||
224 | select S5P_DEV_MFC | 231 | select S5P_DEV_MFC |
225 | select S5P_DEV_ONENAND | 232 | select S5P_DEV_ONENAND |
226 | select S5P_DEV_TV | 233 | select S5P_DEV_TV |
234 | select EXYNOS4_DEV_DMA | ||
227 | select EXYNOS4_DEV_PD | 235 | select EXYNOS4_DEV_PD |
228 | select EXYNOS4_SETUP_FIMD0 | 236 | select EXYNOS4_SETUP_FIMD0 |
229 | select EXYNOS4_SETUP_I2C1 | 237 | select EXYNOS4_SETUP_I2C1 |
@@ -257,6 +265,7 @@ config MACH_NURI | |||
257 | select S5P_DEV_MFC | 265 | select S5P_DEV_MFC |
258 | select S5P_DEV_USB_EHCI | 266 | select S5P_DEV_USB_EHCI |
259 | select S5P_SETUP_MIPIPHY | 267 | select S5P_SETUP_MIPIPHY |
268 | select EXYNOS4_DEV_DMA | ||
260 | select EXYNOS4_DEV_PD | 269 | select EXYNOS4_DEV_PD |
261 | select EXYNOS4_SETUP_FIMC | 270 | select EXYNOS4_SETUP_FIMC |
262 | select EXYNOS4_SETUP_FIMD0 | 271 | select EXYNOS4_SETUP_FIMD0 |
@@ -289,6 +298,7 @@ config MACH_ORIGEN | |||
289 | select S5P_DEV_USB_EHCI | 298 | select S5P_DEV_USB_EHCI |
290 | select SAMSUNG_DEV_BACKLIGHT | 299 | select SAMSUNG_DEV_BACKLIGHT |
291 | select SAMSUNG_DEV_PWM | 300 | select SAMSUNG_DEV_PWM |
301 | select EXYNOS4_DEV_DMA | ||
292 | select EXYNOS4_DEV_PD | 302 | select EXYNOS4_DEV_PD |
293 | select EXYNOS4_SETUP_FIMD0 | 303 | select EXYNOS4_SETUP_FIMD0 |
294 | select EXYNOS4_SETUP_SDHCI | 304 | select EXYNOS4_SETUP_SDHCI |
@@ -329,6 +339,20 @@ config MACH_SMDK4412 | |||
329 | Machine support for Samsung SMDK4412 | 339 | Machine support for Samsung SMDK4412 |
330 | endif | 340 | endif |
331 | 341 | ||
342 | comment "Flattened Device Tree based board for Exynos4 based SoC" | ||
343 | |||
344 | config MACH_EXYNOS4_DT | ||
345 | bool "Samsung Exynos4 Machine using device tree" | ||
346 | select CPU_EXYNOS4210 | ||
347 | select USE_OF | ||
348 | select ARM_AMBA | ||
349 | select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD | ||
350 | help | ||
351 | Machine support for Samsung Exynos4 machine with device tree enabled. | ||
352 | Select this if a fdt blob is available for the Exynos4 SoC based board. | ||
353 | Note: This is under development and not all peripherals can be supported | ||
354 | with this machine file. | ||
355 | |||
332 | if ARCH_EXYNOS4 | 356 | if ARCH_EXYNOS4 |
333 | 357 | ||
334 | comment "Configuration for HSMMC 8-bit bus width" | 358 | comment "Configuration for HSMMC 8-bit bus width" |
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index bcb9efc576e9..fd0d9e9be382 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile | |||
@@ -19,7 +19,7 @@ obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o | |||
19 | obj-$(CONFIG_PM) += pm.o | 19 | obj-$(CONFIG_PM) += pm.o |
20 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o | 20 | obj-$(CONFIG_CPU_IDLE) += cpuidle.o |
21 | 21 | ||
22 | obj-$(CONFIG_ARCH_EXYNOS4) += dma.o pmu.o | 22 | obj-$(CONFIG_ARCH_EXYNOS4) += pmu.o |
23 | 23 | ||
24 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o | 24 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o |
25 | 25 | ||
@@ -39,6 +39,8 @@ obj-$(CONFIG_MACH_ORIGEN) += mach-origen.o | |||
39 | obj-$(CONFIG_MACH_SMDK4212) += mach-smdk4x12.o | 39 | obj-$(CONFIG_MACH_SMDK4212) += mach-smdk4x12.o |
40 | obj-$(CONFIG_MACH_SMDK4412) += mach-smdk4x12.o | 40 | obj-$(CONFIG_MACH_SMDK4412) += mach-smdk4x12.o |
41 | 41 | ||
42 | obj-$(CONFIG_MACH_EXYNOS4_DT) += mach-exynos4-dt.o | ||
43 | |||
42 | # device support | 44 | # device support |
43 | 45 | ||
44 | obj-$(CONFIG_ARCH_EXYNOS4) += dev-audio.o | 46 | obj-$(CONFIG_ARCH_EXYNOS4) += dev-audio.o |
@@ -46,6 +48,7 @@ obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o | |||
46 | obj-$(CONFIG_EXYNOS4_DEV_PD) += dev-pd.o | 48 | obj-$(CONFIG_EXYNOS4_DEV_PD) += dev-pd.o |
47 | obj-$(CONFIG_EXYNOS4_DEV_SYSMMU) += dev-sysmmu.o | 49 | obj-$(CONFIG_EXYNOS4_DEV_SYSMMU) += dev-sysmmu.o |
48 | obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o | 50 | obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o |
51 | obj-$(CONFIG_EXYNOS4_DEV_DMA) += dma.o | ||
49 | 52 | ||
50 | obj-$(CONFIG_ARCH_EXYNOS4) += setup-i2c0.o | 53 | obj-$(CONFIG_ARCH_EXYNOS4) += setup-i2c0.o |
51 | obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o | 54 | obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o |
diff --git a/arch/arm/mach-exynos/clock.c b/arch/arm/mach-exynos/clock.c index 83616a039b15..befee4e13391 100644 --- a/arch/arm/mach-exynos/clock.c +++ b/arch/arm/mach-exynos/clock.c | |||
@@ -554,16 +554,6 @@ static struct clk init_clocks_off[] = { | |||
554 | .enable = exynos4_clk_dac_ctrl, | 554 | .enable = exynos4_clk_dac_ctrl, |
555 | .ctrlbit = (1 << 0), | 555 | .ctrlbit = (1 << 0), |
556 | }, { | 556 | }, { |
557 | .name = "dma", | ||
558 | .devname = "dma-pl330.0", | ||
559 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
560 | .ctrlbit = (1 << 0), | ||
561 | }, { | ||
562 | .name = "dma", | ||
563 | .devname = "dma-pl330.1", | ||
564 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
565 | .ctrlbit = (1 << 1), | ||
566 | }, { | ||
567 | .name = "adc", | 557 | .name = "adc", |
568 | .enable = exynos4_clk_ip_peril_ctrl, | 558 | .enable = exynos4_clk_ip_peril_ctrl, |
569 | .ctrlbit = (1 << 15), | 559 | .ctrlbit = (1 << 15), |
@@ -779,6 +769,20 @@ static struct clk init_clocks[] = { | |||
779 | } | 769 | } |
780 | }; | 770 | }; |
781 | 771 | ||
772 | static struct clk clk_pdma0 = { | ||
773 | .name = "dma", | ||
774 | .devname = "dma-pl330.0", | ||
775 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
776 | .ctrlbit = (1 << 0), | ||
777 | }; | ||
778 | |||
779 | static struct clk clk_pdma1 = { | ||
780 | .name = "dma", | ||
781 | .devname = "dma-pl330.1", | ||
782 | .enable = exynos4_clk_ip_fsys_ctrl, | ||
783 | .ctrlbit = (1 << 1), | ||
784 | }; | ||
785 | |||
782 | struct clk *clkset_group_list[] = { | 786 | struct clk *clkset_group_list[] = { |
783 | [0] = &clk_ext_xtal_mux, | 787 | [0] = &clk_ext_xtal_mux, |
784 | [1] = &clk_xusbxti, | 788 | [1] = &clk_xusbxti, |
@@ -1010,46 +1014,6 @@ static struct clksrc_clk clk_dout_mmc4 = { | |||
1010 | 1014 | ||
1011 | static struct clksrc_clk clksrcs[] = { | 1015 | static struct clksrc_clk clksrcs[] = { |
1012 | { | 1016 | { |
1013 | .clk = { | ||
1014 | .name = "uclk1", | ||
1015 | .devname = "s5pv210-uart.0", | ||
1016 | .enable = exynos4_clksrc_mask_peril0_ctrl, | ||
1017 | .ctrlbit = (1 << 0), | ||
1018 | }, | ||
1019 | .sources = &clkset_group, | ||
1020 | .reg_src = { .reg = S5P_CLKSRC_PERIL0, .shift = 0, .size = 4 }, | ||
1021 | .reg_div = { .reg = S5P_CLKDIV_PERIL0, .shift = 0, .size = 4 }, | ||
1022 | }, { | ||
1023 | .clk = { | ||
1024 | .name = "uclk1", | ||
1025 | .devname = "s5pv210-uart.1", | ||
1026 | .enable = exynos4_clksrc_mask_peril0_ctrl, | ||
1027 | .ctrlbit = (1 << 4), | ||
1028 | }, | ||
1029 | .sources = &clkset_group, | ||
1030 | .reg_src = { .reg = S5P_CLKSRC_PERIL0, .shift = 4, .size = 4 }, | ||
1031 | .reg_div = { .reg = S5P_CLKDIV_PERIL0, .shift = 4, .size = 4 }, | ||
1032 | }, { | ||
1033 | .clk = { | ||
1034 | .name = "uclk1", | ||
1035 | .devname = "s5pv210-uart.2", | ||
1036 | .enable = exynos4_clksrc_mask_peril0_ctrl, | ||
1037 | .ctrlbit = (1 << 8), | ||
1038 | }, | ||
1039 | .sources = &clkset_group, | ||
1040 | .reg_src = { .reg = S5P_CLKSRC_PERIL0, .shift = 8, .size = 4 }, | ||
1041 | .reg_div = { .reg = S5P_CLKDIV_PERIL0, .shift = 8, .size = 4 }, | ||
1042 | }, { | ||
1043 | .clk = { | ||
1044 | .name = "uclk1", | ||
1045 | .devname = "s5pv210-uart.3", | ||
1046 | .enable = exynos4_clksrc_mask_peril0_ctrl, | ||
1047 | .ctrlbit = (1 << 12), | ||
1048 | }, | ||
1049 | .sources = &clkset_group, | ||
1050 | .reg_src = { .reg = S5P_CLKSRC_PERIL0, .shift = 12, .size = 4 }, | ||
1051 | .reg_div = { .reg = S5P_CLKDIV_PERIL0, .shift = 12, .size = 4 }, | ||
1052 | }, { | ||
1053 | .clk = { | 1017 | .clk = { |
1054 | .name = "sclk_pwm", | 1018 | .name = "sclk_pwm", |
1055 | .enable = exynos4_clksrc_mask_peril0_ctrl, | 1019 | .enable = exynos4_clksrc_mask_peril0_ctrl, |
@@ -1238,6 +1202,54 @@ static struct clksrc_clk clksrcs[] = { | |||
1238 | } | 1202 | } |
1239 | }; | 1203 | }; |
1240 | 1204 | ||
1205 | static struct clksrc_clk clk_sclk_uart0 = { | ||
1206 | .clk = { | ||
1207 | .name = "uclk1", | ||
1208 | .devname = "exynos4210-uart.0", | ||
1209 | .enable = exynos4_clksrc_mask_peril0_ctrl, | ||
1210 | .ctrlbit = (1 << 0), | ||
1211 | }, | ||
1212 | .sources = &clkset_group, | ||
1213 | .reg_src = { .reg = S5P_CLKSRC_PERIL0, .shift = 0, .size = 4 }, | ||
1214 | .reg_div = { .reg = S5P_CLKDIV_PERIL0, .shift = 0, .size = 4 }, | ||
1215 | }; | ||
1216 | |||
1217 | static struct clksrc_clk clk_sclk_uart1 = { | ||
1218 | .clk = { | ||
1219 | .name = "uclk1", | ||
1220 | .devname = "exynos4210-uart.1", | ||
1221 | .enable = exynos4_clksrc_mask_peril0_ctrl, | ||
1222 | .ctrlbit = (1 << 4), | ||
1223 | }, | ||
1224 | .sources = &clkset_group, | ||
1225 | .reg_src = { .reg = S5P_CLKSRC_PERIL0, .shift = 4, .size = 4 }, | ||
1226 | .reg_div = { .reg = S5P_CLKDIV_PERIL0, .shift = 4, .size = 4 }, | ||
1227 | }; | ||
1228 | |||
1229 | static struct clksrc_clk clk_sclk_uart2 = { | ||
1230 | .clk = { | ||
1231 | .name = "uclk1", | ||
1232 | .devname = "exynos4210-uart.2", | ||
1233 | .enable = exynos4_clksrc_mask_peril0_ctrl, | ||
1234 | .ctrlbit = (1 << 8), | ||
1235 | }, | ||
1236 | .sources = &clkset_group, | ||
1237 | .reg_src = { .reg = S5P_CLKSRC_PERIL0, .shift = 8, .size = 4 }, | ||
1238 | .reg_div = { .reg = S5P_CLKDIV_PERIL0, .shift = 8, .size = 4 }, | ||
1239 | }; | ||
1240 | |||
1241 | static struct clksrc_clk clk_sclk_uart3 = { | ||
1242 | .clk = { | ||
1243 | .name = "uclk1", | ||
1244 | .devname = "exynos4210-uart.3", | ||
1245 | .enable = exynos4_clksrc_mask_peril0_ctrl, | ||
1246 | .ctrlbit = (1 << 12), | ||
1247 | }, | ||
1248 | .sources = &clkset_group, | ||
1249 | .reg_src = { .reg = S5P_CLKSRC_PERIL0, .shift = 12, .size = 4 }, | ||
1250 | .reg_div = { .reg = S5P_CLKDIV_PERIL0, .shift = 12, .size = 4 }, | ||
1251 | }; | ||
1252 | |||
1241 | /* Clock initialization code */ | 1253 | /* Clock initialization code */ |
1242 | static struct clksrc_clk *sysclks[] = { | 1254 | static struct clksrc_clk *sysclks[] = { |
1243 | &clk_mout_apll, | 1255 | &clk_mout_apll, |
@@ -1272,6 +1284,27 @@ static struct clksrc_clk *sysclks[] = { | |||
1272 | &clk_mout_mfc1, | 1284 | &clk_mout_mfc1, |
1273 | }; | 1285 | }; |
1274 | 1286 | ||
1287 | static struct clk *clk_cdev[] = { | ||
1288 | &clk_pdma0, | ||
1289 | &clk_pdma1, | ||
1290 | }; | ||
1291 | |||
1292 | static struct clksrc_clk *clksrc_cdev[] = { | ||
1293 | &clk_sclk_uart0, | ||
1294 | &clk_sclk_uart1, | ||
1295 | &clk_sclk_uart2, | ||
1296 | &clk_sclk_uart3, | ||
1297 | }; | ||
1298 | |||
1299 | static struct clk_lookup exynos4_clk_lookup[] = { | ||
1300 | CLKDEV_INIT("exynos4210-uart.0", "clk_uart_baud0", &clk_sclk_uart0.clk), | ||
1301 | CLKDEV_INIT("exynos4210-uart.1", "clk_uart_baud0", &clk_sclk_uart1.clk), | ||
1302 | CLKDEV_INIT("exynos4210-uart.2", "clk_uart_baud0", &clk_sclk_uart2.clk), | ||
1303 | CLKDEV_INIT("exynos4210-uart.3", "clk_uart_baud0", &clk_sclk_uart3.clk), | ||
1304 | CLKDEV_INIT("dma-pl330.0", "apb_pclk", &clk_pdma0), | ||
1305 | CLKDEV_INIT("dma-pl330.1", "apb_pclk", &clk_pdma1), | ||
1306 | }; | ||
1307 | |||
1275 | static int xtal_rate; | 1308 | static int xtal_rate; |
1276 | 1309 | ||
1277 | static unsigned long exynos4_fout_apll_get_rate(struct clk *clk) | 1310 | static unsigned long exynos4_fout_apll_get_rate(struct clk *clk) |
@@ -1479,11 +1512,19 @@ void __init exynos4_register_clocks(void) | |||
1479 | for (ptr = 0; ptr < ARRAY_SIZE(sclk_tv); ptr++) | 1512 | for (ptr = 0; ptr < ARRAY_SIZE(sclk_tv); ptr++) |
1480 | s3c_register_clksrc(sclk_tv[ptr], 1); | 1513 | s3c_register_clksrc(sclk_tv[ptr], 1); |
1481 | 1514 | ||
1515 | for (ptr = 0; ptr < ARRAY_SIZE(clksrc_cdev); ptr++) | ||
1516 | s3c_register_clksrc(clksrc_cdev[ptr], 1); | ||
1517 | |||
1482 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | 1518 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
1483 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | 1519 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); |
1484 | 1520 | ||
1521 | s3c24xx_register_clocks(clk_cdev, ARRAY_SIZE(clk_cdev)); | ||
1522 | for (ptr = 0; ptr < ARRAY_SIZE(clk_cdev); ptr++) | ||
1523 | s3c_disable_clocks(clk_cdev[ptr], 1); | ||
1524 | |||
1485 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | 1525 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
1486 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | 1526 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
1527 | clkdev_add_table(exynos4_clk_lookup, ARRAY_SIZE(exynos4_clk_lookup)); | ||
1487 | 1528 | ||
1488 | register_syscore_ops(&exynos4_clock_syscore_ops); | 1529 | register_syscore_ops(&exynos4_clock_syscore_ops); |
1489 | s3c24xx_register_clock(&dummy_apb_pclk); | 1530 | s3c24xx_register_clock(&dummy_apb_pclk); |
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 647c8434610c..c59e18871006 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/serial_core.h> | 19 | #include <linux/serial_core.h> |
20 | #include <linux/of.h> | ||
21 | #include <linux/of_irq.h> | ||
20 | 22 | ||
21 | #include <asm/proc-fns.h> | 23 | #include <asm/proc-fns.h> |
22 | #include <asm/exception.h> | 24 | #include <asm/exception.h> |
@@ -385,6 +387,13 @@ static void __init combiner_init(unsigned int combiner_nr, void __iomem *base, | |||
385 | } | 387 | } |
386 | } | 388 | } |
387 | 389 | ||
390 | #ifdef CONFIG_OF | ||
391 | static const struct of_device_id exynos4_dt_irq_match[] = { | ||
392 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, | ||
393 | {}, | ||
394 | }; | ||
395 | #endif | ||
396 | |||
388 | void __init exynos4_init_irq(void) | 397 | void __init exynos4_init_irq(void) |
389 | { | 398 | { |
390 | int irq; | 399 | int irq; |
@@ -392,7 +401,12 @@ void __init exynos4_init_irq(void) | |||
392 | 401 | ||
393 | gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000; | 402 | gic_bank_offset = soc_is_exynos4412() ? 0x4000 : 0x8000; |
394 | 403 | ||
395 | gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset); | 404 | if (!of_have_populated_dt()) |
405 | gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset); | ||
406 | #ifdef CONFIG_OF | ||
407 | else | ||
408 | of_irq_init(exynos4_dt_irq_match); | ||
409 | #endif | ||
396 | 410 | ||
397 | for (irq = 0; irq < MAX_COMBINER_NR; irq++) { | 411 | for (irq = 0; irq < MAX_COMBINER_NR; irq++) { |
398 | 412 | ||
@@ -460,15 +474,6 @@ int __init exynos_init(void) | |||
460 | return device_register(&exynos4_dev); | 474 | return device_register(&exynos4_dev); |
461 | } | 475 | } |
462 | 476 | ||
463 | static struct s3c24xx_uart_clksrc exynos4_serial_clocks[] = { | ||
464 | [0] = { | ||
465 | .name = "uclk1", | ||
466 | .divisor = 1, | ||
467 | .min_baud = 0, | ||
468 | .max_baud = 0, | ||
469 | }, | ||
470 | }; | ||
471 | |||
472 | /* uart registration process */ | 477 | /* uart registration process */ |
473 | 478 | ||
474 | void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no) | 479 | void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no) |
@@ -476,16 +481,10 @@ void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no) | |||
476 | struct s3c2410_uartcfg *tcfg = cfg; | 481 | struct s3c2410_uartcfg *tcfg = cfg; |
477 | u32 ucnt; | 482 | u32 ucnt; |
478 | 483 | ||
479 | for (ucnt = 0; ucnt < no; ucnt++, tcfg++) { | 484 | for (ucnt = 0; ucnt < no; ucnt++, tcfg++) |
480 | if (!tcfg->clocks) { | 485 | tcfg->has_fracval = 1; |
481 | tcfg->has_fracval = 1; | ||
482 | tcfg->clocks = exynos4_serial_clocks; | ||
483 | tcfg->clocks_size = ARRAY_SIZE(exynos4_serial_clocks); | ||
484 | } | ||
485 | tcfg->flags |= NO_NEED_CHECK_CLKSRC; | ||
486 | } | ||
487 | 486 | ||
488 | s3c24xx_init_uartdevs("s5pv210-uart", s5p_uart_resources, cfg, no); | 487 | s3c24xx_init_uartdevs("exynos4210-uart", s5p_uart_resources, cfg, no); |
489 | } | 488 | } |
490 | 489 | ||
491 | static DEFINE_SPINLOCK(eint_lock); | 490 | static DEFINE_SPINLOCK(eint_lock); |
diff --git a/arch/arm/mach-exynos/dma.c b/arch/arm/mach-exynos/dma.c index 9667c61e64fb..b10fcd270f07 100644 --- a/arch/arm/mach-exynos/dma.c +++ b/arch/arm/mach-exynos/dma.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/dma-mapping.h> | 24 | #include <linux/dma-mapping.h> |
25 | #include <linux/amba/bus.h> | 25 | #include <linux/amba/bus.h> |
26 | #include <linux/amba/pl330.h> | 26 | #include <linux/amba/pl330.h> |
27 | #include <linux/of.h> | ||
27 | 28 | ||
28 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
29 | #include <plat/devs.h> | 30 | #include <plat/devs.h> |
@@ -35,95 +36,42 @@ | |||
35 | 36 | ||
36 | static u64 dma_dmamask = DMA_BIT_MASK(32); | 37 | static u64 dma_dmamask = DMA_BIT_MASK(32); |
37 | 38 | ||
38 | struct dma_pl330_peri pdma0_peri[28] = { | 39 | u8 pdma0_peri[] = { |
39 | { | 40 | DMACH_PCM0_RX, |
40 | .peri_id = (u8)DMACH_PCM0_RX, | 41 | DMACH_PCM0_TX, |
41 | .rqtype = DEVTOMEM, | 42 | DMACH_PCM2_RX, |
42 | }, { | 43 | DMACH_PCM2_TX, |
43 | .peri_id = (u8)DMACH_PCM0_TX, | 44 | DMACH_MSM_REQ0, |
44 | .rqtype = MEMTODEV, | 45 | DMACH_MSM_REQ2, |
45 | }, { | 46 | DMACH_SPI0_RX, |
46 | .peri_id = (u8)DMACH_PCM2_RX, | 47 | DMACH_SPI0_TX, |
47 | .rqtype = DEVTOMEM, | 48 | DMACH_SPI2_RX, |
48 | }, { | 49 | DMACH_SPI2_TX, |
49 | .peri_id = (u8)DMACH_PCM2_TX, | 50 | DMACH_I2S0S_TX, |
50 | .rqtype = MEMTODEV, | 51 | DMACH_I2S0_RX, |
51 | }, { | 52 | DMACH_I2S0_TX, |
52 | .peri_id = (u8)DMACH_MSM_REQ0, | 53 | DMACH_I2S2_RX, |
53 | }, { | 54 | DMACH_I2S2_TX, |
54 | .peri_id = (u8)DMACH_MSM_REQ2, | 55 | DMACH_UART0_RX, |
55 | }, { | 56 | DMACH_UART0_TX, |
56 | .peri_id = (u8)DMACH_SPI0_RX, | 57 | DMACH_UART2_RX, |
57 | .rqtype = DEVTOMEM, | 58 | DMACH_UART2_TX, |
58 | }, { | 59 | DMACH_UART4_RX, |
59 | .peri_id = (u8)DMACH_SPI0_TX, | 60 | DMACH_UART4_TX, |
60 | .rqtype = MEMTODEV, | 61 | DMACH_SLIMBUS0_RX, |
61 | }, { | 62 | DMACH_SLIMBUS0_TX, |
62 | .peri_id = (u8)DMACH_SPI2_RX, | 63 | DMACH_SLIMBUS2_RX, |
63 | .rqtype = DEVTOMEM, | 64 | DMACH_SLIMBUS2_TX, |
64 | }, { | 65 | DMACH_SLIMBUS4_RX, |
65 | .peri_id = (u8)DMACH_SPI2_TX, | 66 | DMACH_SLIMBUS4_TX, |
66 | .rqtype = MEMTODEV, | 67 | DMACH_AC97_MICIN, |
67 | }, { | 68 | DMACH_AC97_PCMIN, |
68 | .peri_id = (u8)DMACH_I2S0S_TX, | 69 | DMACH_AC97_PCMOUT, |
69 | .rqtype = MEMTODEV, | ||
70 | }, { | ||
71 | .peri_id = (u8)DMACH_I2S0_RX, | ||
72 | .rqtype = DEVTOMEM, | ||
73 | }, { | ||
74 | .peri_id = (u8)DMACH_I2S0_TX, | ||
75 | .rqtype = MEMTODEV, | ||
76 | }, { | ||
77 | .peri_id = (u8)DMACH_UART0_RX, | ||
78 | .rqtype = DEVTOMEM, | ||
79 | }, { | ||
80 | .peri_id = (u8)DMACH_UART0_TX, | ||
81 | .rqtype = MEMTODEV, | ||
82 | }, { | ||
83 | .peri_id = (u8)DMACH_UART2_RX, | ||
84 | .rqtype = DEVTOMEM, | ||
85 | }, { | ||
86 | .peri_id = (u8)DMACH_UART2_TX, | ||
87 | .rqtype = MEMTODEV, | ||
88 | }, { | ||
89 | .peri_id = (u8)DMACH_UART4_RX, | ||
90 | .rqtype = DEVTOMEM, | ||
91 | }, { | ||
92 | .peri_id = (u8)DMACH_UART4_TX, | ||
93 | .rqtype = MEMTODEV, | ||
94 | }, { | ||
95 | .peri_id = (u8)DMACH_SLIMBUS0_RX, | ||
96 | .rqtype = DEVTOMEM, | ||
97 | }, { | ||
98 | .peri_id = (u8)DMACH_SLIMBUS0_TX, | ||
99 | .rqtype = MEMTODEV, | ||
100 | }, { | ||
101 | .peri_id = (u8)DMACH_SLIMBUS2_RX, | ||
102 | .rqtype = DEVTOMEM, | ||
103 | }, { | ||
104 | .peri_id = (u8)DMACH_SLIMBUS2_TX, | ||
105 | .rqtype = MEMTODEV, | ||
106 | }, { | ||
107 | .peri_id = (u8)DMACH_SLIMBUS4_RX, | ||
108 | .rqtype = DEVTOMEM, | ||
109 | }, { | ||
110 | .peri_id = (u8)DMACH_SLIMBUS4_TX, | ||
111 | .rqtype = MEMTODEV, | ||
112 | }, { | ||
113 | .peri_id = (u8)DMACH_AC97_MICIN, | ||
114 | .rqtype = DEVTOMEM, | ||
115 | }, { | ||
116 | .peri_id = (u8)DMACH_AC97_PCMIN, | ||
117 | .rqtype = DEVTOMEM, | ||
118 | }, { | ||
119 | .peri_id = (u8)DMACH_AC97_PCMOUT, | ||
120 | .rqtype = MEMTODEV, | ||
121 | }, | ||
122 | }; | 70 | }; |
123 | 71 | ||
124 | struct dma_pl330_platdata exynos4_pdma0_pdata = { | 72 | struct dma_pl330_platdata exynos4_pdma0_pdata = { |
125 | .nr_valid_peri = ARRAY_SIZE(pdma0_peri), | 73 | .nr_valid_peri = ARRAY_SIZE(pdma0_peri), |
126 | .peri = pdma0_peri, | 74 | .peri_id = pdma0_peri, |
127 | }; | 75 | }; |
128 | 76 | ||
129 | struct amba_device exynos4_device_pdma0 = { | 77 | struct amba_device exynos4_device_pdma0 = { |
@@ -142,86 +90,37 @@ struct amba_device exynos4_device_pdma0 = { | |||
142 | .periphid = 0x00041330, | 90 | .periphid = 0x00041330, |
143 | }; | 91 | }; |
144 | 92 | ||
145 | struct dma_pl330_peri pdma1_peri[25] = { | 93 | u8 pdma1_peri[] = { |
146 | { | 94 | DMACH_PCM0_RX, |
147 | .peri_id = (u8)DMACH_PCM0_RX, | 95 | DMACH_PCM0_TX, |
148 | .rqtype = DEVTOMEM, | 96 | DMACH_PCM1_RX, |
149 | }, { | 97 | DMACH_PCM1_TX, |
150 | .peri_id = (u8)DMACH_PCM0_TX, | 98 | DMACH_MSM_REQ1, |
151 | .rqtype = MEMTODEV, | 99 | DMACH_MSM_REQ3, |
152 | }, { | 100 | DMACH_SPI1_RX, |
153 | .peri_id = (u8)DMACH_PCM1_RX, | 101 | DMACH_SPI1_TX, |
154 | .rqtype = DEVTOMEM, | 102 | DMACH_I2S0S_TX, |
155 | }, { | 103 | DMACH_I2S0_RX, |
156 | .peri_id = (u8)DMACH_PCM1_TX, | 104 | DMACH_I2S0_TX, |
157 | .rqtype = MEMTODEV, | 105 | DMACH_I2S1_RX, |
158 | }, { | 106 | DMACH_I2S1_TX, |
159 | .peri_id = (u8)DMACH_MSM_REQ1, | 107 | DMACH_UART0_RX, |
160 | }, { | 108 | DMACH_UART0_TX, |
161 | .peri_id = (u8)DMACH_MSM_REQ3, | 109 | DMACH_UART1_RX, |
162 | }, { | 110 | DMACH_UART1_TX, |
163 | .peri_id = (u8)DMACH_SPI1_RX, | 111 | DMACH_UART3_RX, |
164 | .rqtype = DEVTOMEM, | 112 | DMACH_UART3_TX, |
165 | }, { | 113 | DMACH_SLIMBUS1_RX, |
166 | .peri_id = (u8)DMACH_SPI1_TX, | 114 | DMACH_SLIMBUS1_TX, |
167 | .rqtype = MEMTODEV, | 115 | DMACH_SLIMBUS3_RX, |
168 | }, { | 116 | DMACH_SLIMBUS3_TX, |
169 | .peri_id = (u8)DMACH_I2S0S_TX, | 117 | DMACH_SLIMBUS5_RX, |
170 | .rqtype = MEMTODEV, | 118 | DMACH_SLIMBUS5_TX, |
171 | }, { | ||
172 | .peri_id = (u8)DMACH_I2S0_RX, | ||
173 | .rqtype = DEVTOMEM, | ||
174 | }, { | ||
175 | .peri_id = (u8)DMACH_I2S0_TX, | ||
176 | .rqtype = MEMTODEV, | ||
177 | }, { | ||
178 | .peri_id = (u8)DMACH_I2S1_RX, | ||
179 | .rqtype = DEVTOMEM, | ||
180 | }, { | ||
181 | .peri_id = (u8)DMACH_I2S1_TX, | ||
182 | .rqtype = MEMTODEV, | ||
183 | }, { | ||
184 | .peri_id = (u8)DMACH_UART0_RX, | ||
185 | .rqtype = DEVTOMEM, | ||
186 | }, { | ||
187 | .peri_id = (u8)DMACH_UART0_TX, | ||
188 | .rqtype = MEMTODEV, | ||
189 | }, { | ||
190 | .peri_id = (u8)DMACH_UART1_RX, | ||
191 | .rqtype = DEVTOMEM, | ||
192 | }, { | ||
193 | .peri_id = (u8)DMACH_UART1_TX, | ||
194 | .rqtype = MEMTODEV, | ||
195 | }, { | ||
196 | .peri_id = (u8)DMACH_UART3_RX, | ||
197 | .rqtype = DEVTOMEM, | ||
198 | }, { | ||
199 | .peri_id = (u8)DMACH_UART3_TX, | ||
200 | .rqtype = MEMTODEV, | ||
201 | }, { | ||
202 | .peri_id = (u8)DMACH_SLIMBUS1_RX, | ||
203 | .rqtype = DEVTOMEM, | ||
204 | }, { | ||
205 | .peri_id = (u8)DMACH_SLIMBUS1_TX, | ||
206 | .rqtype = MEMTODEV, | ||
207 | }, { | ||
208 | .peri_id = (u8)DMACH_SLIMBUS3_RX, | ||
209 | .rqtype = DEVTOMEM, | ||
210 | }, { | ||
211 | .peri_id = (u8)DMACH_SLIMBUS3_TX, | ||
212 | .rqtype = MEMTODEV, | ||
213 | }, { | ||
214 | .peri_id = (u8)DMACH_SLIMBUS5_RX, | ||
215 | .rqtype = DEVTOMEM, | ||
216 | }, { | ||
217 | .peri_id = (u8)DMACH_SLIMBUS5_TX, | ||
218 | .rqtype = MEMTODEV, | ||
219 | }, | ||
220 | }; | 119 | }; |
221 | 120 | ||
222 | struct dma_pl330_platdata exynos4_pdma1_pdata = { | 121 | struct dma_pl330_platdata exynos4_pdma1_pdata = { |
223 | .nr_valid_peri = ARRAY_SIZE(pdma1_peri), | 122 | .nr_valid_peri = ARRAY_SIZE(pdma1_peri), |
224 | .peri = pdma1_peri, | 123 | .peri_id = pdma1_peri, |
225 | }; | 124 | }; |
226 | 125 | ||
227 | struct amba_device exynos4_device_pdma1 = { | 126 | struct amba_device exynos4_device_pdma1 = { |
@@ -242,7 +141,15 @@ struct amba_device exynos4_device_pdma1 = { | |||
242 | 141 | ||
243 | static int __init exynos4_dma_init(void) | 142 | static int __init exynos4_dma_init(void) |
244 | { | 143 | { |
144 | if (of_have_populated_dt()) | ||
145 | return 0; | ||
146 | |||
147 | dma_cap_set(DMA_SLAVE, exynos4_pdma0_pdata.cap_mask); | ||
148 | dma_cap_set(DMA_CYCLIC, exynos4_pdma0_pdata.cap_mask); | ||
245 | amba_device_register(&exynos4_device_pdma0, &iomem_resource); | 149 | amba_device_register(&exynos4_device_pdma0, &iomem_resource); |
150 | |||
151 | dma_cap_set(DMA_SLAVE, exynos4_pdma1_pdata.cap_mask); | ||
152 | dma_cap_set(DMA_CYCLIC, exynos4_pdma1_pdata.cap_mask); | ||
246 | amba_device_register(&exynos4_device_pdma1, &iomem_resource); | 153 | amba_device_register(&exynos4_device_pdma1, &iomem_resource); |
247 | 154 | ||
248 | return 0; | 155 | return 0; |
diff --git a/arch/arm/mach-exynos/include/mach/irqs.h b/arch/arm/mach-exynos/include/mach/irqs.h index dfd4b7eecb90..713dd5251c64 100644 --- a/arch/arm/mach-exynos/include/mach/irqs.h +++ b/arch/arm/mach-exynos/include/mach/irqs.h | |||
@@ -17,13 +17,13 @@ | |||
17 | 17 | ||
18 | /* PPI: Private Peripheral Interrupt */ | 18 | /* PPI: Private Peripheral Interrupt */ |
19 | 19 | ||
20 | #define IRQ_PPI(x) S5P_IRQ(x+16) | 20 | #define IRQ_PPI(x) (x+16) |
21 | 21 | ||
22 | #define IRQ_MCT_LOCALTIMER IRQ_PPI(12) | 22 | #define IRQ_MCT_LOCALTIMER IRQ_PPI(12) |
23 | 23 | ||
24 | /* SPI: Shared Peripheral Interrupt */ | 24 | /* SPI: Shared Peripheral Interrupt */ |
25 | 25 | ||
26 | #define IRQ_SPI(x) S5P_IRQ(x+32) | 26 | #define IRQ_SPI(x) (x+32) |
27 | 27 | ||
28 | #define IRQ_EINT0 IRQ_SPI(16) | 28 | #define IRQ_EINT0 IRQ_SPI(16) |
29 | #define IRQ_EINT1 IRQ_SPI(17) | 29 | #define IRQ_EINT1 IRQ_SPI(17) |
@@ -163,7 +163,9 @@ | |||
163 | #define IRQ_GPIO2_NR_GROUPS 9 | 163 | #define IRQ_GPIO2_NR_GROUPS 9 |
164 | #define IRQ_GPIO_END (S5P_GPIOINT_BASE + S5P_GPIOINT_COUNT) | 164 | #define IRQ_GPIO_END (S5P_GPIOINT_BASE + S5P_GPIOINT_COUNT) |
165 | 165 | ||
166 | #define IRQ_TIMER_BASE (IRQ_GPIO_END + 64) | ||
167 | |||
166 | /* Set the default NR_IRQS */ | 168 | /* Set the default NR_IRQS */ |
167 | #define NR_IRQS (IRQ_GPIO_END + 64) | 169 | #define NR_IRQS (IRQ_TIMER_BASE + IRQ_TIMER_COUNT) |
168 | 170 | ||
169 | #endif /* __ASM_ARCH_IRQS_H */ | 171 | #endif /* __ASM_ARCH_IRQS_H */ |
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c new file mode 100644 index 000000000000..85fa02767d67 --- /dev/null +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c | |||
@@ -0,0 +1,85 @@ | |||
1 | /* | ||
2 | * Samsung's Exynos4210 flattened device tree enabled machine | ||
3 | * | ||
4 | * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. | ||
5 | * http://www.samsung.com | ||
6 | * Copyright (c) 2010-2011 Linaro Ltd. | ||
7 | * www.linaro.org | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/of_platform.h> | ||
15 | #include <linux/serial_core.h> | ||
16 | |||
17 | #include <asm/mach/arch.h> | ||
18 | #include <mach/map.h> | ||
19 | |||
20 | #include <plat/cpu.h> | ||
21 | #include <plat/regs-serial.h> | ||
22 | #include <plat/exynos4.h> | ||
23 | |||
24 | /* | ||
25 | * The following lookup table is used to override device names when devices | ||
26 | * are registered from device tree. This is temporarily added to enable | ||
27 | * device tree support addition for the Exynos4 architecture. | ||
28 | * | ||
29 | * For drivers that require platform data to be provided from the machine | ||
30 | * file, a platform data pointer can also be supplied along with the | ||
31 | * devices names. Usually, the platform data elements that cannot be parsed | ||
32 | * from the device tree by the drivers (example: function pointers) are | ||
33 | * supplied. But it should be noted that this is a temporary mechanism and | ||
34 | * at some point, the drivers should be capable of parsing all the platform | ||
35 | * data from the device tree. | ||
36 | */ | ||
37 | static const struct of_dev_auxdata exynos4210_auxdata_lookup[] __initconst = { | ||
38 | OF_DEV_AUXDATA("samsung,exynos4210-uart", S5P_PA_UART0, | ||
39 | "exynos4210-uart.0", NULL), | ||
40 | OF_DEV_AUXDATA("samsung,exynos4210-uart", S5P_PA_UART1, | ||
41 | "exynos4210-uart.1", NULL), | ||
42 | OF_DEV_AUXDATA("samsung,exynos4210-uart", S5P_PA_UART2, | ||
43 | "exynos4210-uart.2", NULL), | ||
44 | OF_DEV_AUXDATA("samsung,exynos4210-uart", S5P_PA_UART3, | ||
45 | "exynos4210-uart.3", NULL), | ||
46 | OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(0), | ||
47 | "exynos4-sdhci.0", NULL), | ||
48 | OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(1), | ||
49 | "exynos4-sdhci.1", NULL), | ||
50 | OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(2), | ||
51 | "exynos4-sdhci.2", NULL), | ||
52 | OF_DEV_AUXDATA("samsung,exynos4210-sdhci", EXYNOS4_PA_HSMMC(3), | ||
53 | "exynos4-sdhci.3", NULL), | ||
54 | OF_DEV_AUXDATA("samsung,s3c2440-i2c", EXYNOS4_PA_IIC(0), | ||
55 | "s3c2440-i2c.0", NULL), | ||
56 | OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA0, "dma-pl330.0", NULL), | ||
57 | OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_PDMA1, "dma-pl330.1", NULL), | ||
58 | {}, | ||
59 | }; | ||
60 | |||
61 | static void __init exynos4210_dt_map_io(void) | ||
62 | { | ||
63 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | ||
64 | s3c24xx_init_clocks(24000000); | ||
65 | } | ||
66 | |||
67 | static void __init exynos4210_dt_machine_init(void) | ||
68 | { | ||
69 | of_platform_populate(NULL, of_default_bus_match_table, | ||
70 | exynos4210_auxdata_lookup, NULL); | ||
71 | } | ||
72 | |||
73 | static char const *exynos4210_dt_compat[] __initdata = { | ||
74 | "samsung,exynos4210", | ||
75 | NULL | ||
76 | }; | ||
77 | |||
78 | DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") | ||
79 | /* Maintainer: Thomas Abraham <thomas.abraham@linaro.org> */ | ||
80 | .init_irq = exynos4_init_irq, | ||
81 | .map_io = exynos4210_dt_map_io, | ||
82 | .init_machine = exynos4210_dt_machine_init, | ||
83 | .timer = &exynos4_timer, | ||
84 | .dt_compat = exynos4210_dt_compat, | ||
85 | MACHINE_END | ||
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index c6133c6ec18f..feeaf73933dc 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -165,22 +165,6 @@ static struct map_desc bast_iodesc[] __initdata = { | |||
165 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB | 165 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB |
166 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE | 166 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE |
167 | 167 | ||
168 | static struct s3c24xx_uart_clksrc bast_serial_clocks[] = { | ||
169 | [0] = { | ||
170 | .name = "uclk", | ||
171 | .divisor = 1, | ||
172 | .min_baud = 0, | ||
173 | .max_baud = 0, | ||
174 | }, | ||
175 | [1] = { | ||
176 | .name = "pclk", | ||
177 | .divisor = 1, | ||
178 | .min_baud = 0, | ||
179 | .max_baud = 0, | ||
180 | } | ||
181 | }; | ||
182 | |||
183 | |||
184 | static struct s3c2410_uartcfg bast_uartcfgs[] __initdata = { | 168 | static struct s3c2410_uartcfg bast_uartcfgs[] __initdata = { |
185 | [0] = { | 169 | [0] = { |
186 | .hwport = 0, | 170 | .hwport = 0, |
@@ -188,8 +172,6 @@ static struct s3c2410_uartcfg bast_uartcfgs[] __initdata = { | |||
188 | .ucon = UCON, | 172 | .ucon = UCON, |
189 | .ulcon = ULCON, | 173 | .ulcon = ULCON, |
190 | .ufcon = UFCON, | 174 | .ufcon = UFCON, |
191 | .clocks = bast_serial_clocks, | ||
192 | .clocks_size = ARRAY_SIZE(bast_serial_clocks), | ||
193 | }, | 175 | }, |
194 | [1] = { | 176 | [1] = { |
195 | .hwport = 1, | 177 | .hwport = 1, |
@@ -197,8 +179,6 @@ static struct s3c2410_uartcfg bast_uartcfgs[] __initdata = { | |||
197 | .ucon = UCON, | 179 | .ucon = UCON, |
198 | .ulcon = ULCON, | 180 | .ulcon = ULCON, |
199 | .ufcon = UFCON, | 181 | .ufcon = UFCON, |
200 | .clocks = bast_serial_clocks, | ||
201 | .clocks_size = ARRAY_SIZE(bast_serial_clocks), | ||
202 | }, | 182 | }, |
203 | /* port 2 is not actually used */ | 183 | /* port 2 is not actually used */ |
204 | [2] = { | 184 | [2] = { |
@@ -207,8 +187,6 @@ static struct s3c2410_uartcfg bast_uartcfgs[] __initdata = { | |||
207 | .ucon = UCON, | 187 | .ucon = UCON, |
208 | .ulcon = ULCON, | 188 | .ulcon = ULCON, |
209 | .ufcon = UFCON, | 189 | .ufcon = UFCON, |
210 | .clocks = bast_serial_clocks, | ||
211 | .clocks_size = ARRAY_SIZE(bast_serial_clocks), | ||
212 | } | 190 | } |
213 | }; | 191 | }; |
214 | 192 | ||
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index cc7032b5c65b..dbe668a803ef 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c | |||
@@ -110,23 +110,6 @@ static struct map_desc vr1000_iodesc[] __initdata = { | |||
110 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB | 110 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB |
111 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE | 111 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE |
112 | 112 | ||
113 | /* uart clock source(s) */ | ||
114 | |||
115 | static struct s3c24xx_uart_clksrc vr1000_serial_clocks[] = { | ||
116 | [0] = { | ||
117 | .name = "uclk", | ||
118 | .divisor = 1, | ||
119 | .min_baud = 0, | ||
120 | .max_baud = 0, | ||
121 | }, | ||
122 | [1] = { | ||
123 | .name = "pclk", | ||
124 | .divisor = 1, | ||
125 | .min_baud = 0, | ||
126 | .max_baud = 0. | ||
127 | } | ||
128 | }; | ||
129 | |||
130 | static struct s3c2410_uartcfg vr1000_uartcfgs[] __initdata = { | 113 | static struct s3c2410_uartcfg vr1000_uartcfgs[] __initdata = { |
131 | [0] = { | 114 | [0] = { |
132 | .hwport = 0, | 115 | .hwport = 0, |
@@ -134,8 +117,6 @@ static struct s3c2410_uartcfg vr1000_uartcfgs[] __initdata = { | |||
134 | .ucon = UCON, | 117 | .ucon = UCON, |
135 | .ulcon = ULCON, | 118 | .ulcon = ULCON, |
136 | .ufcon = UFCON, | 119 | .ufcon = UFCON, |
137 | .clocks = vr1000_serial_clocks, | ||
138 | .clocks_size = ARRAY_SIZE(vr1000_serial_clocks), | ||
139 | }, | 120 | }, |
140 | [1] = { | 121 | [1] = { |
141 | .hwport = 1, | 122 | .hwport = 1, |
@@ -143,8 +124,6 @@ static struct s3c2410_uartcfg vr1000_uartcfgs[] __initdata = { | |||
143 | .ucon = UCON, | 124 | .ucon = UCON, |
144 | .ulcon = ULCON, | 125 | .ulcon = ULCON, |
145 | .ufcon = UFCON, | 126 | .ufcon = UFCON, |
146 | .clocks = vr1000_serial_clocks, | ||
147 | .clocks_size = ARRAY_SIZE(vr1000_serial_clocks), | ||
148 | }, | 127 | }, |
149 | /* port 2 is not actually used */ | 128 | /* port 2 is not actually used */ |
150 | [2] = { | 129 | [2] = { |
@@ -153,9 +132,6 @@ static struct s3c2410_uartcfg vr1000_uartcfgs[] __initdata = { | |||
153 | .ucon = UCON, | 132 | .ucon = UCON, |
154 | .ulcon = ULCON, | 133 | .ulcon = ULCON, |
155 | .ufcon = UFCON, | 134 | .ufcon = UFCON, |
156 | .clocks = vr1000_serial_clocks, | ||
157 | .clocks_size = ARRAY_SIZE(vr1000_serial_clocks), | ||
158 | |||
159 | } | 135 | } |
160 | }; | 136 | }; |
161 | 137 | ||
diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c index eea559ec7a58..061b6bb1a557 100644 --- a/arch/arm/mach-s3c2410/s3c2410.c +++ b/arch/arm/mach-s3c2410/s3c2410.c | |||
@@ -124,12 +124,18 @@ static struct clk s3c2410_armclk = { | |||
124 | .id = -1, | 124 | .id = -1, |
125 | }; | 125 | }; |
126 | 126 | ||
127 | static struct clk_lookup s3c2410_clk_lookup[] = { | ||
128 | CLKDEV_INIT(NULL, "clk_uart_baud0", &clk_p), | ||
129 | CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk), | ||
130 | }; | ||
131 | |||
127 | void __init s3c2410_init_clocks(int xtal) | 132 | void __init s3c2410_init_clocks(int xtal) |
128 | { | 133 | { |
129 | s3c24xx_register_baseclocks(xtal); | 134 | s3c24xx_register_baseclocks(xtal); |
130 | s3c2410_setup_clocks(); | 135 | s3c2410_setup_clocks(); |
131 | s3c2410_baseclk_add(); | 136 | s3c2410_baseclk_add(); |
132 | s3c24xx_register_clock(&s3c2410_armclk); | 137 | s3c24xx_register_clock(&s3c2410_armclk); |
138 | clkdev_add_table(s3c2410_clk_lookup, ARRAY_SIZE(s3c2410_clk_lookup)); | ||
133 | } | 139 | } |
134 | 140 | ||
135 | struct bus_type s3c2410_subsys = { | 141 | struct bus_type s3c2410_subsys = { |
diff --git a/arch/arm/mach-s3c2412/clock.c b/arch/arm/mach-s3c2412/clock.c index 516881640808..d10b695a9066 100644 --- a/arch/arm/mach-s3c2412/clock.c +++ b/arch/arm/mach-s3c2412/clock.c | |||
@@ -659,6 +659,12 @@ static struct clk *clks[] __initdata = { | |||
659 | &clk_armclk, | 659 | &clk_armclk, |
660 | }; | 660 | }; |
661 | 661 | ||
662 | static struct clk_lookup s3c2412_clk_lookup[] = { | ||
663 | CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk), | ||
664 | CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p), | ||
665 | CLKDEV_INIT(NULL, "clk_uart_baud3", &clk_usysclk), | ||
666 | }; | ||
667 | |||
662 | int __init s3c2412_baseclk_add(void) | 668 | int __init s3c2412_baseclk_add(void) |
663 | { | 669 | { |
664 | unsigned long clkcon = __raw_readl(S3C2410_CLKCON); | 670 | unsigned long clkcon = __raw_readl(S3C2410_CLKCON); |
@@ -751,6 +757,7 @@ int __init s3c2412_baseclk_add(void) | |||
751 | s3c2412_clkcon_enable(clkp, 0); | 757 | s3c2412_clkcon_enable(clkp, 0); |
752 | } | 758 | } |
753 | 759 | ||
760 | clkdev_add_table(s3c2412_clk_lookup, ARRAY_SIZE(s3c2412_clk_lookup)); | ||
754 | s3c_pwmclk_init(); | 761 | s3c_pwmclk_init(); |
755 | return 0; | 762 | return 0; |
756 | } | 763 | } |
diff --git a/arch/arm/mach-s3c2440/clock.c b/arch/arm/mach-s3c2440/clock.c index d8957592fdc4..bedbc87a3426 100644 --- a/arch/arm/mach-s3c2440/clock.c +++ b/arch/arm/mach-s3c2440/clock.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/mutex.h> | 33 | #include <linux/mutex.h> |
34 | #include <linux/clk.h> | 34 | #include <linux/clk.h> |
35 | #include <linux/io.h> | 35 | #include <linux/io.h> |
36 | #include <linux/serial_core.h> | ||
36 | 37 | ||
37 | #include <mach/hardware.h> | 38 | #include <mach/hardware.h> |
38 | #include <linux/atomic.h> | 39 | #include <linux/atomic.h> |
@@ -42,6 +43,7 @@ | |||
42 | 43 | ||
43 | #include <plat/clock.h> | 44 | #include <plat/clock.h> |
44 | #include <plat/cpu.h> | 45 | #include <plat/cpu.h> |
46 | #include <plat/regs-serial.h> | ||
45 | 47 | ||
46 | /* S3C2440 extended clock support */ | 48 | /* S3C2440 extended clock support */ |
47 | 49 | ||
@@ -107,6 +109,46 @@ static struct clk s3c2440_clk_ac97 = { | |||
107 | .ctrlbit = S3C2440_CLKCON_CAMERA, | 109 | .ctrlbit = S3C2440_CLKCON_CAMERA, |
108 | }; | 110 | }; |
109 | 111 | ||
112 | static unsigned long s3c2440_fclk_n_getrate(struct clk *clk) | ||
113 | { | ||
114 | unsigned long ucon0, ucon1, ucon2, divisor; | ||
115 | |||
116 | /* the fun of calculating the uart divisors on the s3c2440 */ | ||
117 | ucon0 = __raw_readl(S3C24XX_VA_UART0 + S3C2410_UCON); | ||
118 | ucon1 = __raw_readl(S3C24XX_VA_UART1 + S3C2410_UCON); | ||
119 | ucon2 = __raw_readl(S3C24XX_VA_UART2 + S3C2410_UCON); | ||
120 | |||
121 | ucon0 &= S3C2440_UCON0_DIVMASK; | ||
122 | ucon1 &= S3C2440_UCON1_DIVMASK; | ||
123 | ucon2 &= S3C2440_UCON2_DIVMASK; | ||
124 | |||
125 | if (ucon0 != 0) | ||
126 | divisor = (ucon0 >> S3C2440_UCON_DIVSHIFT) + 6; | ||
127 | else if (ucon1 != 0) | ||
128 | divisor = (ucon1 >> S3C2440_UCON_DIVSHIFT) + 21; | ||
129 | else if (ucon2 != 0) | ||
130 | divisor = (ucon2 >> S3C2440_UCON_DIVSHIFT) + 36; | ||
131 | else | ||
132 | /* manual calims 44, seems to be 9 */ | ||
133 | divisor = 9; | ||
134 | |||
135 | return clk_get_rate(clk->parent) / divisor; | ||
136 | } | ||
137 | |||
138 | static struct clk s3c2440_clk_fclk_n = { | ||
139 | .name = "fclk_n", | ||
140 | .parent = &clk_f, | ||
141 | .ops = &(struct clk_ops) { | ||
142 | .get_rate = s3c2440_fclk_n_getrate, | ||
143 | }, | ||
144 | }; | ||
145 | |||
146 | static struct clk_lookup s3c2440_clk_lookup[] = { | ||
147 | CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk), | ||
148 | CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p), | ||
149 | CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n), | ||
150 | }; | ||
151 | |||
110 | static int s3c2440_clk_add(struct device *dev) | 152 | static int s3c2440_clk_add(struct device *dev) |
111 | { | 153 | { |
112 | struct clk *clock_upll; | 154 | struct clk *clock_upll; |
@@ -125,10 +167,12 @@ static int s3c2440_clk_add(struct device *dev) | |||
125 | s3c2440_clk_cam.parent = clock_h; | 167 | s3c2440_clk_cam.parent = clock_h; |
126 | s3c2440_clk_ac97.parent = clock_p; | 168 | s3c2440_clk_ac97.parent = clock_p; |
127 | s3c2440_clk_cam_upll.parent = clock_upll; | 169 | s3c2440_clk_cam_upll.parent = clock_upll; |
170 | s3c24xx_register_clock(&s3c2440_clk_fclk_n); | ||
128 | 171 | ||
129 | s3c24xx_register_clock(&s3c2440_clk_ac97); | 172 | s3c24xx_register_clock(&s3c2440_clk_ac97); |
130 | s3c24xx_register_clock(&s3c2440_clk_cam); | 173 | s3c24xx_register_clock(&s3c2440_clk_cam); |
131 | s3c24xx_register_clock(&s3c2440_clk_cam_upll); | 174 | s3c24xx_register_clock(&s3c2440_clk_cam_upll); |
175 | clkdev_add_table(s3c2440_clk_lookup, ARRAY_SIZE(s3c2440_clk_lookup)); | ||
132 | 176 | ||
133 | clk_disable(&s3c2440_clk_ac97); | 177 | clk_disable(&s3c2440_clk_ac97); |
134 | clk_disable(&s3c2440_clk_cam); | 178 | clk_disable(&s3c2440_clk_cam); |
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c index 121ff8d2c887..24569550de1a 100644 --- a/arch/arm/mach-s3c2440/mach-anubis.c +++ b/arch/arm/mach-s3c2440/mach-anubis.c | |||
@@ -98,22 +98,6 @@ static struct map_desc anubis_iodesc[] __initdata = { | |||
98 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB | 98 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB |
99 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE | 99 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE |
100 | 100 | ||
101 | static struct s3c24xx_uart_clksrc anubis_serial_clocks[] = { | ||
102 | [0] = { | ||
103 | .name = "uclk", | ||
104 | .divisor = 1, | ||
105 | .min_baud = 0, | ||
106 | .max_baud = 0, | ||
107 | }, | ||
108 | [1] = { | ||
109 | .name = "pclk", | ||
110 | .divisor = 1, | ||
111 | .min_baud = 0, | ||
112 | .max_baud = 0, | ||
113 | } | ||
114 | }; | ||
115 | |||
116 | |||
117 | static struct s3c2410_uartcfg anubis_uartcfgs[] __initdata = { | 101 | static struct s3c2410_uartcfg anubis_uartcfgs[] __initdata = { |
118 | [0] = { | 102 | [0] = { |
119 | .hwport = 0, | 103 | .hwport = 0, |
@@ -121,8 +105,7 @@ static struct s3c2410_uartcfg anubis_uartcfgs[] __initdata = { | |||
121 | .ucon = UCON, | 105 | .ucon = UCON, |
122 | .ulcon = ULCON, | 106 | .ulcon = ULCON, |
123 | .ufcon = UFCON, | 107 | .ufcon = UFCON, |
124 | .clocks = anubis_serial_clocks, | 108 | .clk_sel = S3C2410_UCON_CLKSEL1 | S3C2410_UCON_CLKSEL2, |
125 | .clocks_size = ARRAY_SIZE(anubis_serial_clocks), | ||
126 | }, | 109 | }, |
127 | [1] = { | 110 | [1] = { |
128 | .hwport = 2, | 111 | .hwport = 2, |
@@ -130,8 +113,7 @@ static struct s3c2410_uartcfg anubis_uartcfgs[] __initdata = { | |||
130 | .ucon = UCON, | 113 | .ucon = UCON, |
131 | .ulcon = ULCON, | 114 | .ulcon = ULCON, |
132 | .ufcon = UFCON, | 115 | .ufcon = UFCON, |
133 | .clocks = anubis_serial_clocks, | 116 | .clk_sel = S3C2410_UCON_CLKSEL1 | S3C2410_UCON_CLKSEL2, |
134 | .clocks_size = ARRAY_SIZE(anubis_serial_clocks), | ||
135 | }, | 117 | }, |
136 | }; | 118 | }; |
137 | 119 | ||
diff --git a/arch/arm/mach-s3c2440/mach-at2440evb.c b/arch/arm/mach-s3c2440/mach-at2440evb.c index b7e334f07da4..d6a9763110cd 100644 --- a/arch/arm/mach-s3c2440/mach-at2440evb.c +++ b/arch/arm/mach-s3c2440/mach-at2440evb.c | |||
@@ -59,22 +59,6 @@ static struct map_desc at2440evb_iodesc[] __initdata = { | |||
59 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE) | 59 | #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE) |
60 | #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE) | 60 | #define UFCON (S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE) |
61 | 61 | ||
62 | static struct s3c24xx_uart_clksrc at2440evb_serial_clocks[] = { | ||
63 | [0] = { | ||
64 | .name = "uclk", | ||
65 | .divisor = 1, | ||
66 | .min_baud = 0, | ||
67 | .max_baud = 0, | ||
68 | }, | ||
69 | [1] = { | ||
70 | .name = "pclk", | ||
71 | .divisor = 1, | ||
72 | .min_baud = 0, | ||
73 | .max_baud = 0, | ||
74 | } | ||
75 | }; | ||
76 | |||
77 | |||
78 | static struct s3c2410_uartcfg at2440evb_uartcfgs[] __initdata = { | 62 | static struct s3c2410_uartcfg at2440evb_uartcfgs[] __initdata = { |
79 | [0] = { | 63 | [0] = { |
80 | .hwport = 0, | 64 | .hwport = 0, |
@@ -82,8 +66,7 @@ static struct s3c2410_uartcfg at2440evb_uartcfgs[] __initdata = { | |||
82 | .ucon = UCON, | 66 | .ucon = UCON, |
83 | .ulcon = ULCON, | 67 | .ulcon = ULCON, |
84 | .ufcon = UFCON, | 68 | .ufcon = UFCON, |
85 | .clocks = at2440evb_serial_clocks, | 69 | .clk_sel = S3C2410_UCON_CLKSEL1 | S3C2410_UCON_CLKSEL2, |
86 | .clocks_size = ARRAY_SIZE(at2440evb_serial_clocks), | ||
87 | }, | 70 | }, |
88 | [1] = { | 71 | [1] = { |
89 | .hwport = 1, | 72 | .hwport = 1, |
@@ -91,8 +74,7 @@ static struct s3c2410_uartcfg at2440evb_uartcfgs[] __initdata = { | |||
91 | .ucon = UCON, | 74 | .ucon = UCON, |
92 | .ulcon = ULCON, | 75 | .ulcon = ULCON, |
93 | .ufcon = UFCON, | 76 | .ufcon = UFCON, |
94 | .clocks = at2440evb_serial_clocks, | 77 | .clk_sel = S3C2410_UCON_CLKSEL1 | S3C2410_UCON_CLKSEL2, |
95 | .clocks_size = ARRAY_SIZE(at2440evb_serial_clocks), | ||
96 | }, | 78 | }, |
97 | }; | 79 | }; |
98 | 80 | ||
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c index e795715fba30..4c480ef734f6 100644 --- a/arch/arm/mach-s3c2440/mach-osiris.c +++ b/arch/arm/mach-s3c2440/mach-osiris.c | |||
@@ -102,21 +102,6 @@ static struct map_desc osiris_iodesc[] __initdata = { | |||
102 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB | 102 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB |
103 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE | 103 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE |
104 | 104 | ||
105 | static struct s3c24xx_uart_clksrc osiris_serial_clocks[] = { | ||
106 | [0] = { | ||
107 | .name = "uclk", | ||
108 | .divisor = 1, | ||
109 | .min_baud = 0, | ||
110 | .max_baud = 0, | ||
111 | }, | ||
112 | [1] = { | ||
113 | .name = "pclk", | ||
114 | .divisor = 1, | ||
115 | .min_baud = 0, | ||
116 | .max_baud = 0, | ||
117 | } | ||
118 | }; | ||
119 | |||
120 | static struct s3c2410_uartcfg osiris_uartcfgs[] __initdata = { | 105 | static struct s3c2410_uartcfg osiris_uartcfgs[] __initdata = { |
121 | [0] = { | 106 | [0] = { |
122 | .hwport = 0, | 107 | .hwport = 0, |
@@ -124,8 +109,7 @@ static struct s3c2410_uartcfg osiris_uartcfgs[] __initdata = { | |||
124 | .ucon = UCON, | 109 | .ucon = UCON, |
125 | .ulcon = ULCON, | 110 | .ulcon = ULCON, |
126 | .ufcon = UFCON, | 111 | .ufcon = UFCON, |
127 | .clocks = osiris_serial_clocks, | 112 | .clk_sel = S3C2410_UCON_CLKSEL1 | S3C2410_UCON_CLKSEL2, |
128 | .clocks_size = ARRAY_SIZE(osiris_serial_clocks), | ||
129 | }, | 113 | }, |
130 | [1] = { | 114 | [1] = { |
131 | .hwport = 1, | 115 | .hwport = 1, |
@@ -133,8 +117,7 @@ static struct s3c2410_uartcfg osiris_uartcfgs[] __initdata = { | |||
133 | .ucon = UCON, | 117 | .ucon = UCON, |
134 | .ulcon = ULCON, | 118 | .ulcon = ULCON, |
135 | .ufcon = UFCON, | 119 | .ufcon = UFCON, |
136 | .clocks = osiris_serial_clocks, | 120 | .clk_sel = S3C2410_UCON_CLKSEL1 | S3C2410_UCON_CLKSEL2, |
137 | .clocks_size = ARRAY_SIZE(osiris_serial_clocks), | ||
138 | }, | 121 | }, |
139 | [2] = { | 122 | [2] = { |
140 | .hwport = 2, | 123 | .hwport = 2, |
@@ -142,8 +125,7 @@ static struct s3c2410_uartcfg osiris_uartcfgs[] __initdata = { | |||
142 | .ucon = UCON, | 125 | .ucon = UCON, |
143 | .ulcon = ULCON, | 126 | .ulcon = ULCON, |
144 | .ufcon = UFCON, | 127 | .ufcon = UFCON, |
145 | .clocks = osiris_serial_clocks, | 128 | .clk_sel = S3C2410_UCON_CLKSEL1 | S3C2410_UCON_CLKSEL2, |
146 | .clocks_size = ARRAY_SIZE(osiris_serial_clocks), | ||
147 | } | 129 | } |
148 | }; | 130 | }; |
149 | 131 | ||
diff --git a/arch/arm/mach-s3c2440/mach-rx1950.c b/arch/arm/mach-s3c2440/mach-rx1950.c index 332d7533bd96..80077f6472ee 100644 --- a/arch/arm/mach-s3c2440/mach-rx1950.c +++ b/arch/arm/mach-s3c2440/mach-rx1950.c | |||
@@ -70,15 +70,6 @@ | |||
70 | static struct map_desc rx1950_iodesc[] __initdata = { | 70 | static struct map_desc rx1950_iodesc[] __initdata = { |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static struct s3c24xx_uart_clksrc rx1950_serial_clocks[] = { | ||
74 | [0] = { | ||
75 | .name = "fclk", | ||
76 | .divisor = 0x0a, | ||
77 | .min_baud = 0, | ||
78 | .max_baud = 0, | ||
79 | }, | ||
80 | }; | ||
81 | |||
82 | static struct s3c2410_uartcfg rx1950_uartcfgs[] __initdata = { | 73 | static struct s3c2410_uartcfg rx1950_uartcfgs[] __initdata = { |
83 | [0] = { | 74 | [0] = { |
84 | .hwport = 0, | 75 | .hwport = 0, |
@@ -86,8 +77,7 @@ static struct s3c2410_uartcfg rx1950_uartcfgs[] __initdata = { | |||
86 | .ucon = 0x3c5, | 77 | .ucon = 0x3c5, |
87 | .ulcon = 0x03, | 78 | .ulcon = 0x03, |
88 | .ufcon = 0x51, | 79 | .ufcon = 0x51, |
89 | .clocks = rx1950_serial_clocks, | 80 | .clk_sel = S3C2410_UCON_CLKSEL3, |
90 | .clocks_size = ARRAY_SIZE(rx1950_serial_clocks), | ||
91 | }, | 81 | }, |
92 | [1] = { | 82 | [1] = { |
93 | .hwport = 1, | 83 | .hwport = 1, |
@@ -95,8 +85,7 @@ static struct s3c2410_uartcfg rx1950_uartcfgs[] __initdata = { | |||
95 | .ucon = 0x3c5, | 85 | .ucon = 0x3c5, |
96 | .ulcon = 0x03, | 86 | .ulcon = 0x03, |
97 | .ufcon = 0x51, | 87 | .ufcon = 0x51, |
98 | .clocks = rx1950_serial_clocks, | 88 | .clk_sel = S3C2410_UCON_CLKSEL3, |
99 | .clocks_size = ARRAY_SIZE(rx1950_serial_clocks), | ||
100 | }, | 89 | }, |
101 | /* IR port */ | 90 | /* IR port */ |
102 | [2] = { | 91 | [2] = { |
@@ -105,8 +94,7 @@ static struct s3c2410_uartcfg rx1950_uartcfgs[] __initdata = { | |||
105 | .ucon = 0x3c5, | 94 | .ucon = 0x3c5, |
106 | .ulcon = 0x43, | 95 | .ulcon = 0x43, |
107 | .ufcon = 0xf1, | 96 | .ufcon = 0xf1, |
108 | .clocks = rx1950_serial_clocks, | 97 | .clk_sel = S3C2410_UCON_CLKSEL3, |
109 | .clocks_size = ARRAY_SIZE(rx1950_serial_clocks), | ||
110 | }, | 98 | }, |
111 | }; | 99 | }; |
112 | 100 | ||
diff --git a/arch/arm/mach-s3c2440/mach-rx3715.c b/arch/arm/mach-s3c2440/mach-rx3715.c index 80a0972873c2..20103bafbd4b 100644 --- a/arch/arm/mach-s3c2440/mach-rx3715.c +++ b/arch/arm/mach-s3c2440/mach-rx3715.c | |||
@@ -69,16 +69,6 @@ static struct map_desc rx3715_iodesc[] __initdata = { | |||
69 | }, | 69 | }, |
70 | }; | 70 | }; |
71 | 71 | ||
72 | |||
73 | static struct s3c24xx_uart_clksrc rx3715_serial_clocks[] = { | ||
74 | [0] = { | ||
75 | .name = "fclk", | ||
76 | .divisor = 0, | ||
77 | .min_baud = 0, | ||
78 | .max_baud = 0, | ||
79 | } | ||
80 | }; | ||
81 | |||
82 | static struct s3c2410_uartcfg rx3715_uartcfgs[] = { | 72 | static struct s3c2410_uartcfg rx3715_uartcfgs[] = { |
83 | [0] = { | 73 | [0] = { |
84 | .hwport = 0, | 74 | .hwport = 0, |
@@ -86,8 +76,7 @@ static struct s3c2410_uartcfg rx3715_uartcfgs[] = { | |||
86 | .ucon = 0x3c5, | 76 | .ucon = 0x3c5, |
87 | .ulcon = 0x03, | 77 | .ulcon = 0x03, |
88 | .ufcon = 0x51, | 78 | .ufcon = 0x51, |
89 | .clocks = rx3715_serial_clocks, | 79 | .clk_sel = S3C2410_UCON_CLKSEL3, |
90 | .clocks_size = ARRAY_SIZE(rx3715_serial_clocks), | ||
91 | }, | 80 | }, |
92 | [1] = { | 81 | [1] = { |
93 | .hwport = 1, | 82 | .hwport = 1, |
@@ -95,8 +84,7 @@ static struct s3c2410_uartcfg rx3715_uartcfgs[] = { | |||
95 | .ucon = 0x3c5, | 84 | .ucon = 0x3c5, |
96 | .ulcon = 0x03, | 85 | .ulcon = 0x03, |
97 | .ufcon = 0x00, | 86 | .ufcon = 0x00, |
98 | .clocks = rx3715_serial_clocks, | 87 | .clk_sel = S3C2410_UCON_CLKSEL3, |
99 | .clocks_size = ARRAY_SIZE(rx3715_serial_clocks), | ||
100 | }, | 88 | }, |
101 | /* IR port */ | 89 | /* IR port */ |
102 | [2] = { | 90 | [2] = { |
@@ -105,8 +93,7 @@ static struct s3c2410_uartcfg rx3715_uartcfgs[] = { | |||
105 | .ucon = 0x3c5, | 93 | .ucon = 0x3c5, |
106 | .ulcon = 0x43, | 94 | .ulcon = 0x43, |
107 | .ufcon = 0x51, | 95 | .ufcon = 0x51, |
108 | .clocks = rx3715_serial_clocks, | 96 | .clk_sel = S3C2410_UCON_CLKSEL3, |
109 | .clocks_size = ARRAY_SIZE(rx3715_serial_clocks), | ||
110 | } | 97 | } |
111 | }; | 98 | }; |
112 | 99 | ||
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c index 625219b9cefc..a3aafb6768c9 100644 --- a/arch/arm/mach-s3c64xx/clock.c +++ b/arch/arm/mach-s3c64xx/clock.c | |||
@@ -617,16 +617,6 @@ static struct clksrc_clk clksrcs[] = { | |||
617 | .sources = &clkset_uhost, | 617 | .sources = &clkset_uhost, |
618 | }, { | 618 | }, { |
619 | .clk = { | 619 | .clk = { |
620 | .name = "uclk1", | ||
621 | .ctrlbit = S3C_CLKCON_SCLK_UART, | ||
622 | .enable = s3c64xx_sclk_ctrl, | ||
623 | }, | ||
624 | .reg_src = { .reg = S3C_CLK_SRC, .shift = 13, .size = 1 }, | ||
625 | .reg_div = { .reg = S3C_CLK_DIV2, .shift = 16, .size = 4 }, | ||
626 | .sources = &clkset_uart, | ||
627 | }, { | ||
628 | /* Where does UCLK0 come from? */ | ||
629 | .clk = { | ||
630 | .name = "spi-bus", | 620 | .name = "spi-bus", |
631 | .devname = "s3c64xx-spi.0", | 621 | .devname = "s3c64xx-spi.0", |
632 | .ctrlbit = S3C_CLKCON_SCLK_SPI0, | 622 | .ctrlbit = S3C_CLKCON_SCLK_SPI0, |
@@ -695,6 +685,18 @@ static struct clksrc_clk clksrcs[] = { | |||
695 | }, | 685 | }, |
696 | }; | 686 | }; |
697 | 687 | ||
688 | /* Where does UCLK0 come from? */ | ||
689 | static struct clksrc_clk clk_sclk_uclk = { | ||
690 | .clk = { | ||
691 | .name = "uclk1", | ||
692 | .ctrlbit = S3C_CLKCON_SCLK_UART, | ||
693 | .enable = s3c64xx_sclk_ctrl, | ||
694 | }, | ||
695 | .reg_src = { .reg = S3C_CLK_SRC, .shift = 13, .size = 1 }, | ||
696 | .reg_div = { .reg = S3C_CLK_DIV2, .shift = 16, .size = 4 }, | ||
697 | .sources = &clkset_uart, | ||
698 | }; | ||
699 | |||
698 | /* Clock initialisation code */ | 700 | /* Clock initialisation code */ |
699 | 701 | ||
700 | static struct clksrc_clk *init_parents[] = { | 702 | static struct clksrc_clk *init_parents[] = { |
@@ -703,6 +705,15 @@ static struct clksrc_clk *init_parents[] = { | |||
703 | &clk_mout_mpll, | 705 | &clk_mout_mpll, |
704 | }; | 706 | }; |
705 | 707 | ||
708 | static struct clksrc_clk *clksrc_cdev[] = { | ||
709 | &clk_sclk_uclk, | ||
710 | }; | ||
711 | |||
712 | static struct clk_lookup s3c64xx_clk_lookup[] = { | ||
713 | CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p), | ||
714 | CLKDEV_INIT(NULL, "clk_uart_baud3", &clk_sclk_uclk.clk), | ||
715 | }; | ||
716 | |||
706 | #define GET_DIV(clk, field) ((((clk) & field##_MASK) >> field##_SHIFT) + 1) | 717 | #define GET_DIV(clk, field) ((((clk) & field##_MASK) >> field##_SHIFT) + 1) |
707 | 718 | ||
708 | void __init_or_cpufreq s3c64xx_setup_clocks(void) | 719 | void __init_or_cpufreq s3c64xx_setup_clocks(void) |
@@ -811,6 +822,8 @@ static struct clk *clks[] __initdata = { | |||
811 | void __init s3c64xx_register_clocks(unsigned long xtal, | 822 | void __init s3c64xx_register_clocks(unsigned long xtal, |
812 | unsigned armclk_divlimit) | 823 | unsigned armclk_divlimit) |
813 | { | 824 | { |
825 | unsigned int cnt; | ||
826 | |||
814 | armclk_mask = armclk_divlimit; | 827 | armclk_mask = armclk_divlimit; |
815 | 828 | ||
816 | s3c24xx_register_baseclocks(xtal); | 829 | s3c24xx_register_baseclocks(xtal); |
@@ -823,5 +836,9 @@ void __init s3c64xx_register_clocks(unsigned long xtal, | |||
823 | 836 | ||
824 | s3c24xx_register_clocks(clks1, ARRAY_SIZE(clks1)); | 837 | s3c24xx_register_clocks(clks1, ARRAY_SIZE(clks1)); |
825 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | 838 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
839 | for (cnt = 0; cnt < ARRAY_SIZE(clksrc_cdev); cnt++) | ||
840 | s3c_register_clksrc(clksrc_cdev[cnt], 1); | ||
841 | clkdev_add_table(s3c64xx_clk_lookup, ARRAY_SIZE(s3c64xx_clk_lookup)); | ||
842 | |||
826 | s3c_pwmclk_init(); | 843 | s3c_pwmclk_init(); |
827 | } | 844 | } |
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6440.c b/arch/arm/mach-s5p64x0/clock-s5p6440.c index eb4ffe331e1a..4c797ab3b3fd 100644 --- a/arch/arm/mach-s5p64x0/clock-s5p6440.c +++ b/arch/arm/mach-s5p64x0/clock-s5p6440.c | |||
@@ -422,15 +422,6 @@ static struct clksrc_clk clksrcs[] = { | |||
422 | .reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 8, .size = 4 }, | 422 | .reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 8, .size = 4 }, |
423 | }, { | 423 | }, { |
424 | .clk = { | 424 | .clk = { |
425 | .name = "uclk1", | ||
426 | .ctrlbit = (1 << 5), | ||
427 | .enable = s5p64x0_sclk_ctrl, | ||
428 | }, | ||
429 | .sources = &clkset_uart, | ||
430 | .reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 13, .size = 1 }, | ||
431 | .reg_div = { .reg = S5P64X0_CLK_DIV2, .shift = 16, .size = 4 }, | ||
432 | }, { | ||
433 | .clk = { | ||
434 | .name = "sclk_spi", | 425 | .name = "sclk_spi", |
435 | .devname = "s3c64xx-spi.0", | 426 | .devname = "s3c64xx-spi.0", |
436 | .ctrlbit = (1 << 20), | 427 | .ctrlbit = (1 << 20), |
@@ -488,6 +479,17 @@ static struct clksrc_clk clksrcs[] = { | |||
488 | }, | 479 | }, |
489 | }; | 480 | }; |
490 | 481 | ||
482 | static struct clksrc_clk clk_sclk_uclk = { | ||
483 | .clk = { | ||
484 | .name = "uclk1", | ||
485 | .ctrlbit = (1 << 5), | ||
486 | .enable = s5p64x0_sclk_ctrl, | ||
487 | }, | ||
488 | .sources = &clkset_uart, | ||
489 | .reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 13, .size = 1 }, | ||
490 | .reg_div = { .reg = S5P64X0_CLK_DIV2, .shift = 16, .size = 4 }, | ||
491 | }; | ||
492 | |||
491 | /* Clock initialization code */ | 493 | /* Clock initialization code */ |
492 | static struct clksrc_clk *sysclks[] = { | 494 | static struct clksrc_clk *sysclks[] = { |
493 | &clk_mout_apll, | 495 | &clk_mout_apll, |
@@ -506,6 +508,15 @@ static struct clk dummy_apb_pclk = { | |||
506 | .id = -1, | 508 | .id = -1, |
507 | }; | 509 | }; |
508 | 510 | ||
511 | static struct clksrc_clk *clksrc_cdev[] = { | ||
512 | &clk_sclk_uclk, | ||
513 | }; | ||
514 | |||
515 | static struct clk_lookup s5p6440_clk_lookup[] = { | ||
516 | CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_pclk_low.clk), | ||
517 | CLKDEV_INIT(NULL, "clk_uart_baud3", &clk_sclk_uclk.clk), | ||
518 | }; | ||
519 | |||
509 | void __init_or_cpufreq s5p6440_setup_clocks(void) | 520 | void __init_or_cpufreq s5p6440_setup_clocks(void) |
510 | { | 521 | { |
511 | struct clk *xtal_clk; | 522 | struct clk *xtal_clk; |
@@ -584,9 +595,12 @@ void __init s5p6440_register_clocks(void) | |||
584 | 595 | ||
585 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | 596 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
586 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | 597 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); |
598 | for (ptr = 0; ptr < ARRAY_SIZE(clksrc_cdev); ptr++) | ||
599 | s3c_register_clksrc(clksrc_cdev[ptr], 1); | ||
587 | 600 | ||
588 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | 601 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
589 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | 602 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
603 | clkdev_add_table(s5p6440_clk_lookup, ARRAY_SIZE(s5p6440_clk_lookup)); | ||
590 | 604 | ||
591 | s3c24xx_register_clock(&dummy_apb_pclk); | 605 | s3c24xx_register_clock(&dummy_apb_pclk); |
592 | 606 | ||
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6450.c b/arch/arm/mach-s5p64x0/clock-s5p6450.c index bb7ee912090b..26aa63402d6b 100644 --- a/arch/arm/mach-s5p64x0/clock-s5p6450.c +++ b/arch/arm/mach-s5p64x0/clock-s5p6450.c | |||
@@ -444,15 +444,6 @@ static struct clksrc_clk clksrcs[] = { | |||
444 | .reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 8, .size = 4 }, | 444 | .reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 8, .size = 4 }, |
445 | }, { | 445 | }, { |
446 | .clk = { | 446 | .clk = { |
447 | .name = "uclk1", | ||
448 | .ctrlbit = (1 << 5), | ||
449 | .enable = s5p64x0_sclk_ctrl, | ||
450 | }, | ||
451 | .sources = &clkset_uart, | ||
452 | .reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 13, .size = 1 }, | ||
453 | .reg_div = { .reg = S5P64X0_CLK_DIV2, .shift = 16, .size = 4 }, | ||
454 | }, { | ||
455 | .clk = { | ||
456 | .name = "sclk_spi", | 447 | .name = "sclk_spi", |
457 | .devname = "s3c64xx-spi.0", | 448 | .devname = "s3c64xx-spi.0", |
458 | .ctrlbit = (1 << 20), | 449 | .ctrlbit = (1 << 20), |
@@ -537,6 +528,26 @@ static struct clksrc_clk clksrcs[] = { | |||
537 | }, | 528 | }, |
538 | }; | 529 | }; |
539 | 530 | ||
531 | static struct clksrc_clk clk_sclk_uclk = { | ||
532 | .clk = { | ||
533 | .name = "uclk1", | ||
534 | .ctrlbit = (1 << 5), | ||
535 | .enable = s5p64x0_sclk_ctrl, | ||
536 | }, | ||
537 | .sources = &clkset_uart, | ||
538 | .reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 13, .size = 1 }, | ||
539 | .reg_div = { .reg = S5P64X0_CLK_DIV2, .shift = 16, .size = 4 }, | ||
540 | }; | ||
541 | |||
542 | static struct clksrc_clk *clksrc_cdev[] = { | ||
543 | &clk_sclk_uclk, | ||
544 | }; | ||
545 | |||
546 | static struct clk_lookup s5p6450_clk_lookup[] = { | ||
547 | CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_pclk_low.clk), | ||
548 | CLKDEV_INIT(NULL, "clk_uart_baud3", &clk_sclk_uclk.clk), | ||
549 | }; | ||
550 | |||
540 | /* Clock initialization code */ | 551 | /* Clock initialization code */ |
541 | static struct clksrc_clk *sysclks[] = { | 552 | static struct clksrc_clk *sysclks[] = { |
542 | &clk_mout_apll, | 553 | &clk_mout_apll, |
@@ -635,9 +646,12 @@ void __init s5p6450_register_clocks(void) | |||
635 | 646 | ||
636 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | 647 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
637 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | 648 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); |
649 | for (ptr = 0; ptr < ARRAY_SIZE(clksrc_cdev); ptr++) | ||
650 | s3c_register_clksrc(clksrc_cdev[ptr], 1); | ||
638 | 651 | ||
639 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | 652 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
640 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | 653 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
654 | clkdev_add_table(s5p6450_clk_lookup, ARRAY_SIZE(s5p6450_clk_lookup)); | ||
641 | 655 | ||
642 | s3c24xx_register_clock(&dummy_apb_pclk); | 656 | s3c24xx_register_clock(&dummy_apb_pclk); |
643 | 657 | ||
diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c index 28d0b918cd4b..0d50e79fb9fc 100644 --- a/arch/arm/mach-s5p64x0/common.c +++ b/arch/arm/mach-s5p64x0/common.c | |||
@@ -282,36 +282,7 @@ int __init s5p64x0_init(void) | |||
282 | return device_register(&s5p64x0_dev); | 282 | return device_register(&s5p64x0_dev); |
283 | } | 283 | } |
284 | 284 | ||
285 | static struct s3c24xx_uart_clksrc s5p64x0_serial_clocks[] = { | ||
286 | [0] = { | ||
287 | .name = "pclk_low", | ||
288 | .divisor = 1, | ||
289 | .min_baud = 0, | ||
290 | .max_baud = 0, | ||
291 | }, | ||
292 | [1] = { | ||
293 | .name = "uclk1", | ||
294 | .divisor = 1, | ||
295 | .min_baud = 0, | ||
296 | .max_baud = 0, | ||
297 | }, | ||
298 | }; | ||
299 | |||
300 | /* uart registration process */ | 285 | /* uart registration process */ |
301 | |||
302 | void __init s5p64x0_common_init_uarts(struct s3c2410_uartcfg *cfg, int no) | ||
303 | { | ||
304 | struct s3c2410_uartcfg *tcfg = cfg; | ||
305 | u32 ucnt; | ||
306 | |||
307 | for (ucnt = 0; ucnt < no; ucnt++, tcfg++) { | ||
308 | if (!tcfg->clocks) { | ||
309 | tcfg->clocks = s5p64x0_serial_clocks; | ||
310 | tcfg->clocks_size = ARRAY_SIZE(s5p64x0_serial_clocks); | ||
311 | } | ||
312 | } | ||
313 | } | ||
314 | |||
315 | void __init s5p6440_init_uarts(struct s3c2410_uartcfg *cfg, int no) | 286 | void __init s5p6440_init_uarts(struct s3c2410_uartcfg *cfg, int no) |
316 | { | 287 | { |
317 | int uart; | 288 | int uart; |
@@ -321,13 +292,11 @@ void __init s5p6440_init_uarts(struct s3c2410_uartcfg *cfg, int no) | |||
321 | s5p_uart_resources[uart].resources->end = S5P6440_PA_UART(uart) + S5P_SZ_UART; | 292 | s5p_uart_resources[uart].resources->end = S5P6440_PA_UART(uart) + S5P_SZ_UART; |
322 | } | 293 | } |
323 | 294 | ||
324 | s5p64x0_common_init_uarts(cfg, no); | ||
325 | s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no); | 295 | s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no); |
326 | } | 296 | } |
327 | 297 | ||
328 | void __init s5p6450_init_uarts(struct s3c2410_uartcfg *cfg, int no) | 298 | void __init s5p6450_init_uarts(struct s3c2410_uartcfg *cfg, int no) |
329 | { | 299 | { |
330 | s5p64x0_common_init_uarts(cfg, no); | ||
331 | s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no); | 300 | s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no); |
332 | } | 301 | } |
333 | 302 | ||
diff --git a/arch/arm/mach-s5p64x0/dma.c b/arch/arm/mach-s5p64x0/dma.c index 442dd4ad12da..f820c0744405 100644 --- a/arch/arm/mach-s5p64x0/dma.c +++ b/arch/arm/mach-s5p64x0/dma.c | |||
@@ -38,176 +38,74 @@ | |||
38 | 38 | ||
39 | static u64 dma_dmamask = DMA_BIT_MASK(32); | 39 | static u64 dma_dmamask = DMA_BIT_MASK(32); |
40 | 40 | ||
41 | struct dma_pl330_peri s5p6440_pdma_peri[22] = { | 41 | u8 s5p6440_pdma_peri[] = { |
42 | { | 42 | DMACH_UART0_RX, |
43 | .peri_id = (u8)DMACH_UART0_RX, | 43 | DMACH_UART0_TX, |
44 | .rqtype = DEVTOMEM, | 44 | DMACH_UART1_RX, |
45 | }, { | 45 | DMACH_UART1_TX, |
46 | .peri_id = (u8)DMACH_UART0_TX, | 46 | DMACH_UART2_RX, |
47 | .rqtype = MEMTODEV, | 47 | DMACH_UART2_TX, |
48 | }, { | 48 | DMACH_UART3_RX, |
49 | .peri_id = (u8)DMACH_UART1_RX, | 49 | DMACH_UART3_TX, |
50 | .rqtype = DEVTOMEM, | 50 | DMACH_MAX, |
51 | }, { | 51 | DMACH_MAX, |
52 | .peri_id = (u8)DMACH_UART1_TX, | 52 | DMACH_PCM0_TX, |
53 | .rqtype = MEMTODEV, | 53 | DMACH_PCM0_RX, |
54 | }, { | 54 | DMACH_I2S0_TX, |
55 | .peri_id = (u8)DMACH_UART2_RX, | 55 | DMACH_I2S0_RX, |
56 | .rqtype = DEVTOMEM, | 56 | DMACH_SPI0_TX, |
57 | }, { | 57 | DMACH_SPI0_RX, |
58 | .peri_id = (u8)DMACH_UART2_TX, | 58 | DMACH_MAX, |
59 | .rqtype = MEMTODEV, | 59 | DMACH_MAX, |
60 | }, { | 60 | DMACH_MAX, |
61 | .peri_id = (u8)DMACH_UART3_RX, | 61 | DMACH_MAX, |
62 | .rqtype = DEVTOMEM, | 62 | DMACH_SPI1_TX, |
63 | }, { | 63 | DMACH_SPI1_RX, |
64 | .peri_id = (u8)DMACH_UART3_TX, | ||
65 | .rqtype = MEMTODEV, | ||
66 | }, { | ||
67 | .peri_id = DMACH_MAX, | ||
68 | }, { | ||
69 | .peri_id = DMACH_MAX, | ||
70 | }, { | ||
71 | .peri_id = (u8)DMACH_PCM0_TX, | ||
72 | .rqtype = MEMTODEV, | ||
73 | }, { | ||
74 | .peri_id = (u8)DMACH_PCM0_RX, | ||
75 | .rqtype = DEVTOMEM, | ||
76 | }, { | ||
77 | .peri_id = (u8)DMACH_I2S0_TX, | ||
78 | .rqtype = MEMTODEV, | ||
79 | }, { | ||
80 | .peri_id = (u8)DMACH_I2S0_RX, | ||
81 | .rqtype = DEVTOMEM, | ||
82 | }, { | ||
83 | .peri_id = (u8)DMACH_SPI0_TX, | ||
84 | .rqtype = MEMTODEV, | ||
85 | }, { | ||
86 | .peri_id = (u8)DMACH_SPI0_RX, | ||
87 | .rqtype = DEVTOMEM, | ||
88 | }, { | ||
89 | .peri_id = (u8)DMACH_MAX, | ||
90 | }, { | ||
91 | .peri_id = (u8)DMACH_MAX, | ||
92 | }, { | ||
93 | .peri_id = (u8)DMACH_MAX, | ||
94 | }, { | ||
95 | .peri_id = (u8)DMACH_MAX, | ||
96 | }, { | ||
97 | .peri_id = (u8)DMACH_SPI1_TX, | ||
98 | .rqtype = MEMTODEV, | ||
99 | }, { | ||
100 | .peri_id = (u8)DMACH_SPI1_RX, | ||
101 | .rqtype = DEVTOMEM, | ||
102 | }, | ||
103 | }; | 64 | }; |
104 | 65 | ||
105 | struct dma_pl330_platdata s5p6440_pdma_pdata = { | 66 | struct dma_pl330_platdata s5p6440_pdma_pdata = { |
106 | .nr_valid_peri = ARRAY_SIZE(s5p6440_pdma_peri), | 67 | .nr_valid_peri = ARRAY_SIZE(s5p6440_pdma_peri), |
107 | .peri = s5p6440_pdma_peri, | 68 | .peri_id = s5p6440_pdma_peri, |
108 | }; | 69 | }; |
109 | 70 | ||
110 | struct dma_pl330_peri s5p6450_pdma_peri[32] = { | 71 | u8 s5p6450_pdma_peri[] = { |
111 | { | 72 | DMACH_UART0_RX, |
112 | .peri_id = (u8)DMACH_UART0_RX, | 73 | DMACH_UART0_TX, |
113 | .rqtype = DEVTOMEM, | 74 | DMACH_UART1_RX, |
114 | }, { | 75 | DMACH_UART1_TX, |
115 | .peri_id = (u8)DMACH_UART0_TX, | 76 | DMACH_UART2_RX, |
116 | .rqtype = MEMTODEV, | 77 | DMACH_UART2_TX, |
117 | }, { | 78 | DMACH_UART3_RX, |
118 | .peri_id = (u8)DMACH_UART1_RX, | 79 | DMACH_UART3_TX, |
119 | .rqtype = DEVTOMEM, | 80 | DMACH_UART4_RX, |
120 | }, { | 81 | DMACH_UART4_TX, |
121 | .peri_id = (u8)DMACH_UART1_TX, | 82 | DMACH_PCM0_TX, |
122 | .rqtype = MEMTODEV, | 83 | DMACH_PCM0_RX, |
123 | }, { | 84 | DMACH_I2S0_TX, |
124 | .peri_id = (u8)DMACH_UART2_RX, | 85 | DMACH_I2S0_RX, |
125 | .rqtype = DEVTOMEM, | 86 | DMACH_SPI0_TX, |
126 | }, { | 87 | DMACH_SPI0_RX, |
127 | .peri_id = (u8)DMACH_UART2_TX, | 88 | DMACH_PCM1_TX, |
128 | .rqtype = MEMTODEV, | 89 | DMACH_PCM1_RX, |
129 | }, { | 90 | DMACH_PCM2_TX, |
130 | .peri_id = (u8)DMACH_UART3_RX, | 91 | DMACH_PCM2_RX, |
131 | .rqtype = DEVTOMEM, | 92 | DMACH_SPI1_TX, |
132 | }, { | 93 | DMACH_SPI1_RX, |
133 | .peri_id = (u8)DMACH_UART3_TX, | 94 | DMACH_USI_TX, |
134 | .rqtype = MEMTODEV, | 95 | DMACH_USI_RX, |
135 | }, { | 96 | DMACH_MAX, |
136 | .peri_id = (u8)DMACH_UART4_RX, | 97 | DMACH_I2S1_TX, |
137 | .rqtype = DEVTOMEM, | 98 | DMACH_I2S1_RX, |
138 | }, { | 99 | DMACH_I2S2_TX, |
139 | .peri_id = (u8)DMACH_UART4_TX, | 100 | DMACH_I2S2_RX, |
140 | .rqtype = MEMTODEV, | 101 | DMACH_PWM, |
141 | }, { | 102 | DMACH_UART5_RX, |
142 | .peri_id = (u8)DMACH_PCM0_TX, | 103 | DMACH_UART5_TX, |
143 | .rqtype = MEMTODEV, | ||
144 | }, { | ||
145 | .peri_id = (u8)DMACH_PCM0_RX, | ||
146 | .rqtype = DEVTOMEM, | ||
147 | }, { | ||
148 | .peri_id = (u8)DMACH_I2S0_TX, | ||
149 | .rqtype = MEMTODEV, | ||
150 | }, { | ||
151 | .peri_id = (u8)DMACH_I2S0_RX, | ||
152 | .rqtype = DEVTOMEM, | ||
153 | }, { | ||
154 | .peri_id = (u8)DMACH_SPI0_TX, | ||
155 | .rqtype = MEMTODEV, | ||
156 | }, { | ||
157 | .peri_id = (u8)DMACH_SPI0_RX, | ||
158 | .rqtype = DEVTOMEM, | ||
159 | }, { | ||
160 | .peri_id = (u8)DMACH_PCM1_TX, | ||
161 | .rqtype = MEMTODEV, | ||
162 | }, { | ||
163 | .peri_id = (u8)DMACH_PCM1_RX, | ||
164 | .rqtype = DEVTOMEM, | ||
165 | }, { | ||
166 | .peri_id = (u8)DMACH_PCM2_TX, | ||
167 | .rqtype = MEMTODEV, | ||
168 | }, { | ||
169 | .peri_id = (u8)DMACH_PCM2_RX, | ||
170 | .rqtype = DEVTOMEM, | ||
171 | }, { | ||
172 | .peri_id = (u8)DMACH_SPI1_TX, | ||
173 | .rqtype = MEMTODEV, | ||
174 | }, { | ||
175 | .peri_id = (u8)DMACH_SPI1_RX, | ||
176 | .rqtype = DEVTOMEM, | ||
177 | }, { | ||
178 | .peri_id = (u8)DMACH_USI_TX, | ||
179 | .rqtype = MEMTODEV, | ||
180 | }, { | ||
181 | .peri_id = (u8)DMACH_USI_RX, | ||
182 | .rqtype = DEVTOMEM, | ||
183 | }, { | ||
184 | .peri_id = (u8)DMACH_MAX, | ||
185 | }, { | ||
186 | .peri_id = (u8)DMACH_I2S1_TX, | ||
187 | .rqtype = MEMTODEV, | ||
188 | }, { | ||
189 | .peri_id = (u8)DMACH_I2S1_RX, | ||
190 | .rqtype = DEVTOMEM, | ||
191 | }, { | ||
192 | .peri_id = (u8)DMACH_I2S2_TX, | ||
193 | .rqtype = MEMTODEV, | ||
194 | }, { | ||
195 | .peri_id = (u8)DMACH_I2S2_RX, | ||
196 | .rqtype = DEVTOMEM, | ||
197 | }, { | ||
198 | .peri_id = (u8)DMACH_PWM, | ||
199 | }, { | ||
200 | .peri_id = (u8)DMACH_UART5_RX, | ||
201 | .rqtype = DEVTOMEM, | ||
202 | }, { | ||
203 | .peri_id = (u8)DMACH_UART5_TX, | ||
204 | .rqtype = MEMTODEV, | ||
205 | }, | ||
206 | }; | 104 | }; |
207 | 105 | ||
208 | struct dma_pl330_platdata s5p6450_pdma_pdata = { | 106 | struct dma_pl330_platdata s5p6450_pdma_pdata = { |
209 | .nr_valid_peri = ARRAY_SIZE(s5p6450_pdma_peri), | 107 | .nr_valid_peri = ARRAY_SIZE(s5p6450_pdma_peri), |
210 | .peri = s5p6450_pdma_peri, | 108 | .peri_id = s5p6450_pdma_peri, |
211 | }; | 109 | }; |
212 | 110 | ||
213 | struct amba_device s5p64x0_device_pdma = { | 111 | struct amba_device s5p64x0_device_pdma = { |
@@ -227,10 +125,15 @@ struct amba_device s5p64x0_device_pdma = { | |||
227 | 125 | ||
228 | static int __init s5p64x0_dma_init(void) | 126 | static int __init s5p64x0_dma_init(void) |
229 | { | 127 | { |
230 | if (soc_is_s5p6450()) | 128 | if (soc_is_s5p6450()) { |
129 | dma_cap_set(DMA_SLAVE, s5p6450_pdma_pdata.cap_mask); | ||
130 | dma_cap_set(DMA_CYCLIC, s5p6450_pdma_pdata.cap_mask); | ||
231 | s5p64x0_device_pdma.dev.platform_data = &s5p6450_pdma_pdata; | 131 | s5p64x0_device_pdma.dev.platform_data = &s5p6450_pdma_pdata; |
232 | else | 132 | } else { |
133 | dma_cap_set(DMA_SLAVE, s5p6440_pdma_pdata.cap_mask); | ||
134 | dma_cap_set(DMA_CYCLIC, s5p6440_pdma_pdata.cap_mask); | ||
233 | s5p64x0_device_pdma.dev.platform_data = &s5p6440_pdma_pdata; | 135 | s5p64x0_device_pdma.dev.platform_data = &s5p6440_pdma_pdata; |
136 | } | ||
234 | 137 | ||
235 | amba_device_register(&s5p64x0_device_pdma, &iomem_resource); | 138 | amba_device_register(&s5p64x0_device_pdma, &iomem_resource); |
236 | 139 | ||
diff --git a/arch/arm/mach-s5p64x0/include/mach/irqs.h b/arch/arm/mach-s5p64x0/include/mach/irqs.h index 53982db9d259..5b845e849b30 100644 --- a/arch/arm/mach-s5p64x0/include/mach/irqs.h +++ b/arch/arm/mach-s5p64x0/include/mach/irqs.h | |||
@@ -141,6 +141,8 @@ | |||
141 | 141 | ||
142 | #define IRQ_EINT_GROUP(grp, x) (IRQ_EINT_GROUP##grp##_BASE + (x)) | 142 | #define IRQ_EINT_GROUP(grp, x) (IRQ_EINT_GROUP##grp##_BASE + (x)) |
143 | 143 | ||
144 | #define IRQ_TIMER_BASE (11) | ||
145 | |||
144 | /* Set the default NR_IRQS */ | 146 | /* Set the default NR_IRQS */ |
145 | 147 | ||
146 | #define NR_IRQS (IRQ_EINT_GROUP8_BASE + IRQ_EINT_GROUP8_NR + 1) | 148 | #define NR_IRQS (IRQ_EINT_GROUP8_BASE + IRQ_EINT_GROUP8_NR + 1) |
diff --git a/arch/arm/mach-s5pc100/clock.c b/arch/arm/mach-s5pc100/clock.c index c4c74893f53c..49f8c30d58da 100644 --- a/arch/arm/mach-s5pc100/clock.c +++ b/arch/arm/mach-s5pc100/clock.c | |||
@@ -963,16 +963,6 @@ static struct clksrc_clk clksrcs[] = { | |||
963 | .reg_div = { .reg = S5P_CLK_DIV2, .shift = 12, .size = 4 }, | 963 | .reg_div = { .reg = S5P_CLK_DIV2, .shift = 12, .size = 4 }, |
964 | }, { | 964 | }, { |
965 | .clk = { | 965 | .clk = { |
966 | .name = "uclk1", | ||
967 | .ctrlbit = (1 << 3), | ||
968 | .enable = s5pc100_sclk0_ctrl, | ||
969 | |||
970 | }, | ||
971 | .sources = &clk_src_group2, | ||
972 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 0, .size = 1 }, | ||
973 | .reg_div = { .reg = S5P_CLK_DIV2, .shift = 0, .size = 4 }, | ||
974 | }, { | ||
975 | .clk = { | ||
976 | .name = "sclk_mixer", | 966 | .name = "sclk_mixer", |
977 | .ctrlbit = (1 << 6), | 967 | .ctrlbit = (1 << 6), |
978 | .enable = s5pc100_sclk0_ctrl, | 968 | .enable = s5pc100_sclk0_ctrl, |
@@ -1099,6 +1089,17 @@ static struct clksrc_clk clksrcs[] = { | |||
1099 | }, | 1089 | }, |
1100 | }; | 1090 | }; |
1101 | 1091 | ||
1092 | static struct clksrc_clk clk_sclk_uart = { | ||
1093 | .clk = { | ||
1094 | .name = "uclk1", | ||
1095 | .ctrlbit = (1 << 3), | ||
1096 | .enable = s5pc100_sclk0_ctrl, | ||
1097 | }, | ||
1098 | .sources = &clk_src_group2, | ||
1099 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 0, .size = 1 }, | ||
1100 | .reg_div = { .reg = S5P_CLK_DIV2, .shift = 0, .size = 4 }, | ||
1101 | }; | ||
1102 | |||
1102 | /* Clock initialisation code */ | 1103 | /* Clock initialisation code */ |
1103 | static struct clksrc_clk *sysclks[] = { | 1104 | static struct clksrc_clk *sysclks[] = { |
1104 | &clk_mout_apll, | 1105 | &clk_mout_apll, |
@@ -1128,6 +1129,10 @@ static struct clksrc_clk *sysclks[] = { | |||
1128 | &clk_sclk_spdif, | 1129 | &clk_sclk_spdif, |
1129 | }; | 1130 | }; |
1130 | 1131 | ||
1132 | static struct clksrc_clk *clksrc_cdev[] = { | ||
1133 | &clk_sclk_uart, | ||
1134 | }; | ||
1135 | |||
1131 | void __init_or_cpufreq s5pc100_setup_clocks(void) | 1136 | void __init_or_cpufreq s5pc100_setup_clocks(void) |
1132 | { | 1137 | { |
1133 | unsigned long xtal; | 1138 | unsigned long xtal; |
@@ -1267,6 +1272,11 @@ static struct clk *clks[] __initdata = { | |||
1267 | &clk_pcmcdclk1, | 1272 | &clk_pcmcdclk1, |
1268 | }; | 1273 | }; |
1269 | 1274 | ||
1275 | static struct clk_lookup s5pc100_clk_lookup[] = { | ||
1276 | CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p), | ||
1277 | CLKDEV_INIT(NULL, "clk_uart_baud3", &clk_sclk_uart.clk), | ||
1278 | }; | ||
1279 | |||
1270 | void __init s5pc100_register_clocks(void) | 1280 | void __init s5pc100_register_clocks(void) |
1271 | { | 1281 | { |
1272 | int ptr; | 1282 | int ptr; |
@@ -1278,9 +1288,12 @@ void __init s5pc100_register_clocks(void) | |||
1278 | 1288 | ||
1279 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | 1289 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
1280 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | 1290 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); |
1291 | for (ptr = 0; ptr < ARRAY_SIZE(clksrc_cdev); ptr++) | ||
1292 | s3c_register_clksrc(clksrc_cdev[ptr], 1); | ||
1281 | 1293 | ||
1282 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | 1294 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
1283 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | 1295 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
1296 | clkdev_add_table(s5pc100_clk_lookup, ARRAY_SIZE(s5pc100_clk_lookup)); | ||
1284 | 1297 | ||
1285 | s3c24xx_register_clock(&dummy_apb_pclk); | 1298 | s3c24xx_register_clock(&dummy_apb_pclk); |
1286 | 1299 | ||
diff --git a/arch/arm/mach-s5pc100/dma.c b/arch/arm/mach-s5pc100/dma.c index 065a087f5a8b..c841f4d313f2 100644 --- a/arch/arm/mach-s5pc100/dma.c +++ b/arch/arm/mach-s5pc100/dma.c | |||
@@ -35,100 +35,42 @@ | |||
35 | 35 | ||
36 | static u64 dma_dmamask = DMA_BIT_MASK(32); | 36 | static u64 dma_dmamask = DMA_BIT_MASK(32); |
37 | 37 | ||
38 | struct dma_pl330_peri pdma0_peri[30] = { | 38 | u8 pdma0_peri[] = { |
39 | { | 39 | DMACH_UART0_RX, |
40 | .peri_id = (u8)DMACH_UART0_RX, | 40 | DMACH_UART0_TX, |
41 | .rqtype = DEVTOMEM, | 41 | DMACH_UART1_RX, |
42 | }, { | 42 | DMACH_UART1_TX, |
43 | .peri_id = (u8)DMACH_UART0_TX, | 43 | DMACH_UART2_RX, |
44 | .rqtype = MEMTODEV, | 44 | DMACH_UART2_TX, |
45 | }, { | 45 | DMACH_UART3_RX, |
46 | .peri_id = (u8)DMACH_UART1_RX, | 46 | DMACH_UART3_TX, |
47 | .rqtype = DEVTOMEM, | 47 | DMACH_IRDA, |
48 | }, { | 48 | DMACH_I2S0_RX, |
49 | .peri_id = (u8)DMACH_UART1_TX, | 49 | DMACH_I2S0_TX, |
50 | .rqtype = MEMTODEV, | 50 | DMACH_I2S0S_TX, |
51 | }, { | 51 | DMACH_I2S1_RX, |
52 | .peri_id = (u8)DMACH_UART2_RX, | 52 | DMACH_I2S1_TX, |
53 | .rqtype = DEVTOMEM, | 53 | DMACH_I2S2_RX, |
54 | }, { | 54 | DMACH_I2S2_TX, |
55 | .peri_id = (u8)DMACH_UART2_TX, | 55 | DMACH_SPI0_RX, |
56 | .rqtype = MEMTODEV, | 56 | DMACH_SPI0_TX, |
57 | }, { | 57 | DMACH_SPI1_RX, |
58 | .peri_id = (u8)DMACH_UART3_RX, | 58 | DMACH_SPI1_TX, |
59 | .rqtype = DEVTOMEM, | 59 | DMACH_SPI2_RX, |
60 | }, { | 60 | DMACH_SPI2_TX, |
61 | .peri_id = (u8)DMACH_UART3_TX, | 61 | DMACH_AC97_MICIN, |
62 | .rqtype = MEMTODEV, | 62 | DMACH_AC97_PCMIN, |
63 | }, { | 63 | DMACH_AC97_PCMOUT, |
64 | .peri_id = DMACH_IRDA, | 64 | DMACH_EXTERNAL, |
65 | }, { | 65 | DMACH_PWM, |
66 | .peri_id = (u8)DMACH_I2S0_RX, | 66 | DMACH_SPDIF, |
67 | .rqtype = DEVTOMEM, | 67 | DMACH_HSI_RX, |
68 | }, { | 68 | DMACH_HSI_TX, |
69 | .peri_id = (u8)DMACH_I2S0_TX, | ||
70 | .rqtype = MEMTODEV, | ||
71 | }, { | ||
72 | .peri_id = (u8)DMACH_I2S0S_TX, | ||
73 | .rqtype = MEMTODEV, | ||
74 | }, { | ||
75 | .peri_id = (u8)DMACH_I2S1_RX, | ||
76 | .rqtype = DEVTOMEM, | ||
77 | }, { | ||
78 | .peri_id = (u8)DMACH_I2S1_TX, | ||
79 | .rqtype = MEMTODEV, | ||
80 | }, { | ||
81 | .peri_id = (u8)DMACH_I2S2_RX, | ||
82 | .rqtype = DEVTOMEM, | ||
83 | }, { | ||
84 | .peri_id = (u8)DMACH_I2S2_TX, | ||
85 | .rqtype = MEMTODEV, | ||
86 | }, { | ||
87 | .peri_id = (u8)DMACH_SPI0_RX, | ||
88 | .rqtype = DEVTOMEM, | ||
89 | }, { | ||
90 | .peri_id = (u8)DMACH_SPI0_TX, | ||
91 | .rqtype = MEMTODEV, | ||
92 | }, { | ||
93 | .peri_id = (u8)DMACH_SPI1_RX, | ||
94 | .rqtype = DEVTOMEM, | ||
95 | }, { | ||
96 | .peri_id = (u8)DMACH_SPI1_TX, | ||
97 | .rqtype = MEMTODEV, | ||
98 | }, { | ||
99 | .peri_id = (u8)DMACH_SPI2_RX, | ||
100 | .rqtype = DEVTOMEM, | ||
101 | }, { | ||
102 | .peri_id = (u8)DMACH_SPI2_TX, | ||
103 | .rqtype = MEMTODEV, | ||
104 | }, { | ||
105 | .peri_id = (u8)DMACH_AC97_MICIN, | ||
106 | .rqtype = DEVTOMEM, | ||
107 | }, { | ||
108 | .peri_id = (u8)DMACH_AC97_PCMIN, | ||
109 | .rqtype = DEVTOMEM, | ||
110 | }, { | ||
111 | .peri_id = (u8)DMACH_AC97_PCMOUT, | ||
112 | .rqtype = MEMTODEV, | ||
113 | }, { | ||
114 | .peri_id = (u8)DMACH_EXTERNAL, | ||
115 | }, { | ||
116 | .peri_id = (u8)DMACH_PWM, | ||
117 | }, { | ||
118 | .peri_id = (u8)DMACH_SPDIF, | ||
119 | .rqtype = MEMTODEV, | ||
120 | }, { | ||
121 | .peri_id = (u8)DMACH_HSI_RX, | ||
122 | .rqtype = DEVTOMEM, | ||
123 | }, { | ||
124 | .peri_id = (u8)DMACH_HSI_TX, | ||
125 | .rqtype = MEMTODEV, | ||
126 | }, | ||
127 | }; | 69 | }; |
128 | 70 | ||
129 | struct dma_pl330_platdata s5pc100_pdma0_pdata = { | 71 | struct dma_pl330_platdata s5pc100_pdma0_pdata = { |
130 | .nr_valid_peri = ARRAY_SIZE(pdma0_peri), | 72 | .nr_valid_peri = ARRAY_SIZE(pdma0_peri), |
131 | .peri = pdma0_peri, | 73 | .peri_id = pdma0_peri, |
132 | }; | 74 | }; |
133 | 75 | ||
134 | struct amba_device s5pc100_device_pdma0 = { | 76 | struct amba_device s5pc100_device_pdma0 = { |
@@ -147,98 +89,42 @@ struct amba_device s5pc100_device_pdma0 = { | |||
147 | .periphid = 0x00041330, | 89 | .periphid = 0x00041330, |
148 | }; | 90 | }; |
149 | 91 | ||
150 | struct dma_pl330_peri pdma1_peri[30] = { | 92 | u8 pdma1_peri[] = { |
151 | { | 93 | DMACH_UART0_RX, |
152 | .peri_id = (u8)DMACH_UART0_RX, | 94 | DMACH_UART0_TX, |
153 | .rqtype = DEVTOMEM, | 95 | DMACH_UART1_RX, |
154 | }, { | 96 | DMACH_UART1_TX, |
155 | .peri_id = (u8)DMACH_UART0_TX, | 97 | DMACH_UART2_RX, |
156 | .rqtype = MEMTODEV, | 98 | DMACH_UART2_TX, |
157 | }, { | 99 | DMACH_UART3_RX, |
158 | .peri_id = (u8)DMACH_UART1_RX, | 100 | DMACH_UART3_TX, |
159 | .rqtype = DEVTOMEM, | 101 | DMACH_IRDA, |
160 | }, { | 102 | DMACH_I2S0_RX, |
161 | .peri_id = (u8)DMACH_UART1_TX, | 103 | DMACH_I2S0_TX, |
162 | .rqtype = MEMTODEV, | 104 | DMACH_I2S0S_TX, |
163 | }, { | 105 | DMACH_I2S1_RX, |
164 | .peri_id = (u8)DMACH_UART2_RX, | 106 | DMACH_I2S1_TX, |
165 | .rqtype = DEVTOMEM, | 107 | DMACH_I2S2_RX, |
166 | }, { | 108 | DMACH_I2S2_TX, |
167 | .peri_id = (u8)DMACH_UART2_TX, | 109 | DMACH_SPI0_RX, |
168 | .rqtype = MEMTODEV, | 110 | DMACH_SPI0_TX, |
169 | }, { | 111 | DMACH_SPI1_RX, |
170 | .peri_id = (u8)DMACH_UART3_RX, | 112 | DMACH_SPI1_TX, |
171 | .rqtype = DEVTOMEM, | 113 | DMACH_SPI2_RX, |
172 | }, { | 114 | DMACH_SPI2_TX, |
173 | .peri_id = (u8)DMACH_UART3_TX, | 115 | DMACH_PCM0_RX, |
174 | .rqtype = MEMTODEV, | 116 | DMACH_PCM0_TX, |
175 | }, { | 117 | DMACH_PCM1_RX, |
176 | .peri_id = DMACH_IRDA, | 118 | DMACH_PCM1_TX, |
177 | }, { | 119 | DMACH_MSM_REQ0, |
178 | .peri_id = (u8)DMACH_I2S0_RX, | 120 | DMACH_MSM_REQ1, |
179 | .rqtype = DEVTOMEM, | 121 | DMACH_MSM_REQ2, |
180 | }, { | 122 | DMACH_MSM_REQ3, |
181 | .peri_id = (u8)DMACH_I2S0_TX, | ||
182 | .rqtype = MEMTODEV, | ||
183 | }, { | ||
184 | .peri_id = (u8)DMACH_I2S0S_TX, | ||
185 | .rqtype = MEMTODEV, | ||
186 | }, { | ||
187 | .peri_id = (u8)DMACH_I2S1_RX, | ||
188 | .rqtype = DEVTOMEM, | ||
189 | }, { | ||
190 | .peri_id = (u8)DMACH_I2S1_TX, | ||
191 | .rqtype = MEMTODEV, | ||
192 | }, { | ||
193 | .peri_id = (u8)DMACH_I2S2_RX, | ||
194 | .rqtype = DEVTOMEM, | ||
195 | }, { | ||
196 | .peri_id = (u8)DMACH_I2S2_TX, | ||
197 | .rqtype = MEMTODEV, | ||
198 | }, { | ||
199 | .peri_id = (u8)DMACH_SPI0_RX, | ||
200 | .rqtype = DEVTOMEM, | ||
201 | }, { | ||
202 | .peri_id = (u8)DMACH_SPI0_TX, | ||
203 | .rqtype = MEMTODEV, | ||
204 | }, { | ||
205 | .peri_id = (u8)DMACH_SPI1_RX, | ||
206 | .rqtype = DEVTOMEM, | ||
207 | }, { | ||
208 | .peri_id = (u8)DMACH_SPI1_TX, | ||
209 | .rqtype = MEMTODEV, | ||
210 | }, { | ||
211 | .peri_id = (u8)DMACH_SPI2_RX, | ||
212 | .rqtype = DEVTOMEM, | ||
213 | }, { | ||
214 | .peri_id = (u8)DMACH_SPI2_TX, | ||
215 | .rqtype = MEMTODEV, | ||
216 | }, { | ||
217 | .peri_id = (u8)DMACH_PCM0_RX, | ||
218 | .rqtype = DEVTOMEM, | ||
219 | }, { | ||
220 | .peri_id = (u8)DMACH_PCM1_TX, | ||
221 | .rqtype = MEMTODEV, | ||
222 | }, { | ||
223 | .peri_id = (u8)DMACH_PCM1_RX, | ||
224 | .rqtype = DEVTOMEM, | ||
225 | }, { | ||
226 | .peri_id = (u8)DMACH_PCM1_TX, | ||
227 | .rqtype = MEMTODEV, | ||
228 | }, { | ||
229 | .peri_id = (u8)DMACH_MSM_REQ0, | ||
230 | }, { | ||
231 | .peri_id = (u8)DMACH_MSM_REQ1, | ||
232 | }, { | ||
233 | .peri_id = (u8)DMACH_MSM_REQ2, | ||
234 | }, { | ||
235 | .peri_id = (u8)DMACH_MSM_REQ3, | ||
236 | }, | ||
237 | }; | 123 | }; |
238 | 124 | ||
239 | struct dma_pl330_platdata s5pc100_pdma1_pdata = { | 125 | struct dma_pl330_platdata s5pc100_pdma1_pdata = { |
240 | .nr_valid_peri = ARRAY_SIZE(pdma1_peri), | 126 | .nr_valid_peri = ARRAY_SIZE(pdma1_peri), |
241 | .peri = pdma1_peri, | 127 | .peri_id = pdma1_peri, |
242 | }; | 128 | }; |
243 | 129 | ||
244 | struct amba_device s5pc100_device_pdma1 = { | 130 | struct amba_device s5pc100_device_pdma1 = { |
@@ -259,7 +145,12 @@ struct amba_device s5pc100_device_pdma1 = { | |||
259 | 145 | ||
260 | static int __init s5pc100_dma_init(void) | 146 | static int __init s5pc100_dma_init(void) |
261 | { | 147 | { |
148 | dma_cap_set(DMA_SLAVE, s5pc100_pdma0_pdata.cap_mask); | ||
149 | dma_cap_set(DMA_CYCLIC, s5pc100_pdma0_pdata.cap_mask); | ||
262 | amba_device_register(&s5pc100_device_pdma0, &iomem_resource); | 150 | amba_device_register(&s5pc100_device_pdma0, &iomem_resource); |
151 | |||
152 | dma_cap_set(DMA_SLAVE, s5pc100_pdma1_pdata.cap_mask); | ||
153 | dma_cap_set(DMA_CYCLIC, s5pc100_pdma1_pdata.cap_mask); | ||
263 | amba_device_register(&s5pc100_device_pdma1, &iomem_resource); | 154 | amba_device_register(&s5pc100_device_pdma1, &iomem_resource); |
264 | 155 | ||
265 | return 0; | 156 | return 0; |
diff --git a/arch/arm/mach-s5pc100/include/mach/irqs.h b/arch/arm/mach-s5pc100/include/mach/irqs.h index d2eb4757381f..2870f12c7926 100644 --- a/arch/arm/mach-s5pc100/include/mach/irqs.h +++ b/arch/arm/mach-s5pc100/include/mach/irqs.h | |||
@@ -97,6 +97,8 @@ | |||
97 | #define IRQ_SDMFIQ S5P_IRQ_VIC2(31) | 97 | #define IRQ_SDMFIQ S5P_IRQ_VIC2(31) |
98 | #define IRQ_VIC_END S5P_IRQ_VIC2(31) | 98 | #define IRQ_VIC_END S5P_IRQ_VIC2(31) |
99 | 99 | ||
100 | #define IRQ_TIMER_BASE (11) | ||
101 | |||
100 | #define S5P_EINT_BASE1 (S5P_IRQ_VIC0(0)) | 102 | #define S5P_EINT_BASE1 (S5P_IRQ_VIC0(0)) |
101 | #define S5P_EINT_BASE2 (IRQ_VIC_END + 1) | 103 | #define S5P_EINT_BASE2 (IRQ_VIC_END + 1) |
102 | 104 | ||
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c index 04c9b578e626..d8df66887060 100644 --- a/arch/arm/mach-s5pv210/clock.c +++ b/arch/arm/mach-s5pv210/clock.c | |||
@@ -810,46 +810,6 @@ static struct clksrc_clk clksrcs[] = { | |||
810 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 12, .size = 3 }, | 810 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 12, .size = 3 }, |
811 | }, { | 811 | }, { |
812 | .clk = { | 812 | .clk = { |
813 | .name = "uclk1", | ||
814 | .devname = "s5pv210-uart.0", | ||
815 | .enable = s5pv210_clk_mask0_ctrl, | ||
816 | .ctrlbit = (1 << 12), | ||
817 | }, | ||
818 | .sources = &clkset_uart, | ||
819 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 16, .size = 4 }, | ||
820 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 16, .size = 4 }, | ||
821 | }, { | ||
822 | .clk = { | ||
823 | .name = "uclk1", | ||
824 | .devname = "s5pv210-uart.1", | ||
825 | .enable = s5pv210_clk_mask0_ctrl, | ||
826 | .ctrlbit = (1 << 13), | ||
827 | }, | ||
828 | .sources = &clkset_uart, | ||
829 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 20, .size = 4 }, | ||
830 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 20, .size = 4 }, | ||
831 | }, { | ||
832 | .clk = { | ||
833 | .name = "uclk1", | ||
834 | .devname = "s5pv210-uart.2", | ||
835 | .enable = s5pv210_clk_mask0_ctrl, | ||
836 | .ctrlbit = (1 << 14), | ||
837 | }, | ||
838 | .sources = &clkset_uart, | ||
839 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 24, .size = 4 }, | ||
840 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 24, .size = 4 }, | ||
841 | }, { | ||
842 | .clk = { | ||
843 | .name = "uclk1", | ||
844 | .devname = "s5pv210-uart.3", | ||
845 | .enable = s5pv210_clk_mask0_ctrl, | ||
846 | .ctrlbit = (1 << 15), | ||
847 | }, | ||
848 | .sources = &clkset_uart, | ||
849 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 28, .size = 4 }, | ||
850 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 28, .size = 4 }, | ||
851 | }, { | ||
852 | .clk = { | ||
853 | .name = "sclk_fimc", | 813 | .name = "sclk_fimc", |
854 | .devname = "s5pv210-fimc.0", | 814 | .devname = "s5pv210-fimc.0", |
855 | .enable = s5pv210_clk_mask1_ctrl, | 815 | .enable = s5pv210_clk_mask1_ctrl, |
@@ -1023,6 +983,61 @@ static struct clksrc_clk clksrcs[] = { | |||
1023 | }, | 983 | }, |
1024 | }; | 984 | }; |
1025 | 985 | ||
986 | static struct clksrc_clk clk_sclk_uart0 = { | ||
987 | .clk = { | ||
988 | .name = "uclk1", | ||
989 | .devname = "s5pv210-uart.0", | ||
990 | .enable = s5pv210_clk_mask0_ctrl, | ||
991 | .ctrlbit = (1 << 12), | ||
992 | }, | ||
993 | .sources = &clkset_uart, | ||
994 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 16, .size = 4 }, | ||
995 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 16, .size = 4 }, | ||
996 | }; | ||
997 | |||
998 | static struct clksrc_clk clk_sclk_uart1 = { | ||
999 | .clk = { | ||
1000 | .name = "uclk1", | ||
1001 | .devname = "s5pv210-uart.1", | ||
1002 | .enable = s5pv210_clk_mask0_ctrl, | ||
1003 | .ctrlbit = (1 << 13), | ||
1004 | }, | ||
1005 | .sources = &clkset_uart, | ||
1006 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 20, .size = 4 }, | ||
1007 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 20, .size = 4 }, | ||
1008 | }; | ||
1009 | |||
1010 | static struct clksrc_clk clk_sclk_uart2 = { | ||
1011 | .clk = { | ||
1012 | .name = "uclk1", | ||
1013 | .devname = "s5pv210-uart.2", | ||
1014 | .enable = s5pv210_clk_mask0_ctrl, | ||
1015 | .ctrlbit = (1 << 14), | ||
1016 | }, | ||
1017 | .sources = &clkset_uart, | ||
1018 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 24, .size = 4 }, | ||
1019 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 24, .size = 4 }, | ||
1020 | }; | ||
1021 | |||
1022 | static struct clksrc_clk clk_sclk_uart3 = { | ||
1023 | .clk = { | ||
1024 | .name = "uclk1", | ||
1025 | .devname = "s5pv210-uart.3", | ||
1026 | .enable = s5pv210_clk_mask0_ctrl, | ||
1027 | .ctrlbit = (1 << 15), | ||
1028 | }, | ||
1029 | .sources = &clkset_uart, | ||
1030 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 28, .size = 4 }, | ||
1031 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 28, .size = 4 }, | ||
1032 | }; | ||
1033 | |||
1034 | static struct clksrc_clk *clksrc_cdev[] = { | ||
1035 | &clk_sclk_uart0, | ||
1036 | &clk_sclk_uart1, | ||
1037 | &clk_sclk_uart2, | ||
1038 | &clk_sclk_uart3, | ||
1039 | }; | ||
1040 | |||
1026 | /* Clock initialisation code */ | 1041 | /* Clock initialisation code */ |
1027 | static struct clksrc_clk *sysclks[] = { | 1042 | static struct clksrc_clk *sysclks[] = { |
1028 | &clk_mout_apll, | 1043 | &clk_mout_apll, |
@@ -1262,6 +1277,14 @@ static struct clk *clks[] __initdata = { | |||
1262 | &clk_pcmcdclk2, | 1277 | &clk_pcmcdclk2, |
1263 | }; | 1278 | }; |
1264 | 1279 | ||
1280 | static struct clk_lookup s5pv210_clk_lookup[] = { | ||
1281 | CLKDEV_INIT(NULL, "clk_uart_baud0", &clk_p), | ||
1282 | CLKDEV_INIT("s5pv210-uart.0", "clk_uart_baud1", &clk_sclk_uart0.clk), | ||
1283 | CLKDEV_INIT("s5pv210-uart.1", "clk_uart_baud1", &clk_sclk_uart1.clk), | ||
1284 | CLKDEV_INIT("s5pv210-uart.2", "clk_uart_baud1", &clk_sclk_uart2.clk), | ||
1285 | CLKDEV_INIT("s5pv210-uart.3", "clk_uart_baud1", &clk_sclk_uart3.clk), | ||
1286 | }; | ||
1287 | |||
1265 | void __init s5pv210_register_clocks(void) | 1288 | void __init s5pv210_register_clocks(void) |
1266 | { | 1289 | { |
1267 | int ptr; | 1290 | int ptr; |
@@ -1274,11 +1297,15 @@ void __init s5pv210_register_clocks(void) | |||
1274 | for (ptr = 0; ptr < ARRAY_SIZE(sclk_tv); ptr++) | 1297 | for (ptr = 0; ptr < ARRAY_SIZE(sclk_tv); ptr++) |
1275 | s3c_register_clksrc(sclk_tv[ptr], 1); | 1298 | s3c_register_clksrc(sclk_tv[ptr], 1); |
1276 | 1299 | ||
1300 | for (ptr = 0; ptr < ARRAY_SIZE(clksrc_cdev); ptr++) | ||
1301 | s3c_register_clksrc(clksrc_cdev[ptr], 1); | ||
1302 | |||
1277 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | 1303 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
1278 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | 1304 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); |
1279 | 1305 | ||
1280 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | 1306 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
1281 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | 1307 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
1308 | clkdev_add_table(s5pv210_clk_lookup, ARRAY_SIZE(s5pv210_clk_lookup)); | ||
1282 | 1309 | ||
1283 | s3c24xx_register_clock(&dummy_apb_pclk); | 1310 | s3c24xx_register_clock(&dummy_apb_pclk); |
1284 | s3c_pwmclk_init(); | 1311 | s3c_pwmclk_init(); |
diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c index 0ec393305d7c..9c1bcdcc12c3 100644 --- a/arch/arm/mach-s5pv210/common.c +++ b/arch/arm/mach-s5pv210/common.c | |||
@@ -254,28 +254,9 @@ int __init s5pv210_init(void) | |||
254 | return device_register(&s5pv210_dev); | 254 | return device_register(&s5pv210_dev); |
255 | } | 255 | } |
256 | 256 | ||
257 | static struct s3c24xx_uart_clksrc s5pv210_serial_clocks[] = { | ||
258 | [0] = { | ||
259 | .name = "pclk", | ||
260 | .divisor = 1, | ||
261 | .min_baud = 0, | ||
262 | .max_baud = 0, | ||
263 | }, | ||
264 | }; | ||
265 | |||
266 | /* uart registration process */ | 257 | /* uart registration process */ |
267 | 258 | ||
268 | void __init s5pv210_init_uarts(struct s3c2410_uartcfg *cfg, int no) | 259 | void __init s5pv210_init_uarts(struct s3c2410_uartcfg *cfg, int no) |
269 | { | 260 | { |
270 | struct s3c2410_uartcfg *tcfg = cfg; | ||
271 | u32 ucnt; | ||
272 | |||
273 | for (ucnt = 0; ucnt < no; ucnt++, tcfg++) { | ||
274 | if (!tcfg->clocks) { | ||
275 | tcfg->clocks = s5pv210_serial_clocks; | ||
276 | tcfg->clocks_size = ARRAY_SIZE(s5pv210_serial_clocks); | ||
277 | } | ||
278 | } | ||
279 | |||
280 | s3c24xx_init_uartdevs("s5pv210-uart", s5p_uart_resources, cfg, no); | 261 | s3c24xx_init_uartdevs("s5pv210-uart", s5p_uart_resources, cfg, no); |
281 | } | 262 | } |
diff --git a/arch/arm/mach-s5pv210/dma.c b/arch/arm/mach-s5pv210/dma.c index 86b749c18b77..a6113e0267f2 100644 --- a/arch/arm/mach-s5pv210/dma.c +++ b/arch/arm/mach-s5pv210/dma.c | |||
@@ -35,90 +35,40 @@ | |||
35 | 35 | ||
36 | static u64 dma_dmamask = DMA_BIT_MASK(32); | 36 | static u64 dma_dmamask = DMA_BIT_MASK(32); |
37 | 37 | ||
38 | struct dma_pl330_peri pdma0_peri[28] = { | 38 | u8 pdma0_peri[] = { |
39 | { | 39 | DMACH_UART0_RX, |
40 | .peri_id = (u8)DMACH_UART0_RX, | 40 | DMACH_UART0_TX, |
41 | .rqtype = DEVTOMEM, | 41 | DMACH_UART1_RX, |
42 | }, { | 42 | DMACH_UART1_TX, |
43 | .peri_id = (u8)DMACH_UART0_TX, | 43 | DMACH_UART2_RX, |
44 | .rqtype = MEMTODEV, | 44 | DMACH_UART2_TX, |
45 | }, { | 45 | DMACH_UART3_RX, |
46 | .peri_id = (u8)DMACH_UART1_RX, | 46 | DMACH_UART3_TX, |
47 | .rqtype = DEVTOMEM, | 47 | DMACH_MAX, |
48 | }, { | 48 | DMACH_I2S0_RX, |
49 | .peri_id = (u8)DMACH_UART1_TX, | 49 | DMACH_I2S0_TX, |
50 | .rqtype = MEMTODEV, | 50 | DMACH_I2S0S_TX, |
51 | }, { | 51 | DMACH_I2S1_RX, |
52 | .peri_id = (u8)DMACH_UART2_RX, | 52 | DMACH_I2S1_TX, |
53 | .rqtype = DEVTOMEM, | 53 | DMACH_MAX, |
54 | }, { | 54 | DMACH_MAX, |
55 | .peri_id = (u8)DMACH_UART2_TX, | 55 | DMACH_SPI0_RX, |
56 | .rqtype = MEMTODEV, | 56 | DMACH_SPI0_TX, |
57 | }, { | 57 | DMACH_SPI1_RX, |
58 | .peri_id = (u8)DMACH_UART3_RX, | 58 | DMACH_SPI1_TX, |
59 | .rqtype = DEVTOMEM, | 59 | DMACH_MAX, |
60 | }, { | 60 | DMACH_MAX, |
61 | .peri_id = (u8)DMACH_UART3_TX, | 61 | DMACH_AC97_MICIN, |
62 | .rqtype = MEMTODEV, | 62 | DMACH_AC97_PCMIN, |
63 | }, { | 63 | DMACH_AC97_PCMOUT, |
64 | .peri_id = DMACH_MAX, | 64 | DMACH_MAX, |
65 | }, { | 65 | DMACH_PWM, |
66 | .peri_id = (u8)DMACH_I2S0_RX, | 66 | DMACH_SPDIF, |
67 | .rqtype = DEVTOMEM, | ||
68 | }, { | ||
69 | .peri_id = (u8)DMACH_I2S0_TX, | ||
70 | .rqtype = MEMTODEV, | ||
71 | }, { | ||
72 | .peri_id = (u8)DMACH_I2S0S_TX, | ||
73 | .rqtype = MEMTODEV, | ||
74 | }, { | ||
75 | .peri_id = (u8)DMACH_I2S1_RX, | ||
76 | .rqtype = DEVTOMEM, | ||
77 | }, { | ||
78 | .peri_id = (u8)DMACH_I2S1_TX, | ||
79 | .rqtype = MEMTODEV, | ||
80 | }, { | ||
81 | .peri_id = (u8)DMACH_MAX, | ||
82 | }, { | ||
83 | .peri_id = (u8)DMACH_MAX, | ||
84 | }, { | ||
85 | .peri_id = (u8)DMACH_SPI0_RX, | ||
86 | .rqtype = DEVTOMEM, | ||
87 | }, { | ||
88 | .peri_id = (u8)DMACH_SPI0_TX, | ||
89 | .rqtype = MEMTODEV, | ||
90 | }, { | ||
91 | .peri_id = (u8)DMACH_SPI1_RX, | ||
92 | .rqtype = DEVTOMEM, | ||
93 | }, { | ||
94 | .peri_id = (u8)DMACH_SPI1_TX, | ||
95 | .rqtype = MEMTODEV, | ||
96 | }, { | ||
97 | .peri_id = (u8)DMACH_MAX, | ||
98 | }, { | ||
99 | .peri_id = (u8)DMACH_MAX, | ||
100 | }, { | ||
101 | .peri_id = (u8)DMACH_AC97_MICIN, | ||
102 | .rqtype = DEVTOMEM, | ||
103 | }, { | ||
104 | .peri_id = (u8)DMACH_AC97_PCMIN, | ||
105 | .rqtype = DEVTOMEM, | ||
106 | }, { | ||
107 | .peri_id = (u8)DMACH_AC97_PCMOUT, | ||
108 | .rqtype = MEMTODEV, | ||
109 | }, { | ||
110 | .peri_id = (u8)DMACH_MAX, | ||
111 | }, { | ||
112 | .peri_id = (u8)DMACH_PWM, | ||
113 | }, { | ||
114 | .peri_id = (u8)DMACH_SPDIF, | ||
115 | .rqtype = MEMTODEV, | ||
116 | }, | ||
117 | }; | 67 | }; |
118 | 68 | ||
119 | struct dma_pl330_platdata s5pv210_pdma0_pdata = { | 69 | struct dma_pl330_platdata s5pv210_pdma0_pdata = { |
120 | .nr_valid_peri = ARRAY_SIZE(pdma0_peri), | 70 | .nr_valid_peri = ARRAY_SIZE(pdma0_peri), |
121 | .peri = pdma0_peri, | 71 | .peri_id = pdma0_peri, |
122 | }; | 72 | }; |
123 | 73 | ||
124 | struct amba_device s5pv210_device_pdma0 = { | 74 | struct amba_device s5pv210_device_pdma0 = { |
@@ -137,102 +87,44 @@ struct amba_device s5pv210_device_pdma0 = { | |||
137 | .periphid = 0x00041330, | 87 | .periphid = 0x00041330, |
138 | }; | 88 | }; |
139 | 89 | ||
140 | struct dma_pl330_peri pdma1_peri[32] = { | 90 | u8 pdma1_peri[] = { |
141 | { | 91 | DMACH_UART0_RX, |
142 | .peri_id = (u8)DMACH_UART0_RX, | 92 | DMACH_UART0_TX, |
143 | .rqtype = DEVTOMEM, | 93 | DMACH_UART1_RX, |
144 | }, { | 94 | DMACH_UART1_TX, |
145 | .peri_id = (u8)DMACH_UART0_TX, | 95 | DMACH_UART2_RX, |
146 | .rqtype = MEMTODEV, | 96 | DMACH_UART2_TX, |
147 | }, { | 97 | DMACH_UART3_RX, |
148 | .peri_id = (u8)DMACH_UART1_RX, | 98 | DMACH_UART3_TX, |
149 | .rqtype = DEVTOMEM, | 99 | DMACH_MAX, |
150 | }, { | 100 | DMACH_I2S0_RX, |
151 | .peri_id = (u8)DMACH_UART1_TX, | 101 | DMACH_I2S0_TX, |
152 | .rqtype = MEMTODEV, | 102 | DMACH_I2S0S_TX, |
153 | }, { | 103 | DMACH_I2S1_RX, |
154 | .peri_id = (u8)DMACH_UART2_RX, | 104 | DMACH_I2S1_TX, |
155 | .rqtype = DEVTOMEM, | 105 | DMACH_I2S2_RX, |
156 | }, { | 106 | DMACH_I2S2_TX, |
157 | .peri_id = (u8)DMACH_UART2_TX, | 107 | DMACH_SPI0_RX, |
158 | .rqtype = MEMTODEV, | 108 | DMACH_SPI0_TX, |
159 | }, { | 109 | DMACH_SPI1_RX, |
160 | .peri_id = (u8)DMACH_UART3_RX, | 110 | DMACH_SPI1_TX, |
161 | .rqtype = DEVTOMEM, | 111 | DMACH_MAX, |
162 | }, { | 112 | DMACH_MAX, |
163 | .peri_id = (u8)DMACH_UART3_TX, | 113 | DMACH_PCM0_RX, |
164 | .rqtype = MEMTODEV, | 114 | DMACH_PCM0_TX, |
165 | }, { | 115 | DMACH_PCM1_RX, |
166 | .peri_id = DMACH_MAX, | 116 | DMACH_PCM1_TX, |
167 | }, { | 117 | DMACH_MSM_REQ0, |
168 | .peri_id = (u8)DMACH_I2S0_RX, | 118 | DMACH_MSM_REQ1, |
169 | .rqtype = DEVTOMEM, | 119 | DMACH_MSM_REQ2, |
170 | }, { | 120 | DMACH_MSM_REQ3, |
171 | .peri_id = (u8)DMACH_I2S0_TX, | 121 | DMACH_PCM2_RX, |
172 | .rqtype = MEMTODEV, | 122 | DMACH_PCM2_TX, |
173 | }, { | ||
174 | .peri_id = (u8)DMACH_I2S0S_TX, | ||
175 | .rqtype = MEMTODEV, | ||
176 | }, { | ||
177 | .peri_id = (u8)DMACH_I2S1_RX, | ||
178 | .rqtype = DEVTOMEM, | ||
179 | }, { | ||
180 | .peri_id = (u8)DMACH_I2S1_TX, | ||
181 | .rqtype = MEMTODEV, | ||
182 | }, { | ||
183 | .peri_id = (u8)DMACH_I2S2_RX, | ||
184 | .rqtype = DEVTOMEM, | ||
185 | }, { | ||
186 | .peri_id = (u8)DMACH_I2S2_TX, | ||
187 | .rqtype = MEMTODEV, | ||
188 | }, { | ||
189 | .peri_id = (u8)DMACH_SPI0_RX, | ||
190 | .rqtype = DEVTOMEM, | ||
191 | }, { | ||
192 | .peri_id = (u8)DMACH_SPI0_TX, | ||
193 | .rqtype = MEMTODEV, | ||
194 | }, { | ||
195 | .peri_id = (u8)DMACH_SPI1_RX, | ||
196 | .rqtype = DEVTOMEM, | ||
197 | }, { | ||
198 | .peri_id = (u8)DMACH_SPI1_TX, | ||
199 | .rqtype = MEMTODEV, | ||
200 | }, { | ||
201 | .peri_id = (u8)DMACH_MAX, | ||
202 | }, { | ||
203 | .peri_id = (u8)DMACH_MAX, | ||
204 | }, { | ||
205 | .peri_id = (u8)DMACH_PCM0_RX, | ||
206 | .rqtype = DEVTOMEM, | ||
207 | }, { | ||
208 | .peri_id = (u8)DMACH_PCM0_TX, | ||
209 | .rqtype = MEMTODEV, | ||
210 | }, { | ||
211 | .peri_id = (u8)DMACH_PCM1_RX, | ||
212 | .rqtype = DEVTOMEM, | ||
213 | }, { | ||
214 | .peri_id = (u8)DMACH_PCM1_TX, | ||
215 | .rqtype = MEMTODEV, | ||
216 | }, { | ||
217 | .peri_id = (u8)DMACH_MSM_REQ0, | ||
218 | }, { | ||
219 | .peri_id = (u8)DMACH_MSM_REQ1, | ||
220 | }, { | ||
221 | .peri_id = (u8)DMACH_MSM_REQ2, | ||
222 | }, { | ||
223 | .peri_id = (u8)DMACH_MSM_REQ3, | ||
224 | }, { | ||
225 | .peri_id = (u8)DMACH_PCM2_RX, | ||
226 | .rqtype = DEVTOMEM, | ||
227 | }, { | ||
228 | .peri_id = (u8)DMACH_PCM2_TX, | ||
229 | .rqtype = MEMTODEV, | ||
230 | }, | ||
231 | }; | 123 | }; |
232 | 124 | ||
233 | struct dma_pl330_platdata s5pv210_pdma1_pdata = { | 125 | struct dma_pl330_platdata s5pv210_pdma1_pdata = { |
234 | .nr_valid_peri = ARRAY_SIZE(pdma1_peri), | 126 | .nr_valid_peri = ARRAY_SIZE(pdma1_peri), |
235 | .peri = pdma1_peri, | 127 | .peri_id = pdma1_peri, |
236 | }; | 128 | }; |
237 | 129 | ||
238 | struct amba_device s5pv210_device_pdma1 = { | 130 | struct amba_device s5pv210_device_pdma1 = { |
@@ -253,7 +145,12 @@ struct amba_device s5pv210_device_pdma1 = { | |||
253 | 145 | ||
254 | static int __init s5pv210_dma_init(void) | 146 | static int __init s5pv210_dma_init(void) |
255 | { | 147 | { |
148 | dma_cap_set(DMA_SLAVE, s5pv210_pdma0_pdata.cap_mask); | ||
149 | dma_cap_set(DMA_CYCLIC, s5pv210_pdma0_pdata.cap_mask); | ||
256 | amba_device_register(&s5pv210_device_pdma0, &iomem_resource); | 150 | amba_device_register(&s5pv210_device_pdma0, &iomem_resource); |
151 | |||
152 | dma_cap_set(DMA_SLAVE, s5pv210_pdma1_pdata.cap_mask); | ||
153 | dma_cap_set(DMA_CYCLIC, s5pv210_pdma1_pdata.cap_mask); | ||
257 | amba_device_register(&s5pv210_device_pdma1, &iomem_resource); | 154 | amba_device_register(&s5pv210_device_pdma1, &iomem_resource); |
258 | 155 | ||
259 | return 0; | 156 | return 0; |
diff --git a/arch/arm/mach-s5pv210/include/mach/irqs.h b/arch/arm/mach-s5pv210/include/mach/irqs.h index 5e0de3a31f3d..e777e010ed2e 100644 --- a/arch/arm/mach-s5pv210/include/mach/irqs.h +++ b/arch/arm/mach-s5pv210/include/mach/irqs.h | |||
@@ -118,6 +118,8 @@ | |||
118 | #define IRQ_MDNIE3 S5P_IRQ_VIC3(8) | 118 | #define IRQ_MDNIE3 S5P_IRQ_VIC3(8) |
119 | #define IRQ_VIC_END S5P_IRQ_VIC3(31) | 119 | #define IRQ_VIC_END S5P_IRQ_VIC3(31) |
120 | 120 | ||
121 | #define IRQ_TIMER_BASE (11) | ||
122 | |||
121 | #define S5P_EINT_BASE1 (S5P_IRQ_VIC0(0)) | 123 | #define S5P_EINT_BASE1 (S5P_IRQ_VIC0(0)) |
122 | #define S5P_EINT_BASE2 (IRQ_VIC_END + 1) | 124 | #define S5P_EINT_BASE2 (IRQ_VIC_END + 1) |
123 | 125 | ||
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile index 5be8e9eefc95..c9ec38e82991 100644 --- a/arch/arm/mach-tegra/Makefile +++ b/arch/arm/mach-tegra/Makefile | |||
@@ -32,6 +32,8 @@ obj-$(CONFIG_MACH_SEABOARD) += board-seaboard-pinmux.o | |||
32 | obj-$(CONFIG_MACH_TEGRA_DT) += board-dt.o | 32 | obj-$(CONFIG_MACH_TEGRA_DT) += board-dt.o |
33 | obj-$(CONFIG_MACH_TEGRA_DT) += board-harmony-pinmux.o | 33 | obj-$(CONFIG_MACH_TEGRA_DT) += board-harmony-pinmux.o |
34 | obj-$(CONFIG_MACH_TEGRA_DT) += board-seaboard-pinmux.o | 34 | obj-$(CONFIG_MACH_TEGRA_DT) += board-seaboard-pinmux.o |
35 | obj-$(CONFIG_MACH_TEGRA_DT) += board-paz00-pinmux.o | ||
36 | obj-$(CONFIG_MACH_TEGRA_DT) += board-trimslice-pinmux.o | ||
35 | 37 | ||
36 | obj-$(CONFIG_MACH_TRIMSLICE) += board-trimslice.o | 38 | obj-$(CONFIG_MACH_TRIMSLICE) += board-trimslice.o |
37 | obj-$(CONFIG_MACH_TRIMSLICE) += board-trimslice-pinmux.o | 39 | obj-$(CONFIG_MACH_TRIMSLICE) += board-trimslice-pinmux.o |
diff --git a/arch/arm/mach-tegra/Makefile.boot b/arch/arm/mach-tegra/Makefile.boot index bd12c9fb81e8..cf51a000d400 100644 --- a/arch/arm/mach-tegra/Makefile.boot +++ b/arch/arm/mach-tegra/Makefile.boot | |||
@@ -3,5 +3,7 @@ params_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00000100 | |||
3 | initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000 | 3 | initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000 |
4 | 4 | ||
5 | dtb-$(CONFIG_MACH_HARMONY) += tegra-harmony.dtb | 5 | dtb-$(CONFIG_MACH_HARMONY) += tegra-harmony.dtb |
6 | dtb-$(CONFIG_MACH_PAZ00) += tegra-paz00.dtb | ||
6 | dtb-$(CONFIG_MACH_SEABOARD) += tegra-seaboard.dtb | 7 | dtb-$(CONFIG_MACH_SEABOARD) += tegra-seaboard.dtb |
8 | dtb-$(CONFIG_MACH_TRIMSLICE) += tegra-trimslice.dtb | ||
7 | dtb-$(CONFIG_MACH_VENTANA) += tegra-ventana.dtb | 9 | dtb-$(CONFIG_MACH_VENTANA) += tegra-ventana.dtb |
diff --git a/arch/arm/mach-tegra/board-dt.c b/arch/arm/mach-tegra/board-dt.c index e417a8383dbb..46074a2f0b82 100644 --- a/arch/arm/mach-tegra/board-dt.c +++ b/arch/arm/mach-tegra/board-dt.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <asm/mach/arch.h> | 37 | #include <asm/mach/arch.h> |
38 | #include <asm/mach/time.h> | 38 | #include <asm/mach/time.h> |
39 | #include <asm/setup.h> | 39 | #include <asm/setup.h> |
40 | #include <asm/hardware/gic.h> | ||
40 | 41 | ||
41 | #include <mach/iomap.h> | 42 | #include <mach/iomap.h> |
42 | #include <mach/irqs.h> | 43 | #include <mach/irqs.h> |
@@ -47,9 +48,22 @@ | |||
47 | #include "devices.h" | 48 | #include "devices.h" |
48 | 49 | ||
49 | void harmony_pinmux_init(void); | 50 | void harmony_pinmux_init(void); |
51 | void paz00_pinmux_init(void); | ||
50 | void seaboard_pinmux_init(void); | 52 | void seaboard_pinmux_init(void); |
53 | void trimslice_pinmux_init(void); | ||
51 | void ventana_pinmux_init(void); | 54 | void ventana_pinmux_init(void); |
52 | 55 | ||
56 | static const struct of_device_id tegra_dt_irq_match[] __initconst = { | ||
57 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init }, | ||
58 | { } | ||
59 | }; | ||
60 | |||
61 | void __init tegra_dt_init_irq(void) | ||
62 | { | ||
63 | tegra_init_irq(); | ||
64 | of_irq_init(tegra_dt_irq_match); | ||
65 | } | ||
66 | |||
53 | struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { | 67 | struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { |
54 | OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC1_BASE, "sdhci-tegra.0", NULL), | 68 | OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC1_BASE, "sdhci-tegra.0", NULL), |
55 | OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC2_BASE, "sdhci-tegra.1", NULL), | 69 | OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC2_BASE, "sdhci-tegra.1", NULL), |
@@ -58,16 +72,30 @@ struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { | |||
58 | OF_DEV_AUXDATA("nvidia,tegra20-i2c", TEGRA_I2C_BASE, "tegra-i2c.0", NULL), | 72 | OF_DEV_AUXDATA("nvidia,tegra20-i2c", TEGRA_I2C_BASE, "tegra-i2c.0", NULL), |
59 | OF_DEV_AUXDATA("nvidia,tegra20-i2c", TEGRA_I2C2_BASE, "tegra-i2c.1", NULL), | 73 | OF_DEV_AUXDATA("nvidia,tegra20-i2c", TEGRA_I2C2_BASE, "tegra-i2c.1", NULL), |
60 | OF_DEV_AUXDATA("nvidia,tegra20-i2c", TEGRA_I2C3_BASE, "tegra-i2c.2", NULL), | 74 | OF_DEV_AUXDATA("nvidia,tegra20-i2c", TEGRA_I2C3_BASE, "tegra-i2c.2", NULL), |
61 | OF_DEV_AUXDATA("nvidia,tegra20-i2c", TEGRA_DVC_BASE, "tegra-i2c.3", NULL), | 75 | OF_DEV_AUXDATA("nvidia,tegra20-i2c-dvc", TEGRA_DVC_BASE, "tegra-i2c.3", NULL), |
62 | OF_DEV_AUXDATA("nvidia,tegra20-i2s", TEGRA_I2S1_BASE, "tegra-i2s.0", NULL), | 76 | OF_DEV_AUXDATA("nvidia,tegra20-i2s", TEGRA_I2S1_BASE, "tegra-i2s.0", NULL), |
63 | OF_DEV_AUXDATA("nvidia,tegra20-i2s", TEGRA_I2S1_BASE, "tegra-i2s.1", NULL), | 77 | OF_DEV_AUXDATA("nvidia,tegra20-i2s", TEGRA_I2S2_BASE, "tegra-i2s.1", NULL), |
64 | OF_DEV_AUXDATA("nvidia,tegra20-das", TEGRA_APB_MISC_DAS_BASE, "tegra-das", NULL), | 78 | OF_DEV_AUXDATA("nvidia,tegra20-das", TEGRA_APB_MISC_DAS_BASE, "tegra-das", NULL), |
79 | OF_DEV_AUXDATA("nvidia,tegra20-ehci", TEGRA_USB_BASE, "tegra-ehci.0", | ||
80 | &tegra_ehci1_device.dev.platform_data), | ||
81 | OF_DEV_AUXDATA("nvidia,tegra20-ehci", TEGRA_USB2_BASE, "tegra-ehci.1", | ||
82 | &tegra_ehci2_device.dev.platform_data), | ||
83 | OF_DEV_AUXDATA("nvidia,tegra20-ehci", TEGRA_USB3_BASE, "tegra-ehci.2", | ||
84 | &tegra_ehci3_device.dev.platform_data), | ||
65 | {} | 85 | {} |
66 | }; | 86 | }; |
67 | 87 | ||
68 | static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = { | 88 | static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = { |
69 | /* name parent rate enabled */ | 89 | /* name parent rate enabled */ |
70 | { "uartd", "pll_p", 216000000, true }, | 90 | { "uartd", "pll_p", 216000000, true }, |
91 | { "usbd", "clk_m", 12000000, false }, | ||
92 | { "usb2", "clk_m", 12000000, false }, | ||
93 | { "usb3", "clk_m", 12000000, false }, | ||
94 | { "pll_a", "pll_p_out1", 56448000, true }, | ||
95 | { "pll_a_out0", "pll_a", 11289600, true }, | ||
96 | { "cdev1", NULL, 0, true }, | ||
97 | { "i2s1", "pll_a_out0", 11289600, false}, | ||
98 | { "i2s2", "pll_a_out0", 11289600, false}, | ||
71 | { NULL, NULL, 0, 0}, | 99 | { NULL, NULL, 0, 0}, |
72 | }; | 100 | }; |
73 | 101 | ||
@@ -76,30 +104,21 @@ static struct of_device_id tegra_dt_match_table[] __initdata = { | |||
76 | {} | 104 | {} |
77 | }; | 105 | }; |
78 | 106 | ||
79 | static struct of_device_id tegra_dt_gic_match[] __initdata = { | ||
80 | { .compatible = "nvidia,tegra20-gic", }, | ||
81 | {} | ||
82 | }; | ||
83 | |||
84 | static struct { | 107 | static struct { |
85 | char *machine; | 108 | char *machine; |
86 | void (*init)(void); | 109 | void (*init)(void); |
87 | } pinmux_configs[] = { | 110 | } pinmux_configs[] = { |
111 | { "compulab,trimslice", trimslice_pinmux_init }, | ||
88 | { "nvidia,harmony", harmony_pinmux_init }, | 112 | { "nvidia,harmony", harmony_pinmux_init }, |
113 | { "compal,paz00", paz00_pinmux_init }, | ||
89 | { "nvidia,seaboard", seaboard_pinmux_init }, | 114 | { "nvidia,seaboard", seaboard_pinmux_init }, |
90 | { "nvidia,ventana", ventana_pinmux_init }, | 115 | { "nvidia,ventana", ventana_pinmux_init }, |
91 | }; | 116 | }; |
92 | 117 | ||
93 | static void __init tegra_dt_init(void) | 118 | static void __init tegra_dt_init(void) |
94 | { | 119 | { |
95 | struct device_node *node; | ||
96 | int i; | 120 | int i; |
97 | 121 | ||
98 | node = of_find_matching_node_by_address(NULL, tegra_dt_gic_match, | ||
99 | TEGRA_ARM_INT_DIST_BASE); | ||
100 | if (node) | ||
101 | irq_domain_add_simple(node, INT_GIC_BASE); | ||
102 | |||
103 | tegra_clk_init_from_table(tegra_dt_clk_init_table); | 122 | tegra_clk_init_from_table(tegra_dt_clk_init_table); |
104 | 123 | ||
105 | /* | 124 | /* |
@@ -121,7 +140,9 @@ static void __init tegra_dt_init(void) | |||
121 | } | 140 | } |
122 | 141 | ||
123 | static const char * tegra_dt_board_compat[] = { | 142 | static const char * tegra_dt_board_compat[] = { |
143 | "compulab,trimslice", | ||
124 | "nvidia,harmony", | 144 | "nvidia,harmony", |
145 | "compal,paz00", | ||
125 | "nvidia,seaboard", | 146 | "nvidia,seaboard", |
126 | "nvidia,ventana", | 147 | "nvidia,ventana", |
127 | NULL | 148 | NULL |
@@ -130,7 +151,7 @@ static const char * tegra_dt_board_compat[] = { | |||
130 | DT_MACHINE_START(TEGRA_DT, "nVidia Tegra (Flattened Device Tree)") | 151 | DT_MACHINE_START(TEGRA_DT, "nVidia Tegra (Flattened Device Tree)") |
131 | .map_io = tegra_map_common_io, | 152 | .map_io = tegra_map_common_io, |
132 | .init_early = tegra_init_early, | 153 | .init_early = tegra_init_early, |
133 | .init_irq = tegra_init_irq, | 154 | .init_irq = tegra_dt_init_irq, |
134 | .handle_irq = gic_handle_irq, | 155 | .handle_irq = gic_handle_irq, |
135 | .timer = &tegra_timer, | 156 | .timer = &tegra_timer, |
136 | .init_machine = tegra_dt_init, | 157 | .init_machine = tegra_dt_init, |
diff --git a/arch/arm/mach-tegra/irq.c b/arch/arm/mach-tegra/irq.c index 8ad82af6a293..4e1afcd54fae 100644 --- a/arch/arm/mach-tegra/irq.c +++ b/arch/arm/mach-tegra/irq.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/of.h> | ||
24 | 25 | ||
25 | #include <asm/hardware/gic.h> | 26 | #include <asm/hardware/gic.h> |
26 | 27 | ||
@@ -125,6 +126,11 @@ void __init tegra_init_irq(void) | |||
125 | gic_arch_extn.irq_unmask = tegra_unmask; | 126 | gic_arch_extn.irq_unmask = tegra_unmask; |
126 | gic_arch_extn.irq_retrigger = tegra_retrigger; | 127 | gic_arch_extn.irq_retrigger = tegra_retrigger; |
127 | 128 | ||
128 | gic_init(0, 29, IO_ADDRESS(TEGRA_ARM_INT_DIST_BASE), | 129 | /* |
129 | IO_ADDRESS(TEGRA_ARM_PERIF_BASE + 0x100)); | 130 | * Check if there is a devicetree present, since the GIC will be |
131 | * initialized elsewhere under DT. | ||
132 | */ | ||
133 | if (!of_have_populated_dt()) | ||
134 | gic_init(0, 29, IO_ADDRESS(TEGRA_ARM_INT_DIST_BASE), | ||
135 | IO_ADDRESS(TEGRA_ARM_PERIF_BASE + 0x100)); | ||
130 | } | 136 | } |
diff --git a/arch/arm/plat-s3c24xx/s3c2443-clock.c b/arch/arm/plat-s3c24xx/s3c2443-clock.c index 5a21b15b2a97..4eab2cca2d92 100644 --- a/arch/arm/plat-s3c24xx/s3c2443-clock.c +++ b/arch/arm/plat-s3c24xx/s3c2443-clock.c | |||
@@ -297,13 +297,6 @@ static struct clksrc_clk clk_usb_bus_host = { | |||
297 | 297 | ||
298 | static struct clksrc_clk clksrc_clks[] = { | 298 | static struct clksrc_clk clksrc_clks[] = { |
299 | { | 299 | { |
300 | /* ART baud-rate clock sourced from esysclk via a divisor */ | ||
301 | .clk = { | ||
302 | .name = "uartclk", | ||
303 | .parent = &clk_esysclk.clk, | ||
304 | }, | ||
305 | .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 8 }, | ||
306 | }, { | ||
307 | /* camera interface bus-clock, divided down from esysclk */ | 300 | /* camera interface bus-clock, divided down from esysclk */ |
308 | .clk = { | 301 | .clk = { |
309 | .name = "camif-upll", /* same as 2440 name */ | 302 | .name = "camif-upll", /* same as 2440 name */ |
@@ -323,6 +316,15 @@ static struct clksrc_clk clksrc_clks[] = { | |||
323 | }, | 316 | }, |
324 | }; | 317 | }; |
325 | 318 | ||
319 | static struct clksrc_clk clk_esys_uart = { | ||
320 | /* ART baud-rate clock sourced from esysclk via a divisor */ | ||
321 | .clk = { | ||
322 | .name = "uartclk", | ||
323 | .parent = &clk_esysclk.clk, | ||
324 | }, | ||
325 | .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 8 }, | ||
326 | }; | ||
327 | |||
326 | static struct clk clk_i2s_ext = { | 328 | static struct clk clk_i2s_ext = { |
327 | .name = "i2s-ext", | 329 | .name = "i2s-ext", |
328 | }; | 330 | }; |
@@ -589,6 +591,12 @@ static struct clksrc_clk *clksrcs[] __initdata = { | |||
589 | &clk_arm, | 591 | &clk_arm, |
590 | }; | 592 | }; |
591 | 593 | ||
594 | static struct clk_lookup s3c2443_clk_lookup[] = { | ||
595 | CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk), | ||
596 | CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p), | ||
597 | CLKDEV_INIT(NULL, "clk_uart_baud3", &clk_esys_uart.clk), | ||
598 | }; | ||
599 | |||
592 | void __init s3c2443_common_init_clocks(int xtal, pll_fn get_mpll, | 600 | void __init s3c2443_common_init_clocks(int xtal, pll_fn get_mpll, |
593 | unsigned int *divs, int nr_divs, | 601 | unsigned int *divs, int nr_divs, |
594 | int divmask) | 602 | int divmask) |
@@ -618,6 +626,7 @@ void __init s3c2443_common_init_clocks(int xtal, pll_fn get_mpll, | |||
618 | /* See s3c2443/etc notes on disabling clocks at init time */ | 626 | /* See s3c2443/etc notes on disabling clocks at init time */ |
619 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | 627 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
620 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); | 628 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
629 | clkdev_add_table(s3c2443_clk_lookup, ARRAY_SIZE(s3c2443_clk_lookup)); | ||
621 | 630 | ||
622 | s3c2443_common_setup_clocks(get_mpll); | 631 | s3c2443_common_setup_clocks(get_mpll); |
623 | } | 632 | } |
diff --git a/arch/arm/plat-samsung/dma-ops.c b/arch/arm/plat-samsung/dma-ops.c index 93a994a5dd8f..2cded872f22b 100644 --- a/arch/arm/plat-samsung/dma-ops.c +++ b/arch/arm/plat-samsung/dma-ops.c | |||
@@ -18,23 +18,24 @@ | |||
18 | 18 | ||
19 | #include <mach/dma.h> | 19 | #include <mach/dma.h> |
20 | 20 | ||
21 | static inline bool pl330_filter(struct dma_chan *chan, void *param) | ||
22 | { | ||
23 | struct dma_pl330_peri *peri = chan->private; | ||
24 | return peri->peri_id == (unsigned)param; | ||
25 | } | ||
26 | |||
27 | static unsigned samsung_dmadev_request(enum dma_ch dma_ch, | 21 | static unsigned samsung_dmadev_request(enum dma_ch dma_ch, |
28 | struct samsung_dma_info *info) | 22 | struct samsung_dma_info *info) |
29 | { | 23 | { |
30 | struct dma_chan *chan; | 24 | struct dma_chan *chan; |
31 | dma_cap_mask_t mask; | 25 | dma_cap_mask_t mask; |
32 | struct dma_slave_config slave_config; | 26 | struct dma_slave_config slave_config; |
27 | void *filter_param; | ||
33 | 28 | ||
34 | dma_cap_zero(mask); | 29 | dma_cap_zero(mask); |
35 | dma_cap_set(info->cap, mask); | 30 | dma_cap_set(info->cap, mask); |
36 | 31 | ||
37 | chan = dma_request_channel(mask, pl330_filter, (void *)dma_ch); | 32 | /* |
33 | * If a dma channel property of a device node from device tree is | ||
34 | * specified, use that as the fliter parameter. | ||
35 | */ | ||
36 | filter_param = (dma_ch == DMACH_DT_PROP) ? (void *)info->dt_dmach_prop : | ||
37 | (void *)dma_ch; | ||
38 | chan = dma_request_channel(mask, pl330_filter, filter_param); | ||
38 | 39 | ||
39 | if (info->direction == DMA_FROM_DEVICE) { | 40 | if (info->direction == DMA_FROM_DEVICE) { |
40 | memset(&slave_config, 0, sizeof(struct dma_slave_config)); | 41 | memset(&slave_config, 0, sizeof(struct dma_slave_config)); |
diff --git a/arch/arm/plat-samsung/include/plat/dma-ops.h b/arch/arm/plat-samsung/include/plat/dma-ops.h index 4c1a363526cf..22eafc310bd7 100644 --- a/arch/arm/plat-samsung/include/plat/dma-ops.h +++ b/arch/arm/plat-samsung/include/plat/dma-ops.h | |||
@@ -31,6 +31,7 @@ struct samsung_dma_info { | |||
31 | enum dma_slave_buswidth width; | 31 | enum dma_slave_buswidth width; |
32 | dma_addr_t fifo; | 32 | dma_addr_t fifo; |
33 | struct s3c2410_dma_client *client; | 33 | struct s3c2410_dma_client *client; |
34 | struct property *dt_dmach_prop; | ||
34 | }; | 35 | }; |
35 | 36 | ||
36 | struct samsung_dma_ops { | 37 | struct samsung_dma_ops { |
diff --git a/arch/arm/plat-samsung/include/plat/dma-pl330.h b/arch/arm/plat-samsung/include/plat/dma-pl330.h index 2e55e5958674..c5eaad529de5 100644 --- a/arch/arm/plat-samsung/include/plat/dma-pl330.h +++ b/arch/arm/plat-samsung/include/plat/dma-pl330.h | |||
@@ -21,7 +21,8 @@ | |||
21 | * use these just as IDs. | 21 | * use these just as IDs. |
22 | */ | 22 | */ |
23 | enum dma_ch { | 23 | enum dma_ch { |
24 | DMACH_UART0_RX, | 24 | DMACH_DT_PROP = -1, |
25 | DMACH_UART0_RX = 0, | ||
25 | DMACH_UART0_TX, | 26 | DMACH_UART0_TX, |
26 | DMACH_UART1_RX, | 27 | DMACH_UART1_RX, |
27 | DMACH_UART1_TX, | 28 | DMACH_UART1_TX, |
diff --git a/arch/arm/plat-samsung/include/plat/irqs.h b/arch/arm/plat-samsung/include/plat/irqs.h index 08d1a7ef97b7..df46b776976a 100644 --- a/arch/arm/plat-samsung/include/plat/irqs.h +++ b/arch/arm/plat-samsung/include/plat/irqs.h | |||
@@ -44,13 +44,14 @@ | |||
44 | #define S5P_IRQ_VIC2(x) (S5P_VIC2_BASE + (x)) | 44 | #define S5P_IRQ_VIC2(x) (S5P_VIC2_BASE + (x)) |
45 | #define S5P_IRQ_VIC3(x) (S5P_VIC3_BASE + (x)) | 45 | #define S5P_IRQ_VIC3(x) (S5P_VIC3_BASE + (x)) |
46 | 46 | ||
47 | #define S5P_TIMER_IRQ(x) (11 + (x)) | 47 | #define S5P_TIMER_IRQ(x) (IRQ_TIMER_BASE + (x)) |
48 | 48 | ||
49 | #define IRQ_TIMER0 S5P_TIMER_IRQ(0) | 49 | #define IRQ_TIMER0 S5P_TIMER_IRQ(0) |
50 | #define IRQ_TIMER1 S5P_TIMER_IRQ(1) | 50 | #define IRQ_TIMER1 S5P_TIMER_IRQ(1) |
51 | #define IRQ_TIMER2 S5P_TIMER_IRQ(2) | 51 | #define IRQ_TIMER2 S5P_TIMER_IRQ(2) |
52 | #define IRQ_TIMER3 S5P_TIMER_IRQ(3) | 52 | #define IRQ_TIMER3 S5P_TIMER_IRQ(3) |
53 | #define IRQ_TIMER4 S5P_TIMER_IRQ(4) | 53 | #define IRQ_TIMER4 S5P_TIMER_IRQ(4) |
54 | #define IRQ_TIMER_COUNT (5) | ||
54 | 55 | ||
55 | #define IRQ_EINT(x) ((x) < 16 ? ((x) + S5P_EINT_BASE1) \ | 56 | #define IRQ_EINT(x) ((x) < 16 ? ((x) + S5P_EINT_BASE1) \ |
56 | : ((x) - 16 + S5P_EINT_BASE2)) | 57 | : ((x) - 16 + S5P_EINT_BASE2)) |
diff --git a/arch/arm/plat-samsung/include/plat/regs-serial.h b/arch/arm/plat-samsung/include/plat/regs-serial.h index 720734847027..29c26a818842 100644 --- a/arch/arm/plat-samsung/include/plat/regs-serial.h +++ b/arch/arm/plat-samsung/include/plat/regs-serial.h | |||
@@ -71,6 +71,7 @@ | |||
71 | #define S3C2410_LCON_IRM (1<<6) | 71 | #define S3C2410_LCON_IRM (1<<6) |
72 | 72 | ||
73 | #define S3C2440_UCON_CLKMASK (3<<10) | 73 | #define S3C2440_UCON_CLKMASK (3<<10) |
74 | #define S3C2440_UCON_CLKSHIFT (10) | ||
74 | #define S3C2440_UCON_PCLK (0<<10) | 75 | #define S3C2440_UCON_PCLK (0<<10) |
75 | #define S3C2440_UCON_UCLK (1<<10) | 76 | #define S3C2440_UCON_UCLK (1<<10) |
76 | #define S3C2440_UCON_PCLK2 (2<<10) | 77 | #define S3C2440_UCON_PCLK2 (2<<10) |
@@ -78,6 +79,7 @@ | |||
78 | #define S3C2443_UCON_EPLL (3<<10) | 79 | #define S3C2443_UCON_EPLL (3<<10) |
79 | 80 | ||
80 | #define S3C6400_UCON_CLKMASK (3<<10) | 81 | #define S3C6400_UCON_CLKMASK (3<<10) |
82 | #define S3C6400_UCON_CLKSHIFT (10) | ||
81 | #define S3C6400_UCON_PCLK (0<<10) | 83 | #define S3C6400_UCON_PCLK (0<<10) |
82 | #define S3C6400_UCON_PCLK2 (2<<10) | 84 | #define S3C6400_UCON_PCLK2 (2<<10) |
83 | #define S3C6400_UCON_UCLK0 (1<<10) | 85 | #define S3C6400_UCON_UCLK0 (1<<10) |
@@ -90,11 +92,14 @@ | |||
90 | #define S3C2440_UCON_DIVSHIFT (12) | 92 | #define S3C2440_UCON_DIVSHIFT (12) |
91 | 93 | ||
92 | #define S3C2412_UCON_CLKMASK (3<<10) | 94 | #define S3C2412_UCON_CLKMASK (3<<10) |
95 | #define S3C2412_UCON_CLKSHIFT (10) | ||
93 | #define S3C2412_UCON_UCLK (1<<10) | 96 | #define S3C2412_UCON_UCLK (1<<10) |
94 | #define S3C2412_UCON_USYSCLK (3<<10) | 97 | #define S3C2412_UCON_USYSCLK (3<<10) |
95 | #define S3C2412_UCON_PCLK (0<<10) | 98 | #define S3C2412_UCON_PCLK (0<<10) |
96 | #define S3C2412_UCON_PCLK2 (2<<10) | 99 | #define S3C2412_UCON_PCLK2 (2<<10) |
97 | 100 | ||
101 | #define S3C2410_UCON_CLKMASK (1 << 10) | ||
102 | #define S3C2410_UCON_CLKSHIFT (10) | ||
98 | #define S3C2410_UCON_UCLK (1<<10) | 103 | #define S3C2410_UCON_UCLK (1<<10) |
99 | #define S3C2410_UCON_SBREAK (1<<4) | 104 | #define S3C2410_UCON_SBREAK (1<<4) |
100 | 105 | ||
@@ -193,6 +198,7 @@ | |||
193 | 198 | ||
194 | /* Following are specific to S5PV210 */ | 199 | /* Following are specific to S5PV210 */ |
195 | #define S5PV210_UCON_CLKMASK (1<<10) | 200 | #define S5PV210_UCON_CLKMASK (1<<10) |
201 | #define S5PV210_UCON_CLKSHIFT (10) | ||
196 | #define S5PV210_UCON_PCLK (0<<10) | 202 | #define S5PV210_UCON_PCLK (0<<10) |
197 | #define S5PV210_UCON_UCLK (1<<10) | 203 | #define S5PV210_UCON_UCLK (1<<10) |
198 | 204 | ||
@@ -221,29 +227,24 @@ | |||
221 | #define S5PV210_UFSTAT_RXMASK (255<<0) | 227 | #define S5PV210_UFSTAT_RXMASK (255<<0) |
222 | #define S5PV210_UFSTAT_RXSHIFT (0) | 228 | #define S5PV210_UFSTAT_RXSHIFT (0) |
223 | 229 | ||
224 | #define NO_NEED_CHECK_CLKSRC 1 | 230 | #define S3C2410_UCON_CLKSEL0 (1 << 0) |
231 | #define S3C2410_UCON_CLKSEL1 (1 << 1) | ||
232 | #define S3C2410_UCON_CLKSEL2 (1 << 2) | ||
233 | #define S3C2410_UCON_CLKSEL3 (1 << 3) | ||
225 | 234 | ||
226 | #ifndef __ASSEMBLY__ | 235 | /* Default values for s5pv210 UCON and UFCON uart registers */ |
236 | #define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | ||
237 | S3C2410_UCON_RXILEVEL | \ | ||
238 | S3C2410_UCON_TXIRQMODE | \ | ||
239 | S3C2410_UCON_RXIRQMODE | \ | ||
240 | S3C2410_UCON_RXFIFO_TOI | \ | ||
241 | S3C2443_UCON_RXERR_IRQEN) | ||
227 | 242 | ||
228 | /* struct s3c24xx_uart_clksrc | 243 | #define S5PV210_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ |
229 | * | 244 | S5PV210_UFCON_TXTRIG4 | \ |
230 | * this structure defines a named clock source that can be used for the | 245 | S5PV210_UFCON_RXTRIG4) |
231 | * uart, so that the best clock can be selected for the requested baud | ||
232 | * rate. | ||
233 | * | ||
234 | * min_baud and max_baud define the range of baud-rates this clock is | ||
235 | * acceptable for, if they are both zero, it is assumed any baud rate that | ||
236 | * can be generated from this clock will be used. | ||
237 | * | ||
238 | * divisor gives the divisor from the clock to the one seen by the uart | ||
239 | */ | ||
240 | 246 | ||
241 | struct s3c24xx_uart_clksrc { | 247 | #ifndef __ASSEMBLY__ |
242 | const char *name; | ||
243 | unsigned int divisor; | ||
244 | unsigned int min_baud; | ||
245 | unsigned int max_baud; | ||
246 | }; | ||
247 | 248 | ||
248 | /* configuration structure for per-machine configurations for the | 249 | /* configuration structure for per-machine configurations for the |
249 | * serial port | 250 | * serial port |
@@ -257,15 +258,13 @@ struct s3c2410_uartcfg { | |||
257 | unsigned char unused; | 258 | unsigned char unused; |
258 | unsigned short flags; | 259 | unsigned short flags; |
259 | upf_t uart_flags; /* default uart flags */ | 260 | upf_t uart_flags; /* default uart flags */ |
261 | unsigned int clk_sel; | ||
260 | 262 | ||
261 | unsigned int has_fracval; | 263 | unsigned int has_fracval; |
262 | 264 | ||
263 | unsigned long ucon; /* value of ucon for port */ | 265 | unsigned long ucon; /* value of ucon for port */ |
264 | unsigned long ulcon; /* value of ulcon for port */ | 266 | unsigned long ulcon; /* value of ulcon for port */ |
265 | unsigned long ufcon; /* value of ufcon for port */ | 267 | unsigned long ufcon; /* value of ufcon for port */ |
266 | |||
267 | struct s3c24xx_uart_clksrc *clocks; | ||
268 | unsigned int clocks_size; | ||
269 | }; | 268 | }; |
270 | 269 | ||
271 | /* s3c24xx_uart_devs | 270 | /* s3c24xx_uart_devs |