diff options
42 files changed, 1016 insertions, 566 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 6fd2ceae305a..a37a50f575a2 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -190,6 +190,7 @@ machine-$(CONFIG_ARCH_S5PV210) += s5pv210 | |||
190 | machine-$(CONFIG_ARCH_SA1100) += sa1100 | 190 | machine-$(CONFIG_ARCH_SA1100) += sa1100 |
191 | machine-$(CONFIG_ARCH_SHARK) += shark | 191 | machine-$(CONFIG_ARCH_SHARK) += shark |
192 | machine-$(CONFIG_ARCH_SHMOBILE) += shmobile | 192 | machine-$(CONFIG_ARCH_SHMOBILE) += shmobile |
193 | machine-$(CONFIG_ARCH_SHMOBILE_MULTI) += shmobile | ||
193 | machine-$(CONFIG_ARCH_SIRF) += prima2 | 194 | machine-$(CONFIG_ARCH_SIRF) += prima2 |
194 | machine-$(CONFIG_ARCH_SOCFPGA) += socfpga | 195 | machine-$(CONFIG_ARCH_SOCFPGA) += socfpga |
195 | machine-$(CONFIG_ARCH_STI) += sti | 196 | machine-$(CONFIG_ARCH_STI) += sti |
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 641b3c9a7028..f3861de9fd4e 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -183,6 +183,7 @@ dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \ | |||
183 | ccu9540.dtb | 183 | ccu9540.dtb |
184 | dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb | 184 | dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb |
185 | dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ | 185 | dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ |
186 | emev2-kzm9d-reference.dtb \ | ||
186 | r8a7740-armadillo800eva.dtb \ | 187 | r8a7740-armadillo800eva.dtb \ |
187 | r8a7778-bockw.dtb \ | 188 | r8a7778-bockw.dtb \ |
188 | r8a7740-armadillo800eva-reference.dtb \ | 189 | r8a7740-armadillo800eva-reference.dtb \ |
@@ -192,6 +193,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ | |||
192 | sh73a0-kzm9g-reference.dtb \ | 193 | sh73a0-kzm9g-reference.dtb \ |
193 | r8a73a4-ape6evm.dtb \ | 194 | r8a73a4-ape6evm.dtb \ |
194 | sh7372-mackerel.dtb | 195 | sh7372-mackerel.dtb |
196 | dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d-reference.dtb | ||
195 | dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_cyclone5.dtb \ | 197 | dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_cyclone5.dtb \ |
196 | socfpga_vt.dtb | 198 | socfpga_vt.dtb |
197 | dtb-$(CONFIG_ARCH_SPEAR13XX) += spear1310-evb.dtb \ | 199 | dtb-$(CONFIG_ARCH_SPEAR13XX) += spear1310-evb.dtb \ |
diff --git a/arch/arm/boot/dts/emev2-kzm9d-reference.dts b/arch/arm/boot/dts/emev2-kzm9d-reference.dts new file mode 100644 index 000000000000..bed676b95c27 --- /dev/null +++ b/arch/arm/boot/dts/emev2-kzm9d-reference.dts | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * Device Tree Source for the KZM9D board | ||
3 | * | ||
4 | * Copyright (C) 2013 Renesas Solutions Corp. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public License | ||
7 | * version 2. This program is licensed "as is" without any warranty of any | ||
8 | * kind, whether express or implied. | ||
9 | */ | ||
10 | /dts-v1/; | ||
11 | |||
12 | /include/ "emev2.dtsi" | ||
13 | |||
14 | / { | ||
15 | model = "EMEV2 KZM9D Board"; | ||
16 | compatible = "renesas,kzm9d-reference", "renesas,emev2"; | ||
17 | |||
18 | memory { | ||
19 | device_type = "memory"; | ||
20 | reg = <0x40000000 0x8000000>; | ||
21 | }; | ||
22 | |||
23 | chosen { | ||
24 | bootargs = "console=ttyS1,115200n81 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096"; | ||
25 | }; | ||
26 | |||
27 | reg_1p8v: regulator@0 { | ||
28 | compatible = "regulator-fixed"; | ||
29 | regulator-name = "fixed-1.8V"; | ||
30 | regulator-min-microvolt = <1800000>; | ||
31 | regulator-max-microvolt = <1800000>; | ||
32 | regulator-always-on; | ||
33 | regulator-boot-on; | ||
34 | }; | ||
35 | |||
36 | reg_3p3v: regulator@1 { | ||
37 | compatible = "regulator-fixed"; | ||
38 | regulator-name = "fixed-3.3V"; | ||
39 | regulator-min-microvolt = <3300000>; | ||
40 | regulator-max-microvolt = <3300000>; | ||
41 | regulator-always-on; | ||
42 | regulator-boot-on; | ||
43 | }; | ||
44 | |||
45 | lan9220@20000000 { | ||
46 | compatible = "smsc,lan9220", "smsc,lan9115"; | ||
47 | reg = <0x20000000 0x10000>; | ||
48 | phy-mode = "mii"; | ||
49 | interrupt-parent = <&gpio0>; | ||
50 | interrupts = <1 1>; /* active high */ | ||
51 | reg-io-width = <4>; | ||
52 | smsc,irq-active-high; | ||
53 | smsc,irq-push-pull; | ||
54 | vddvario-supply = <®_1p8v>; | ||
55 | vdd33a-supply = <®_3p3v>; | ||
56 | }; | ||
57 | }; | ||
diff --git a/arch/arm/boot/dts/emev2-kzm9d.dts b/arch/arm/boot/dts/emev2-kzm9d.dts index b9b3241f173b..dda13bc02f9f 100644 --- a/arch/arm/boot/dts/emev2-kzm9d.dts +++ b/arch/arm/boot/dts/emev2-kzm9d.dts | |||
@@ -21,6 +21,6 @@ | |||
21 | }; | 21 | }; |
22 | 22 | ||
23 | chosen { | 23 | chosen { |
24 | bootargs = "console=tty0 console=ttyS1,115200n81 earlyprintk=serial8250-em.1,115200n81 mem=128M@0x40000000 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096"; | 24 | bootargs = "console=ttyS1,115200n81 ignore_loglevel root=/dev/nfs ip=dhcp nfsroot=,rsize=4096,wsize=4096"; |
25 | }; | 25 | }; |
26 | }; | 26 | }; |
diff --git a/arch/arm/boot/dts/emev2.dtsi b/arch/arm/boot/dts/emev2.dtsi index c8a8c08b48dd..99ad2b2e8e14 100644 --- a/arch/arm/boot/dts/emev2.dtsi +++ b/arch/arm/boot/dts/emev2.dtsi | |||
@@ -14,6 +14,14 @@ | |||
14 | compatible = "renesas,emev2"; | 14 | compatible = "renesas,emev2"; |
15 | interrupt-parent = <&gic>; | 15 | interrupt-parent = <&gic>; |
16 | 16 | ||
17 | aliases { | ||
18 | gpio0 = &gpio0; | ||
19 | gpio1 = &gpio1; | ||
20 | gpio2 = &gpio2; | ||
21 | gpio3 = &gpio3; | ||
22 | gpio4 = &gpio4; | ||
23 | }; | ||
24 | |||
17 | cpus { | 25 | cpus { |
18 | #address-cells = <1>; | 26 | #address-cells = <1>; |
19 | #size-cells = <0>; | 27 | #size-cells = <0>; |
@@ -67,4 +75,55 @@ | |||
67 | reg = <0xe1050000 0x38>; | 75 | reg = <0xe1050000 0x38>; |
68 | interrupts = <0 11 0>; | 76 | interrupts = <0 11 0>; |
69 | }; | 77 | }; |
78 | |||
79 | gpio0: gpio@e0050000 { | ||
80 | compatible = "renesas,em-gio"; | ||
81 | reg = <0xe0050000 0x2c>, <0xe0050040 0x20>; | ||
82 | interrupts = <0 67 0>, <0 68 0>; | ||
83 | gpio-controller; | ||
84 | #gpio-cells = <2>; | ||
85 | ngpios = <32>; | ||
86 | interrupt-controller; | ||
87 | #interrupt-cells = <2>; | ||
88 | }; | ||
89 | gpio1: gpio@e0050080 { | ||
90 | compatible = "renesas,em-gio"; | ||
91 | reg = <0xe0050080 0x2c>, <0xe00500c0 0x20>; | ||
92 | interrupts = <0 69 0>, <0 70 0>; | ||
93 | gpio-controller; | ||
94 | #gpio-cells = <2>; | ||
95 | ngpios = <32>; | ||
96 | interrupt-controller; | ||
97 | #interrupt-cells = <2>; | ||
98 | }; | ||
99 | gpio2: gpio@e0050100 { | ||
100 | compatible = "renesas,em-gio"; | ||
101 | reg = <0xe0050100 0x2c>, <0xe0050140 0x20>; | ||
102 | interrupts = <0 71 0>, <0 72 0>; | ||
103 | gpio-controller; | ||
104 | #gpio-cells = <2>; | ||
105 | ngpios = <32>; | ||
106 | interrupt-controller; | ||
107 | #interrupt-cells = <2>; | ||
108 | }; | ||
109 | gpio3: gpio@e0050180 { | ||
110 | compatible = "renesas,em-gio"; | ||
111 | reg = <0xe0050180 0x2c>, <0xe00501c0 0x20>; | ||
112 | interrupts = <0 73 0>, <0 74 0>; | ||
113 | gpio-controller; | ||
114 | #gpio-cells = <2>; | ||
115 | ngpios = <32>; | ||
116 | interrupt-controller; | ||
117 | #interrupt-cells = <2>; | ||
118 | }; | ||
119 | gpio4: gpio@e0050200 { | ||
120 | compatible = "renesas,em-gio"; | ||
121 | reg = <0xe0050200 0x2c>, <0xe0050240 0x20>; | ||
122 | interrupts = <0 75 0>, <0 76 0>; | ||
123 | gpio-controller; | ||
124 | #gpio-cells = <2>; | ||
125 | ngpios = <31>; | ||
126 | interrupt-controller; | ||
127 | #interrupt-cells = <2>; | ||
128 | }; | ||
70 | }; | 129 | }; |
diff --git a/arch/arm/boot/dts/pxa3xx.dtsi b/arch/arm/boot/dts/pxa3xx.dtsi index f9d92da86783..83bb0eff697b 100644 --- a/arch/arm/boot/dts/pxa3xx.dtsi +++ b/arch/arm/boot/dts/pxa3xx.dtsi | |||
@@ -28,5 +28,16 @@ | |||
28 | marvell,intc-priority; | 28 | marvell,intc-priority; |
29 | marvell,intc-nr-irqs = <56>; | 29 | marvell,intc-nr-irqs = <56>; |
30 | }; | 30 | }; |
31 | |||
32 | gpio: gpio@40e00000 { | ||
33 | compatible = "intel,pxa3xx-gpio"; | ||
34 | reg = <0x40e00000 0x10000>; | ||
35 | interrupt-names = "gpio0", "gpio1", "gpio_mux"; | ||
36 | interrupts = <8 9 10>; | ||
37 | gpio-controller; | ||
38 | #gpio-cells = <0x2>; | ||
39 | interrupt-controller; | ||
40 | #interrupt-cells = <0x2>; | ||
41 | }; | ||
31 | }; | 42 | }; |
32 | }; | 43 | }; |
diff --git a/arch/arm/boot/dts/r8a73a4-ape6evm.dts b/arch/arm/boot/dts/r8a73a4-ape6evm.dts index f603c6946c29..e657a9db1666 100644 --- a/arch/arm/boot/dts/r8a73a4-ape6evm.dts +++ b/arch/arm/boot/dts/r8a73a4-ape6evm.dts | |||
@@ -50,3 +50,25 @@ | |||
50 | }; | 50 | }; |
51 | }; | 51 | }; |
52 | }; | 52 | }; |
53 | |||
54 | &i2c5 { | ||
55 | vdd_dvfs: max8973@1b { | ||
56 | compatible = "maxim,max8973"; | ||
57 | reg = <0x1b>; | ||
58 | |||
59 | regulator-min-microvolt = <935000>; | ||
60 | regulator-max-microvolt = <1200000>; | ||
61 | regulator-boot-on; | ||
62 | regulator-always-on; | ||
63 | }; | ||
64 | }; | ||
65 | |||
66 | &cpu0 { | ||
67 | cpu0-supply = <&vdd_dvfs>; | ||
68 | operating-points = < | ||
69 | /* kHz uV */ | ||
70 | 1950000 1115000 | ||
71 | 1462500 995000 | ||
72 | >; | ||
73 | voltage-tolerance = <1>; /* 1% */ | ||
74 | }; | ||
diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi index 4ff2019c0e30..6c26caa880f2 100644 --- a/arch/arm/boot/dts/r8a73a4.dtsi +++ b/arch/arm/boot/dts/r8a73a4.dtsi | |||
@@ -85,4 +85,137 @@ | |||
85 | interrupt-parent = <&gic>; | 85 | interrupt-parent = <&gic>; |
86 | interrupts = <0 69 4>; | 86 | interrupts = <0 69 4>; |
87 | }; | 87 | }; |
88 | |||
89 | i2c0: i2c@e6500000 { | ||
90 | #address-cells = <1>; | ||
91 | #size-cells = <0>; | ||
92 | compatible = "renesas,rmobile-iic"; | ||
93 | reg = <0 0xe6500000 0 0x428>; | ||
94 | interrupt-parent = <&gic>; | ||
95 | interrupts = <0 174 0x4>; | ||
96 | }; | ||
97 | |||
98 | i2c1: i2c@e6510000 { | ||
99 | #address-cells = <1>; | ||
100 | #size-cells = <0>; | ||
101 | compatible = "renesas,rmobile-iic"; | ||
102 | reg = <0 0xe6510000 0 0x428>; | ||
103 | interrupt-parent = <&gic>; | ||
104 | interrupts = <0 175 0x4>; | ||
105 | }; | ||
106 | |||
107 | i2c2: i2c@e6520000 { | ||
108 | #address-cells = <1>; | ||
109 | #size-cells = <0>; | ||
110 | compatible = "renesas,rmobile-iic"; | ||
111 | reg = <0 0xe6520000 0 0x428>; | ||
112 | interrupt-parent = <&gic>; | ||
113 | interrupts = <0 176 0x4>; | ||
114 | }; | ||
115 | |||
116 | i2c3: i2c@e6530000 { | ||
117 | #address-cells = <1>; | ||
118 | #size-cells = <0>; | ||
119 | compatible = "renesas,rmobile-iic"; | ||
120 | reg = <0 0xe6530000 0 0x428>; | ||
121 | interrupt-parent = <&gic>; | ||
122 | interrupts = <0 177 0x4>; | ||
123 | }; | ||
124 | |||
125 | i2c4: i2c@e6540000 { | ||
126 | #address-cells = <1>; | ||
127 | #size-cells = <0>; | ||
128 | compatible = "renesas,rmobile-iic"; | ||
129 | reg = <0 0xe6540000 0 0x428>; | ||
130 | interrupt-parent = <&gic>; | ||
131 | interrupts = <0 178 0x4>; | ||
132 | }; | ||
133 | |||
134 | i2c5: i2c@e60b0000 { | ||
135 | #address-cells = <1>; | ||
136 | #size-cells = <0>; | ||
137 | compatible = "renesas,rmobile-iic"; | ||
138 | reg = <0 0xe60b0000 0 0x428>; | ||
139 | interrupt-parent = <&gic>; | ||
140 | interrupts = <0 179 0x4>; | ||
141 | }; | ||
142 | |||
143 | i2c6: i2c@e6550000 { | ||
144 | #address-cells = <1>; | ||
145 | #size-cells = <0>; | ||
146 | compatible = "renesas,rmobile-iic"; | ||
147 | reg = <0 0xe6550000 0 0x428>; | ||
148 | interrupt-parent = <&gic>; | ||
149 | interrupts = <0 184 0x4>; | ||
150 | }; | ||
151 | |||
152 | i2c7: i2c@e6560000 { | ||
153 | #address-cells = <1>; | ||
154 | #size-cells = <0>; | ||
155 | compatible = "renesas,rmobile-iic"; | ||
156 | reg = <0 0xe6560000 0 0x428>; | ||
157 | interrupt-parent = <&gic>; | ||
158 | interrupts = <0 185 0x4>; | ||
159 | }; | ||
160 | |||
161 | i2c8: i2c@e6570000 { | ||
162 | #address-cells = <1>; | ||
163 | #size-cells = <0>; | ||
164 | compatible = "renesas,rmobile-iic"; | ||
165 | reg = <0 0xe6570000 0 0x428>; | ||
166 | interrupt-parent = <&gic>; | ||
167 | interrupts = <0 173 0x4>; | ||
168 | }; | ||
169 | |||
170 | mmcif0: mmcif@ee200000 { | ||
171 | compatible = "renesas,sh-mmcif"; | ||
172 | reg = <0 0xee200000 0 0x80>; | ||
173 | interrupt-parent = <&gic>; | ||
174 | interrupts = <0 169 0x4>; | ||
175 | reg-io-width = <4>; | ||
176 | status = "disabled"; | ||
177 | }; | ||
178 | |||
179 | mmcif1: mmcif@ee220000 { | ||
180 | compatible = "renesas,sh-mmcif"; | ||
181 | reg = <0 0xee220000 0 0x80>; | ||
182 | interrupt-parent = <&gic>; | ||
183 | interrupts = <0 170 0x4>; | ||
184 | reg-io-width = <4>; | ||
185 | status = "disabled"; | ||
186 | }; | ||
187 | |||
188 | pfc: pfc@e6050000 { | ||
189 | compatible = "renesas,pfc-r8a73a4"; | ||
190 | reg = <0 0xe6050000 0 0x9000>; | ||
191 | gpio-controller; | ||
192 | #gpio-cells = <2>; | ||
193 | }; | ||
194 | |||
195 | sdhi0: sdhi@ee100000 { | ||
196 | compatible = "renesas,r8a73a4-sdhi"; | ||
197 | reg = <0 0xee100000 0 0x100>; | ||
198 | interrupt-parent = <&gic>; | ||
199 | interrupts = <0 165 4>; | ||
200 | cap-sd-highspeed; | ||
201 | status = "disabled"; | ||
202 | }; | ||
203 | |||
204 | sdhi1: sdhi@ee120000 { | ||
205 | compatible = "renesas,r8a73a4-sdhi"; | ||
206 | reg = <0 0xee120000 0 0x100>; | ||
207 | interrupt-parent = <&gic>; | ||
208 | interrupts = <0 166 4>; | ||
209 | cap-sd-highspeed; | ||
210 | status = "disabled"; | ||
211 | }; | ||
212 | |||
213 | sdhi2: sdhi@ee140000 { | ||
214 | compatible = "renesas,r8a73a4-sdhi"; | ||
215 | reg = <0 0xee140000 0 0x100>; | ||
216 | interrupt-parent = <&gic>; | ||
217 | interrupts = <0 167 4>; | ||
218 | cap-sd-highspeed; | ||
219 | status = "disabled"; | ||
220 | }; | ||
88 | }; | 221 | }; |
diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts index 09ea22c26359..366f72989dc3 100644 --- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts +++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | /dts-v1/; | 11 | /dts-v1/; |
12 | /include/ "r8a7740.dtsi" | 12 | /include/ "r8a7740.dtsi" |
13 | #include <dt-bindings/gpio/gpio.h> | ||
13 | 14 | ||
14 | / { | 15 | / { |
15 | model = "armadillo 800 eva reference"; | 16 | model = "armadillo 800 eva reference"; |
@@ -33,6 +34,21 @@ | |||
33 | regulator-boot-on; | 34 | regulator-boot-on; |
34 | }; | 35 | }; |
35 | 36 | ||
37 | leds { | ||
38 | compatible = "gpio-leds"; | ||
39 | led1 { | ||
40 | gpios = <&pfc 102 GPIO_ACTIVE_HIGH>; | ||
41 | }; | ||
42 | led2 { | ||
43 | gpios = <&pfc 111 GPIO_ACTIVE_HIGH>; | ||
44 | }; | ||
45 | led3 { | ||
46 | gpios = <&pfc 110 GPIO_ACTIVE_HIGH>; | ||
47 | }; | ||
48 | led4 { | ||
49 | gpios = <&pfc 177 GPIO_ACTIVE_HIGH>; | ||
50 | }; | ||
51 | }; | ||
36 | }; | 52 | }; |
37 | 53 | ||
38 | &i2c0 { | 54 | &i2c0 { |
@@ -41,5 +57,23 @@ | |||
41 | reg = <0x55>; | 57 | reg = <0x55>; |
42 | interrupt-parent = <&irqpin1>; | 58 | interrupt-parent = <&irqpin1>; |
43 | interrupts = <2 0>; /* IRQ10: hwirq 2 on irqpin1 */ | 59 | interrupts = <2 0>; /* IRQ10: hwirq 2 on irqpin1 */ |
60 | pinctrl-0 = <&st1232_pins>; | ||
61 | pinctrl-names = "default"; | ||
62 | gpios = <&pfc 166 GPIO_ACTIVE_LOW>; | ||
63 | }; | ||
64 | }; | ||
65 | |||
66 | &pfc { | ||
67 | pinctrl-0 = <&scifa1_pins>; | ||
68 | pinctrl-names = "default"; | ||
69 | |||
70 | scifa1_pins: scifa1 { | ||
71 | renesas,groups = "scifa1_data"; | ||
72 | renesas,function = "scifa1"; | ||
73 | }; | ||
74 | |||
75 | st1232_pins: st1232 { | ||
76 | renesas,groups = "intc_irq10"; | ||
77 | renesas,function = "intc"; | ||
44 | }; | 78 | }; |
45 | }; | 79 | }; |
diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi index 24e930643821..e18a195b55f3 100644 --- a/arch/arm/boot/dts/r8a7740.dtsi +++ b/arch/arm/boot/dts/r8a7740.dtsi | |||
@@ -139,4 +139,12 @@ | |||
139 | 0 72 0x4 | 139 | 0 72 0x4 |
140 | 0 73 0x4>; | 140 | 0 73 0x4>; |
141 | }; | 141 | }; |
142 | |||
143 | pfc: pfc@e6050000 { | ||
144 | compatible = "renesas,pfc-r8a7740"; | ||
145 | reg = <0xe6050000 0x8000>, | ||
146 | <0xe605800c 0x20>; | ||
147 | gpio-controller; | ||
148 | #gpio-cells = <2>; | ||
149 | }; | ||
142 | }; | 150 | }; |
diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi index 474373559bdc..45ac404ab6d8 100644 --- a/arch/arm/boot/dts/r8a7778.dtsi +++ b/arch/arm/boot/dts/r8a7778.dtsi | |||
@@ -32,4 +32,70 @@ | |||
32 | reg = <0xfe438000 0x1000>, | 32 | reg = <0xfe438000 0x1000>, |
33 | <0xfe430000 0x100>; | 33 | <0xfe430000 0x100>; |
34 | }; | 34 | }; |
35 | |||
36 | gpio0: gpio@ffc40000 { | ||
37 | compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; | ||
38 | reg = <0xffc40000 0x2c>; | ||
39 | interrupt-parent = <&gic>; | ||
40 | interrupts = <0 103 0x4>; | ||
41 | #gpio-cells = <2>; | ||
42 | gpio-controller; | ||
43 | gpio-ranges = <&pfc 0 0 32>; | ||
44 | #interrupt-cells = <2>; | ||
45 | interrupt-controller; | ||
46 | }; | ||
47 | |||
48 | gpio1: gpio@ffc41000 { | ||
49 | compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; | ||
50 | reg = <0xffc41000 0x2c>; | ||
51 | interrupt-parent = <&gic>; | ||
52 | interrupts = <0 103 0x4>; | ||
53 | #gpio-cells = <2>; | ||
54 | gpio-controller; | ||
55 | gpio-ranges = <&pfc 0 32 32>; | ||
56 | #interrupt-cells = <2>; | ||
57 | interrupt-controller; | ||
58 | }; | ||
59 | |||
60 | gpio2: gpio@ffc42000 { | ||
61 | compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; | ||
62 | reg = <0xffc42000 0x2c>; | ||
63 | interrupt-parent = <&gic>; | ||
64 | interrupts = <0 103 0x4>; | ||
65 | #gpio-cells = <2>; | ||
66 | gpio-controller; | ||
67 | gpio-ranges = <&pfc 0 64 32>; | ||
68 | #interrupt-cells = <2>; | ||
69 | interrupt-controller; | ||
70 | }; | ||
71 | |||
72 | gpio3: gpio@ffc43000 { | ||
73 | compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; | ||
74 | reg = <0xffc43000 0x2c>; | ||
75 | interrupt-parent = <&gic>; | ||
76 | interrupts = <0 103 0x4>; | ||
77 | #gpio-cells = <2>; | ||
78 | gpio-controller; | ||
79 | gpio-ranges = <&pfc 0 96 32>; | ||
80 | #interrupt-cells = <2>; | ||
81 | interrupt-controller; | ||
82 | }; | ||
83 | |||
84 | gpio4: gpio@ffc44000 { | ||
85 | compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar"; | ||
86 | reg = <0xffc44000 0x2c>; | ||
87 | interrupt-parent = <&gic>; | ||
88 | interrupts = <0 103 0x4>; | ||
89 | #gpio-cells = <2>; | ||
90 | gpio-controller; | ||
91 | gpio-ranges = <&pfc 0 128 27>; | ||
92 | #interrupt-cells = <2>; | ||
93 | interrupt-controller; | ||
94 | }; | ||
95 | |||
96 | pfc: pfc@fffc0000 { | ||
97 | compatible = "renesas,pfc-r8a7778"; | ||
98 | reg = <0xfffc000 0x118>; | ||
99 | #gpio-range-cells = <3>; | ||
100 | }; | ||
35 | }; | 101 | }; |
diff --git a/arch/arm/boot/dts/r8a7779-marzen-reference.dts b/arch/arm/boot/dts/r8a7779-marzen-reference.dts index 72be4c87cfb5..b64705be258d 100644 --- a/arch/arm/boot/dts/r8a7779-marzen-reference.dts +++ b/arch/arm/boot/dts/r8a7779-marzen-reference.dts | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | /dts-v1/; | 12 | /dts-v1/; |
13 | /include/ "r8a7779.dtsi" | 13 | /include/ "r8a7779.dtsi" |
14 | #include <dt-bindings/gpio/gpio.h> | ||
14 | 15 | ||
15 | / { | 16 | / { |
16 | model = "marzen"; | 17 | model = "marzen"; |
@@ -37,6 +38,9 @@ | |||
37 | lan0@18000000 { | 38 | lan0@18000000 { |
38 | compatible = "smsc,lan9220", "smsc,lan9115"; | 39 | compatible = "smsc,lan9220", "smsc,lan9115"; |
39 | reg = <0x18000000 0x100>; | 40 | reg = <0x18000000 0x100>; |
41 | pinctrl-0 = <&lan0_pins>; | ||
42 | pinctrl-names = "default"; | ||
43 | |||
40 | phy-mode = "mii"; | 44 | phy-mode = "mii"; |
41 | interrupt-parent = <&gic>; | 45 | interrupt-parent = <&gic>; |
42 | interrupts = <0 28 0x4>; | 46 | interrupts = <0 28 0x4>; |
@@ -44,4 +48,49 @@ | |||
44 | vddvario-supply = <&fixedregulator3v3>; | 48 | vddvario-supply = <&fixedregulator3v3>; |
45 | vdd33a-supply = <&fixedregulator3v3>; | 49 | vdd33a-supply = <&fixedregulator3v3>; |
46 | }; | 50 | }; |
51 | |||
52 | leds { | ||
53 | compatible = "gpio-leds"; | ||
54 | led2 { | ||
55 | gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>; | ||
56 | }; | ||
57 | led3 { | ||
58 | gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>; | ||
59 | }; | ||
60 | led4 { | ||
61 | gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>; | ||
62 | }; | ||
63 | }; | ||
64 | }; | ||
65 | |||
66 | &pfc { | ||
67 | pinctrl-0 = <&scif2_pins &scif4_pins &sdhi0_pins>; | ||
68 | pinctrl-names = "default"; | ||
69 | |||
70 | lan0_pins: lan0 { | ||
71 | intc { | ||
72 | renesas,groups = "intc_irq1_b"; | ||
73 | renesas,function = "intc"; | ||
74 | }; | ||
75 | lbsc { | ||
76 | renesas,groups = "lbsc_ex_cs0"; | ||
77 | renesas,function = "lbsc"; | ||
78 | }; | ||
79 | }; | ||
80 | |||
81 | scif2_pins: scif2 { | ||
82 | renesas,groups = "scif2_data_c"; | ||
83 | renesas,function = "scif2"; | ||
84 | }; | ||
85 | |||
86 | scif4_pins: scif4 { | ||
87 | renesas,groups = "scif4_data"; | ||
88 | renesas,function = "scif4"; | ||
89 | }; | ||
90 | |||
91 | sdhi0_pins: sdhi0 { | ||
92 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd", | ||
93 | "sdhi0_wp"; | ||
94 | renesas,function = "sdhi0"; | ||
95 | }; | ||
47 | }; | 96 | }; |
diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi index 7f146c6bf756..e9fbe3d572d7 100644 --- a/arch/arm/boot/dts/r8a7779.dtsi +++ b/arch/arm/boot/dts/r8a7779.dtsi | |||
@@ -48,6 +48,90 @@ | |||
48 | <0xf0000100 0x100>; | 48 | <0xf0000100 0x100>; |
49 | }; | 49 | }; |
50 | 50 | ||
51 | gpio0: gpio@ffc40000 { | ||
52 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; | ||
53 | reg = <0xffc40000 0x2c>; | ||
54 | interrupt-parent = <&gic>; | ||
55 | interrupts = <0 141 0x4>; | ||
56 | #gpio-cells = <2>; | ||
57 | gpio-controller; | ||
58 | gpio-ranges = <&pfc 0 0 32>; | ||
59 | #interrupt-cells = <2>; | ||
60 | interrupt-controller; | ||
61 | }; | ||
62 | |||
63 | gpio1: gpio@ffc41000 { | ||
64 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; | ||
65 | reg = <0xffc41000 0x2c>; | ||
66 | interrupt-parent = <&gic>; | ||
67 | interrupts = <0 142 0x4>; | ||
68 | #gpio-cells = <2>; | ||
69 | gpio-controller; | ||
70 | gpio-ranges = <&pfc 0 32 32>; | ||
71 | #interrupt-cells = <2>; | ||
72 | interrupt-controller; | ||
73 | }; | ||
74 | |||
75 | gpio2: gpio@ffc42000 { | ||
76 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; | ||
77 | reg = <0xffc42000 0x2c>; | ||
78 | interrupt-parent = <&gic>; | ||
79 | interrupts = <0 143 0x4>; | ||
80 | #gpio-cells = <2>; | ||
81 | gpio-controller; | ||
82 | gpio-ranges = <&pfc 0 64 32>; | ||
83 | #interrupt-cells = <2>; | ||
84 | interrupt-controller; | ||
85 | }; | ||
86 | |||
87 | gpio3: gpio@ffc43000 { | ||
88 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; | ||
89 | reg = <0xffc43000 0x2c>; | ||
90 | interrupt-parent = <&gic>; | ||
91 | interrupts = <0 144 0x4>; | ||
92 | #gpio-cells = <2>; | ||
93 | gpio-controller; | ||
94 | gpio-ranges = <&pfc 0 96 32>; | ||
95 | #interrupt-cells = <2>; | ||
96 | interrupt-controller; | ||
97 | }; | ||
98 | |||
99 | gpio4: gpio@ffc44000 { | ||
100 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; | ||
101 | reg = <0xffc44000 0x2c>; | ||
102 | interrupt-parent = <&gic>; | ||
103 | interrupts = <0 145 0x4>; | ||
104 | #gpio-cells = <2>; | ||
105 | gpio-controller; | ||
106 | gpio-ranges = <&pfc 0 128 32>; | ||
107 | #interrupt-cells = <2>; | ||
108 | interrupt-controller; | ||
109 | }; | ||
110 | |||
111 | gpio5: gpio@ffc45000 { | ||
112 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; | ||
113 | reg = <0xffc45000 0x2c>; | ||
114 | interrupt-parent = <&gic>; | ||
115 | interrupts = <0 146 0x4>; | ||
116 | #gpio-cells = <2>; | ||
117 | gpio-controller; | ||
118 | gpio-ranges = <&pfc 0 160 32>; | ||
119 | #interrupt-cells = <2>; | ||
120 | interrupt-controller; | ||
121 | }; | ||
122 | |||
123 | gpio6: gpio@ffc46000 { | ||
124 | compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar"; | ||
125 | reg = <0xffc46000 0x2c>; | ||
126 | interrupt-parent = <&gic>; | ||
127 | interrupts = <0 147 0x4>; | ||
128 | #gpio-cells = <2>; | ||
129 | gpio-controller; | ||
130 | gpio-ranges = <&pfc 0 192 9>; | ||
131 | #interrupt-cells = <2>; | ||
132 | interrupt-controller; | ||
133 | }; | ||
134 | |||
51 | irqpin0: irqpin@fe780010 { | 135 | irqpin0: irqpin@fe780010 { |
52 | compatible = "renesas,intc-irqpin"; | 136 | compatible = "renesas,intc-irqpin"; |
53 | #interrupt-cells = <2>; | 137 | #interrupt-cells = <2>; |
@@ -101,6 +185,12 @@ | |||
101 | interrupts = <0 81 0x4>; | 185 | interrupts = <0 81 0x4>; |
102 | }; | 186 | }; |
103 | 187 | ||
188 | pfc: pfc@fffc0000 { | ||
189 | compatible = "renesas,pfc-r8a7779"; | ||
190 | reg = <0xfffc0000 0x23c>; | ||
191 | #gpio-range-cells = <3>; | ||
192 | }; | ||
193 | |||
104 | thermal@ffc48000 { | 194 | thermal@ffc48000 { |
105 | compatible = "renesas,rcar-thermal"; | 195 | compatible = "renesas,rcar-thermal"; |
106 | reg = <0xffc48000 0x38>; | 196 | reg = <0xffc48000 0x38>; |
diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index 339d9b11721c..3b879e7c697c 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi | |||
@@ -38,6 +38,78 @@ | |||
38 | interrupts = <1 9 0xf04>; | 38 | interrupts = <1 9 0xf04>; |
39 | }; | 39 | }; |
40 | 40 | ||
41 | gpio0: gpio@ffc40000 { | ||
42 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | ||
43 | reg = <0 0xffc40000 0 0x2c>; | ||
44 | interrupt-parent = <&gic>; | ||
45 | interrupts = <0 4 0x4>; | ||
46 | #gpio-cells = <2>; | ||
47 | gpio-controller; | ||
48 | gpio-ranges = <&pfc 0 0 32>; | ||
49 | #interrupt-cells = <2>; | ||
50 | interrupt-controller; | ||
51 | }; | ||
52 | |||
53 | gpio1: gpio@ffc41000 { | ||
54 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | ||
55 | reg = <0 0xffc41000 0 0x2c>; | ||
56 | interrupt-parent = <&gic>; | ||
57 | interrupts = <0 5 0x4>; | ||
58 | #gpio-cells = <2>; | ||
59 | gpio-controller; | ||
60 | gpio-ranges = <&pfc 0 32 32>; | ||
61 | #interrupt-cells = <2>; | ||
62 | interrupt-controller; | ||
63 | }; | ||
64 | |||
65 | gpio2: gpio@ffc42000 { | ||
66 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | ||
67 | reg = <0 0xffc42000 0 0x2c>; | ||
68 | interrupt-parent = <&gic>; | ||
69 | interrupts = <0 6 0x4>; | ||
70 | #gpio-cells = <2>; | ||
71 | gpio-controller; | ||
72 | gpio-ranges = <&pfc 0 64 32>; | ||
73 | #interrupt-cells = <2>; | ||
74 | interrupt-controller; | ||
75 | }; | ||
76 | |||
77 | gpio3: gpio@ffc43000 { | ||
78 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | ||
79 | reg = <0 0xffc43000 0 0x2c>; | ||
80 | interrupt-parent = <&gic>; | ||
81 | interrupts = <0 7 0x4>; | ||
82 | #gpio-cells = <2>; | ||
83 | gpio-controller; | ||
84 | gpio-ranges = <&pfc 0 96 32>; | ||
85 | #interrupt-cells = <2>; | ||
86 | interrupt-controller; | ||
87 | }; | ||
88 | |||
89 | gpio4: gpio@ffc44000 { | ||
90 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | ||
91 | reg = <0 0xffc44000 0 0x2c>; | ||
92 | interrupt-parent = <&gic>; | ||
93 | interrupts = <0 8 0x4>; | ||
94 | #gpio-cells = <2>; | ||
95 | gpio-controller; | ||
96 | gpio-ranges = <&pfc 0 128 32>; | ||
97 | #interrupt-cells = <2>; | ||
98 | interrupt-controller; | ||
99 | }; | ||
100 | |||
101 | gpio5: gpio@ffc45000 { | ||
102 | compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar"; | ||
103 | reg = <0 0xffc45000 0 0x2c>; | ||
104 | interrupt-parent = <&gic>; | ||
105 | interrupts = <0 9 0x4>; | ||
106 | #gpio-cells = <2>; | ||
107 | gpio-controller; | ||
108 | gpio-ranges = <&pfc 0 160 32>; | ||
109 | #interrupt-cells = <2>; | ||
110 | interrupt-controller; | ||
111 | }; | ||
112 | |||
41 | timer { | 113 | timer { |
42 | compatible = "arm,armv7-timer"; | 114 | compatible = "arm,armv7-timer"; |
43 | interrupts = <1 13 0xf08>, | 115 | interrupts = <1 13 0xf08>, |
@@ -54,4 +126,64 @@ | |||
54 | interrupt-parent = <&gic>; | 126 | interrupt-parent = <&gic>; |
55 | interrupts = <0 0 4>, <0 1 4>, <0 2 4>, <0 3 4>; | 127 | interrupts = <0 0 4>, <0 1 4>, <0 2 4>, <0 3 4>; |
56 | }; | 128 | }; |
129 | |||
130 | mmcif0: mmcif@ee200000 { | ||
131 | compatible = "renesas,sh-mmcif"; | ||
132 | reg = <0 0xee200000 0 0x80>; | ||
133 | interrupt-parent = <&gic>; | ||
134 | interrupts = <0 169 0x4>; | ||
135 | reg-io-width = <4>; | ||
136 | status = "disabled"; | ||
137 | }; | ||
138 | |||
139 | mmcif1: mmcif@ee220000 { | ||
140 | compatible = "renesas,sh-mmcif"; | ||
141 | reg = <0 0xee220000 0 0x80>; | ||
142 | interrupt-parent = <&gic>; | ||
143 | interrupts = <0 170 0x4>; | ||
144 | reg-io-width = <4>; | ||
145 | status = "disabled"; | ||
146 | }; | ||
147 | |||
148 | pfc: pfc@e6060000 { | ||
149 | compatible = "renesas,pfc-r8a7790"; | ||
150 | reg = <0 0xe6060000 0 0x250>; | ||
151 | #gpio-range-cells = <3>; | ||
152 | }; | ||
153 | |||
154 | sdhi0: sdhi@ee100000 { | ||
155 | compatible = "renesas,r8a7790-sdhi"; | ||
156 | reg = <0 0xee100000 0 0x100>; | ||
157 | interrupt-parent = <&gic>; | ||
158 | interrupts = <0 165 4>; | ||
159 | cap-sd-highspeed; | ||
160 | status = "disabled"; | ||
161 | }; | ||
162 | |||
163 | sdhi1: sdhi@ee120000 { | ||
164 | compatible = "renesas,r8a7790-sdhi"; | ||
165 | reg = <0 0xee120000 0 0x100>; | ||
166 | interrupt-parent = <&gic>; | ||
167 | interrupts = <0 166 4>; | ||
168 | cap-sd-highspeed; | ||
169 | status = "disabled"; | ||
170 | }; | ||
171 | |||
172 | sdhi2: sdhi@ee140000 { | ||
173 | compatible = "renesas,r8a7790-sdhi"; | ||
174 | reg = <0 0xee140000 0 0x100>; | ||
175 | interrupt-parent = <&gic>; | ||
176 | interrupts = <0 167 4>; | ||
177 | cap-sd-highspeed; | ||
178 | status = "disabled"; | ||
179 | }; | ||
180 | |||
181 | sdhi3: sdhi@ee160000 { | ||
182 | compatible = "renesas,r8a7790-sdhi"; | ||
183 | reg = <0 0xee160000 0 0x100>; | ||
184 | interrupt-parent = <&gic>; | ||
185 | interrupts = <0 168 4>; | ||
186 | cap-sd-highspeed; | ||
187 | status = "disabled"; | ||
188 | }; | ||
57 | }; | 189 | }; |
diff --git a/arch/arm/boot/dts/sh7372.dtsi b/arch/arm/boot/dts/sh7372.dtsi index 7bf020ecadf5..249f65be2a50 100644 --- a/arch/arm/boot/dts/sh7372.dtsi +++ b/arch/arm/boot/dts/sh7372.dtsi | |||
@@ -23,4 +23,12 @@ | |||
23 | reg = <0x0>; | 23 | reg = <0x0>; |
24 | }; | 24 | }; |
25 | }; | 25 | }; |
26 | |||
27 | pfc: pfc@e6050000 { | ||
28 | compatible = "renesas,pfc-sh7372"; | ||
29 | reg = <0xe6050000 0x8000>, | ||
30 | <0xe605801c 0x1c>; | ||
31 | gpio-controller; | ||
32 | #gpio-cells = <2>; | ||
33 | }; | ||
26 | }; | 34 | }; |
diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts index b6f759e830ed..b99e890def54 100644 --- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts +++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | /dts-v1/; | 14 | /dts-v1/; |
15 | /include/ "sh73a0.dtsi" | 15 | /include/ "sh73a0.dtsi" |
16 | #include <dt-bindings/gpio/gpio.h> | ||
16 | 17 | ||
17 | / { | 18 | / { |
18 | model = "KZM-A9-GT"; | 19 | model = "KZM-A9-GT"; |
@@ -58,6 +59,24 @@ | |||
58 | regulator-boot-on; | 59 | regulator-boot-on; |
59 | }; | 60 | }; |
60 | 61 | ||
62 | vmmc_sdhi0: regulator@2 { | ||
63 | compatible = "regulator-fixed"; | ||
64 | regulator-name = "SDHI0 Vcc"; | ||
65 | regulator-min-microvolt = <3300000>; | ||
66 | regulator-max-microvolt = <3300000>; | ||
67 | gpio = <&pfc 15 GPIO_ACTIVE_HIGH>; | ||
68 | enable-active-high; | ||
69 | }; | ||
70 | |||
71 | vmmc_sdhi2: regulator@3 { | ||
72 | compatible = "regulator-fixed"; | ||
73 | regulator-name = "SDHI2 Vcc"; | ||
74 | regulator-min-microvolt = <3300000>; | ||
75 | regulator-max-microvolt = <3300000>; | ||
76 | gpio = <&pfc 14 GPIO_ACTIVE_HIGH>; | ||
77 | enable-active-high; | ||
78 | }; | ||
79 | |||
61 | lan9220@10000000 { | 80 | lan9220@10000000 { |
62 | compatible = "smsc,lan9220", "smsc,lan9115"; | 81 | compatible = "smsc,lan9220", "smsc,lan9115"; |
63 | reg = <0x10000000 0x100>; | 82 | reg = <0x10000000 0x100>; |
@@ -70,6 +89,22 @@ | |||
70 | vddvario-supply = <®_1p8v>; | 89 | vddvario-supply = <®_1p8v>; |
71 | vdd33a-supply = <®_3p3v>; | 90 | vdd33a-supply = <®_3p3v>; |
72 | }; | 91 | }; |
92 | |||
93 | leds { | ||
94 | compatible = "gpio-leds"; | ||
95 | led1 { | ||
96 | gpios = <&pfc 20 GPIO_ACTIVE_LOW>; | ||
97 | }; | ||
98 | led2 { | ||
99 | gpios = <&pfc 21 GPIO_ACTIVE_LOW>; | ||
100 | }; | ||
101 | led3 { | ||
102 | gpios = <&pfc 22 GPIO_ACTIVE_LOW>; | ||
103 | }; | ||
104 | led4 { | ||
105 | gpios = <&pfc 23 GPIO_ACTIVE_LOW>; | ||
106 | }; | ||
107 | }; | ||
73 | }; | 108 | }; |
74 | 109 | ||
75 | &i2c0 { | 110 | &i2c0 { |
@@ -145,20 +180,71 @@ | |||
145 | }; | 180 | }; |
146 | }; | 181 | }; |
147 | 182 | ||
183 | &i2c3 { | ||
184 | pinctrl-0 = <&i2c3_pins>; | ||
185 | pinctrl-names = "default"; | ||
186 | }; | ||
187 | |||
148 | &mmcif { | 188 | &mmcif { |
189 | pinctrl-0 = <&mmcif_pins>; | ||
190 | pinctrl-names = "default"; | ||
191 | |||
149 | bus-width = <8>; | 192 | bus-width = <8>; |
150 | vmmc-supply = <®_1p8v>; | 193 | vmmc-supply = <®_1p8v>; |
151 | status = "okay"; | 194 | status = "okay"; |
152 | }; | 195 | }; |
153 | 196 | ||
197 | &pfc { | ||
198 | pinctrl-0 = <&scifa4_pins>; | ||
199 | pinctrl-names = "default"; | ||
200 | |||
201 | i2c3_pins: i2c3 { | ||
202 | renesas,groups = "i2c3_1"; | ||
203 | renesas,function = "i2c3"; | ||
204 | }; | ||
205 | |||
206 | mmcif_pins: mmcif { | ||
207 | mux { | ||
208 | renesas,groups = "mmc0_data8_0", "mmc0_ctrl_0"; | ||
209 | renesas,function = "mmc0"; | ||
210 | }; | ||
211 | cfg { | ||
212 | renesas,groups = "mmc0_data8_0"; | ||
213 | renesas,pins = "PORT279"; | ||
214 | bias-pull-up; | ||
215 | }; | ||
216 | }; | ||
217 | |||
218 | scifa4_pins: scifa4 { | ||
219 | renesas,groups = "scifa4_data", "scifa4_ctrl"; | ||
220 | renesas,function = "scifa4"; | ||
221 | }; | ||
222 | |||
223 | sdhi0_pins: sdhi0 { | ||
224 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd", "sdhi0_wp"; | ||
225 | renesas,function = "sdhi0"; | ||
226 | }; | ||
227 | |||
228 | sdhi2_pins: sdhi2 { | ||
229 | renesas,groups = "sdhi2_data4", "sdhi2_ctrl"; | ||
230 | renesas,function = "sdhi2"; | ||
231 | }; | ||
232 | }; | ||
233 | |||
154 | &sdhi0 { | 234 | &sdhi0 { |
155 | vmmc-supply = <®_3p3v>; | 235 | pinctrl-0 = <&sdhi0_pins>; |
236 | pinctrl-names = "default"; | ||
237 | |||
238 | vmmc-supply = <&vmmc_sdhi0>; | ||
156 | bus-width = <4>; | 239 | bus-width = <4>; |
157 | status = "okay"; | 240 | status = "okay"; |
158 | }; | 241 | }; |
159 | 242 | ||
160 | &sdhi2 { | 243 | &sdhi2 { |
161 | vmmc-supply = <®_3p3v>; | 244 | pinctrl-0 = <&sdhi2_pins>; |
245 | pinctrl-names = "default"; | ||
246 | |||
247 | vmmc-supply = <&vmmc_sdhi2>; | ||
162 | bus-width = <4>; | 248 | bus-width = <4>; |
163 | broken-cd; | 249 | broken-cd; |
164 | status = "okay"; | 250 | status = "okay"; |
diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi index b97750256003..86e79feb7560 100644 --- a/arch/arm/boot/dts/sh73a0.dtsi +++ b/arch/arm/boot/dts/sh73a0.dtsi | |||
@@ -222,4 +222,12 @@ | |||
222 | cap-sd-highspeed; | 222 | cap-sd-highspeed; |
223 | status = "disabled"; | 223 | status = "disabled"; |
224 | }; | 224 | }; |
225 | |||
226 | pfc: pfc@e6050000 { | ||
227 | compatible = "renesas,pfc-sh73a0"; | ||
228 | reg = <0xe6050000 0x8000>, | ||
229 | <0xe605801c 0x1c>; | ||
230 | gpio-controller; | ||
231 | #gpio-cells = <2>; | ||
232 | }; | ||
225 | }; | 233 | }; |
diff --git a/arch/arm/mach-pxa/pxa-dt.c b/arch/arm/mach-pxa/pxa-dt.c index 3835979a0dd3..f6a2c4b1c1dc 100644 --- a/arch/arm/mach-pxa/pxa-dt.c +++ b/arch/arm/mach-pxa/pxa-dt.c | |||
@@ -28,7 +28,7 @@ static const struct of_dev_auxdata pxa3xx_auxdata_lookup[] __initconst = { | |||
28 | OF_DEV_AUXDATA("mrvl,pxa-uart", 0x40700000, "pxa2xx-uart.2", NULL), | 28 | OF_DEV_AUXDATA("mrvl,pxa-uart", 0x40700000, "pxa2xx-uart.2", NULL), |
29 | OF_DEV_AUXDATA("mrvl,pxa-uart", 0x41600000, "pxa2xx-uart.3", NULL), | 29 | OF_DEV_AUXDATA("mrvl,pxa-uart", 0x41600000, "pxa2xx-uart.3", NULL), |
30 | OF_DEV_AUXDATA("marvell,pxa-mmc", 0x41100000, "pxa2xx-mci.0", NULL), | 30 | OF_DEV_AUXDATA("marvell,pxa-mmc", 0x41100000, "pxa2xx-mci.0", NULL), |
31 | OF_DEV_AUXDATA("mrvl,pxa-gpio", 0x40e00000, "pxa-gpio", NULL), | 31 | OF_DEV_AUXDATA("intel,pxa3xx-gpio", 0x40e00000, "pxa3xx-gpio", NULL), |
32 | OF_DEV_AUXDATA("marvell,pxa-ohci", 0x4c000000, "pxa27x-ohci", NULL), | 32 | OF_DEV_AUXDATA("marvell,pxa-ohci", 0x4c000000, "pxa27x-ohci", NULL), |
33 | OF_DEV_AUXDATA("mrvl,pxa-i2c", 0x40301680, "pxa2xx-i2c.0", NULL), | 33 | OF_DEV_AUXDATA("mrvl,pxa-i2c", 0x40301680, "pxa2xx-i2c.0", NULL), |
34 | OF_DEV_AUXDATA("mrvl,pwri2c", 0x40f500c0, "pxa3xx-i2c.1", NULL), | 34 | OF_DEV_AUXDATA("mrvl,pwri2c", 0x40f500c0, "pxa3xx-i2c.1", NULL), |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 3912ce91fee4..cdefd7dcca79 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -1,3 +1,41 @@ | |||
1 | config ARCH_SHMOBILE_MULTI | ||
2 | bool "SH-Mobile Series" if ARCH_MULTI_V7 | ||
3 | depends on MMU | ||
4 | select CPU_V7 | ||
5 | select GENERIC_CLOCKEVENTS | ||
6 | select HAVE_ARM_SCU if SMP | ||
7 | select HAVE_ARM_TWD if LOCAL_TIMERS | ||
8 | select HAVE_SMP | ||
9 | select ARM_GIC | ||
10 | select MIGHT_HAVE_CACHE_L2X0 | ||
11 | select NO_IOPORT | ||
12 | select PINCTRL | ||
13 | select ARCH_REQUIRE_GPIOLIB | ||
14 | select CLKDEV_LOOKUP | ||
15 | |||
16 | if ARCH_SHMOBILE_MULTI | ||
17 | |||
18 | comment "SH-Mobile System Type" | ||
19 | |||
20 | config ARCH_EMEV2 | ||
21 | bool "Emma Mobile EV2" | ||
22 | |||
23 | comment "SH-Mobile Board Type" | ||
24 | |||
25 | config MACH_KZM9D_REFERENCE | ||
26 | bool "KZM9D board - Reference Device Tree Implementation" | ||
27 | depends on ARCH_EMEV2 | ||
28 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
29 | ---help--- | ||
30 | Use reference implementation of KZM9D board support | ||
31 | which makes a greater use of device tree at the expense | ||
32 | of not supporting a number of devices. | ||
33 | |||
34 | This is intended to aid developers | ||
35 | |||
36 | comment "SH-Mobile System Configuration" | ||
37 | endif | ||
38 | |||
1 | if ARCH_SHMOBILE | 39 | if ARCH_SHMOBILE |
2 | 40 | ||
3 | comment "SH-Mobile System Type" | 41 | comment "SH-Mobile System Type" |
@@ -156,6 +194,18 @@ config MACH_KZM9D | |||
156 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 194 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
157 | select USE_OF | 195 | select USE_OF |
158 | 196 | ||
197 | config MACH_KZM9D_REFERENCE | ||
198 | bool "KZM9D board - Reference Device Tree Implementation" | ||
199 | depends on ARCH_EMEV2 | ||
200 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
201 | select USE_OF | ||
202 | ---help--- | ||
203 | Use reference implementation of KZM9D board support | ||
204 | which makes a greater use of device tree at the expense | ||
205 | of not supporting a number of devices. | ||
206 | |||
207 | This is intended to aid developers | ||
208 | |||
159 | config MACH_KZM9G | 209 | config MACH_KZM9G |
160 | bool "KZM-A9-GT board" | 210 | bool "KZM-A9-GT board" |
161 | depends on ARCH_SH73A0 | 211 | depends on ARCH_SH73A0 |
@@ -186,6 +236,15 @@ config CPU_HAS_INTEVT | |||
186 | bool | 236 | bool |
187 | default y | 237 | default y |
188 | 238 | ||
239 | config SH_CLK_CPG | ||
240 | bool | ||
241 | |||
242 | source "drivers/sh/Kconfig" | ||
243 | |||
244 | endif | ||
245 | |||
246 | if ARCH_SHMOBILE || ARCH_SHMOBILE_MULTI | ||
247 | |||
189 | menu "Timer and clock configuration" | 248 | menu "Timer and clock configuration" |
190 | 249 | ||
191 | config SHMOBILE_TIMER_HZ | 250 | config SHMOBILE_TIMER_HZ |
@@ -220,9 +279,4 @@ config EM_TIMER_STI | |||
220 | 279 | ||
221 | endmenu | 280 | endmenu |
222 | 281 | ||
223 | config SH_CLK_CPG | ||
224 | bool | ||
225 | |||
226 | source "drivers/sh/Kconfig" | ||
227 | |||
228 | endif | 282 | endif |
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index 6165a517f580..b150c4508237 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -2,18 +2,33 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/arch/arm/mach-shmobile/include | ||
6 | |||
5 | # Common objects | 7 | # Common objects |
6 | obj-y := timer.o console.o clock.o | 8 | obj-y := timer.o console.o |
7 | 9 | ||
8 | # CPU objects | 10 | # CPU objects |
9 | obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o clock-sh7372.o intc-sh7372.o | 11 | obj-$(CONFIG_ARCH_SH7372) += setup-sh7372.o intc-sh7372.o |
10 | obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o clock-sh73a0.o intc-sh73a0.o | 12 | obj-$(CONFIG_ARCH_SH73A0) += setup-sh73a0.o intc-sh73a0.o |
11 | obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o clock-r8a73a4.o | 13 | obj-$(CONFIG_ARCH_R8A73A4) += setup-r8a73a4.o |
12 | obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o clock-r8a7740.o intc-r8a7740.o | 14 | obj-$(CONFIG_ARCH_R8A7740) += setup-r8a7740.o intc-r8a7740.o |
13 | obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o clock-r8a7778.o | 15 | obj-$(CONFIG_ARCH_R8A7778) += setup-r8a7778.o |
14 | obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o clock-r8a7779.o intc-r8a7779.o | 16 | obj-$(CONFIG_ARCH_R8A7779) += setup-r8a7779.o intc-r8a7779.o |
15 | obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o clock-r8a7790.o | 17 | obj-$(CONFIG_ARCH_R8A7790) += setup-r8a7790.o |
16 | obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o clock-emev2.o | 18 | obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o |
19 | |||
20 | # Clock objects | ||
21 | ifndef CONFIG_COMMON_CLK | ||
22 | obj-y += clock.o | ||
23 | obj-$(CONFIG_ARCH_SH7372) += clock-sh7372.o | ||
24 | obj-$(CONFIG_ARCH_SH73A0) += clock-sh73a0.o | ||
25 | obj-$(CONFIG_ARCH_R8A73A4) += clock-r8a73a4.o | ||
26 | obj-$(CONFIG_ARCH_R8A7740) += clock-r8a7740.o | ||
27 | obj-$(CONFIG_ARCH_R8A7778) += clock-r8a7778.o | ||
28 | obj-$(CONFIG_ARCH_R8A7779) += clock-r8a7779.o | ||
29 | obj-$(CONFIG_ARCH_R8A7790) += clock-r8a7790.o | ||
30 | obj-$(CONFIG_ARCH_EMEV2) += clock-emev2.o | ||
31 | endif | ||
17 | 32 | ||
18 | # SMP objects | 33 | # SMP objects |
19 | smp-y := platsmp.o headsmp.o | 34 | smp-y := platsmp.o headsmp.o |
@@ -46,6 +61,7 @@ obj-$(CONFIG_MACH_LAGER) += board-lager.o | |||
46 | obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o | 61 | obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o |
47 | obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o | 62 | obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o |
48 | obj-$(CONFIG_MACH_KZM9D) += board-kzm9d.o | 63 | obj-$(CONFIG_MACH_KZM9D) += board-kzm9d.o |
64 | obj-$(CONFIG_MACH_KZM9D_REFERENCE) += board-kzm9d-reference.o | ||
49 | obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o | 65 | obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o |
50 | obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o | 66 | obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o |
51 | 67 | ||
diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot index 84c6868580f0..7785c52b5cfd 100644 --- a/arch/arm/mach-shmobile/Makefile.boot +++ b/arch/arm/mach-shmobile/Makefile.boot | |||
@@ -7,6 +7,7 @@ loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000 | |||
7 | loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 | 7 | loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 |
8 | loadaddr-$(CONFIG_MACH_KOTA2) += 0x41008000 | 8 | loadaddr-$(CONFIG_MACH_KOTA2) += 0x41008000 |
9 | loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000 | 9 | loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000 |
10 | loadaddr-$(CONFIG_MACH_KZM9D_REFERENCE) += 0x40008000 | ||
10 | loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 | 11 | loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 |
11 | loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 | 12 | loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 |
12 | loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 | 13 | loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 |
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c index 5eb0caa6a7d0..1fbc39a14e25 100644 --- a/arch/arm/mach-shmobile/board-ape6evm.c +++ b/arch/arm/mach-shmobile/board-ape6evm.c | |||
@@ -20,7 +20,6 @@ | |||
20 | 20 | ||
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
23 | #include <linux/irqchip.h> | ||
24 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
25 | #include <linux/pinctrl/machine.h> | 24 | #include <linux/pinctrl/machine.h> |
26 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
@@ -102,7 +101,6 @@ static const char *ape6evm_boards_compat_dt[] __initdata = { | |||
102 | }; | 101 | }; |
103 | 102 | ||
104 | DT_MACHINE_START(APE6EVM_DT, "ape6evm") | 103 | DT_MACHINE_START(APE6EVM_DT, "ape6evm") |
105 | .init_irq = irqchip_init, | ||
106 | .init_time = shmobile_timer_init, | 104 | .init_time = shmobile_timer_init, |
107 | .init_machine = ape6evm_add_standard_devices, | 105 | .init_machine = ape6evm_add_standard_devices, |
108 | .dt_compat = ape6evm_boards_compat_dt, | 106 | .dt_compat = ape6evm_boards_compat_dt, |
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c index 03b85fec2ddb..002d8d3d0fc5 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/pinctrl/machine.h> | ||
28 | #include <mach/common.h> | 27 | #include <mach/common.h> |
29 | #include <mach/r8a7740.h> | 28 | #include <mach/r8a7740.h> |
30 | #include <asm/mach/arch.h> | 29 | #include <asm/mach/arch.h> |
@@ -119,12 +118,6 @@ | |||
119 | * usbhsf_power_ctrl() | 118 | * usbhsf_power_ctrl() |
120 | */ | 119 | */ |
121 | 120 | ||
122 | static const struct pinctrl_map eva_pinctrl_map[] = { | ||
123 | /* SCIFA1 */ | ||
124 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.1", "pfc-r8a7740", | ||
125 | "scifa1_data", "scifa1"), | ||
126 | }; | ||
127 | |||
128 | static void __init eva_clock_init(void) | 121 | static void __init eva_clock_init(void) |
129 | { | 122 | { |
130 | struct clk *system = clk_get(NULL, "system_clk"); | 123 | struct clk *system = clk_get(NULL, "system_clk"); |
@@ -165,27 +158,18 @@ clock_error: | |||
165 | */ | 158 | */ |
166 | static void __init eva_init(void) | 159 | static void __init eva_init(void) |
167 | { | 160 | { |
168 | |||
169 | r8a7740_clock_init(MD_CK0 | MD_CK2); | 161 | r8a7740_clock_init(MD_CK0 | MD_CK2); |
170 | eva_clock_init(); | 162 | eva_clock_init(); |
171 | 163 | ||
172 | pinctrl_register_mappings(eva_pinctrl_map, ARRAY_SIZE(eva_pinctrl_map)); | ||
173 | r8a7740_pinmux_init(); | ||
174 | |||
175 | r8a7740_meram_workaround(); | 164 | r8a7740_meram_workaround(); |
176 | 165 | ||
177 | /* | ||
178 | * Touchscreen | ||
179 | * TODO: Move reset GPIO over to .dts when we can reference it | ||
180 | */ | ||
181 | gpio_request_one(166, GPIOF_OUT_INIT_HIGH, NULL); /* TP_RST_B */ | ||
182 | |||
183 | #ifdef CONFIG_CACHE_L2X0 | 166 | #ifdef CONFIG_CACHE_L2X0 |
184 | /* Early BRESP enable, Shared attribute override enable, 32K*8way */ | 167 | /* Early BRESP enable, Shared attribute override enable, 32K*8way */ |
185 | l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff); | 168 | l2x0_init(IOMEM(0xf0002000), 0x40440000, 0x82000fff); |
186 | #endif | 169 | #endif |
187 | 170 | ||
188 | r8a7740_add_standard_devices_dt(); | 171 | r8a7740_add_standard_devices_dt(); |
172 | |||
189 | r8a7740_pm_init(); | 173 | r8a7740_pm_init(); |
190 | } | 174 | } |
191 | 175 | ||
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index c5be60d85e4b..f6952c266fe9 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c | |||
@@ -679,15 +679,6 @@ static struct platform_device vcc_sdhi1 = { | |||
679 | }; | 679 | }; |
680 | 680 | ||
681 | /* SDHI0 */ | 681 | /* SDHI0 */ |
682 | /* | ||
683 | * FIXME | ||
684 | * | ||
685 | * It use polling mode here, since | ||
686 | * CD (= Card Detect) pin is not connected to SDHI0_CD. | ||
687 | * We can use IRQ31 as card detect irq, | ||
688 | * but it needs chattering removal operation | ||
689 | */ | ||
690 | #define IRQ31 irq_pin(31) | ||
691 | static struct sh_mobile_sdhi_info sdhi0_info = { | 682 | static struct sh_mobile_sdhi_info sdhi0_info = { |
692 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, | 683 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, |
693 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, | 684 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, |
diff --git a/arch/arm/mach-shmobile/board-kzm9d-reference.c b/arch/arm/mach-shmobile/board-kzm9d-reference.c new file mode 100644 index 000000000000..8f8bb2fab076 --- /dev/null +++ b/arch/arm/mach-shmobile/board-kzm9d-reference.c | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * kzm9d board support - Reference DT implementation | ||
3 | * | ||
4 | * Copyright (C) 2013 Renesas Solutions Corp. | ||
5 | * Copyright (C) 2013 Magnus Damm | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | |||
21 | #include <linux/init.h> | ||
22 | #include <linux/of_platform.h> | ||
23 | #include <mach/emev2.h> | ||
24 | #include <mach/common.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | |||
27 | static void __init kzm9d_add_standard_devices(void) | ||
28 | { | ||
29 | if (!IS_ENABLED(CONFIG_COMMON_CLK)) | ||
30 | emev2_clock_init(); | ||
31 | |||
32 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
33 | } | ||
34 | |||
35 | static const char *kzm9d_boards_compat_dt[] __initdata = { | ||
36 | "renesas,kzm9d-reference", | ||
37 | NULL, | ||
38 | }; | ||
39 | |||
40 | DT_MACHINE_START(KZM9D_DT, "kzm9d") | ||
41 | .smp = smp_ops(emev2_smp_ops), | ||
42 | .map_io = emev2_map_io, | ||
43 | .init_early = emev2_init_delay, | ||
44 | .init_machine = kzm9d_add_standard_devices, | ||
45 | .init_late = shmobile_init_late, | ||
46 | .dt_compat = kzm9d_boards_compat_dt, | ||
47 | MACHINE_END | ||
diff --git a/arch/arm/mach-shmobile/board-kzm9d.c b/arch/arm/mach-shmobile/board-kzm9d.c index 4368000e1127..30c2cc695b12 100644 --- a/arch/arm/mach-shmobile/board-kzm9d.c +++ b/arch/arm/mach-shmobile/board-kzm9d.c | |||
@@ -85,9 +85,7 @@ static const char *kzm9d_boards_compat_dt[] __initdata = { | |||
85 | DT_MACHINE_START(KZM9D_DT, "kzm9d") | 85 | DT_MACHINE_START(KZM9D_DT, "kzm9d") |
86 | .smp = smp_ops(emev2_smp_ops), | 86 | .smp = smp_ops(emev2_smp_ops), |
87 | .map_io = emev2_map_io, | 87 | .map_io = emev2_map_io, |
88 | .init_early = emev2_add_early_devices, | 88 | .init_early = emev2_init_delay, |
89 | .nr_irqs = NR_IRQS_LEGACY, | ||
90 | .init_irq = emev2_init_irq, | ||
91 | .init_machine = kzm9d_add_standard_devices, | 89 | .init_machine = kzm9d_add_standard_devices, |
92 | .init_late = shmobile_init_late, | 90 | .init_late = shmobile_init_late, |
93 | .dt_compat = kzm9d_boards_compat_dt, | 91 | .dt_compat = kzm9d_boards_compat_dt, |
diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c index 44055fe8a45c..a66a808db012 100644 --- a/arch/arm/mach-shmobile/board-kzm9g-reference.c +++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c | |||
@@ -21,67 +21,19 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/gpio.h> | ||
25 | #include <linux/io.h> | 24 | #include <linux/io.h> |
26 | #include <linux/irq.h> | 25 | #include <linux/irq.h> |
27 | #include <linux/irqchip.h> | ||
28 | #include <linux/input.h> | 26 | #include <linux/input.h> |
29 | #include <linux/of_platform.h> | 27 | #include <linux/of_platform.h> |
30 | #include <linux/pinctrl/machine.h> | ||
31 | #include <linux/pinctrl/pinconf-generic.h> | ||
32 | #include <mach/sh73a0.h> | 28 | #include <mach/sh73a0.h> |
33 | #include <mach/common.h> | 29 | #include <mach/common.h> |
34 | #include <asm/hardware/cache-l2x0.h> | 30 | #include <asm/hardware/cache-l2x0.h> |
35 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
36 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
37 | 33 | ||
38 | static unsigned long pin_pullup_conf[] = { | ||
39 | PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_UP, 0), | ||
40 | }; | ||
41 | |||
42 | static const struct pinctrl_map kzm_pinctrl_map[] = { | ||
43 | PIN_MAP_MUX_GROUP_DEFAULT("e6826000.i2c", "pfc-sh73a0", | ||
44 | "i2c3_1", "i2c3"), | ||
45 | /* MMCIF */ | ||
46 | PIN_MAP_MUX_GROUP_DEFAULT("e6bd0000.mmcif", "pfc-sh73a0", | ||
47 | "mmc0_data8_0", "mmc0"), | ||
48 | PIN_MAP_MUX_GROUP_DEFAULT("e6bd0000.mmcif", "pfc-sh73a0", | ||
49 | "mmc0_ctrl_0", "mmc0"), | ||
50 | PIN_MAP_CONFIGS_PIN_DEFAULT("e6bd0000.mmcif", "pfc-sh73a0", | ||
51 | "PORT279", pin_pullup_conf), | ||
52 | PIN_MAP_CONFIGS_GROUP_DEFAULT("e6bd0000.mmcif", "pfc-sh73a0", | ||
53 | "mmc0_data8_0", pin_pullup_conf), | ||
54 | /* SCIFA4 */ | ||
55 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.4", "pfc-sh73a0", | ||
56 | "scifa4_data", "scifa4"), | ||
57 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.4", "pfc-sh73a0", | ||
58 | "scifa4_ctrl", "scifa4"), | ||
59 | /* SDHI0 */ | ||
60 | PIN_MAP_MUX_GROUP_DEFAULT("ee100000.sdhi", "pfc-sh73a0", | ||
61 | "sdhi0_data4", "sdhi0"), | ||
62 | PIN_MAP_MUX_GROUP_DEFAULT("ee100000.sdhi", "pfc-sh73a0", | ||
63 | "sdhi0_ctrl", "sdhi0"), | ||
64 | PIN_MAP_MUX_GROUP_DEFAULT("ee100000.sdhi", "pfc-sh73a0", | ||
65 | "sdhi0_cd", "sdhi0"), | ||
66 | PIN_MAP_MUX_GROUP_DEFAULT("ee100000.sdhi", "pfc-sh73a0", | ||
67 | "sdhi0_wp", "sdhi0"), | ||
68 | /* SDHI2 */ | ||
69 | PIN_MAP_MUX_GROUP_DEFAULT("ee140000.sdhi", "pfc-sh73a0", | ||
70 | "sdhi2_data4", "sdhi2"), | ||
71 | PIN_MAP_MUX_GROUP_DEFAULT("ee140000.sdhi", "pfc-sh73a0", | ||
72 | "sdhi2_ctrl", "sdhi2"), | ||
73 | }; | ||
74 | |||
75 | static void __init kzm_init(void) | 34 | static void __init kzm_init(void) |
76 | { | 35 | { |
77 | sh73a0_add_standard_devices_dt(); | 36 | sh73a0_add_standard_devices_dt(); |
78 | pinctrl_register_mappings(kzm_pinctrl_map, ARRAY_SIZE(kzm_pinctrl_map)); | ||
79 | sh73a0_pinmux_init(); | ||
80 | |||
81 | /* enable SD */ | ||
82 | gpio_request_one(15, GPIOF_OUT_INIT_HIGH, NULL); /* power */ | ||
83 | |||
84 | gpio_request_one(14, GPIOF_OUT_INIT_HIGH, NULL); /* power */ | ||
85 | 37 | ||
86 | #ifdef CONFIG_CACHE_L2X0 | 38 | #ifdef CONFIG_CACHE_L2X0 |
87 | /* Early BRESP enable, Shared attribute override enable, 64K*8way */ | 39 | /* Early BRESP enable, Shared attribute override enable, 64K*8way */ |
@@ -99,7 +51,6 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g-reference") | |||
99 | .map_io = sh73a0_map_io, | 51 | .map_io = sh73a0_map_io, |
100 | .init_early = sh73a0_init_delay, | 52 | .init_early = sh73a0_init_delay, |
101 | .nr_irqs = NR_IRQS_LEGACY, | 53 | .nr_irqs = NR_IRQS_LEGACY, |
102 | .init_irq = irqchip_init, | ||
103 | .init_machine = kzm_init, | 54 | .init_machine = kzm_init, |
104 | .init_time = shmobile_timer_init, | 55 | .init_time = shmobile_timer_init, |
105 | .dt_compat = kzm9g_boards_compat_dt, | 56 | .dt_compat = kzm9g_boards_compat_dt, |
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index 8d6bd5c5efb9..78d92d34665d 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/gpio_keys.h> | 22 | #include <linux/gpio_keys.h> |
23 | #include <linux/input.h> | 23 | #include <linux/input.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/irqchip.h> | ||
26 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
27 | #include <linux/leds.h> | 26 | #include <linux/leds.h> |
28 | #include <linux/pinctrl/machine.h> | 27 | #include <linux/pinctrl/machine.h> |
@@ -103,7 +102,6 @@ static const char *lager_boards_compat_dt[] __initdata = { | |||
103 | }; | 102 | }; |
104 | 103 | ||
105 | DT_MACHINE_START(LAGER_DT, "lager") | 104 | DT_MACHINE_START(LAGER_DT, "lager") |
106 | .init_irq = irqchip_init, | ||
107 | .init_time = r8a7790_timer_init, | 105 | .init_time = r8a7790_timer_init, |
108 | .init_machine = lager_add_standard_devices, | 106 | .init_machine = lager_add_standard_devices, |
109 | .dt_compat = lager_boards_compat_dt, | 107 | .dt_compat = lager_boards_compat_dt, |
diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c index 480d882e42c7..3d1c439b4998 100644 --- a/arch/arm/mach-shmobile/board-marzen-reference.c +++ b/arch/arm/mach-shmobile/board-marzen-reference.c | |||
@@ -19,42 +19,14 @@ | |||
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/pinctrl/machine.h> | ||
23 | #include <mach/r8a7779.h> | 22 | #include <mach/r8a7779.h> |
24 | #include <mach/common.h> | 23 | #include <mach/common.h> |
25 | #include <mach/irqs.h> | 24 | #include <mach/irqs.h> |
26 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
27 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
28 | 27 | ||
29 | static const struct pinctrl_map marzen_pinctrl_map[] = { | ||
30 | /* SCIF2 (CN18: DEBUG0) */ | ||
31 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.2", "pfc-r8a7779", | ||
32 | "scif2_data_c", "scif2"), | ||
33 | /* SCIF4 (CN19: DEBUG1) */ | ||
34 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.4", "pfc-r8a7779", | ||
35 | "scif4_data", "scif4"), | ||
36 | /* SDHI0 */ | ||
37 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", | ||
38 | "sdhi0_data4", "sdhi0"), | ||
39 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", | ||
40 | "sdhi0_ctrl", "sdhi0"), | ||
41 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", | ||
42 | "sdhi0_cd", "sdhi0"), | ||
43 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779", | ||
44 | "sdhi0_wp", "sdhi0"), | ||
45 | /* SMSC */ | ||
46 | PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a7779", | ||
47 | "intc_irq1_b", "intc"), | ||
48 | PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a7779", | ||
49 | "lbsc_ex_cs0", "lbsc"), | ||
50 | }; | ||
51 | |||
52 | static void __init marzen_init(void) | 28 | static void __init marzen_init(void) |
53 | { | 29 | { |
54 | pinctrl_register_mappings(marzen_pinctrl_map, | ||
55 | ARRAY_SIZE(marzen_pinctrl_map)); | ||
56 | r8a7779_pinmux_init(); | ||
57 | |||
58 | r8a7779_add_standard_devices_dt(); | 30 | r8a7779_add_standard_devices_dt(); |
59 | } | 31 | } |
60 | 32 | ||
diff --git a/arch/arm/mach-shmobile/clock-emev2.c b/arch/arm/mach-shmobile/clock-emev2.c index 4710f1847bb7..56dd0cfcddc7 100644 --- a/arch/arm/mach-shmobile/clock-emev2.c +++ b/arch/arm/mach-shmobile/clock-emev2.c | |||
@@ -221,7 +221,7 @@ void __init emev2_clock_init(void) | |||
221 | smu_base = ioremap(EMEV2_SMU_BASE, PAGE_SIZE); | 221 | smu_base = ioremap(EMEV2_SMU_BASE, PAGE_SIZE); |
222 | BUG_ON(!smu_base); | 222 | BUG_ON(!smu_base); |
223 | 223 | ||
224 | /* setup STI timer to run on 37.768 kHz and deassert reset */ | 224 | /* setup STI timer to run on 32.768 kHz and deassert reset */ |
225 | emev2_smu_write(0, STI_CLKSEL); | 225 | emev2_smu_write(0, STI_CLKSEL); |
226 | emev2_smu_write(1, STI_RSTCTRL); | 226 | emev2_smu_write(1, STI_RSTCTRL); |
227 | 227 | ||
diff --git a/arch/arm/mach-shmobile/include/mach/dma.h b/arch/arm/mach-shmobile/include/mach/dma.h deleted file mode 100644 index 40a8c178f10d..000000000000 --- a/arch/arm/mach-shmobile/include/mach/dma.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | /* empty */ | ||
diff --git a/arch/arm/mach-shmobile/include/mach/emev2.h b/arch/arm/mach-shmobile/include/mach/emev2.h index ac3751705cab..b0ab4b72770a 100644 --- a/arch/arm/mach-shmobile/include/mach/emev2.h +++ b/arch/arm/mach-shmobile/include/mach/emev2.h | |||
@@ -2,8 +2,7 @@ | |||
2 | #define __ASM_EMEV2_H__ | 2 | #define __ASM_EMEV2_H__ |
3 | 3 | ||
4 | extern void emev2_map_io(void); | 4 | extern void emev2_map_io(void); |
5 | extern void emev2_init_irq(void); | 5 | extern void emev2_init_delay(void); |
6 | extern void emev2_add_early_devices(void); | ||
7 | extern void emev2_add_standard_devices(void); | 6 | extern void emev2_add_standard_devices(void); |
8 | extern void emev2_clock_init(void); | 7 | extern void emev2_clock_init(void); |
9 | extern void emev2_set_boot_vector(unsigned long value); | 8 | extern void emev2_set_boot_vector(unsigned long value); |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h index 851d027a2f06..9b561bf4229f 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7778.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h | |||
@@ -33,7 +33,6 @@ extern void r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info); | |||
33 | 33 | ||
34 | extern void r8a7778_init_late(void); | 34 | extern void r8a7778_init_late(void); |
35 | extern void r8a7778_init_delay(void); | 35 | extern void r8a7778_init_delay(void); |
36 | extern void r8a7778_init_irq(void); | ||
37 | extern void r8a7778_init_irq_dt(void); | 36 | extern void r8a7778_init_irq_dt(void); |
38 | extern void r8a7778_clock_init(void); | 37 | extern void r8a7778_clock_init(void); |
39 | extern void r8a7778_init_irq_extpin(int irlm); | 38 | extern void r8a7778_init_irq_extpin(int irlm); |
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c index 1ccddd228112..1553af8e04ff 100644 --- a/arch/arm/mach-shmobile/setup-emev2.c +++ b/arch/arm/mach-shmobile/setup-emev2.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/irqchip.h> | ||
24 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
25 | #include <linux/platform_data/gpio-em.h> | 24 | #include <linux/platform_data/gpio-em.h> |
26 | #include <linux/of_platform.h> | 25 | #include <linux/of_platform.h> |
@@ -39,13 +38,6 @@ | |||
39 | 38 | ||
40 | static struct map_desc emev2_io_desc[] __initdata = { | 39 | static struct map_desc emev2_io_desc[] __initdata = { |
41 | #ifdef CONFIG_SMP | 40 | #ifdef CONFIG_SMP |
42 | /* 128K entity map for 0xe0100000 (SMU) */ | ||
43 | { | ||
44 | .virtual = 0xe0100000, | ||
45 | .pfn = __phys_to_pfn(0xe0100000), | ||
46 | .length = SZ_128K, | ||
47 | .type = MT_DEVICE | ||
48 | }, | ||
49 | /* 2M mapping for SCU + L2 controller */ | 41 | /* 2M mapping for SCU + L2 controller */ |
50 | { | 42 | { |
51 | .virtual = 0xf0000000, | 43 | .virtual = 0xf0000000, |
@@ -63,102 +55,40 @@ void __init emev2_map_io(void) | |||
63 | 55 | ||
64 | /* UART */ | 56 | /* UART */ |
65 | static struct resource uart0_resources[] = { | 57 | static struct resource uart0_resources[] = { |
66 | [0] = { | 58 | DEFINE_RES_MEM(0xe1020000, 0x38), |
67 | .start = 0xe1020000, | 59 | DEFINE_RES_IRQ(40), |
68 | .end = 0xe1020037, | ||
69 | .flags = IORESOURCE_MEM, | ||
70 | }, | ||
71 | [1] = { | ||
72 | .start = 40, | ||
73 | .flags = IORESOURCE_IRQ, | ||
74 | } | ||
75 | }; | ||
76 | |||
77 | static struct platform_device uart0_device = { | ||
78 | .name = "serial8250-em", | ||
79 | .id = 0, | ||
80 | .num_resources = ARRAY_SIZE(uart0_resources), | ||
81 | .resource = uart0_resources, | ||
82 | }; | 60 | }; |
83 | 61 | ||
84 | static struct resource uart1_resources[] = { | 62 | static struct resource uart1_resources[] = { |
85 | [0] = { | 63 | DEFINE_RES_MEM(0xe1030000, 0x38), |
86 | .start = 0xe1030000, | 64 | DEFINE_RES_IRQ(41), |
87 | .end = 0xe1030037, | ||
88 | .flags = IORESOURCE_MEM, | ||
89 | }, | ||
90 | [1] = { | ||
91 | .start = 41, | ||
92 | .flags = IORESOURCE_IRQ, | ||
93 | } | ||
94 | }; | ||
95 | |||
96 | static struct platform_device uart1_device = { | ||
97 | .name = "serial8250-em", | ||
98 | .id = 1, | ||
99 | .num_resources = ARRAY_SIZE(uart1_resources), | ||
100 | .resource = uart1_resources, | ||
101 | }; | 65 | }; |
102 | 66 | ||
103 | static struct resource uart2_resources[] = { | 67 | static struct resource uart2_resources[] = { |
104 | [0] = { | 68 | DEFINE_RES_MEM(0xe1040000, 0x38), |
105 | .start = 0xe1040000, | 69 | DEFINE_RES_IRQ(42), |
106 | .end = 0xe1040037, | ||
107 | .flags = IORESOURCE_MEM, | ||
108 | }, | ||
109 | [1] = { | ||
110 | .start = 42, | ||
111 | .flags = IORESOURCE_IRQ, | ||
112 | } | ||
113 | }; | ||
114 | |||
115 | static struct platform_device uart2_device = { | ||
116 | .name = "serial8250-em", | ||
117 | .id = 2, | ||
118 | .num_resources = ARRAY_SIZE(uart2_resources), | ||
119 | .resource = uart2_resources, | ||
120 | }; | 70 | }; |
121 | 71 | ||
122 | static struct resource uart3_resources[] = { | 72 | static struct resource uart3_resources[] = { |
123 | [0] = { | 73 | DEFINE_RES_MEM(0xe1050000, 0x38), |
124 | .start = 0xe1050000, | 74 | DEFINE_RES_IRQ(43), |
125 | .end = 0xe1050037, | ||
126 | .flags = IORESOURCE_MEM, | ||
127 | }, | ||
128 | [1] = { | ||
129 | .start = 43, | ||
130 | .flags = IORESOURCE_IRQ, | ||
131 | } | ||
132 | }; | 75 | }; |
133 | 76 | ||
134 | static struct platform_device uart3_device = { | 77 | #define emev2_register_uart(idx) \ |
135 | .name = "serial8250-em", | 78 | platform_device_register_simple("serial8250-em", idx, \ |
136 | .id = 3, | 79 | uart##idx##_resources, \ |
137 | .num_resources = ARRAY_SIZE(uart3_resources), | 80 | ARRAY_SIZE(uart##idx##_resources)) |
138 | .resource = uart3_resources, | ||
139 | }; | ||
140 | 81 | ||
141 | /* STI */ | 82 | /* STI */ |
142 | static struct resource sti_resources[] = { | 83 | static struct resource sti_resources[] = { |
143 | [0] = { | 84 | DEFINE_RES_MEM(0xe0180000, 0x54), |
144 | .name = "STI", | 85 | DEFINE_RES_IRQ(157), |
145 | .start = 0xe0180000, | ||
146 | .end = 0xe0180053, | ||
147 | .flags = IORESOURCE_MEM, | ||
148 | }, | ||
149 | [1] = { | ||
150 | .start = 157, | ||
151 | .flags = IORESOURCE_IRQ, | ||
152 | }, | ||
153 | }; | ||
154 | |||
155 | static struct platform_device sti_device = { | ||
156 | .name = "em_sti", | ||
157 | .id = 0, | ||
158 | .resource = sti_resources, | ||
159 | .num_resources = ARRAY_SIZE(sti_resources), | ||
160 | }; | 86 | }; |
161 | 87 | ||
88 | #define emev2_register_sti() \ | ||
89 | platform_device_register_simple("em_sti", 0, \ | ||
90 | sti_resources, \ | ||
91 | ARRAY_SIZE(sti_resources)) | ||
162 | 92 | ||
163 | /* GIO */ | 93 | /* GIO */ |
164 | static struct gpio_em_config gio0_config = { | 94 | static struct gpio_em_config gio0_config = { |
@@ -168,36 +98,10 @@ static struct gpio_em_config gio0_config = { | |||
168 | }; | 98 | }; |
169 | 99 | ||
170 | static struct resource gio0_resources[] = { | 100 | static struct resource gio0_resources[] = { |
171 | [0] = { | 101 | DEFINE_RES_MEM(0xe0050000, 0x2c), |
172 | .name = "GIO_000", | 102 | DEFINE_RES_MEM(0xe0050040, 0x20), |
173 | .start = 0xe0050000, | 103 | DEFINE_RES_IRQ(99), |
174 | .end = 0xe005002b, | 104 | DEFINE_RES_IRQ(100), |
175 | .flags = IORESOURCE_MEM, | ||
176 | }, | ||
177 | [1] = { | ||
178 | .name = "GIO_000", | ||
179 | .start = 0xe0050040, | ||
180 | .end = 0xe005005f, | ||
181 | .flags = IORESOURCE_MEM, | ||
182 | }, | ||
183 | [2] = { | ||
184 | .start = 99, | ||
185 | .flags = IORESOURCE_IRQ, | ||
186 | }, | ||
187 | [3] = { | ||
188 | .start = 100, | ||
189 | .flags = IORESOURCE_IRQ, | ||
190 | }, | ||
191 | }; | ||
192 | |||
193 | static struct platform_device gio0_device = { | ||
194 | .name = "em_gio", | ||
195 | .id = 0, | ||
196 | .resource = gio0_resources, | ||
197 | .num_resources = ARRAY_SIZE(gio0_resources), | ||
198 | .dev = { | ||
199 | .platform_data = &gio0_config, | ||
200 | }, | ||
201 | }; | 105 | }; |
202 | 106 | ||
203 | static struct gpio_em_config gio1_config = { | 107 | static struct gpio_em_config gio1_config = { |
@@ -207,36 +111,10 @@ static struct gpio_em_config gio1_config = { | |||
207 | }; | 111 | }; |
208 | 112 | ||
209 | static struct resource gio1_resources[] = { | 113 | static struct resource gio1_resources[] = { |
210 | [0] = { | 114 | DEFINE_RES_MEM(0xe0050080, 0x2c), |
211 | .name = "GIO_032", | 115 | DEFINE_RES_MEM(0xe00500c0, 0x20), |
212 | .start = 0xe0050080, | 116 | DEFINE_RES_IRQ(101), |
213 | .end = 0xe00500ab, | 117 | DEFINE_RES_IRQ(102), |
214 | .flags = IORESOURCE_MEM, | ||
215 | }, | ||
216 | [1] = { | ||
217 | .name = "GIO_032", | ||
218 | .start = 0xe00500c0, | ||
219 | .end = 0xe00500df, | ||
220 | .flags = IORESOURCE_MEM, | ||
221 | }, | ||
222 | [2] = { | ||
223 | .start = 101, | ||
224 | .flags = IORESOURCE_IRQ, | ||
225 | }, | ||
226 | [3] = { | ||
227 | .start = 102, | ||
228 | .flags = IORESOURCE_IRQ, | ||
229 | }, | ||
230 | }; | ||
231 | |||
232 | static struct platform_device gio1_device = { | ||
233 | .name = "em_gio", | ||
234 | .id = 1, | ||
235 | .resource = gio1_resources, | ||
236 | .num_resources = ARRAY_SIZE(gio1_resources), | ||
237 | .dev = { | ||
238 | .platform_data = &gio1_config, | ||
239 | }, | ||
240 | }; | 118 | }; |
241 | 119 | ||
242 | static struct gpio_em_config gio2_config = { | 120 | static struct gpio_em_config gio2_config = { |
@@ -246,36 +124,10 @@ static struct gpio_em_config gio2_config = { | |||
246 | }; | 124 | }; |
247 | 125 | ||
248 | static struct resource gio2_resources[] = { | 126 | static struct resource gio2_resources[] = { |
249 | [0] = { | 127 | DEFINE_RES_MEM(0xe0050100, 0x2c), |
250 | .name = "GIO_064", | 128 | DEFINE_RES_MEM(0xe0050140, 0x20), |
251 | .start = 0xe0050100, | 129 | DEFINE_RES_IRQ(103), |
252 | .end = 0xe005012b, | 130 | DEFINE_RES_IRQ(104), |
253 | .flags = IORESOURCE_MEM, | ||
254 | }, | ||
255 | [1] = { | ||
256 | .name = "GIO_064", | ||
257 | .start = 0xe0050140, | ||
258 | .end = 0xe005015f, | ||
259 | .flags = IORESOURCE_MEM, | ||
260 | }, | ||
261 | [2] = { | ||
262 | .start = 103, | ||
263 | .flags = IORESOURCE_IRQ, | ||
264 | }, | ||
265 | [3] = { | ||
266 | .start = 104, | ||
267 | .flags = IORESOURCE_IRQ, | ||
268 | }, | ||
269 | }; | ||
270 | |||
271 | static struct platform_device gio2_device = { | ||
272 | .name = "em_gio", | ||
273 | .id = 2, | ||
274 | .resource = gio2_resources, | ||
275 | .num_resources = ARRAY_SIZE(gio2_resources), | ||
276 | .dev = { | ||
277 | .platform_data = &gio2_config, | ||
278 | }, | ||
279 | }; | 131 | }; |
280 | 132 | ||
281 | static struct gpio_em_config gio3_config = { | 133 | static struct gpio_em_config gio3_config = { |
@@ -285,36 +137,10 @@ static struct gpio_em_config gio3_config = { | |||
285 | }; | 137 | }; |
286 | 138 | ||
287 | static struct resource gio3_resources[] = { | 139 | static struct resource gio3_resources[] = { |
288 | [0] = { | 140 | DEFINE_RES_MEM(0xe0050180, 0x2c), |
289 | .name = "GIO_096", | 141 | DEFINE_RES_MEM(0xe00501c0, 0x20), |
290 | .start = 0xe0050180, | 142 | DEFINE_RES_IRQ(105), |
291 | .end = 0xe00501ab, | 143 | DEFINE_RES_IRQ(106), |
292 | .flags = IORESOURCE_MEM, | ||
293 | }, | ||
294 | [1] = { | ||
295 | .name = "GIO_096", | ||
296 | .start = 0xe00501c0, | ||
297 | .end = 0xe00501df, | ||
298 | .flags = IORESOURCE_MEM, | ||
299 | }, | ||
300 | [2] = { | ||
301 | .start = 105, | ||
302 | .flags = IORESOURCE_IRQ, | ||
303 | }, | ||
304 | [3] = { | ||
305 | .start = 106, | ||
306 | .flags = IORESOURCE_IRQ, | ||
307 | }, | ||
308 | }; | ||
309 | |||
310 | static struct platform_device gio3_device = { | ||
311 | .name = "em_gio", | ||
312 | .id = 3, | ||
313 | .resource = gio3_resources, | ||
314 | .num_resources = ARRAY_SIZE(gio3_resources), | ||
315 | .dev = { | ||
316 | .platform_data = &gio3_config, | ||
317 | }, | ||
318 | }; | 144 | }; |
319 | 145 | ||
320 | static struct gpio_em_config gio4_config = { | 146 | static struct gpio_em_config gio4_config = { |
@@ -324,126 +150,53 @@ static struct gpio_em_config gio4_config = { | |||
324 | }; | 150 | }; |
325 | 151 | ||
326 | static struct resource gio4_resources[] = { | 152 | static struct resource gio4_resources[] = { |
327 | [0] = { | 153 | DEFINE_RES_MEM(0xe0050200, 0x2c), |
328 | .name = "GIO_128", | 154 | DEFINE_RES_MEM(0xe0050240, 0x20), |
329 | .start = 0xe0050200, | 155 | DEFINE_RES_IRQ(107), |
330 | .end = 0xe005022b, | 156 | DEFINE_RES_IRQ(108), |
331 | .flags = IORESOURCE_MEM, | ||
332 | }, | ||
333 | [1] = { | ||
334 | .name = "GIO_128", | ||
335 | .start = 0xe0050240, | ||
336 | .end = 0xe005025f, | ||
337 | .flags = IORESOURCE_MEM, | ||
338 | }, | ||
339 | [2] = { | ||
340 | .start = 107, | ||
341 | .flags = IORESOURCE_IRQ, | ||
342 | }, | ||
343 | [3] = { | ||
344 | .start = 108, | ||
345 | .flags = IORESOURCE_IRQ, | ||
346 | }, | ||
347 | }; | 157 | }; |
348 | 158 | ||
349 | static struct platform_device gio4_device = { | 159 | #define emev2_register_gio(idx) \ |
350 | .name = "em_gio", | 160 | platform_device_register_resndata(&platform_bus, "em_gio", \ |
351 | .id = 4, | 161 | idx, gio##idx##_resources, \ |
352 | .resource = gio4_resources, | 162 | ARRAY_SIZE(gio##idx##_resources), \ |
353 | .num_resources = ARRAY_SIZE(gio4_resources), | 163 | &gio##idx##_config, \ |
354 | .dev = { | 164 | sizeof(struct gpio_em_config)) |
355 | .platform_data = &gio4_config, | ||
356 | }, | ||
357 | }; | ||
358 | 165 | ||
359 | static struct resource pmu_resources[] = { | 166 | static struct resource pmu_resources[] = { |
360 | [0] = { | 167 | DEFINE_RES_IRQ(152), |
361 | .start = 152, | 168 | DEFINE_RES_IRQ(153), |
362 | .end = 152, | ||
363 | .flags = IORESOURCE_IRQ, | ||
364 | }, | ||
365 | [1] = { | ||
366 | .start = 153, | ||
367 | .end = 153, | ||
368 | .flags = IORESOURCE_IRQ, | ||
369 | }, | ||
370 | }; | ||
371 | |||
372 | static struct platform_device pmu_device = { | ||
373 | .name = "arm-pmu", | ||
374 | .id = -1, | ||
375 | .num_resources = ARRAY_SIZE(pmu_resources), | ||
376 | .resource = pmu_resources, | ||
377 | }; | 169 | }; |
378 | 170 | ||
379 | static struct platform_device *emev2_early_devices[] __initdata = { | 171 | #define emev2_register_pmu() \ |
380 | &uart0_device, | 172 | platform_device_register_simple("arm-pmu", -1, \ |
381 | &uart1_device, | 173 | pmu_resources, \ |
382 | &uart2_device, | 174 | ARRAY_SIZE(pmu_resources)) |
383 | &uart3_device, | ||
384 | }; | ||
385 | |||
386 | static struct platform_device *emev2_late_devices[] __initdata = { | ||
387 | &sti_device, | ||
388 | &gio0_device, | ||
389 | &gio1_device, | ||
390 | &gio2_device, | ||
391 | &gio3_device, | ||
392 | &gio4_device, | ||
393 | &pmu_device, | ||
394 | }; | ||
395 | 175 | ||
396 | void __init emev2_add_standard_devices(void) | 176 | void __init emev2_add_standard_devices(void) |
397 | { | 177 | { |
398 | emev2_clock_init(); | 178 | if (!IS_ENABLED(CONFIG_COMMON_CLK)) |
399 | 179 | emev2_clock_init(); | |
400 | platform_add_devices(emev2_early_devices, | 180 | |
401 | ARRAY_SIZE(emev2_early_devices)); | 181 | emev2_register_uart(0); |
402 | 182 | emev2_register_uart(1); | |
403 | platform_add_devices(emev2_late_devices, | 183 | emev2_register_uart(2); |
404 | ARRAY_SIZE(emev2_late_devices)); | 184 | emev2_register_uart(3); |
185 | emev2_register_sti(); | ||
186 | emev2_register_gio(0); | ||
187 | emev2_register_gio(1); | ||
188 | emev2_register_gio(2); | ||
189 | emev2_register_gio(3); | ||
190 | emev2_register_gio(4); | ||
191 | emev2_register_pmu(); | ||
405 | } | 192 | } |
406 | 193 | ||
407 | static void __init emev2_init_delay(void) | 194 | void __init emev2_init_delay(void) |
408 | { | 195 | { |
409 | shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */ | 196 | shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */ |
410 | } | 197 | } |
411 | 198 | ||
412 | void __init emev2_add_early_devices(void) | ||
413 | { | ||
414 | emev2_init_delay(); | ||
415 | |||
416 | early_platform_add_devices(emev2_early_devices, | ||
417 | ARRAY_SIZE(emev2_early_devices)); | ||
418 | |||
419 | /* setup early console here as well */ | ||
420 | shmobile_setup_console(); | ||
421 | } | ||
422 | |||
423 | void __init emev2_init_irq(void) | ||
424 | { | ||
425 | void __iomem *gic_dist_base; | ||
426 | void __iomem *gic_cpu_base; | ||
427 | |||
428 | /* Static mappings, never released */ | ||
429 | gic_dist_base = ioremap(0xe0028000, PAGE_SIZE); | ||
430 | gic_cpu_base = ioremap(0xe0020000, PAGE_SIZE); | ||
431 | BUG_ON(!gic_dist_base || !gic_cpu_base); | ||
432 | |||
433 | /* Use GIC to handle interrupts */ | ||
434 | gic_init(0, 29, gic_dist_base, gic_cpu_base); | ||
435 | } | ||
436 | |||
437 | #ifdef CONFIG_USE_OF | 199 | #ifdef CONFIG_USE_OF |
438 | static const struct of_dev_auxdata emev2_auxdata_lookup[] __initconst = { | ||
439 | { } | ||
440 | }; | ||
441 | |||
442 | static void __init emev2_add_standard_devices_dt(void) | ||
443 | { | ||
444 | of_platform_populate(NULL, of_default_bus_match_table, | ||
445 | emev2_auxdata_lookup, NULL); | ||
446 | } | ||
447 | 200 | ||
448 | static const char *emev2_boards_compat_dt[] __initdata = { | 201 | static const char *emev2_boards_compat_dt[] __initdata = { |
449 | "renesas,emev2", | 202 | "renesas,emev2", |
@@ -452,10 +205,8 @@ static const char *emev2_boards_compat_dt[] __initdata = { | |||
452 | 205 | ||
453 | DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)") | 206 | DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)") |
454 | .smp = smp_ops(emev2_smp_ops), | 207 | .smp = smp_ops(emev2_smp_ops), |
208 | .map_io = emev2_map_io, | ||
455 | .init_early = emev2_init_delay, | 209 | .init_early = emev2_init_delay, |
456 | .nr_irqs = NR_IRQS_LEGACY, | ||
457 | .init_irq = irqchip_init, | ||
458 | .init_machine = emev2_add_standard_devices_dt, | ||
459 | .dt_compat = emev2_boards_compat_dt, | 210 | .dt_compat = emev2_boards_compat_dt, |
460 | MACHINE_END | 211 | MACHINE_END |
461 | 212 | ||
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c index 7f45c2edbca9..a8c4e41bf27a 100644 --- a/arch/arm/mach-shmobile/setup-r8a73a4.c +++ b/arch/arm/mach-shmobile/setup-r8a73a4.c | |||
@@ -18,7 +18,6 @@ | |||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
19 | */ | 19 | */ |
20 | #include <linux/irq.h> | 20 | #include <linux/irq.h> |
21 | #include <linux/irqchip.h> | ||
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
23 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
24 | #include <linux/platform_data/irq-renesas-irqc.h> | 23 | #include <linux/platform_data/irq-renesas-irqc.h> |
@@ -194,7 +193,6 @@ static const char *r8a73a4_boards_compat_dt[] __initdata = { | |||
194 | }; | 193 | }; |
195 | 194 | ||
196 | DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)") | 195 | DT_MACHINE_START(R8A73A4_DT, "Generic R8A73A4 (Flattened Device Tree)") |
197 | .init_irq = irqchip_init, | ||
198 | .init_machine = r8a73a4_add_standard_devices_dt, | 196 | .init_machine = r8a73a4_add_standard_devices_dt, |
199 | .init_time = shmobile_timer_init, | 197 | .init_time = shmobile_timer_init, |
200 | .dt_compat = r8a73a4_boards_compat_dt, | 198 | .dt_compat = r8a73a4_boards_compat_dt, |
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index 00c5a707238b..ac29c2ee011f 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c | |||
@@ -986,16 +986,22 @@ void __init r8a7740_add_early_devices(void) | |||
986 | 986 | ||
987 | #ifdef CONFIG_USE_OF | 987 | #ifdef CONFIG_USE_OF |
988 | 988 | ||
989 | static const struct of_dev_auxdata r8a7740_auxdata_lookup[] __initconst = { | 989 | void __init r8a7740_add_early_devices_dt(void) |
990 | { } | 990 | { |
991 | }; | 991 | shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */ |
992 | |||
993 | early_platform_add_devices(r8a7740_early_devices, | ||
994 | ARRAY_SIZE(r8a7740_early_devices)); | ||
995 | |||
996 | /* setup early console here as well */ | ||
997 | shmobile_setup_console(); | ||
998 | } | ||
992 | 999 | ||
993 | void __init r8a7740_add_standard_devices_dt(void) | 1000 | void __init r8a7740_add_standard_devices_dt(void) |
994 | { | 1001 | { |
995 | platform_add_devices(r8a7740_devices_dt, | 1002 | platform_add_devices(r8a7740_devices_dt, |
996 | ARRAY_SIZE(r8a7740_devices_dt)); | 1003 | ARRAY_SIZE(r8a7740_devices_dt)); |
997 | of_platform_populate(NULL, of_default_bus_match_table, | 1004 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
998 | r8a7740_auxdata_lookup, NULL); | ||
999 | } | 1005 | } |
1000 | 1006 | ||
1001 | void __init r8a7740_init_delay(void) | 1007 | void __init r8a7740_init_delay(void) |
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index 80c20392ad7c..a3a2e37b03f3 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c | |||
@@ -53,7 +53,7 @@ | |||
53 | .irqs = SCIx_IRQ_MUXED(irq), \ | 53 | .irqs = SCIx_IRQ_MUXED(irq), \ |
54 | } | 54 | } |
55 | 55 | ||
56 | static struct plat_sci_port scif_platform_data[] = { | 56 | static struct plat_sci_port scif_platform_data[] __initdata = { |
57 | SCIF_INFO(0xffe40000, gic_iid(0x66)), | 57 | SCIF_INFO(0xffe40000, gic_iid(0x66)), |
58 | SCIF_INFO(0xffe41000, gic_iid(0x67)), | 58 | SCIF_INFO(0xffe41000, gic_iid(0x67)), |
59 | SCIF_INFO(0xffe42000, gic_iid(0x68)), | 59 | SCIF_INFO(0xffe42000, gic_iid(0x68)), |
@@ -63,24 +63,24 @@ static struct plat_sci_port scif_platform_data[] = { | |||
63 | }; | 63 | }; |
64 | 64 | ||
65 | /* TMU */ | 65 | /* TMU */ |
66 | static struct resource sh_tmu0_resources[] = { | 66 | static struct resource sh_tmu0_resources[] __initdata = { |
67 | DEFINE_RES_MEM(0xffd80008, 12), | 67 | DEFINE_RES_MEM(0xffd80008, 12), |
68 | DEFINE_RES_IRQ(gic_iid(0x40)), | 68 | DEFINE_RES_IRQ(gic_iid(0x40)), |
69 | }; | 69 | }; |
70 | 70 | ||
71 | static struct sh_timer_config sh_tmu0_platform_data = { | 71 | static struct sh_timer_config sh_tmu0_platform_data __initdata = { |
72 | .name = "TMU00", | 72 | .name = "TMU00", |
73 | .channel_offset = 0x4, | 73 | .channel_offset = 0x4, |
74 | .timer_bit = 0, | 74 | .timer_bit = 0, |
75 | .clockevent_rating = 200, | 75 | .clockevent_rating = 200, |
76 | }; | 76 | }; |
77 | 77 | ||
78 | static struct resource sh_tmu1_resources[] = { | 78 | static struct resource sh_tmu1_resources[] __initdata = { |
79 | DEFINE_RES_MEM(0xffd80014, 12), | 79 | DEFINE_RES_MEM(0xffd80014, 12), |
80 | DEFINE_RES_IRQ(gic_iid(0x41)), | 80 | DEFINE_RES_IRQ(gic_iid(0x41)), |
81 | }; | 81 | }; |
82 | 82 | ||
83 | static struct sh_timer_config sh_tmu1_platform_data = { | 83 | static struct sh_timer_config sh_tmu1_platform_data __initdata = { |
84 | .name = "TMU01", | 84 | .name = "TMU01", |
85 | .channel_offset = 0x10, | 85 | .channel_offset = 0x10, |
86 | .timer_bit = 1, | 86 | .timer_bit = 1, |
@@ -189,7 +189,7 @@ USB_PLATFORM_INFO(ehci); | |||
189 | USB_PLATFORM_INFO(ohci); | 189 | USB_PLATFORM_INFO(ohci); |
190 | 190 | ||
191 | /* Ether */ | 191 | /* Ether */ |
192 | static struct resource ether_resources[] = { | 192 | static struct resource ether_resources[] __initdata = { |
193 | DEFINE_RES_MEM(0xfde00000, 0x400), | 193 | DEFINE_RES_MEM(0xfde00000, 0x400), |
194 | DEFINE_RES_IRQ(gic_iid(0x89)), | 194 | DEFINE_RES_IRQ(gic_iid(0x89)), |
195 | }; | 195 | }; |
@@ -203,17 +203,17 @@ void __init r8a7778_add_ether_device(struct sh_eth_plat_data *pdata) | |||
203 | } | 203 | } |
204 | 204 | ||
205 | /* PFC/GPIO */ | 205 | /* PFC/GPIO */ |
206 | static struct resource pfc_resources[] = { | 206 | static struct resource pfc_resources[] __initdata = { |
207 | DEFINE_RES_MEM(0xfffc0000, 0x118), | 207 | DEFINE_RES_MEM(0xfffc0000, 0x118), |
208 | }; | 208 | }; |
209 | 209 | ||
210 | #define R8A7778_GPIO(idx) \ | 210 | #define R8A7778_GPIO(idx) \ |
211 | static struct resource r8a7778_gpio##idx##_resources[] = { \ | 211 | static struct resource r8a7778_gpio##idx##_resources[] __initdata = { \ |
212 | DEFINE_RES_MEM(0xffc40000 + 0x1000 * (idx), 0x30), \ | 212 | DEFINE_RES_MEM(0xffc40000 + 0x1000 * (idx), 0x30), \ |
213 | DEFINE_RES_IRQ(gic_iid(0x87)), \ | 213 | DEFINE_RES_IRQ(gic_iid(0x87)), \ |
214 | }; \ | 214 | }; \ |
215 | \ | 215 | \ |
216 | static struct gpio_rcar_config r8a7778_gpio##idx##_platform_data = { \ | 216 | static struct gpio_rcar_config r8a7778_gpio##idx##_platform_data __initdata = { \ |
217 | .gpio_base = 32 * (idx), \ | 217 | .gpio_base = 32 * (idx), \ |
218 | .irq_base = GPIO_IRQ_BASE(idx), \ | 218 | .irq_base = GPIO_IRQ_BASE(idx), \ |
219 | .number_of_pins = 32, \ | 219 | .number_of_pins = 32, \ |
@@ -249,7 +249,7 @@ void __init r8a7778_pinmux_init(void) | |||
249 | }; | 249 | }; |
250 | 250 | ||
251 | /* SDHI */ | 251 | /* SDHI */ |
252 | static struct resource sdhi_resources[] = { | 252 | static struct resource sdhi_resources[] __initdata = { |
253 | /* SDHI0 */ | 253 | /* SDHI0 */ |
254 | DEFINE_RES_MEM(0xFFE4C000, 0x100), | 254 | DEFINE_RES_MEM(0xFFE4C000, 0x100), |
255 | DEFINE_RES_IRQ(gic_iid(0x77)), | 255 | DEFINE_RES_IRQ(gic_iid(0x77)), |
@@ -365,12 +365,12 @@ void __init r8a7778_init_late(void) | |||
365 | platform_device_register_full(&ohci_info); | 365 | platform_device_register_full(&ohci_info); |
366 | } | 366 | } |
367 | 367 | ||
368 | static struct renesas_intc_irqpin_config irqpin_platform_data = { | 368 | static struct renesas_intc_irqpin_config irqpin_platform_data __initdata = { |
369 | .irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */ | 369 | .irq_base = irq_pin(0), /* IRQ0 -> IRQ3 */ |
370 | .sense_bitfield_width = 2, | 370 | .sense_bitfield_width = 2, |
371 | }; | 371 | }; |
372 | 372 | ||
373 | static struct resource irqpin_resources[] = { | 373 | static struct resource irqpin_resources[] __initdata = { |
374 | DEFINE_RES_MEM(0xfe78001c, 4), /* ICR1 */ | 374 | DEFINE_RES_MEM(0xfe78001c, 4), /* ICR1 */ |
375 | DEFINE_RES_MEM(0xfe780010, 4), /* INTPRI */ | 375 | DEFINE_RES_MEM(0xfe780010, 4), /* INTPRI */ |
376 | DEFINE_RES_MEM(0xfe780024, 4), /* INTREQ */ | 376 | DEFINE_RES_MEM(0xfe780024, 4), /* INTREQ */ |
@@ -408,17 +408,25 @@ void __init r8a7778_init_irq_extpin(int irlm) | |||
408 | &irqpin_platform_data, sizeof(irqpin_platform_data)); | 408 | &irqpin_platform_data, sizeof(irqpin_platform_data)); |
409 | } | 409 | } |
410 | 410 | ||
411 | void __init r8a7778_init_delay(void) | ||
412 | { | ||
413 | shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */ | ||
414 | } | ||
415 | |||
416 | #ifdef CONFIG_USE_OF | ||
411 | #define INT2SMSKCR0 0x82288 /* 0xfe782288 */ | 417 | #define INT2SMSKCR0 0x82288 /* 0xfe782288 */ |
412 | #define INT2SMSKCR1 0x8228c /* 0xfe78228c */ | 418 | #define INT2SMSKCR1 0x8228c /* 0xfe78228c */ |
413 | 419 | ||
414 | #define INT2NTSR0 0x00018 /* 0xfe700018 */ | 420 | #define INT2NTSR0 0x00018 /* 0xfe700018 */ |
415 | #define INT2NTSR1 0x0002c /* 0xfe70002c */ | 421 | #define INT2NTSR1 0x0002c /* 0xfe70002c */ |
416 | static void __init r8a7778_init_irq_common(void) | 422 | void __init r8a7778_init_irq_dt(void) |
417 | { | 423 | { |
418 | void __iomem *base = ioremap_nocache(0xfe700000, 0x00100000); | 424 | void __iomem *base = ioremap_nocache(0xfe700000, 0x00100000); |
419 | 425 | ||
420 | BUG_ON(!base); | 426 | BUG_ON(!base); |
421 | 427 | ||
428 | irqchip_init(); | ||
429 | |||
422 | /* route all interrupts to ARM */ | 430 | /* route all interrupts to ARM */ |
423 | __raw_writel(0x73ffffff, base + INT2NTSR0); | 431 | __raw_writel(0x73ffffff, base + INT2NTSR0); |
424 | __raw_writel(0xffffffff, base + INT2NTSR1); | 432 | __raw_writel(0xffffffff, base + INT2NTSR1); |
@@ -430,43 +438,6 @@ static void __init r8a7778_init_irq_common(void) | |||
430 | iounmap(base); | 438 | iounmap(base); |
431 | } | 439 | } |
432 | 440 | ||
433 | void __init r8a7778_init_irq(void) | ||
434 | { | ||
435 | void __iomem *gic_dist_base; | ||
436 | void __iomem *gic_cpu_base; | ||
437 | |||
438 | gic_dist_base = ioremap_nocache(0xfe438000, PAGE_SIZE); | ||
439 | gic_cpu_base = ioremap_nocache(0xfe430000, PAGE_SIZE); | ||
440 | BUG_ON(!gic_dist_base || !gic_cpu_base); | ||
441 | |||
442 | /* use GIC to handle interrupts */ | ||
443 | gic_init(0, 29, gic_dist_base, gic_cpu_base); | ||
444 | |||
445 | r8a7778_init_irq_common(); | ||
446 | } | ||
447 | |||
448 | void __init r8a7778_init_delay(void) | ||
449 | { | ||
450 | shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */ | ||
451 | } | ||
452 | |||
453 | #ifdef CONFIG_USE_OF | ||
454 | void __init r8a7778_init_irq_dt(void) | ||
455 | { | ||
456 | irqchip_init(); | ||
457 | r8a7778_init_irq_common(); | ||
458 | } | ||
459 | |||
460 | static const struct of_dev_auxdata r8a7778_auxdata_lookup[] __initconst = { | ||
461 | {}, | ||
462 | }; | ||
463 | |||
464 | void __init r8a7778_add_standard_devices_dt(void) | ||
465 | { | ||
466 | of_platform_populate(NULL, of_default_bus_match_table, | ||
467 | r8a7778_auxdata_lookup, NULL); | ||
468 | } | ||
469 | |||
470 | static const char *r8a7778_compat_dt[] __initdata = { | 441 | static const char *r8a7778_compat_dt[] __initdata = { |
471 | "renesas,r8a7778", | 442 | "renesas,r8a7778", |
472 | NULL, | 443 | NULL, |
@@ -475,7 +446,6 @@ static const char *r8a7778_compat_dt[] __initdata = { | |||
475 | DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)") | 446 | DT_MACHINE_START(R8A7778_DT, "Generic R8A7778 (Flattened Device Tree)") |
476 | .init_early = r8a7778_init_delay, | 447 | .init_early = r8a7778_init_delay, |
477 | .init_irq = r8a7778_init_irq_dt, | 448 | .init_irq = r8a7778_init_irq_dt, |
478 | .init_machine = r8a7778_add_standard_devices_dt, | ||
479 | .init_time = shmobile_timer_init, | 449 | .init_time = shmobile_timer_init, |
480 | .dt_compat = r8a7778_compat_dt, | 450 | .dt_compat = r8a7778_compat_dt, |
481 | .init_late = r8a7778_init_late, | 451 | .init_late = r8a7778_init_late, |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 398687761f50..66d38261ecaa 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -665,10 +665,6 @@ void __init r8a7779_init_delay(void) | |||
665 | shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */ | 665 | shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */ |
666 | } | 666 | } |
667 | 667 | ||
668 | static const struct of_dev_auxdata r8a7779_auxdata_lookup[] __initconst = { | ||
669 | {}, | ||
670 | }; | ||
671 | |||
672 | void __init r8a7779_add_standard_devices_dt(void) | 668 | void __init r8a7779_add_standard_devices_dt(void) |
673 | { | 669 | { |
674 | /* clocks are setup late during boot in the case of DT */ | 670 | /* clocks are setup late during boot in the case of DT */ |
@@ -676,8 +672,7 @@ void __init r8a7779_add_standard_devices_dt(void) | |||
676 | 672 | ||
677 | platform_add_devices(r8a7779_devices_dt, | 673 | platform_add_devices(r8a7779_devices_dt, |
678 | ARRAY_SIZE(r8a7779_devices_dt)); | 674 | ARRAY_SIZE(r8a7779_devices_dt)); |
679 | of_platform_populate(NULL, of_default_bus_match_table, | 675 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
680 | r8a7779_auxdata_lookup, NULL); | ||
681 | } | 676 | } |
682 | 677 | ||
683 | static const char *r8a7779_compat_dt[] __initdata = { | 678 | static const char *r8a7779_compat_dt[] __initdata = { |
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index 28f94752b8ff..b7e78b9a7fdf 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c | |||
@@ -19,7 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/irqchip.h> | ||
23 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
24 | #include <linux/of_platform.h> | 23 | #include <linux/of_platform.h> |
25 | #include <linux/serial_sci.h> | 24 | #include <linux/serial_sci.h> |
@@ -177,10 +176,6 @@ void __init r8a7790_timer_init(void) | |||
177 | } | 176 | } |
178 | 177 | ||
179 | #ifdef CONFIG_USE_OF | 178 | #ifdef CONFIG_USE_OF |
180 | void __init r8a7790_add_standard_devices_dt(void) | ||
181 | { | ||
182 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
183 | } | ||
184 | 179 | ||
185 | static const char *r8a7790_boards_compat_dt[] __initdata = { | 180 | static const char *r8a7790_boards_compat_dt[] __initdata = { |
186 | "renesas,r8a7790", | 181 | "renesas,r8a7790", |
@@ -188,8 +183,6 @@ static const char *r8a7790_boards_compat_dt[] __initdata = { | |||
188 | }; | 183 | }; |
189 | 184 | ||
190 | DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") | 185 | DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)") |
191 | .init_irq = irqchip_init, | ||
192 | .init_machine = r8a7790_add_standard_devices_dt, | ||
193 | .init_time = r8a7790_timer_init, | 186 | .init_time = r8a7790_timer_init, |
194 | .dt_compat = r8a7790_boards_compat_dt, | 187 | .dt_compat = r8a7790_boards_compat_dt, |
195 | MACHINE_END | 188 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 5502d624aca6..13e6fdbde0a5 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -1147,10 +1147,6 @@ void __init sh7372_add_early_devices_dt(void) | |||
1147 | shmobile_setup_console(); | 1147 | shmobile_setup_console(); |
1148 | } | 1148 | } |
1149 | 1149 | ||
1150 | static const struct of_dev_auxdata sh7372_auxdata_lookup[] __initconst = { | ||
1151 | { } | ||
1152 | }; | ||
1153 | |||
1154 | void __init sh7372_add_standard_devices_dt(void) | 1150 | void __init sh7372_add_standard_devices_dt(void) |
1155 | { | 1151 | { |
1156 | /* clocks are setup late during boot in the case of DT */ | 1152 | /* clocks are setup late during boot in the case of DT */ |
@@ -1159,8 +1155,7 @@ void __init sh7372_add_standard_devices_dt(void) | |||
1159 | platform_add_devices(sh7372_early_devices, | 1155 | platform_add_devices(sh7372_early_devices, |
1160 | ARRAY_SIZE(sh7372_early_devices)); | 1156 | ARRAY_SIZE(sh7372_early_devices)); |
1161 | 1157 | ||
1162 | of_platform_populate(NULL, of_default_bus_match_table, | 1158 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
1163 | sh7372_auxdata_lookup, NULL); | ||
1164 | } | 1159 | } |
1165 | 1160 | ||
1166 | static const char *sh7372_boards_compat_dt[] __initdata = { | 1161 | static const char *sh7372_boards_compat_dt[] __initdata = { |
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 96e7ca1e4e11..516c2391b47a 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
24 | #include <linux/irq.h> | 24 | #include <linux/irq.h> |
25 | #include <linux/irqchip.h> | ||
26 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
27 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
28 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
@@ -61,29 +60,16 @@ void __init sh73a0_map_io(void) | |||
61 | iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc)); | 60 | iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc)); |
62 | } | 61 | } |
63 | 62 | ||
64 | static struct resource sh73a0_pfc_resources[] = { | 63 | /* PFC */ |
65 | [0] = { | 64 | static struct resource pfc_resources[] __initdata = { |
66 | .start = 0xe6050000, | 65 | DEFINE_RES_MEM(0xe6050000, 0x8000), |
67 | .end = 0xe6057fff, | 66 | DEFINE_RES_MEM(0xe605801c, 0x000c), |
68 | .flags = IORESOURCE_MEM, | ||
69 | }, | ||
70 | [1] = { | ||
71 | .start = 0xe605801c, | ||
72 | .end = 0xe6058027, | ||
73 | .flags = IORESOURCE_MEM, | ||
74 | } | ||
75 | }; | ||
76 | |||
77 | static struct platform_device sh73a0_pfc_device = { | ||
78 | .name = "pfc-sh73a0", | ||
79 | .id = -1, | ||
80 | .resource = sh73a0_pfc_resources, | ||
81 | .num_resources = ARRAY_SIZE(sh73a0_pfc_resources), | ||
82 | }; | 67 | }; |
83 | 68 | ||
84 | void __init sh73a0_pinmux_init(void) | 69 | void __init sh73a0_pinmux_init(void) |
85 | { | 70 | { |
86 | platform_device_register(&sh73a0_pfc_device); | 71 | platform_device_register_simple("pfc-sh73a0", -1, pfc_resources, |
72 | ARRAY_SIZE(pfc_resources)); | ||
87 | } | 73 | } |
88 | 74 | ||
89 | static struct plat_sci_port scif0_platform_data = { | 75 | static struct plat_sci_port scif0_platform_data = { |
@@ -958,10 +944,6 @@ void __init sh73a0_add_early_devices(void) | |||
958 | 944 | ||
959 | #ifdef CONFIG_USE_OF | 945 | #ifdef CONFIG_USE_OF |
960 | 946 | ||
961 | static const struct of_dev_auxdata sh73a0_auxdata_lookup[] __initconst = { | ||
962 | {}, | ||
963 | }; | ||
964 | |||
965 | void __init sh73a0_add_standard_devices_dt(void) | 947 | void __init sh73a0_add_standard_devices_dt(void) |
966 | { | 948 | { |
967 | struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1, }; | 949 | struct platform_device_info devinfo = { .name = "cpufreq-cpu0", .id = -1, }; |
@@ -971,8 +953,7 @@ void __init sh73a0_add_standard_devices_dt(void) | |||
971 | 953 | ||
972 | platform_add_devices(sh73a0_devices_dt, | 954 | platform_add_devices(sh73a0_devices_dt, |
973 | ARRAY_SIZE(sh73a0_devices_dt)); | 955 | ARRAY_SIZE(sh73a0_devices_dt)); |
974 | of_platform_populate(NULL, of_default_bus_match_table, | 956 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
975 | sh73a0_auxdata_lookup, NULL); | ||
976 | 957 | ||
977 | /* Instantiate cpufreq-cpu0 */ | 958 | /* Instantiate cpufreq-cpu0 */ |
978 | platform_device_register_full(&devinfo); | 959 | platform_device_register_full(&devinfo); |
@@ -988,7 +969,6 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH73A0 (Flattened Device Tree)") | |||
988 | .map_io = sh73a0_map_io, | 969 | .map_io = sh73a0_map_io, |
989 | .init_early = sh73a0_init_delay, | 970 | .init_early = sh73a0_init_delay, |
990 | .nr_irqs = NR_IRQS_LEGACY, | 971 | .nr_irqs = NR_IRQS_LEGACY, |
991 | .init_irq = irqchip_init, | ||
992 | .init_machine = sh73a0_add_standard_devices_dt, | 972 | .init_machine = sh73a0_add_standard_devices_dt, |
993 | .dt_compat = sh73a0_boards_compat_dt, | 973 | .dt_compat = sh73a0_boards_compat_dt, |
994 | MACHINE_END | 974 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c index 22a05a869d25..1fcd607d64ad 100644 --- a/arch/arm/mach-shmobile/smp-emev2.c +++ b/arch/arm/mach-shmobile/smp-emev2.c | |||
@@ -38,9 +38,12 @@ static int emev2_boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
38 | 38 | ||
39 | static void __init emev2_smp_prepare_cpus(unsigned int max_cpus) | 39 | static void __init emev2_smp_prepare_cpus(unsigned int max_cpus) |
40 | { | 40 | { |
41 | /* setup EMEV2 specific SCU base, enable */ | ||
42 | shmobile_scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE); | ||
41 | scu_enable(shmobile_scu_base); | 43 | scu_enable(shmobile_scu_base); |
42 | 44 | ||
43 | /* Tell ROM loader about our vector (in headsmp-scu.S, headsmp.S) */ | 45 | /* Tell ROM loader about our vector (in headsmp-scu.S, headsmp.S) */ |
46 | emev2_clock_init(); /* need ioremapped SMU */ | ||
44 | emev2_set_boot_vector(__pa(shmobile_boot_vector)); | 47 | emev2_set_boot_vector(__pa(shmobile_boot_vector)); |
45 | shmobile_boot_fn = virt_to_phys(shmobile_boot_scu); | 48 | shmobile_boot_fn = virt_to_phys(shmobile_boot_scu); |
46 | shmobile_boot_arg = (unsigned long)shmobile_scu_base; | 49 | shmobile_boot_arg = (unsigned long)shmobile_scu_base; |
@@ -49,21 +52,7 @@ static void __init emev2_smp_prepare_cpus(unsigned int max_cpus) | |||
49 | scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL); | 52 | scu_power_mode(shmobile_scu_base, SCU_PM_NORMAL); |
50 | } | 53 | } |
51 | 54 | ||
52 | static void __init emev2_smp_init_cpus(void) | ||
53 | { | ||
54 | unsigned int ncores; | ||
55 | |||
56 | /* setup EMEV2 specific SCU base */ | ||
57 | shmobile_scu_base = ioremap(EMEV2_SCU_BASE, PAGE_SIZE); | ||
58 | emev2_clock_init(); /* need ioremapped SMU */ | ||
59 | |||
60 | ncores = shmobile_scu_base ? scu_get_core_count(shmobile_scu_base) : 1; | ||
61 | |||
62 | shmobile_smp_init_cpus(ncores); | ||
63 | } | ||
64 | |||
65 | struct smp_operations emev2_smp_ops __initdata = { | 55 | struct smp_operations emev2_smp_ops __initdata = { |
66 | .smp_init_cpus = emev2_smp_init_cpus, | ||
67 | .smp_prepare_cpus = emev2_smp_prepare_cpus, | 56 | .smp_prepare_cpus = emev2_smp_prepare_cpus, |
68 | .smp_boot_secondary = emev2_boot_secondary, | 57 | .smp_boot_secondary = emev2_boot_secondary, |
69 | }; | 58 | }; |