diff options
Diffstat (limited to 'arch/arm')
54 files changed, 886 insertions, 163 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index b9d6a8b485e0..6d1e43d46187 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -38,6 +38,7 @@ dtb-$(CONFIG_ARCH_AT91) += at91sam9g35ek.dtb | |||
38 | dtb-$(CONFIG_ARCH_AT91) += at91sam9x25ek.dtb | 38 | dtb-$(CONFIG_ARCH_AT91) += at91sam9x25ek.dtb |
39 | dtb-$(CONFIG_ARCH_AT91) += at91sam9x35ek.dtb | 39 | dtb-$(CONFIG_ARCH_AT91) += at91sam9x35ek.dtb |
40 | # sama5d3 | 40 | # sama5d3 |
41 | dtb-$(CONFIG_ARCH_AT91) += at91-sama5d3_xplained.dtb | ||
41 | dtb-$(CONFIG_ARCH_AT91) += sama5d31ek.dtb | 42 | dtb-$(CONFIG_ARCH_AT91) += sama5d31ek.dtb |
42 | dtb-$(CONFIG_ARCH_AT91) += sama5d33ek.dtb | 43 | dtb-$(CONFIG_ARCH_AT91) += sama5d33ek.dtb |
43 | dtb-$(CONFIG_ARCH_AT91) += sama5d34ek.dtb | 44 | dtb-$(CONFIG_ARCH_AT91) += sama5d34ek.dtb |
diff --git a/arch/arm/boot/dts/at91-sama5d3_xplained.dts b/arch/arm/boot/dts/at91-sama5d3_xplained.dts new file mode 100644 index 000000000000..ce1375595e5f --- /dev/null +++ b/arch/arm/boot/dts/at91-sama5d3_xplained.dts | |||
@@ -0,0 +1,229 @@ | |||
1 | /* | ||
2 | * at91-sama5d3_xplained.dts - Device Tree file for the SAMA5D3 Xplained board | ||
3 | * | ||
4 | * Copyright (C) 2014 Atmel, | ||
5 | * 2014 Nicolas Ferre <nicolas.ferre@atmel.com> | ||
6 | * | ||
7 | * Licensed under GPLv2 or later. | ||
8 | */ | ||
9 | /dts-v1/; | ||
10 | #include "sama5d36.dtsi" | ||
11 | |||
12 | / { | ||
13 | model = "SAMA5D3 Xplained"; | ||
14 | compatible = "atmel,sama5d3-xplained", "atmel,sama5d3", "atmel,sama5"; | ||
15 | |||
16 | chosen { | ||
17 | bootargs = "console=ttyS0,115200"; | ||
18 | }; | ||
19 | |||
20 | memory { | ||
21 | reg = <0x20000000 0x10000000>; | ||
22 | }; | ||
23 | |||
24 | ahb { | ||
25 | apb { | ||
26 | mmc0: mmc@f0000000 { | ||
27 | pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_dat4_7 &pinctrl_mmc0_cd>; | ||
28 | status = "okay"; | ||
29 | slot@0 { | ||
30 | reg = <0>; | ||
31 | bus-width = <8>; | ||
32 | cd-gpios = <&pioE 0 GPIO_ACTIVE_LOW>; | ||
33 | }; | ||
34 | }; | ||
35 | |||
36 | spi0: spi@f0004000 { | ||
37 | cs-gpios = <&pioD 13 0>; | ||
38 | status = "okay"; | ||
39 | }; | ||
40 | |||
41 | can0: can@f000c000 { | ||
42 | status = "okay"; | ||
43 | }; | ||
44 | |||
45 | i2c0: i2c@f0014000 { | ||
46 | status = "okay"; | ||
47 | }; | ||
48 | |||
49 | i2c1: i2c@f0018000 { | ||
50 | status = "okay"; | ||
51 | }; | ||
52 | |||
53 | macb0: ethernet@f0028000 { | ||
54 | phy-mode = "rgmii"; | ||
55 | status = "okay"; | ||
56 | }; | ||
57 | |||
58 | usart0: serial@f001c000 { | ||
59 | status = "okay"; | ||
60 | }; | ||
61 | |||
62 | usart1: serial@f0020000 { | ||
63 | pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts_cts>; | ||
64 | status = "okay"; | ||
65 | }; | ||
66 | |||
67 | uart0: serial@f0024000 { | ||
68 | status = "okay"; | ||
69 | }; | ||
70 | |||
71 | mmc1: mmc@f8000000 { | ||
72 | pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>; | ||
73 | status = "okay"; | ||
74 | slot@0 { | ||
75 | reg = <0>; | ||
76 | bus-width = <4>; | ||
77 | cd-gpios = <&pioE 1 GPIO_ACTIVE_HIGH>; | ||
78 | }; | ||
79 | }; | ||
80 | |||
81 | spi1: spi@f8008000 { | ||
82 | cs-gpios = <&pioC 25 0>, <0>, <0>, <&pioD 16 0>; | ||
83 | status = "okay"; | ||
84 | }; | ||
85 | |||
86 | adc0: adc@f8018000 { | ||
87 | pinctrl-0 = < | ||
88 | &pinctrl_adc0_adtrg | ||
89 | &pinctrl_adc0_ad0 | ||
90 | &pinctrl_adc0_ad1 | ||
91 | &pinctrl_adc0_ad2 | ||
92 | &pinctrl_adc0_ad3 | ||
93 | &pinctrl_adc0_ad4 | ||
94 | &pinctrl_adc0_ad5 | ||
95 | &pinctrl_adc0_ad6 | ||
96 | &pinctrl_adc0_ad7 | ||
97 | &pinctrl_adc0_ad8 | ||
98 | &pinctrl_adc0_ad9 | ||
99 | >; | ||
100 | status = "okay"; | ||
101 | }; | ||
102 | |||
103 | i2c2: i2c@f801c000 { | ||
104 | dmas = <0>, <0>; /* Do not use DMA for i2c2 */ | ||
105 | status = "okay"; | ||
106 | }; | ||
107 | |||
108 | macb1: ethernet@f802c000 { | ||
109 | phy-mode = "rmii"; | ||
110 | status = "okay"; | ||
111 | }; | ||
112 | |||
113 | dbgu: serial@ffffee00 { | ||
114 | status = "okay"; | ||
115 | }; | ||
116 | |||
117 | pinctrl@fffff200 { | ||
118 | board { | ||
119 | pinctrl_mmc0_cd: mmc0_cd { | ||
120 | atmel,pins = | ||
121 | <AT91_PIOE 0 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; | ||
122 | }; | ||
123 | |||
124 | pinctrl_mmc1_cd: mmc1_cd { | ||
125 | atmel,pins = | ||
126 | <AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; | ||
127 | }; | ||
128 | |||
129 | pinctrl_usba_vbus: usba_vbus { | ||
130 | atmel,pins = | ||
131 | <AT91_PIOE 9 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; /* PE9, conflicts with A9 */ | ||
132 | }; | ||
133 | }; | ||
134 | }; | ||
135 | |||
136 | pmc: pmc@fffffc00 { | ||
137 | main: mainck { | ||
138 | clock-frequency = <12000000>; | ||
139 | }; | ||
140 | }; | ||
141 | }; | ||
142 | |||
143 | nand0: nand@60000000 { | ||
144 | nand-bus-width = <8>; | ||
145 | nand-ecc-mode = "hw"; | ||
146 | atmel,has-pmecc; | ||
147 | atmel,pmecc-cap = <4>; | ||
148 | atmel,pmecc-sector-size = <512>; | ||
149 | nand-on-flash-bbt; | ||
150 | status = "okay"; | ||
151 | |||
152 | at91bootstrap@0 { | ||
153 | label = "at91bootstrap"; | ||
154 | reg = <0x0 0x40000>; | ||
155 | }; | ||
156 | |||
157 | bootloader@40000 { | ||
158 | label = "bootloader"; | ||
159 | reg = <0x40000 0x80000>; | ||
160 | }; | ||
161 | |||
162 | bootloaderenv@c0000 { | ||
163 | label = "bootloader env"; | ||
164 | reg = <0xc0000 0xc0000>; | ||
165 | }; | ||
166 | |||
167 | dtb@180000 { | ||
168 | label = "device tree"; | ||
169 | reg = <0x180000 0x80000>; | ||
170 | }; | ||
171 | |||
172 | kernel@200000 { | ||
173 | label = "kernel"; | ||
174 | reg = <0x200000 0x600000>; | ||
175 | }; | ||
176 | |||
177 | rootfs@800000 { | ||
178 | label = "rootfs"; | ||
179 | reg = <0x800000 0x0f800000>; | ||
180 | }; | ||
181 | }; | ||
182 | |||
183 | usb0: gadget@00500000 { | ||
184 | atmel,vbus-gpio = <&pioE 9 GPIO_ACTIVE_HIGH>; /* PE9, conflicts with A9 */ | ||
185 | pinctrl-names = "default"; | ||
186 | pinctrl-0 = <&pinctrl_usba_vbus>; | ||
187 | status = "okay"; | ||
188 | }; | ||
189 | |||
190 | usb1: ohci@00600000 { | ||
191 | num-ports = <3>; | ||
192 | atmel,vbus-gpio = <0 | ||
193 | &pioE 3 GPIO_ACTIVE_LOW | ||
194 | &pioE 4 GPIO_ACTIVE_LOW | ||
195 | >; | ||
196 | status = "okay"; | ||
197 | }; | ||
198 | |||
199 | usb2: ehci@00700000 { | ||
200 | status = "okay"; | ||
201 | }; | ||
202 | }; | ||
203 | |||
204 | gpio_keys { | ||
205 | compatible = "gpio-keys"; | ||
206 | |||
207 | bp3 { | ||
208 | label = "PB_USER"; | ||
209 | gpios = <&pioE 29 GPIO_ACTIVE_LOW>; | ||
210 | linux,code = <0x104>; | ||
211 | gpio-key,wakeup; | ||
212 | }; | ||
213 | }; | ||
214 | |||
215 | leds { | ||
216 | compatible = "gpio-leds"; | ||
217 | |||
218 | d2 { | ||
219 | label = "d2"; | ||
220 | gpios = <&pioE 23 GPIO_ACTIVE_LOW>; /* PE23, conflicts with A23, CTS2 */ | ||
221 | linux,default-trigger = "heartbeat"; | ||
222 | }; | ||
223 | |||
224 | d3 { | ||
225 | label = "d3"; | ||
226 | gpios = <&pioE 24 GPIO_ACTIVE_HIGH>; | ||
227 | }; | ||
228 | }; | ||
229 | }; | ||
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi index 0042f73068b0..fece8665fb63 100644 --- a/arch/arm/boot/dts/at91sam9263.dtsi +++ b/arch/arm/boot/dts/at91sam9263.dtsi | |||
@@ -523,7 +523,7 @@ | |||
523 | }; | 523 | }; |
524 | 524 | ||
525 | i2c0: i2c@fff88000 { | 525 | i2c0: i2c@fff88000 { |
526 | compatible = "atmel,at91sam9263-i2c"; | 526 | compatible = "atmel,at91sam9260-i2c"; |
527 | reg = <0xfff88000 0x100>; | 527 | reg = <0xfff88000 0x100>; |
528 | interrupts = <13 IRQ_TYPE_LEVEL_HIGH 6>; | 528 | interrupts = <13 IRQ_TYPE_LEVEL_HIGH 6>; |
529 | #address-cells = <1>; | 529 | #address-cells = <1>; |
diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts index e9487f6f0166..924a6a6ffd0f 100644 --- a/arch/arm/boot/dts/at91sam9n12ek.dts +++ b/arch/arm/boot/dts/at91sam9n12ek.dts | |||
@@ -124,6 +124,10 @@ | |||
124 | nand-on-flash-bbt; | 124 | nand-on-flash-bbt; |
125 | status = "okay"; | 125 | status = "okay"; |
126 | }; | 126 | }; |
127 | |||
128 | usb0: ohci@00500000 { | ||
129 | status = "okay"; | ||
130 | }; | ||
127 | }; | 131 | }; |
128 | 132 | ||
129 | leds { | 133 | leds { |
diff --git a/arch/arm/boot/dts/integratorap.dts b/arch/arm/boot/dts/integratorap.dts index e6be9315ff0a..b10e6351da53 100644 --- a/arch/arm/boot/dts/integratorap.dts +++ b/arch/arm/boot/dts/integratorap.dts | |||
@@ -18,6 +18,28 @@ | |||
18 | bootargs = "root=/dev/ram0 console=ttyAM0,38400n8 earlyprintk"; | 18 | bootargs = "root=/dev/ram0 console=ttyAM0,38400n8 earlyprintk"; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | /* 24 MHz chrystal on the core module */ | ||
22 | xtal24mhz: xtal24mhz@24M { | ||
23 | #clock-cells = <0>; | ||
24 | compatible = "fixed-clock"; | ||
25 | clock-frequency = <24000000>; | ||
26 | }; | ||
27 | |||
28 | pclk: pclk@0 { | ||
29 | #clock-cells = <0>; | ||
30 | compatible = "fixed-factor-clock"; | ||
31 | clock-div = <1>; | ||
32 | clock-mult = <1>; | ||
33 | clocks = <&xtal24mhz>; | ||
34 | }; | ||
35 | |||
36 | /* The UART clock is 14.74 MHz divided by an ICS525 */ | ||
37 | uartclk: uartclk@14.74M { | ||
38 | #clock-cells = <0>; | ||
39 | compatible = "fixed-clock"; | ||
40 | clock-frequency = <14745600>; | ||
41 | }; | ||
42 | |||
21 | syscon { | 43 | syscon { |
22 | compatible = "arm,integrator-ap-syscon"; | 44 | compatible = "arm,integrator-ap-syscon"; |
23 | reg = <0x11000000 0x100>; | 45 | reg = <0x11000000 0x100>; |
@@ -28,14 +50,17 @@ | |||
28 | 50 | ||
29 | timer0: timer@13000000 { | 51 | timer0: timer@13000000 { |
30 | compatible = "arm,integrator-timer"; | 52 | compatible = "arm,integrator-timer"; |
53 | clocks = <&xtal24mhz>; | ||
31 | }; | 54 | }; |
32 | 55 | ||
33 | timer1: timer@13000100 { | 56 | timer1: timer@13000100 { |
34 | compatible = "arm,integrator-timer"; | 57 | compatible = "arm,integrator-timer"; |
58 | clocks = <&xtal24mhz>; | ||
35 | }; | 59 | }; |
36 | 60 | ||
37 | timer2: timer@13000200 { | 61 | timer2: timer@13000200 { |
38 | compatible = "arm,integrator-timer"; | 62 | compatible = "arm,integrator-timer"; |
63 | clocks = <&xtal24mhz>; | ||
39 | }; | 64 | }; |
40 | 65 | ||
41 | pic: pic@14000000 { | 66 | pic: pic@14000000 { |
@@ -92,26 +117,36 @@ | |||
92 | rtc: rtc@15000000 { | 117 | rtc: rtc@15000000 { |
93 | compatible = "arm,pl030", "arm,primecell"; | 118 | compatible = "arm,pl030", "arm,primecell"; |
94 | arm,primecell-periphid = <0x00041030>; | 119 | arm,primecell-periphid = <0x00041030>; |
120 | clocks = <&pclk>; | ||
121 | clock-names = "apb_pclk"; | ||
95 | }; | 122 | }; |
96 | 123 | ||
97 | uart0: uart@16000000 { | 124 | uart0: uart@16000000 { |
98 | compatible = "arm,pl010", "arm,primecell"; | 125 | compatible = "arm,pl010", "arm,primecell"; |
99 | arm,primecell-periphid = <0x00041010>; | 126 | arm,primecell-periphid = <0x00041010>; |
127 | clocks = <&uartclk>, <&pclk>; | ||
128 | clock-names = "uartclk", "apb_pclk"; | ||
100 | }; | 129 | }; |
101 | 130 | ||
102 | uart1: uart@17000000 { | 131 | uart1: uart@17000000 { |
103 | compatible = "arm,pl010", "arm,primecell"; | 132 | compatible = "arm,pl010", "arm,primecell"; |
104 | arm,primecell-periphid = <0x00041010>; | 133 | arm,primecell-periphid = <0x00041010>; |
134 | clocks = <&uartclk>, <&pclk>; | ||
135 | clock-names = "uartclk", "apb_pclk"; | ||
105 | }; | 136 | }; |
106 | 137 | ||
107 | kmi0: kmi@18000000 { | 138 | kmi0: kmi@18000000 { |
108 | compatible = "arm,pl050", "arm,primecell"; | 139 | compatible = "arm,pl050", "arm,primecell"; |
109 | arm,primecell-periphid = <0x00041050>; | 140 | arm,primecell-periphid = <0x00041050>; |
141 | clocks = <&xtal24mhz>, <&pclk>; | ||
142 | clock-names = "KMIREFCLK", "apb_pclk"; | ||
110 | }; | 143 | }; |
111 | 144 | ||
112 | kmi1: kmi@19000000 { | 145 | kmi1: kmi@19000000 { |
113 | compatible = "arm,pl050", "arm,primecell"; | 146 | compatible = "arm,pl050", "arm,primecell"; |
114 | arm,primecell-periphid = <0x00041050>; | 147 | arm,primecell-periphid = <0x00041050>; |
148 | clocks = <&xtal24mhz>, <&pclk>; | ||
149 | clock-names = "KMIREFCLK", "apb_pclk"; | ||
115 | }; | 150 | }; |
116 | }; | 151 | }; |
117 | }; | 152 | }; |
diff --git a/arch/arm/boot/dts/integratorcp.dts b/arch/arm/boot/dts/integratorcp.dts index a21c17de9a5e..d43f15b4f79a 100644 --- a/arch/arm/boot/dts/integratorcp.dts +++ b/arch/arm/boot/dts/integratorcp.dts | |||
@@ -13,25 +13,107 @@ | |||
13 | bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk"; | 13 | bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk"; |
14 | }; | 14 | }; |
15 | 15 | ||
16 | /* | ||
17 | * The Integrator/CP overall clocking architecture can be found in | ||
18 | * ARM DUI 0184B page 7-28 "Integrator/CP922T system clocks" which | ||
19 | * appear to illustrate the layout used in most configurations. | ||
20 | */ | ||
21 | |||
22 | /* The codec chrystal operates at 24.576 MHz */ | ||
23 | xtal_codec: xtal24.576@24.576M { | ||
24 | #clock-cells = <0>; | ||
25 | compatible = "fixed-clock"; | ||
26 | clock-frequency = <24576000>; | ||
27 | }; | ||
28 | |||
29 | /* The chrystal is divided by 2 by the codec for the AACI bit clock */ | ||
30 | aaci_bitclk: aaci_bitclk@12.288M { | ||
31 | #clock-cells = <0>; | ||
32 | compatible = "fixed-factor-clock"; | ||
33 | clock-div = <2>; | ||
34 | clock-mult = <1>; | ||
35 | clocks = <&xtal_codec>; | ||
36 | }; | ||
37 | |||
38 | /* This is a 25MHz chrystal on the base board */ | ||
39 | xtal25mhz: xtal25mhz@25M { | ||
40 | #clock-cells = <0>; | ||
41 | compatible = "fixed-clock"; | ||
42 | clock-frequency = <25000000>; | ||
43 | }; | ||
44 | |||
45 | /* The UART clock is 14.74 MHz divided from 25MHz by an ICS525 */ | ||
46 | uartclk: uartclk@14.74M { | ||
47 | #clock-cells = <0>; | ||
48 | compatible = "fixed-clock"; | ||
49 | clock-frequency = <14745600>; | ||
50 | }; | ||
51 | |||
52 | /* Actually sysclk I think */ | ||
53 | pclk: pclk@0 { | ||
54 | #clock-cells = <0>; | ||
55 | compatible = "fixed-clock"; | ||
56 | clock-frequency = <0>; | ||
57 | }; | ||
58 | |||
59 | core-module@10000000 { | ||
60 | /* 24 MHz chrystal on the core module */ | ||
61 | xtal24mhz: xtal24mhz@24M { | ||
62 | #clock-cells = <0>; | ||
63 | compatible = "fixed-clock"; | ||
64 | clock-frequency = <24000000>; | ||
65 | }; | ||
66 | |||
67 | /* | ||
68 | * External oscillator on the core module, usually used | ||
69 | * to drive video circuitry. Driven from the 24MHz clock. | ||
70 | */ | ||
71 | auxosc: cm_aux_osc@25M { | ||
72 | #clock-cells = <0>; | ||
73 | compatible = "arm,integrator-cm-auxosc"; | ||
74 | clocks = <&xtal24mhz>; | ||
75 | }; | ||
76 | |||
77 | /* The KMI clock is the 24 MHz oscillator divided to 8MHz */ | ||
78 | kmiclk: kmiclk@1M { | ||
79 | #clock-cells = <0>; | ||
80 | compatible = "fixed-factor-clock"; | ||
81 | clock-div = <3>; | ||
82 | clock-mult = <1>; | ||
83 | clocks = <&xtal24mhz>; | ||
84 | }; | ||
85 | |||
86 | /* The timer clock is the 24 MHz oscillator divided to 1MHz */ | ||
87 | timclk: timclk@1M { | ||
88 | #clock-cells = <0>; | ||
89 | compatible = "fixed-factor-clock"; | ||
90 | clock-div = <24>; | ||
91 | clock-mult = <1>; | ||
92 | clocks = <&xtal24mhz>; | ||
93 | }; | ||
94 | }; | ||
95 | |||
16 | syscon { | 96 | syscon { |
17 | compatible = "arm,integrator-cp-syscon"; | 97 | compatible = "arm,integrator-cp-syscon"; |
18 | reg = <0xcb000000 0x100>; | 98 | reg = <0xcb000000 0x100>; |
19 | }; | 99 | }; |
20 | 100 | ||
21 | timer0: timer@13000000 { | 101 | timer0: timer@13000000 { |
22 | /* TIMER0 runs @ 25MHz */ | 102 | /* TIMER0 runs directly on the 25MHz chrystal */ |
23 | compatible = "arm,integrator-cp-timer"; | 103 | compatible = "arm,integrator-cp-timer"; |
24 | status = "disabled"; | 104 | clocks = <&xtal25mhz>; |
25 | }; | 105 | }; |
26 | 106 | ||
27 | timer1: timer@13000100 { | 107 | timer1: timer@13000100 { |
28 | /* TIMER1 runs @ 1MHz */ | 108 | /* TIMER1 runs @ 1MHz */ |
29 | compatible = "arm,integrator-cp-timer"; | 109 | compatible = "arm,integrator-cp-timer"; |
110 | clocks = <&timclk>; | ||
30 | }; | 111 | }; |
31 | 112 | ||
32 | timer2: timer@13000200 { | 113 | timer2: timer@13000200 { |
33 | /* TIMER2 runs @ 1MHz */ | 114 | /* TIMER2 runs @ 1MHz */ |
34 | compatible = "arm,integrator-cp-timer"; | 115 | compatible = "arm,integrator-cp-timer"; |
116 | clocks = <&timclk>; | ||
35 | }; | 117 | }; |
36 | 118 | ||
37 | pic: pic@14000000 { | 119 | pic: pic@14000000 { |
@@ -74,22 +156,32 @@ | |||
74 | */ | 156 | */ |
75 | rtc@15000000 { | 157 | rtc@15000000 { |
76 | compatible = "arm,pl031", "arm,primecell"; | 158 | compatible = "arm,pl031", "arm,primecell"; |
159 | clocks = <&pclk>; | ||
160 | clock-names = "apb_pclk"; | ||
77 | }; | 161 | }; |
78 | 162 | ||
79 | uart@16000000 { | 163 | uart@16000000 { |
80 | compatible = "arm,pl011", "arm,primecell"; | 164 | compatible = "arm,pl011", "arm,primecell"; |
165 | clocks = <&uartclk>, <&pclk>; | ||
166 | clock-names = "uartclk", "apb_pclk"; | ||
81 | }; | 167 | }; |
82 | 168 | ||
83 | uart@17000000 { | 169 | uart@17000000 { |
84 | compatible = "arm,pl011", "arm,primecell"; | 170 | compatible = "arm,pl011", "arm,primecell"; |
171 | clocks = <&uartclk>, <&pclk>; | ||
172 | clock-names = "uartclk", "apb_pclk"; | ||
85 | }; | 173 | }; |
86 | 174 | ||
87 | kmi@18000000 { | 175 | kmi@18000000 { |
88 | compatible = "arm,pl050", "arm,primecell"; | 176 | compatible = "arm,pl050", "arm,primecell"; |
177 | clocks = <&kmiclk>, <&pclk>; | ||
178 | clock-names = "KMIREFCLK", "apb_pclk"; | ||
89 | }; | 179 | }; |
90 | 180 | ||
91 | kmi@19000000 { | 181 | kmi@19000000 { |
92 | compatible = "arm,pl050", "arm,primecell"; | 182 | compatible = "arm,pl050", "arm,primecell"; |
183 | clocks = <&kmiclk>, <&pclk>; | ||
184 | clock-names = "KMIREFCLK", "apb_pclk"; | ||
93 | }; | 185 | }; |
94 | 186 | ||
95 | /* | 187 | /* |
@@ -100,18 +192,24 @@ | |||
100 | reg = <0x1c000000 0x1000>; | 192 | reg = <0x1c000000 0x1000>; |
101 | interrupts = <23 24>; | 193 | interrupts = <23 24>; |
102 | max-frequency = <515633>; | 194 | max-frequency = <515633>; |
195 | clocks = <&uartclk>, <&pclk>; | ||
196 | clock-names = "mclk", "apb_pclk"; | ||
103 | }; | 197 | }; |
104 | 198 | ||
105 | aaci@1d000000 { | 199 | aaci@1d000000 { |
106 | compatible = "arm,pl041", "arm,primecell"; | 200 | compatible = "arm,pl041", "arm,primecell"; |
107 | reg = <0x1d000000 0x1000>; | 201 | reg = <0x1d000000 0x1000>; |
108 | interrupts = <25>; | 202 | interrupts = <25>; |
203 | clocks = <&pclk>; | ||
204 | clock-names = "apb_pclk"; | ||
109 | }; | 205 | }; |
110 | 206 | ||
111 | clcd@c0000000 { | 207 | clcd@c0000000 { |
112 | compatible = "arm,pl110", "arm,primecell"; | 208 | compatible = "arm,pl110", "arm,primecell"; |
113 | reg = <0xC0000000 0x1000>; | 209 | reg = <0xC0000000 0x1000>; |
114 | interrupts = <22>; | 210 | interrupts = <22>; |
211 | clocks = <&auxosc>, <&pclk>; | ||
212 | clock-names = "clcd", "apb_pclk"; | ||
115 | }; | 213 | }; |
116 | }; | 214 | }; |
117 | }; | 215 | }; |
diff --git a/arch/arm/boot/dts/sama5d3.dtsi b/arch/arm/boot/dts/sama5d3.dtsi index 52447c17537a..3d5faf85f51b 100644 --- a/arch/arm/boot/dts/sama5d3.dtsi +++ b/arch/arm/boot/dts/sama5d3.dtsi | |||
@@ -1228,7 +1228,7 @@ | |||
1228 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; | 1228 | compatible = "atmel,at91rm9200-ohci", "usb-ohci"; |
1229 | reg = <0x00600000 0x100000>; | 1229 | reg = <0x00600000 0x100000>; |
1230 | interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>; | 1230 | interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>; |
1231 | clocks = <&usb>, <&uhphs_clk>, <&udphs_clk>, | 1231 | clocks = <&usb>, <&uhphs_clk>, <&uhphs_clk>, |
1232 | <&uhpck>; | 1232 | <&uhpck>; |
1233 | clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck"; | 1233 | clock-names = "usb_clk", "ohci_clk", "hclk", "uhpck"; |
1234 | status = "disabled"; | 1234 | status = "disabled"; |
diff --git a/arch/arm/boot/dts/ste-href.dtsi b/arch/arm/boot/dts/ste-href.dtsi index 0c1e8d871ed1..6cb9b68e2188 100644 --- a/arch/arm/boot/dts/ste-href.dtsi +++ b/arch/arm/boot/dts/ste-href.dtsi | |||
@@ -188,7 +188,6 @@ | |||
188 | msp2: msp@80117000 { | 188 | msp2: msp@80117000 { |
189 | pinctrl-names = "default"; | 189 | pinctrl-names = "default"; |
190 | pinctrl-0 = <&msp2_default_mode>; | 190 | pinctrl-0 = <&msp2_default_mode>; |
191 | status = "okay"; | ||
192 | }; | 191 | }; |
193 | 192 | ||
194 | msp3: msp@80125000 { | 193 | msp3: msp@80125000 { |
diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi index 040bb0eba152..10666ca8aee1 100644 --- a/arch/arm/boot/dts/sun4i-a10.dtsi +++ b/arch/arm/boot/dts/sun4i-a10.dtsi | |||
@@ -315,7 +315,7 @@ | |||
315 | ranges; | 315 | ranges; |
316 | 316 | ||
317 | emac: ethernet@01c0b000 { | 317 | emac: ethernet@01c0b000 { |
318 | compatible = "allwinner,sun4i-emac"; | 318 | compatible = "allwinner,sun4i-a10-emac"; |
319 | reg = <0x01c0b000 0x1000>; | 319 | reg = <0x01c0b000 0x1000>; |
320 | interrupts = <55>; | 320 | interrupts = <55>; |
321 | clocks = <&ahb_gates 17>; | 321 | clocks = <&ahb_gates 17>; |
@@ -323,7 +323,7 @@ | |||
323 | }; | 323 | }; |
324 | 324 | ||
325 | mdio@01c0b080 { | 325 | mdio@01c0b080 { |
326 | compatible = "allwinner,sun4i-mdio"; | 326 | compatible = "allwinner,sun4i-a10-mdio"; |
327 | reg = <0x01c0b080 0x14>; | 327 | reg = <0x01c0b080 0x14>; |
328 | status = "disabled"; | 328 | status = "disabled"; |
329 | #address-cells = <1>; | 329 | #address-cells = <1>; |
diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi index ea16054857a4..64961595e8d6 100644 --- a/arch/arm/boot/dts/sun5i-a10s.dtsi +++ b/arch/arm/boot/dts/sun5i-a10s.dtsi | |||
@@ -278,7 +278,7 @@ | |||
278 | ranges; | 278 | ranges; |
279 | 279 | ||
280 | emac: ethernet@01c0b000 { | 280 | emac: ethernet@01c0b000 { |
281 | compatible = "allwinner,sun4i-emac"; | 281 | compatible = "allwinner,sun4i-a10-emac"; |
282 | reg = <0x01c0b000 0x1000>; | 282 | reg = <0x01c0b000 0x1000>; |
283 | interrupts = <55>; | 283 | interrupts = <55>; |
284 | clocks = <&ahb_gates 17>; | 284 | clocks = <&ahb_gates 17>; |
@@ -286,7 +286,7 @@ | |||
286 | }; | 286 | }; |
287 | 287 | ||
288 | mdio@01c0b080 { | 288 | mdio@01c0b080 { |
289 | compatible = "allwinner,sun4i-mdio"; | 289 | compatible = "allwinner,sun4i-a10-mdio"; |
290 | reg = <0x01c0b080 0x14>; | 290 | reg = <0x01c0b080 0x14>; |
291 | status = "disabled"; | 291 | status = "disabled"; |
292 | #address-cells = <1>; | 292 | #address-cells = <1>; |
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index 119f066f0d98..9ff09484847b 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi | |||
@@ -340,7 +340,7 @@ | |||
340 | ranges; | 340 | ranges; |
341 | 341 | ||
342 | emac: ethernet@01c0b000 { | 342 | emac: ethernet@01c0b000 { |
343 | compatible = "allwinner,sun4i-emac"; | 343 | compatible = "allwinner,sun4i-a10-emac"; |
344 | reg = <0x01c0b000 0x1000>; | 344 | reg = <0x01c0b000 0x1000>; |
345 | interrupts = <0 55 4>; | 345 | interrupts = <0 55 4>; |
346 | clocks = <&ahb_gates 17>; | 346 | clocks = <&ahb_gates 17>; |
@@ -348,7 +348,7 @@ | |||
348 | }; | 348 | }; |
349 | 349 | ||
350 | mdio@01c0b080 { | 350 | mdio@01c0b080 { |
351 | compatible = "allwinner,sun4i-mdio"; | 351 | compatible = "allwinner,sun4i-a10-mdio"; |
352 | reg = <0x01c0b080 0x14>; | 352 | reg = <0x01c0b080 0x14>; |
353 | status = "disabled"; | 353 | status = "disabled"; |
354 | #address-cells = <1>; | 354 | #address-cells = <1>; |
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c index 53c6a26b633d..fd6bff0c5b96 100644 --- a/arch/arm/common/timer-sp.c +++ b/arch/arm/common/timer-sp.c | |||
@@ -271,10 +271,14 @@ static void __init integrator_cp_of_init(struct device_node *np) | |||
271 | void __iomem *base; | 271 | void __iomem *base; |
272 | int irq; | 272 | int irq; |
273 | const char *name = of_get_property(np, "compatible", NULL); | 273 | const char *name = of_get_property(np, "compatible", NULL); |
274 | struct clk *clk; | ||
274 | 275 | ||
275 | base = of_iomap(np, 0); | 276 | base = of_iomap(np, 0); |
276 | if (WARN_ON(!base)) | 277 | if (WARN_ON(!base)) |
277 | return; | 278 | return; |
279 | clk = of_clk_get(np, 0); | ||
280 | if (WARN_ON(IS_ERR(clk))) | ||
281 | return; | ||
278 | 282 | ||
279 | /* Ensure timer is disabled */ | 283 | /* Ensure timer is disabled */ |
280 | writel(0, base + TIMER_CTRL); | 284 | writel(0, base + TIMER_CTRL); |
@@ -283,13 +287,13 @@ static void __init integrator_cp_of_init(struct device_node *np) | |||
283 | goto err; | 287 | goto err; |
284 | 288 | ||
285 | if (!init_count) | 289 | if (!init_count) |
286 | sp804_clocksource_init(base, name); | 290 | __sp804_clocksource_and_sched_clock_init(base, name, clk, 0); |
287 | else { | 291 | else { |
288 | irq = irq_of_parse_and_map(np, 0); | 292 | irq = irq_of_parse_and_map(np, 0); |
289 | if (irq <= 0) | 293 | if (irq <= 0) |
290 | goto err; | 294 | goto err; |
291 | 295 | ||
292 | sp804_clockevents_init(base, irq, name); | 296 | __sp804_clockevents_init(base, irq, clk, name); |
293 | } | 297 | } |
294 | 298 | ||
295 | init_count++; | 299 | init_count++; |
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 845bc745706b..ee6982976d66 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig | |||
@@ -29,6 +29,7 @@ CONFIG_ARCH_OMAP3=y | |||
29 | CONFIG_ARCH_OMAP4=y | 29 | CONFIG_ARCH_OMAP4=y |
30 | CONFIG_SOC_OMAP5=y | 30 | CONFIG_SOC_OMAP5=y |
31 | CONFIG_SOC_AM33XX=y | 31 | CONFIG_SOC_AM33XX=y |
32 | CONFIG_SOC_DRA7XX=y | ||
32 | CONFIG_SOC_AM43XX=y | 33 | CONFIG_SOC_AM43XX=y |
33 | CONFIG_ARCH_ROCKCHIP=y | 34 | CONFIG_ARCH_ROCKCHIP=y |
34 | CONFIG_ARCH_SOCFPGA=y | 35 | CONFIG_ARCH_SOCFPGA=y |
diff --git a/arch/arm/mach-davinci/aemif.c b/arch/arm/mach-davinci/aemif.c index f091a9010c2f..ff8b7e76b6e9 100644 --- a/arch/arm/mach-davinci/aemif.c +++ b/arch/arm/mach-davinci/aemif.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/time.h> | 16 | #include <linux/time.h> |
17 | 17 | ||
18 | #include <linux/platform_data/mtd-davinci-aemif.h> | 18 | #include <linux/platform_data/mtd-davinci-aemif.h> |
19 | #include <linux/platform_data/mtd-davinci.h> | ||
19 | 20 | ||
20 | /* Timing value configuration */ | 21 | /* Timing value configuration */ |
21 | 22 | ||
@@ -43,6 +44,17 @@ | |||
43 | WSTROBE(WSTROBE_MAX) | \ | 44 | WSTROBE(WSTROBE_MAX) | \ |
44 | WSETUP(WSETUP_MAX)) | 45 | WSETUP(WSETUP_MAX)) |
45 | 46 | ||
47 | static inline unsigned int davinci_aemif_readl(void __iomem *base, int offset) | ||
48 | { | ||
49 | return readl_relaxed(base + offset); | ||
50 | } | ||
51 | |||
52 | static inline void davinci_aemif_writel(void __iomem *base, | ||
53 | int offset, unsigned long value) | ||
54 | { | ||
55 | writel_relaxed(value, base + offset); | ||
56 | } | ||
57 | |||
46 | /* | 58 | /* |
47 | * aemif_calc_rate - calculate timing data. | 59 | * aemif_calc_rate - calculate timing data. |
48 | * @wanted: The cycle time needed in nanoseconds. | 60 | * @wanted: The cycle time needed in nanoseconds. |
@@ -76,6 +88,7 @@ static int aemif_calc_rate(int wanted, unsigned long clk, int max) | |||
76 | * @t: timing values to be progammed | 88 | * @t: timing values to be progammed |
77 | * @base: The virtual base address of the AEMIF interface | 89 | * @base: The virtual base address of the AEMIF interface |
78 | * @cs: chip-select to program the timing values for | 90 | * @cs: chip-select to program the timing values for |
91 | * @clkrate: the AEMIF clkrate | ||
79 | * | 92 | * |
80 | * This function programs the given timing values (in real clock) into the | 93 | * This function programs the given timing values (in real clock) into the |
81 | * AEMIF registers taking the AEMIF clock into account. | 94 | * AEMIF registers taking the AEMIF clock into account. |
@@ -86,24 +99,17 @@ static int aemif_calc_rate(int wanted, unsigned long clk, int max) | |||
86 | * | 99 | * |
87 | * Returns 0 on success, else negative errno. | 100 | * Returns 0 on success, else negative errno. |
88 | */ | 101 | */ |
89 | int davinci_aemif_setup_timing(struct davinci_aemif_timing *t, | 102 | static int davinci_aemif_setup_timing(struct davinci_aemif_timing *t, |
90 | void __iomem *base, unsigned cs) | 103 | void __iomem *base, unsigned cs, |
104 | unsigned long clkrate) | ||
91 | { | 105 | { |
92 | unsigned set, val; | 106 | unsigned set, val; |
93 | int ta, rhold, rstrobe, rsetup, whold, wstrobe, wsetup; | 107 | int ta, rhold, rstrobe, rsetup, whold, wstrobe, wsetup; |
94 | unsigned offset = A1CR_OFFSET + cs * 4; | 108 | unsigned offset = A1CR_OFFSET + cs * 4; |
95 | struct clk *aemif_clk; | ||
96 | unsigned long clkrate; | ||
97 | 109 | ||
98 | if (!t) | 110 | if (!t) |
99 | return 0; /* Nothing to do */ | 111 | return 0; /* Nothing to do */ |
100 | 112 | ||
101 | aemif_clk = clk_get(NULL, "aemif"); | ||
102 | if (IS_ERR(aemif_clk)) | ||
103 | return PTR_ERR(aemif_clk); | ||
104 | |||
105 | clkrate = clk_get_rate(aemif_clk); | ||
106 | |||
107 | clkrate /= 1000; /* turn clock into kHz for ease of use */ | 113 | clkrate /= 1000; /* turn clock into kHz for ease of use */ |
108 | 114 | ||
109 | ta = aemif_calc_rate(t->ta, clkrate, TA_MAX); | 115 | ta = aemif_calc_rate(t->ta, clkrate, TA_MAX); |
@@ -130,4 +136,83 @@ int davinci_aemif_setup_timing(struct davinci_aemif_timing *t, | |||
130 | 136 | ||
131 | return 0; | 137 | return 0; |
132 | } | 138 | } |
133 | EXPORT_SYMBOL(davinci_aemif_setup_timing); | 139 | |
140 | /** | ||
141 | * davinci_aemif_setup - setup AEMIF interface by davinci_nand_pdata | ||
142 | * @pdev - link to platform device to setup settings for | ||
143 | * | ||
144 | * This function does not use any locking while programming the AEMIF | ||
145 | * because it is expected that there is only one user of a given | ||
146 | * chip-select. | ||
147 | * | ||
148 | * Returns 0 on success, else negative errno. | ||
149 | */ | ||
150 | int davinci_aemif_setup(struct platform_device *pdev) | ||
151 | { | ||
152 | struct davinci_nand_pdata *pdata = dev_get_platdata(&pdev->dev); | ||
153 | uint32_t val; | ||
154 | unsigned long clkrate; | ||
155 | struct resource *res; | ||
156 | void __iomem *base; | ||
157 | struct clk *clk; | ||
158 | int ret = 0; | ||
159 | |||
160 | clk = clk_get(&pdev->dev, "aemif"); | ||
161 | if (IS_ERR(clk)) { | ||
162 | ret = PTR_ERR(clk); | ||
163 | dev_dbg(&pdev->dev, "unable to get AEMIF clock, err %d\n", ret); | ||
164 | return ret; | ||
165 | } | ||
166 | |||
167 | ret = clk_prepare_enable(clk); | ||
168 | if (ret < 0) { | ||
169 | dev_dbg(&pdev->dev, "unable to enable AEMIF clock, err %d\n", | ||
170 | ret); | ||
171 | goto err_put; | ||
172 | } | ||
173 | |||
174 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); | ||
175 | if (!res) { | ||
176 | dev_err(&pdev->dev, "cannot get IORESOURCE_MEM\n"); | ||
177 | ret = -ENOMEM; | ||
178 | goto err; | ||
179 | } | ||
180 | |||
181 | base = ioremap(res->start, resource_size(res)); | ||
182 | if (!base) { | ||
183 | dev_err(&pdev->dev, "ioremap failed for resource %pR\n", res); | ||
184 | ret = -ENOMEM; | ||
185 | goto err; | ||
186 | } | ||
187 | |||
188 | /* | ||
189 | * Setup Async configuration register in case we did not boot | ||
190 | * from NAND and so bootloader did not bother to set it up. | ||
191 | */ | ||
192 | val = davinci_aemif_readl(base, A1CR_OFFSET + pdev->id * 4); | ||
193 | /* | ||
194 | * Extended Wait is not valid and Select Strobe mode is not | ||
195 | * used | ||
196 | */ | ||
197 | val &= ~(ACR_ASIZE_MASK | ACR_EW_MASK | ACR_SS_MASK); | ||
198 | if (pdata->options & NAND_BUSWIDTH_16) | ||
199 | val |= 0x1; | ||
200 | |||
201 | davinci_aemif_writel(base, A1CR_OFFSET + pdev->id * 4, val); | ||
202 | |||
203 | clkrate = clk_get_rate(clk); | ||
204 | |||
205 | if (pdata->timing) | ||
206 | ret = davinci_aemif_setup_timing(pdata->timing, base, pdev->id, | ||
207 | clkrate); | ||
208 | |||
209 | if (ret < 0) | ||
210 | dev_dbg(&pdev->dev, "NAND timing values setup fail\n"); | ||
211 | |||
212 | iounmap(base); | ||
213 | err: | ||
214 | clk_disable_unprepare(clk); | ||
215 | err_put: | ||
216 | clk_put(clk); | ||
217 | return ret; | ||
218 | } | ||
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index d1f45af7a530..5623131c4f0b 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c | |||
@@ -419,6 +419,9 @@ static inline void da830_evm_init_nand(int mux_mode) | |||
419 | if (ret) | 419 | if (ret) |
420 | pr_warning("da830_evm_init: NAND device not registered.\n"); | 420 | pr_warning("da830_evm_init: NAND device not registered.\n"); |
421 | 421 | ||
422 | if (davinci_aemif_setup(&da830_evm_nand_device)) | ||
423 | pr_warn("%s: Cannot configure AEMIF.\n", __func__); | ||
424 | |||
422 | gpio_direction_output(mux_mode, 1); | 425 | gpio_direction_output(mux_mode, 1); |
423 | } | 426 | } |
424 | #else | 427 | #else |
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index e0af0eccde8f..234c5bb091f5 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -358,6 +358,9 @@ static inline void da850_evm_setup_nor_nand(void) | |||
358 | 358 | ||
359 | platform_add_devices(da850_evm_devices, | 359 | platform_add_devices(da850_evm_devices, |
360 | ARRAY_SIZE(da850_evm_devices)); | 360 | ARRAY_SIZE(da850_evm_devices)); |
361 | |||
362 | if (davinci_aemif_setup(&da850_evm_nandflash_device)) | ||
363 | pr_warn("%s: Cannot configure AEMIF.\n", __func__); | ||
361 | } | 364 | } |
362 | } | 365 | } |
363 | 366 | ||
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 987605b78556..5602957b67d7 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -778,6 +778,11 @@ static __init void davinci_evm_init(void) | |||
778 | /* only one device will be jumpered and detected */ | 778 | /* only one device will be jumpered and detected */ |
779 | if (HAS_NAND) { | 779 | if (HAS_NAND) { |
780 | platform_device_register(&davinci_evm_nandflash_device); | 780 | platform_device_register(&davinci_evm_nandflash_device); |
781 | |||
782 | if (davinci_aemif_setup(&davinci_evm_nandflash_device)) | ||
783 | pr_warn("%s: Cannot configure AEMIF.\n", | ||
784 | __func__); | ||
785 | |||
781 | evm_leds[7].default_trigger = "nand-disk"; | 786 | evm_leds[7].default_trigger = "nand-disk"; |
782 | if (HAS_NOR) | 787 | if (HAS_NOR) |
783 | pr_warning("WARNING: both NAND and NOR flash " | 788 | pr_warning("WARNING: both NAND and NOR flash " |
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 13d0801fd6b1..ae129bc49273 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c | |||
@@ -805,6 +805,9 @@ static __init void evm_init(void) | |||
805 | 805 | ||
806 | platform_device_register(&davinci_nand_device); | 806 | platform_device_register(&davinci_nand_device); |
807 | 807 | ||
808 | if (davinci_aemif_setup(&davinci_nand_device)) | ||
809 | pr_warn("%s: Cannot configure AEMIF.\n", __func__); | ||
810 | |||
808 | dm646x_init_edma(dm646x_edma_rsv); | 811 | dm646x_init_edma(dm646x_edma_rsv); |
809 | 812 | ||
810 | if (HAS_ATA) | 813 | if (HAS_ATA) |
diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index 7aa105b1fd0f..96fc00a167f5 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <mach/cp_intc.h> | 27 | #include <mach/cp_intc.h> |
28 | #include <mach/da8xx.h> | 28 | #include <mach/da8xx.h> |
29 | #include <linux/platform_data/mtd-davinci.h> | 29 | #include <linux/platform_data/mtd-davinci.h> |
30 | #include <linux/platform_data/mtd-davinci-aemif.h> | ||
30 | #include <mach/mux.h> | 31 | #include <mach/mux.h> |
31 | #include <linux/platform_data/spi-davinci.h> | 32 | #include <linux/platform_data/spi-davinci.h> |
32 | 33 | ||
@@ -432,6 +433,9 @@ static void __init mityomapl138_setup_nand(void) | |||
432 | { | 433 | { |
433 | platform_add_devices(mityomapl138_devices, | 434 | platform_add_devices(mityomapl138_devices, |
434 | ARRAY_SIZE(mityomapl138_devices)); | 435 | ARRAY_SIZE(mityomapl138_devices)); |
436 | |||
437 | if (davinci_aemif_setup(&mityomapl138_nandflash_device)) | ||
438 | pr_warn("%s: Cannot configure AEMIF.\n", __func__); | ||
435 | } | 439 | } |
436 | 440 | ||
437 | static const short mityomap_mii_pins[] = { | 441 | static const short mityomap_mii_pins[] = { |
diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig index 8f4649b301b2..1abae5f6a418 100644 --- a/arch/arm/mach-hisi/Kconfig +++ b/arch/arm/mach-hisi/Kconfig | |||
@@ -8,7 +8,7 @@ config ARCH_HI3xxx | |||
8 | select CLKSRC_OF | 8 | select CLKSRC_OF |
9 | select GENERIC_CLOCKEVENTS | 9 | select GENERIC_CLOCKEVENTS |
10 | select HAVE_ARM_SCU | 10 | select HAVE_ARM_SCU |
11 | select HAVE_ARM_TWD | 11 | select HAVE_ARM_TWD if SMP |
12 | select HAVE_SMP | 12 | select HAVE_SMP |
13 | select PINCTRL | 13 | select PINCTRL |
14 | select PINCTRL_SINGLE | 14 | select PINCTRL_SINGLE |
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index af2e582d2b74..4d677f442539 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
@@ -482,6 +482,9 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
482 | if (IS_ENABLED(CONFIG_PCI_IMX6)) | 482 | if (IS_ENABLED(CONFIG_PCI_IMX6)) |
483 | clk_set_parent(clk[lvds1_sel], clk[sata_ref]); | 483 | clk_set_parent(clk[lvds1_sel], clk[sata_ref]); |
484 | 484 | ||
485 | /* Set initial power mode */ | ||
486 | imx6q_set_lpm(WAIT_CLOCKED); | ||
487 | |||
485 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); | 488 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); |
486 | base = of_iomap(np, 0); | 489 | base = of_iomap(np, 0); |
487 | WARN_ON(!base); | 490 | WARN_ON(!base); |
diff --git a/arch/arm/mach-imx/clk-imx6sl.c b/arch/arm/mach-imx/clk-imx6sl.c index 3781a1853998..4c86f3035205 100644 --- a/arch/arm/mach-imx/clk-imx6sl.c +++ b/arch/arm/mach-imx/clk-imx6sl.c | |||
@@ -266,6 +266,9 @@ static void __init imx6sl_clocks_init(struct device_node *ccm_node) | |||
266 | /* Audio-related clocks configuration */ | 266 | /* Audio-related clocks configuration */ |
267 | clk_set_parent(clks[IMX6SL_CLK_SPDIF0_SEL], clks[IMX6SL_CLK_PLL3_PFD3]); | 267 | clk_set_parent(clks[IMX6SL_CLK_SPDIF0_SEL], clks[IMX6SL_CLK_PLL3_PFD3]); |
268 | 268 | ||
269 | /* Set initial power mode */ | ||
270 | imx6q_set_lpm(WAIT_CLOCKED); | ||
271 | |||
269 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-gpt"); | 272 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6sl-gpt"); |
270 | base = of_iomap(np, 0); | 273 | base = of_iomap(np, 0); |
271 | WARN_ON(!base); | 274 | WARN_ON(!base); |
diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c index 9d47adc078aa..7a9b98589db7 100644 --- a/arch/arm/mach-imx/pm-imx6q.c +++ b/arch/arm/mach-imx/pm-imx6q.c | |||
@@ -236,8 +236,6 @@ void __init imx6q_pm_init(void) | |||
236 | regmap_update_bits(gpr, IOMUXC_GPR1, IMX6Q_GPR1_GINT, | 236 | regmap_update_bits(gpr, IOMUXC_GPR1, IMX6Q_GPR1_GINT, |
237 | IMX6Q_GPR1_GINT); | 237 | IMX6Q_GPR1_GINT); |
238 | 238 | ||
239 | /* Set initial power mode */ | ||
240 | imx6q_set_lpm(WAIT_CLOCKED); | ||
241 | 239 | ||
242 | suspend_set_ops(&imx6q_pm_ops); | 240 | suspend_set_ops(&imx6q_pm_ops); |
243 | } | 241 | } |
diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig index abeff25532ab..6e8b0e10b420 100644 --- a/arch/arm/mach-integrator/Kconfig +++ b/arch/arm/mach-integrator/Kconfig | |||
@@ -30,6 +30,9 @@ config ARCH_CINTEGRATOR | |||
30 | config INTEGRATOR_IMPD1 | 30 | config INTEGRATOR_IMPD1 |
31 | tristate "Include support for Integrator/IM-PD1" | 31 | tristate "Include support for Integrator/IM-PD1" |
32 | depends on ARCH_INTEGRATOR_AP | 32 | depends on ARCH_INTEGRATOR_AP |
33 | select ARCH_REQUIRE_GPIOLIB | ||
34 | select ARM_VIC | ||
35 | select GPIO_PL061 if GPIOLIB | ||
33 | help | 36 | help |
34 | The IM-PD1 is an add-on logic module for the Integrator which | 37 | The IM-PD1 is an add-on logic module for the Integrator which |
35 | allows ARM(R) Ltd PrimeCells to be developed and evaluated. | 38 | allows ARM(R) Ltd PrimeCells to be developed and evaluated. |
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 9f82f9dcbb98..d9b784824808 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/platform_data/clk-integrator.h> | 24 | #include <linux/platform_data/clk-integrator.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/irqchip/arm-vic.h> | ||
26 | 27 | ||
27 | #include <mach/lm.h> | 28 | #include <mach/lm.h> |
28 | #include <mach/impd1.h> | 29 | #include <mach/impd1.h> |
@@ -35,6 +36,7 @@ MODULE_PARM_DESC(lmid, "logic module stack position"); | |||
35 | 36 | ||
36 | struct impd1_module { | 37 | struct impd1_module { |
37 | void __iomem *base; | 38 | void __iomem *base; |
39 | void __iomem *vic_base; | ||
38 | }; | 40 | }; |
39 | 41 | ||
40 | void impd1_tweak_control(struct device *dev, u32 mask, u32 val) | 42 | void impd1_tweak_control(struct device *dev, u32 mask, u32 val) |
@@ -262,9 +264,6 @@ struct impd1_device { | |||
262 | 264 | ||
263 | static struct impd1_device impd1_devs[] = { | 265 | static struct impd1_device impd1_devs[] = { |
264 | { | 266 | { |
265 | .offset = 0x03000000, | ||
266 | .id = 0x00041190, | ||
267 | }, { | ||
268 | .offset = 0x00100000, | 267 | .offset = 0x00100000, |
269 | .irq = { 1 }, | 268 | .irq = { 1 }, |
270 | .id = 0x00141011, | 269 | .id = 0x00141011, |
@@ -304,46 +303,72 @@ static struct impd1_device impd1_devs[] = { | |||
304 | } | 303 | } |
305 | }; | 304 | }; |
306 | 305 | ||
307 | static int impd1_probe(struct lm_device *dev) | 306 | /* |
307 | * Valid IRQs: 0 thru 9 and 11, 10 unused. | ||
308 | */ | ||
309 | #define IMPD1_VALID_IRQS 0x00000bffU | ||
310 | |||
311 | static int __init impd1_probe(struct lm_device *dev) | ||
308 | { | 312 | { |
309 | struct impd1_module *impd1; | 313 | struct impd1_module *impd1; |
310 | int i, ret; | 314 | int irq_base; |
315 | int i; | ||
311 | 316 | ||
312 | if (dev->id != module_id) | 317 | if (dev->id != module_id) |
313 | return -EINVAL; | 318 | return -EINVAL; |
314 | 319 | ||
315 | if (!request_mem_region(dev->resource.start, SZ_4K, "LM registers")) | 320 | if (!devm_request_mem_region(&dev->dev, dev->resource.start, |
321 | SZ_4K, "LM registers")) | ||
316 | return -EBUSY; | 322 | return -EBUSY; |
317 | 323 | ||
318 | impd1 = kzalloc(sizeof(struct impd1_module), GFP_KERNEL); | 324 | impd1 = devm_kzalloc(&dev->dev, sizeof(struct impd1_module), |
319 | if (!impd1) { | 325 | GFP_KERNEL); |
320 | ret = -ENOMEM; | 326 | if (!impd1) |
321 | goto release_lm; | 327 | return -ENOMEM; |
322 | } | ||
323 | 328 | ||
324 | impd1->base = ioremap(dev->resource.start, SZ_4K); | 329 | impd1->base = devm_ioremap(&dev->dev, dev->resource.start, SZ_4K); |
325 | if (!impd1->base) { | 330 | if (!impd1->base) |
326 | ret = -ENOMEM; | 331 | return -ENOMEM; |
327 | goto free_impd1; | ||
328 | } | ||
329 | 332 | ||
330 | lm_set_drvdata(dev, impd1); | 333 | integrator_impd1_clk_init(impd1->base, dev->id); |
331 | 334 | ||
332 | printk("IM-PD1 found at 0x%08lx\n", | 335 | if (!devm_request_mem_region(&dev->dev, |
333 | (unsigned long)dev->resource.start); | 336 | dev->resource.start + 0x03000000, |
337 | SZ_4K, "VIC")) | ||
338 | return -EBUSY; | ||
334 | 339 | ||
335 | integrator_impd1_clk_init(impd1->base, dev->id); | 340 | impd1->vic_base = devm_ioremap(&dev->dev, |
341 | dev->resource.start + 0x03000000, | ||
342 | SZ_4K); | ||
343 | if (!impd1->vic_base) | ||
344 | return -ENOMEM; | ||
345 | |||
346 | irq_base = vic_init_cascaded(impd1->vic_base, dev->irq, | ||
347 | IMPD1_VALID_IRQS, 0); | ||
348 | |||
349 | lm_set_drvdata(dev, impd1); | ||
350 | |||
351 | dev_info(&dev->dev, "IM-PD1 found at 0x%08lx\n", | ||
352 | (unsigned long)dev->resource.start); | ||
336 | 353 | ||
337 | for (i = 0; i < ARRAY_SIZE(impd1_devs); i++) { | 354 | for (i = 0; i < ARRAY_SIZE(impd1_devs); i++) { |
338 | struct impd1_device *idev = impd1_devs + i; | 355 | struct impd1_device *idev = impd1_devs + i; |
339 | struct amba_device *d; | 356 | struct amba_device *d; |
340 | unsigned long pc_base; | 357 | unsigned long pc_base; |
341 | char devname[32]; | 358 | char devname[32]; |
359 | int irq1 = idev->irq[0]; | ||
360 | int irq2 = idev->irq[1]; | ||
361 | |||
362 | /* Translate IRQs to IM-PD1 local numberspace */ | ||
363 | if (irq1) | ||
364 | irq1 += irq_base; | ||
365 | if (irq2) | ||
366 | irq2 += irq_base; | ||
342 | 367 | ||
343 | pc_base = dev->resource.start + idev->offset; | 368 | pc_base = dev->resource.start + idev->offset; |
344 | snprintf(devname, 32, "lm%x:%5.5lx", dev->id, idev->offset >> 12); | 369 | snprintf(devname, 32, "lm%x:%5.5lx", dev->id, idev->offset >> 12); |
345 | d = amba_ahb_device_add_res(&dev->dev, devname, pc_base, SZ_4K, | 370 | d = amba_ahb_device_add_res(&dev->dev, devname, pc_base, SZ_4K, |
346 | dev->irq, dev->irq, | 371 | irq1, irq2, |
347 | idev->platform_data, idev->id, | 372 | idev->platform_data, idev->id, |
348 | &dev->resource); | 373 | &dev->resource); |
349 | if (IS_ERR(d)) { | 374 | if (IS_ERR(d)) { |
@@ -353,14 +378,6 @@ static int impd1_probe(struct lm_device *dev) | |||
353 | } | 378 | } |
354 | 379 | ||
355 | return 0; | 380 | return 0; |
356 | |||
357 | free_impd1: | ||
358 | if (impd1 && impd1->base) | ||
359 | iounmap(impd1->base); | ||
360 | kfree(impd1); | ||
361 | release_lm: | ||
362 | release_mem_region(dev->resource.start, SZ_4K); | ||
363 | return ret; | ||
364 | } | 381 | } |
365 | 382 | ||
366 | static int impd1_remove_one(struct device *dev, void *data) | 383 | static int impd1_remove_one(struct device *dev, void *data) |
@@ -371,16 +388,10 @@ static int impd1_remove_one(struct device *dev, void *data) | |||
371 | 388 | ||
372 | static void impd1_remove(struct lm_device *dev) | 389 | static void impd1_remove(struct lm_device *dev) |
373 | { | 390 | { |
374 | struct impd1_module *impd1 = lm_get_drvdata(dev); | ||
375 | |||
376 | device_for_each_child(&dev->dev, NULL, impd1_remove_one); | 391 | device_for_each_child(&dev->dev, NULL, impd1_remove_one); |
377 | integrator_impd1_clk_exit(dev->id); | 392 | integrator_impd1_clk_exit(dev->id); |
378 | 393 | ||
379 | lm_set_drvdata(dev, NULL); | 394 | lm_set_drvdata(dev, NULL); |
380 | |||
381 | iounmap(impd1->base); | ||
382 | kfree(impd1); | ||
383 | release_mem_region(dev->resource.start, SZ_4K); | ||
384 | } | 395 | } |
385 | 396 | ||
386 | static struct lm_driver impd1_driver = { | 397 | static struct lm_driver impd1_driver = { |
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index 17c0fe627435..fedcd2fab094 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/sys_soc.h> | 42 | #include <linux/sys_soc.h> |
43 | #include <linux/termios.h> | 43 | #include <linux/termios.h> |
44 | #include <linux/sched_clock.h> | 44 | #include <linux/sched_clock.h> |
45 | #include <linux/clk-provider.h> | ||
45 | 46 | ||
46 | #include <mach/hardware.h> | 47 | #include <mach/hardware.h> |
47 | #include <mach/platform.h> | 48 | #include <mach/platform.h> |
@@ -402,10 +403,7 @@ static void __init ap_of_timer_init(void) | |||
402 | struct clk *clk; | 403 | struct clk *clk; |
403 | unsigned long rate; | 404 | unsigned long rate; |
404 | 405 | ||
405 | clk = clk_get_sys("ap_timer", NULL); | 406 | of_clk_init(NULL); |
406 | BUG_ON(IS_ERR(clk)); | ||
407 | clk_prepare_enable(clk); | ||
408 | rate = clk_get_rate(clk); | ||
409 | 407 | ||
410 | err = of_property_read_string(of_aliases, | 408 | err = of_property_read_string(of_aliases, |
411 | "arm,timer-primary", &path); | 409 | "arm,timer-primary", &path); |
@@ -415,6 +413,12 @@ static void __init ap_of_timer_init(void) | |||
415 | base = of_iomap(node, 0); | 413 | base = of_iomap(node, 0); |
416 | if (WARN_ON(!base)) | 414 | if (WARN_ON(!base)) |
417 | return; | 415 | return; |
416 | |||
417 | clk = of_clk_get(node, 0); | ||
418 | BUG_ON(IS_ERR(clk)); | ||
419 | clk_prepare_enable(clk); | ||
420 | rate = clk_get_rate(clk); | ||
421 | |||
418 | writel(0, base + TIMER_CTRL); | 422 | writel(0, base + TIMER_CTRL); |
419 | integrator_clocksource_init(rate, base); | 423 | integrator_clocksource_init(rate, base); |
420 | 424 | ||
@@ -427,6 +431,12 @@ static void __init ap_of_timer_init(void) | |||
427 | if (WARN_ON(!base)) | 431 | if (WARN_ON(!base)) |
428 | return; | 432 | return; |
429 | irq = irq_of_parse_and_map(node, 0); | 433 | irq = irq_of_parse_and_map(node, 0); |
434 | |||
435 | clk = of_clk_get(node, 0); | ||
436 | BUG_ON(IS_ERR(clk)); | ||
437 | clk_prepare_enable(clk); | ||
438 | rate = clk_get_rate(clk); | ||
439 | |||
430 | writel(0, base + TIMER_CTRL); | 440 | writel(0, base + TIMER_CTRL); |
431 | integrator_clockevent_init(rate, base, irq); | 441 | integrator_clockevent_init(rate, base, irq); |
432 | } | 442 | } |
@@ -440,7 +450,6 @@ static void __init ap_init_irq_of(void) | |||
440 | { | 450 | { |
441 | cm_init(); | 451 | cm_init(); |
442 | of_irq_init(fpga_irq_of_match); | 452 | of_irq_init(fpga_irq_of_match); |
443 | integrator_clk_init(false); | ||
444 | } | 453 | } |
445 | 454 | ||
446 | /* For the Device Tree, add in the UART callbacks as AUXDATA */ | 455 | /* For the Device Tree, add in the UART callbacks as AUXDATA */ |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index a3ef961e4a93..0ad5f60598c8 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/irqchip/versatile-fpga.h> | 23 | #include <linux/irqchip/versatile-fpga.h> |
24 | #include <linux/gfp.h> | 24 | #include <linux/gfp.h> |
25 | #include <linux/mtd/physmap.h> | 25 | #include <linux/mtd/physmap.h> |
26 | #include <linux/platform_data/clk-integrator.h> | ||
27 | #include <linux/of_irq.h> | 26 | #include <linux/of_irq.h> |
28 | #include <linux/of_address.h> | 27 | #include <linux/of_address.h> |
29 | #include <linux/of_platform.h> | 28 | #include <linux/of_platform.h> |
@@ -33,8 +32,6 @@ | |||
33 | #include <mach/platform.h> | 32 | #include <mach/platform.h> |
34 | #include <asm/setup.h> | 33 | #include <asm/setup.h> |
35 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
36 | #include <asm/hardware/arm_timer.h> | ||
37 | #include <asm/hardware/icst.h> | ||
38 | 35 | ||
39 | #include <mach/lm.h> | 36 | #include <mach/lm.h> |
40 | 37 | ||
@@ -43,8 +40,6 @@ | |||
43 | #include <asm/mach/map.h> | 40 | #include <asm/mach/map.h> |
44 | #include <asm/mach/time.h> | 41 | #include <asm/mach/time.h> |
45 | 42 | ||
46 | #include <asm/hardware/timer-sp.h> | ||
47 | |||
48 | #include <plat/clcd.h> | 43 | #include <plat/clcd.h> |
49 | #include <plat/sched_clock.h> | 44 | #include <plat/sched_clock.h> |
50 | 45 | ||
@@ -250,7 +245,6 @@ static void __init intcp_init_irq_of(void) | |||
250 | { | 245 | { |
251 | cm_init(); | 246 | cm_init(); |
252 | of_irq_init(fpga_irq_of_match); | 247 | of_irq_init(fpga_irq_of_match); |
253 | integrator_clk_init(true); | ||
254 | } | 248 | } |
255 | 249 | ||
256 | /* | 250 | /* |
diff --git a/arch/arm/mach-moxart/Kconfig b/arch/arm/mach-moxart/Kconfig index ba470d64493b..3795ae28a613 100644 --- a/arch/arm/mach-moxart/Kconfig +++ b/arch/arm/mach-moxart/Kconfig | |||
@@ -2,7 +2,6 @@ config ARCH_MOXART | |||
2 | bool "MOXA ART SoC" if ARCH_MULTI_V4T | 2 | bool "MOXA ART SoC" if ARCH_MULTI_V4T |
3 | select CPU_FA526 | 3 | select CPU_FA526 |
4 | select ARM_DMA_MEM_BUFFERABLE | 4 | select ARM_DMA_MEM_BUFFERABLE |
5 | select DMA_OF | ||
6 | select USE_OF | 5 | select USE_OF |
7 | select CLKSRC_OF | 6 | select CLKSRC_OF |
8 | select CLKSRC_MMIO | 7 | select CLKSRC_MMIO |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 653b489479e0..e2ce4f8366a7 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -54,7 +54,7 @@ config SOC_OMAP5 | |||
54 | select ARM_GIC | 54 | select ARM_GIC |
55 | select CPU_V7 | 55 | select CPU_V7 |
56 | select HAVE_ARM_SCU if SMP | 56 | select HAVE_ARM_SCU if SMP |
57 | select HAVE_ARM_TWD if LOCAL_TIMERS | 57 | select HAVE_ARM_TWD if SMP |
58 | select HAVE_SMP | 58 | select HAVE_SMP |
59 | select HAVE_ARM_ARCH_TIMER | 59 | select HAVE_ARM_ARCH_TIMER |
60 | select ARM_ERRATA_798181 if SMP | 60 | select ARM_ERRATA_798181 if SMP |
diff --git a/arch/arm/mach-pxa/am300epd.c b/arch/arm/mach-pxa/am300epd.c index c9f309ae88c5..8b90c4f2d430 100644 --- a/arch/arm/mach-pxa/am300epd.c +++ b/arch/arm/mach-pxa/am300epd.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <mach/gumstix.h> | 31 | #include <mach/gumstix.h> |
32 | #include <mach/mfp-pxa25x.h> | 32 | #include <mach/mfp-pxa25x.h> |
33 | #include <mach/irqs.h> | ||
33 | #include <linux/platform_data/video-pxafb.h> | 34 | #include <linux/platform_data/video-pxafb.h> |
34 | 35 | ||
35 | #include "generic.h" | 36 | #include "generic.h" |
diff --git a/arch/arm/mach-pxa/include/mach/balloon3.h b/arch/arm/mach-pxa/include/mach/balloon3.h index 954641e6c8b1..1b0825911e62 100644 --- a/arch/arm/mach-pxa/include/mach/balloon3.h +++ b/arch/arm/mach-pxa/include/mach/balloon3.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #ifndef ASM_ARCH_BALLOON3_H | 14 | #ifndef ASM_ARCH_BALLOON3_H |
15 | #define ASM_ARCH_BALLOON3_H | 15 | #define ASM_ARCH_BALLOON3_H |
16 | 16 | ||
17 | #include "irqs.h" /* PXA_NR_BUILTIN_GPIO */ | ||
18 | |||
17 | enum balloon3_features { | 19 | enum balloon3_features { |
18 | BALLOON3_FEATURE_OHCI, | 20 | BALLOON3_FEATURE_OHCI, |
19 | BALLOON3_FEATURE_MMC, | 21 | BALLOON3_FEATURE_MMC, |
diff --git a/arch/arm/mach-pxa/include/mach/corgi.h b/arch/arm/mach-pxa/include/mach/corgi.h index f3c3493b468d..c030d955bbd7 100644 --- a/arch/arm/mach-pxa/include/mach/corgi.h +++ b/arch/arm/mach-pxa/include/mach/corgi.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #ifndef __ASM_ARCH_CORGI_H | 13 | #ifndef __ASM_ARCH_CORGI_H |
14 | #define __ASM_ARCH_CORGI_H 1 | 14 | #define __ASM_ARCH_CORGI_H 1 |
15 | 15 | ||
16 | #include "irqs.h" /* PXA_NR_BUILTIN_GPIO */ | ||
16 | 17 | ||
17 | /* | 18 | /* |
18 | * Corgi (Non Standard) GPIO Definitions | 19 | * Corgi (Non Standard) GPIO Definitions |
diff --git a/arch/arm/mach-pxa/include/mach/csb726.h b/arch/arm/mach-pxa/include/mach/csb726.h index 2628e7b72116..00cfbbbf73f7 100644 --- a/arch/arm/mach-pxa/include/mach/csb726.h +++ b/arch/arm/mach-pxa/include/mach/csb726.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef CSB726_H | 11 | #ifndef CSB726_H |
12 | #define CSB726_H | 12 | #define CSB726_H |
13 | 13 | ||
14 | #include "irqs.h" /* PXA_GPIO_TO_IRQ */ | ||
15 | |||
14 | #define CSB726_GPIO_IRQ_LAN 52 | 16 | #define CSB726_GPIO_IRQ_LAN 52 |
15 | #define CSB726_GPIO_IRQ_SM501 53 | 17 | #define CSB726_GPIO_IRQ_SM501 53 |
16 | #define CSB726_GPIO_MMC_DETECT 100 | 18 | #define CSB726_GPIO_MMC_DETECT 100 |
diff --git a/arch/arm/mach-pxa/include/mach/gumstix.h b/arch/arm/mach-pxa/include/mach/gumstix.h index dba14b6503ad..f7df27bbb42e 100644 --- a/arch/arm/mach-pxa/include/mach/gumstix.h +++ b/arch/arm/mach-pxa/include/mach/gumstix.h | |||
@@ -6,6 +6,7 @@ | |||
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include "irqs.h" /* PXA_GPIO_TO_IRQ */ | ||
9 | 10 | ||
10 | /* BTRESET - Reset line to Bluetooth module, active low signal. */ | 11 | /* BTRESET - Reset line to Bluetooth module, active low signal. */ |
11 | #define GPIO_GUMSTIX_BTRESET 7 | 12 | #define GPIO_GUMSTIX_BTRESET 7 |
diff --git a/arch/arm/mach-pxa/include/mach/idp.h b/arch/arm/mach-pxa/include/mach/idp.h index 22a96f87232b..7e63f4680271 100644 --- a/arch/arm/mach-pxa/include/mach/idp.h +++ b/arch/arm/mach-pxa/include/mach/idp.h | |||
@@ -23,6 +23,7 @@ | |||
23 | * IDP hardware. | 23 | * IDP hardware. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "irqs.h" /* PXA_GPIO_TO_IRQ */ | ||
26 | 27 | ||
27 | #define IDP_FLASH_PHYS (PXA_CS0_PHYS) | 28 | #define IDP_FLASH_PHYS (PXA_CS0_PHYS) |
28 | #define IDP_ALT_FLASH_PHYS (PXA_CS1_PHYS) | 29 | #define IDP_ALT_FLASH_PHYS (PXA_CS1_PHYS) |
diff --git a/arch/arm/mach-pxa/include/mach/palmld.h b/arch/arm/mach-pxa/include/mach/palmld.h index 2c4471336570..b184f296023b 100644 --- a/arch/arm/mach-pxa/include/mach/palmld.h +++ b/arch/arm/mach-pxa/include/mach/palmld.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #ifndef _INCLUDE_PALMLD_H_ | 13 | #ifndef _INCLUDE_PALMLD_H_ |
14 | #define _INCLUDE_PALMLD_H_ | 14 | #define _INCLUDE_PALMLD_H_ |
15 | 15 | ||
16 | #include "irqs.h" /* PXA_GPIO_TO_IRQ */ | ||
17 | |||
16 | /** HERE ARE GPIOs **/ | 18 | /** HERE ARE GPIOs **/ |
17 | 19 | ||
18 | /* GPIOs */ | 20 | /* GPIOs */ |
diff --git a/arch/arm/mach-pxa/include/mach/palmt5.h b/arch/arm/mach-pxa/include/mach/palmt5.h index 0bd4f036c72f..e342c5921405 100644 --- a/arch/arm/mach-pxa/include/mach/palmt5.h +++ b/arch/arm/mach-pxa/include/mach/palmt5.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #ifndef _INCLUDE_PALMT5_H_ | 15 | #ifndef _INCLUDE_PALMT5_H_ |
16 | #define _INCLUDE_PALMT5_H_ | 16 | #define _INCLUDE_PALMT5_H_ |
17 | 17 | ||
18 | #include "irqs.h" /* PXA_GPIO_TO_IRQ */ | ||
19 | |||
18 | /** HERE ARE GPIOs **/ | 20 | /** HERE ARE GPIOs **/ |
19 | 21 | ||
20 | /* GPIOs */ | 22 | /* GPIOs */ |
diff --git a/arch/arm/mach-pxa/include/mach/palmtc.h b/arch/arm/mach-pxa/include/mach/palmtc.h index c383a21680b6..81c727b3cfd2 100644 --- a/arch/arm/mach-pxa/include/mach/palmtc.h +++ b/arch/arm/mach-pxa/include/mach/palmtc.h | |||
@@ -16,6 +16,8 @@ | |||
16 | #ifndef _INCLUDE_PALMTC_H_ | 16 | #ifndef _INCLUDE_PALMTC_H_ |
17 | #define _INCLUDE_PALMTC_H_ | 17 | #define _INCLUDE_PALMTC_H_ |
18 | 18 | ||
19 | #include "irqs.h" /* PXA_GPIO_TO_IRQ */ | ||
20 | |||
19 | /** HERE ARE GPIOs **/ | 21 | /** HERE ARE GPIOs **/ |
20 | 22 | ||
21 | /* GPIOs */ | 23 | /* GPIOs */ |
diff --git a/arch/arm/mach-pxa/include/mach/palmtx.h b/arch/arm/mach-pxa/include/mach/palmtx.h index f2e530380253..92bc1f05300d 100644 --- a/arch/arm/mach-pxa/include/mach/palmtx.h +++ b/arch/arm/mach-pxa/include/mach/palmtx.h | |||
@@ -16,6 +16,8 @@ | |||
16 | #ifndef _INCLUDE_PALMTX_H_ | 16 | #ifndef _INCLUDE_PALMTX_H_ |
17 | #define _INCLUDE_PALMTX_H_ | 17 | #define _INCLUDE_PALMTX_H_ |
18 | 18 | ||
19 | #include "irqs.h" /* PXA_GPIO_TO_IRQ */ | ||
20 | |||
19 | /** HERE ARE GPIOs **/ | 21 | /** HERE ARE GPIOs **/ |
20 | 22 | ||
21 | /* GPIOs */ | 23 | /* GPIOs */ |
diff --git a/arch/arm/mach-pxa/include/mach/pcm027.h b/arch/arm/mach-pxa/include/mach/pcm027.h index 6bf28de228bd..86ebd7b6c960 100644 --- a/arch/arm/mach-pxa/include/mach/pcm027.h +++ b/arch/arm/mach-pxa/include/mach/pcm027.h | |||
@@ -23,6 +23,8 @@ | |||
23 | * Definitions of CPU card resources only | 23 | * Definitions of CPU card resources only |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "irqs.h" /* PXA_GPIO_TO_IRQ */ | ||
27 | |||
26 | /* phyCORE-PXA270 (PCM027) Interrupts */ | 28 | /* phyCORE-PXA270 (PCM027) Interrupts */ |
27 | #define PCM027_IRQ(x) (IRQ_BOARD_START + (x)) | 29 | #define PCM027_IRQ(x) (IRQ_BOARD_START + (x)) |
28 | #define PCM027_BTDET_IRQ PCM027_IRQ(0) | 30 | #define PCM027_BTDET_IRQ PCM027_IRQ(0) |
diff --git a/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h b/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h index 0260aaa2fc17..7e544c14967e 100644 --- a/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h +++ b/arch/arm/mach-pxa/include/mach/pcm990_baseboard.h | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <mach/pcm027.h> | 22 | #include <mach/pcm027.h> |
23 | #include "irqs.h" /* PXA_GPIO_TO_IRQ */ | ||
23 | 24 | ||
24 | /* | 25 | /* |
25 | * definitions relevant only when the PCM-990 | 26 | * definitions relevant only when the PCM-990 |
diff --git a/arch/arm/mach-pxa/include/mach/poodle.h b/arch/arm/mach-pxa/include/mach/poodle.h index f32ff75dcca8..b56b19351a03 100644 --- a/arch/arm/mach-pxa/include/mach/poodle.h +++ b/arch/arm/mach-pxa/include/mach/poodle.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #ifndef __ASM_ARCH_POODLE_H | 15 | #ifndef __ASM_ARCH_POODLE_H |
16 | #define __ASM_ARCH_POODLE_H 1 | 16 | #define __ASM_ARCH_POODLE_H 1 |
17 | 17 | ||
18 | #include "irqs.h" /* PXA_GPIO_TO_IRQ */ | ||
19 | |||
18 | /* | 20 | /* |
19 | * GPIOs | 21 | * GPIOs |
20 | */ | 22 | */ |
diff --git a/arch/arm/mach-pxa/include/mach/spitz.h b/arch/arm/mach-pxa/include/mach/spitz.h index 0bfe6507c95d..25c9f62e46aa 100644 --- a/arch/arm/mach-pxa/include/mach/spitz.h +++ b/arch/arm/mach-pxa/include/mach/spitz.h | |||
@@ -15,8 +15,8 @@ | |||
15 | #define __ASM_ARCH_SPITZ_H 1 | 15 | #define __ASM_ARCH_SPITZ_H 1 |
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | #include "irqs.h" /* PXA_NR_BUILTIN_GPIO, PXA_GPIO_TO_IRQ */ | ||
18 | #include <linux/fb.h> | 19 | #include <linux/fb.h> |
19 | #include <linux/gpio.h> | ||
20 | 20 | ||
21 | /* Spitz/Akita GPIOs */ | 21 | /* Spitz/Akita GPIOs */ |
22 | 22 | ||
diff --git a/arch/arm/mach-pxa/include/mach/tosa.h b/arch/arm/mach-pxa/include/mach/tosa.h index 2bb0e862598c..0497d95cef25 100644 --- a/arch/arm/mach-pxa/include/mach/tosa.h +++ b/arch/arm/mach-pxa/include/mach/tosa.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #ifndef _ASM_ARCH_TOSA_H_ | 13 | #ifndef _ASM_ARCH_TOSA_H_ |
14 | #define _ASM_ARCH_TOSA_H_ 1 | 14 | #define _ASM_ARCH_TOSA_H_ 1 |
15 | 15 | ||
16 | #include "irqs.h" /* PXA_NR_BUILTIN_GPIO */ | ||
17 | |||
16 | /* TOSA Chip selects */ | 18 | /* TOSA Chip selects */ |
17 | #define TOSA_LCDC_PHYS PXA_CS4_PHYS | 19 | #define TOSA_LCDC_PHYS PXA_CS4_PHYS |
18 | /* Internel Scoop */ | 20 | /* Internel Scoop */ |
diff --git a/arch/arm/mach-pxa/include/mach/trizeps4.h b/arch/arm/mach-pxa/include/mach/trizeps4.h index d2ca01053f69..ae3ca013afab 100644 --- a/arch/arm/mach-pxa/include/mach/trizeps4.h +++ b/arch/arm/mach-pxa/include/mach/trizeps4.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #ifndef _TRIPEPS4_H_ | 10 | #ifndef _TRIPEPS4_H_ |
11 | #define _TRIPEPS4_H_ | 11 | #define _TRIPEPS4_H_ |
12 | 12 | ||
13 | #include "irqs.h" /* PXA_GPIO_TO_IRQ */ | ||
14 | |||
13 | /* physical memory regions */ | 15 | /* physical memory regions */ |
14 | #define TRIZEPS4_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */ | 16 | #define TRIZEPS4_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */ |
15 | #define TRIZEPS4_DISK_PHYS (PXA_CS1_PHYS) /* Disk On Chip region */ | 17 | #define TRIZEPS4_DISK_PHYS (PXA_CS1_PHYS) /* Disk On Chip region */ |
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index 338640631e08..05fa505df585 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -8,7 +8,7 @@ config ARCH_SHMOBILE_MULTI | |||
8 | select CPU_V7 | 8 | select CPU_V7 |
9 | select GENERIC_CLOCKEVENTS | 9 | select GENERIC_CLOCKEVENTS |
10 | select HAVE_ARM_SCU if SMP | 10 | select HAVE_ARM_SCU if SMP |
11 | select HAVE_ARM_TWD if LOCAL_TIMERS | 11 | select HAVE_ARM_TWD if SMP |
12 | select HAVE_SMP | 12 | select HAVE_SMP |
13 | select ARM_GIC | 13 | select ARM_GIC |
14 | select MIGHT_HAVE_CACHE_L2X0 | 14 | select MIGHT_HAVE_CACHE_L2X0 |
diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c index e6ab0cd5b286..dd8ce87596de 100644 --- a/arch/arm/mach-shmobile/clock-r7s72100.c +++ b/arch/arm/mach-shmobile/clock-r7s72100.c | |||
@@ -176,6 +176,10 @@ static struct clk_lookup lookups[] = { | |||
176 | CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]), | 176 | CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]), |
177 | 177 | ||
178 | /* MSTP clocks */ | 178 | /* MSTP clocks */ |
179 | CLKDEV_DEV_ID("fcfee000.i2c", &mstp_clks[MSTP97]), | ||
180 | CLKDEV_DEV_ID("fcfee400.i2c", &mstp_clks[MSTP96]), | ||
181 | CLKDEV_DEV_ID("fcfee800.i2c", &mstp_clks[MSTP95]), | ||
182 | CLKDEV_DEV_ID("fcfeec00.i2c", &mstp_clks[MSTP94]), | ||
179 | CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP33]), | 183 | CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP33]), |
180 | 184 | ||
181 | /* ICK */ | 185 | /* ICK */ |
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c index f1fb89b76786..93a562531d53 100644 --- a/arch/arm/mach-shmobile/clock-r8a7779.c +++ b/arch/arm/mach-shmobile/clock-r8a7779.c | |||
@@ -127,16 +127,16 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
127 | [MSTP322] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 22, 0), /* SDHI1 */ | 127 | [MSTP322] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 22, 0), /* SDHI1 */ |
128 | [MSTP321] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 21, 0), /* SDHI2 */ | 128 | [MSTP321] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 21, 0), /* SDHI2 */ |
129 | [MSTP320] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 20, 0), /* SDHI3 */ | 129 | [MSTP320] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 20, 0), /* SDHI3 */ |
130 | [MSTP120] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 20, 0), /* VIN3 */ | 130 | [MSTP120] = SH_CLK_MSTP32_STS(&clks_clk, MSTPCR1, 20, MSTPSR1, 0), /* VIN3 */ |
131 | [MSTP116] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 16, 0), /* PCIe */ | 131 | [MSTP116] = SH_CLK_MSTP32_STS(&clkp_clk, MSTPCR1, 16, MSTPSR1, 0), /* PCIe */ |
132 | [MSTP115] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 15, 0), /* SATA */ | 132 | [MSTP115] = SH_CLK_MSTP32_STS(&clkp_clk, MSTPCR1, 15, MSTPSR1, 0), /* SATA */ |
133 | [MSTP114] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 14, 0), /* Ether */ | 133 | [MSTP114] = SH_CLK_MSTP32_STS(&clkp_clk, MSTPCR1, 14, MSTPSR1, 0), /* Ether */ |
134 | [MSTP110] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 10, 0), /* VIN0 */ | 134 | [MSTP110] = SH_CLK_MSTP32_STS(&clks_clk, MSTPCR1, 10, MSTPSR1, 0), /* VIN0 */ |
135 | [MSTP109] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 9, 0), /* VIN1 */ | 135 | [MSTP109] = SH_CLK_MSTP32_STS(&clks_clk, MSTPCR1, 9, MSTPSR1, 0), /* VIN1 */ |
136 | [MSTP108] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 8, 0), /* VIN2 */ | 136 | [MSTP108] = SH_CLK_MSTP32_STS(&clks_clk, MSTPCR1, 8, MSTPSR1, 0), /* VIN2 */ |
137 | [MSTP103] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 3, 0), /* DU */ | 137 | [MSTP103] = SH_CLK_MSTP32_STS(&clks_clk, MSTPCR1, 3, MSTPSR1, 0), /* DU */ |
138 | [MSTP101] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 1, 0), /* USB2 */ | 138 | [MSTP101] = SH_CLK_MSTP32_STS(&clkp_clk, MSTPCR1, 1, MSTPSR1, 0), /* USB2 */ |
139 | [MSTP100] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 0, 0), /* USB0/1 */ | 139 | [MSTP100] = SH_CLK_MSTP32_STS(&clkp_clk, MSTPCR1, 0, MSTPSR1, 0), /* USB0/1 */ |
140 | [MSTP030] = SH_CLK_MSTP32(&clkp_clk, MSTPCR0, 30, 0), /* I2C0 */ | 140 | [MSTP030] = SH_CLK_MSTP32(&clkp_clk, MSTPCR0, 30, 0), /* I2C0 */ |
141 | [MSTP029] = SH_CLK_MSTP32(&clkp_clk, MSTPCR0, 29, 0), /* I2C1 */ | 141 | [MSTP029] = SH_CLK_MSTP32(&clkp_clk, MSTPCR0, 29, 0), /* I2C1 */ |
142 | [MSTP028] = SH_CLK_MSTP32(&clkp_clk, MSTPCR0, 28, 0), /* I2C2 */ | 142 | [MSTP028] = SH_CLK_MSTP32(&clkp_clk, MSTPCR0, 28, 0), /* I2C2 */ |
diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c index f44987a92ad4..507073e9d455 100644 --- a/arch/arm/mach-shmobile/clock-r8a7790.c +++ b/arch/arm/mach-shmobile/clock-r8a7790.c | |||
@@ -43,17 +43,26 @@ | |||
43 | * see "p1 / 2" on R8A7790_CLOCK_ROOT() below | 43 | * see "p1 / 2" on R8A7790_CLOCK_ROOT() below |
44 | */ | 44 | */ |
45 | 45 | ||
46 | #define CPG_BASE 0xe6150000 | 46 | #define CPG_BASE 0xe6150000 |
47 | #define CPG_LEN 0x1000 | 47 | #define CPG_LEN 0x1000 |
48 | 48 | ||
49 | #define SMSTPCR1 0xe6150134 | 49 | #define SMSTPCR1 0xe6150134 |
50 | #define SMSTPCR2 0xe6150138 | 50 | #define SMSTPCR2 0xe6150138 |
51 | #define SMSTPCR3 0xe615013c | 51 | #define SMSTPCR3 0xe615013c |
52 | #define SMSTPCR5 0xe6150144 | 52 | #define SMSTPCR5 0xe6150144 |
53 | #define SMSTPCR7 0xe615014c | 53 | #define SMSTPCR7 0xe615014c |
54 | #define SMSTPCR8 0xe6150990 | 54 | #define SMSTPCR8 0xe6150990 |
55 | #define SMSTPCR9 0xe6150994 | 55 | #define SMSTPCR9 0xe6150994 |
56 | #define SMSTPCR10 0xe6150998 | 56 | #define SMSTPCR10 0xe6150998 |
57 | |||
58 | #define MSTPSR1 IOMEM(0xe6150038) | ||
59 | #define MSTPSR2 IOMEM(0xe6150040) | ||
60 | #define MSTPSR3 IOMEM(0xe6150048) | ||
61 | #define MSTPSR5 IOMEM(0xe615003c) | ||
62 | #define MSTPSR7 IOMEM(0xe61501c4) | ||
63 | #define MSTPSR8 IOMEM(0xe61509a0) | ||
64 | #define MSTPSR9 IOMEM(0xe61509a4) | ||
65 | #define MSTPSR10 IOMEM(0xe61509a8) | ||
57 | 66 | ||
58 | #define SDCKCR 0xE6150074 | 67 | #define SDCKCR 0xE6150074 |
59 | #define SD2CKCR 0xE6150078 | 68 | #define SD2CKCR 0xE6150078 |
@@ -187,11 +196,14 @@ enum { | |||
187 | MSTP1009, MSTP1008, MSTP1007, MSTP1006, MSTP1005, | 196 | MSTP1009, MSTP1008, MSTP1007, MSTP1006, MSTP1005, |
188 | MSTP931, MSTP930, MSTP929, MSTP928, | 197 | MSTP931, MSTP930, MSTP929, MSTP928, |
189 | MSTP917, | 198 | MSTP917, |
199 | MSTP815, MSTP814, | ||
190 | MSTP813, | 200 | MSTP813, |
201 | MSTP811, MSTP810, MSTP809, MSTP808, | ||
191 | MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720, | 202 | MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720, |
192 | MSTP717, MSTP716, | 203 | MSTP717, MSTP716, |
193 | MSTP704, | 204 | MSTP704, MSTP703, |
194 | MSTP522, | 205 | MSTP522, |
206 | MSTP502, MSTP501, | ||
195 | MSTP315, MSTP314, MSTP313, MSTP312, MSTP311, MSTP305, MSTP304, | 207 | MSTP315, MSTP314, MSTP313, MSTP312, MSTP311, MSTP305, MSTP304, |
196 | MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, | 208 | MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, |
197 | MSTP124, | 209 | MSTP124, |
@@ -199,48 +211,57 @@ enum { | |||
199 | }; | 211 | }; |
200 | 212 | ||
201 | static struct clk mstp_clks[MSTP_NR] = { | 213 | static struct clk mstp_clks[MSTP_NR] = { |
202 | [MSTP1015] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 15, 0), /* SSI0 */ | 214 | [MSTP1015] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 15, MSTPSR10, 0), /* SSI0 */ |
203 | [MSTP1014] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 14, 0), /* SSI1 */ | 215 | [MSTP1014] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 14, MSTPSR10, 0), /* SSI1 */ |
204 | [MSTP1013] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 13, 0), /* SSI2 */ | 216 | [MSTP1013] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 13, MSTPSR10, 0), /* SSI2 */ |
205 | [MSTP1012] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 12, 0), /* SSI3 */ | 217 | [MSTP1012] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 12, MSTPSR10, 0), /* SSI3 */ |
206 | [MSTP1011] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 11, 0), /* SSI4 */ | 218 | [MSTP1011] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 11, MSTPSR10, 0), /* SSI4 */ |
207 | [MSTP1010] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 10, 0), /* SSI5 */ | 219 | [MSTP1010] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 10, MSTPSR10, 0), /* SSI5 */ |
208 | [MSTP1009] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 9, 0), /* SSI6 */ | 220 | [MSTP1009] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 9, MSTPSR10, 0), /* SSI6 */ |
209 | [MSTP1008] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 8, 0), /* SSI7 */ | 221 | [MSTP1008] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 8, MSTPSR10, 0), /* SSI7 */ |
210 | [MSTP1007] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 7, 0), /* SSI8 */ | 222 | [MSTP1007] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 7, MSTPSR10, 0), /* SSI8 */ |
211 | [MSTP1006] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 6, 0), /* SSI9 */ | 223 | [MSTP1006] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 6, MSTPSR10, 0), /* SSI9 */ |
212 | [MSTP1005] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 5, 0), /* SSI ALL */ | 224 | [MSTP1005] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 5, MSTPSR10, 0), /* SSI ALL */ |
213 | [MSTP931] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 31, 0), /* I2C0 */ | 225 | [MSTP931] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 31, MSTPSR9, 0), /* I2C0 */ |
214 | [MSTP930] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 30, 0), /* I2C1 */ | 226 | [MSTP930] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 30, MSTPSR9, 0), /* I2C1 */ |
215 | [MSTP929] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 29, 0), /* I2C2 */ | 227 | [MSTP929] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 29, MSTPSR9, 0), /* I2C2 */ |
216 | [MSTP928] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 28, 0), /* I2C3 */ | 228 | [MSTP928] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */ |
217 | [MSTP917] = SH_CLK_MSTP32(&qspi_clk, SMSTPCR9, 17, 0), /* QSPI */ | 229 | [MSTP917] = SH_CLK_MSTP32_STS(&qspi_clk, SMSTPCR9, 17, MSTPSR9, 0), /* QSPI */ |
218 | [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */ | 230 | [MSTP815] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 15, MSTPSR8, 0), /* SATA0 */ |
219 | [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */ | 231 | [MSTP814] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 14, MSTPSR8, 0), /* SATA1 */ |
220 | [MSTP725] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 25, 0), /* LVDS1 */ | 232 | [MSTP813] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR8, 13, MSTPSR8, 0), /* Ether */ |
221 | [MSTP724] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 24, 0), /* DU0 */ | 233 | [MSTP811] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 11, MSTPSR8, 0), /* VIN0 */ |
222 | [MSTP723] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 23, 0), /* DU1 */ | 234 | [MSTP810] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 10, MSTPSR8, 0), /* VIN1 */ |
223 | [MSTP722] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 22, 0), /* DU2 */ | 235 | [MSTP809] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 9, MSTPSR8, 0), /* VIN2 */ |
224 | [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */ | 236 | [MSTP808] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 8, MSTPSR8, 0), /* VIN3 */ |
225 | [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ | 237 | [MSTP726] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 26, MSTPSR7, 0), /* LVDS0 */ |
226 | [MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */ | 238 | [MSTP725] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 25, MSTPSR7, 0), /* LVDS1 */ |
227 | [MSTP716] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 16, 0), /* HSCIF1 */ | 239 | [MSTP724] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 24, MSTPSR7, 0), /* DU0 */ |
228 | [MSTP704] = SH_CLK_MSTP32(&mp_clk, SMSTPCR7, 4, 0), /* HSUSB */ | 240 | [MSTP723] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 23, MSTPSR7, 0), /* DU1 */ |
229 | [MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */ | 241 | [MSTP722] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 22, MSTPSR7, 0), /* DU2 */ |
230 | [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0], SMSTPCR3, 15, 0), /* MMC0 */ | 242 | [MSTP721] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 21, MSTPSR7, 0), /* SCIF0 */ |
231 | [MSTP314] = SH_CLK_MSTP32(&div4_clks[DIV4_SD0], SMSTPCR3, 14, 0), /* SDHI0 */ | 243 | [MSTP720] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 20, MSTPSR7, 0), /* SCIF1 */ |
232 | [MSTP313] = SH_CLK_MSTP32(&div4_clks[DIV4_SD1], SMSTPCR3, 13, 0), /* SDHI1 */ | 244 | [MSTP717] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR7, 17, MSTPSR7, 0), /* HSCIF0 */ |
233 | [MSTP312] = SH_CLK_MSTP32(&div6_clks[DIV6_SD2], SMSTPCR3, 12, 0), /* SDHI2 */ | 245 | [MSTP716] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR7, 16, MSTPSR7, 0), /* HSCIF1 */ |
234 | [MSTP311] = SH_CLK_MSTP32(&div6_clks[DIV6_SD3], SMSTPCR3, 11, 0), /* SDHI3 */ | 246 | [MSTP704] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR7, 4, MSTPSR7, 0), /* HSUSB */ |
235 | [MSTP305] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC1], SMSTPCR3, 5, 0), /* MMC1 */ | 247 | [MSTP703] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR7, 3, MSTPSR7, 0), /* EHCI */ |
236 | [MSTP304] = SH_CLK_MSTP32(&cp_clk, SMSTPCR3, 4, 0), /* TPU0 */ | 248 | [MSTP522] = SH_CLK_MSTP32_STS(&extal_clk, SMSTPCR5, 22, MSTPSR5, 0), /* Thermal */ |
237 | [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */ | 249 | [MSTP502] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR5, 2, MSTPSR5, 0), /* Audio-DMAC low */ |
238 | [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */ | 250 | [MSTP501] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR5, 1, MSTPSR5, 0), /* Audio-DMAC hi */ |
239 | [MSTP206] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 6, 0), /* SCIFB0 */ | 251 | [MSTP315] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_MMC0], SMSTPCR3, 15, MSTPSR3, 0), /* MMC0 */ |
240 | [MSTP204] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 4, 0), /* SCIFA0 */ | 252 | [MSTP314] = SH_CLK_MSTP32_STS(&div4_clks[DIV4_SD0], SMSTPCR3, 14, MSTPSR3, 0), /* SDHI0 */ |
241 | [MSTP203] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 3, 0), /* SCIFA1 */ | 253 | [MSTP313] = SH_CLK_MSTP32_STS(&div4_clks[DIV4_SD1], SMSTPCR3, 13, MSTPSR3, 0), /* SDHI1 */ |
242 | [MSTP202] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 2, 0), /* SCIFA2 */ | 254 | [MSTP312] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_SD2], SMSTPCR3, 12, MSTPSR3, 0), /* SDHI2 */ |
243 | [MSTP124] = SH_CLK_MSTP32(&rclk_clk, SMSTPCR1, 24, 0), /* CMT0 */ | 255 | [MSTP311] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_SD3], SMSTPCR3, 11, MSTPSR3, 0), /* SDHI3 */ |
256 | [MSTP305] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_MMC1], SMSTPCR3, 5, MSTPSR3, 0), /* MMC1 */ | ||
257 | [MSTP304] = SH_CLK_MSTP32_STS(&cp_clk, SMSTPCR3, 4, MSTPSR3, 0), /* TPU0 */ | ||
258 | [MSTP216] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 16, MSTPSR2, 0), /* SCIFB2 */ | ||
259 | [MSTP207] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 7, MSTPSR2, 0), /* SCIFB1 */ | ||
260 | [MSTP206] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 6, MSTPSR2, 0), /* SCIFB0 */ | ||
261 | [MSTP204] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 4, MSTPSR2, 0), /* SCIFA0 */ | ||
262 | [MSTP203] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 3, MSTPSR2, 0), /* SCIFA1 */ | ||
263 | [MSTP202] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 2, MSTPSR2, 0), /* SCIFA2 */ | ||
264 | [MSTP124] = SH_CLK_MSTP32_STS(&rclk_clk, SMSTPCR1, 24, MSTPSR1, 0), /* CMT0 */ | ||
244 | }; | 265 | }; |
245 | 266 | ||
246 | static struct clk_lookup lookups[] = { | 267 | static struct clk_lookup lookups[] = { |
@@ -300,8 +321,14 @@ static struct clk_lookup lookups[] = { | |||
300 | CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]), | 321 | CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]), |
301 | CLKDEV_DEV_ID("i2c-rcar_gen2.3", &mstp_clks[MSTP928]), | 322 | CLKDEV_DEV_ID("i2c-rcar_gen2.3", &mstp_clks[MSTP928]), |
302 | CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]), | 323 | CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]), |
324 | CLKDEV_DEV_ID("r8a7790-vin.0", &mstp_clks[MSTP811]), | ||
325 | CLKDEV_DEV_ID("r8a7790-vin.1", &mstp_clks[MSTP810]), | ||
326 | CLKDEV_DEV_ID("r8a7790-vin.2", &mstp_clks[MSTP809]), | ||
327 | CLKDEV_DEV_ID("r8a7790-vin.3", &mstp_clks[MSTP808]), | ||
303 | CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), | 328 | CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), |
304 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), | 329 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), |
330 | CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP502]), | ||
331 | CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP501]), | ||
305 | CLKDEV_DEV_ID("ee200000.mmc", &mstp_clks[MSTP315]), | 332 | CLKDEV_DEV_ID("ee200000.mmc", &mstp_clks[MSTP315]), |
306 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]), | 333 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]), |
307 | CLKDEV_DEV_ID("ee100000.sd", &mstp_clks[MSTP314]), | 334 | CLKDEV_DEV_ID("ee100000.sd", &mstp_clks[MSTP314]), |
@@ -317,6 +344,11 @@ static struct clk_lookup lookups[] = { | |||
317 | CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), | 344 | CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), |
318 | CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]), | 345 | CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]), |
319 | CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP704]), | 346 | CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP704]), |
347 | CLKDEV_DEV_ID("pci-rcar-gen2.0", &mstp_clks[MSTP703]), | ||
348 | CLKDEV_DEV_ID("pci-rcar-gen2.1", &mstp_clks[MSTP703]), | ||
349 | CLKDEV_DEV_ID("pci-rcar-gen2.2", &mstp_clks[MSTP703]), | ||
350 | CLKDEV_DEV_ID("sata-r8a7790.0", &mstp_clks[MSTP815]), | ||
351 | CLKDEV_DEV_ID("sata-r8a7790.1", &mstp_clks[MSTP814]), | ||
320 | 352 | ||
321 | /* ICK */ | 353 | /* ICK */ |
322 | CLKDEV_ICK_ID("usbhs", "usb_phy_rcar_gen2", &mstp_clks[MSTP704]), | 354 | CLKDEV_ICK_ID("usbhs", "usb_phy_rcar_gen2", &mstp_clks[MSTP704]), |
diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c index f5461262ee25..e4e4dfac85e9 100644 --- a/arch/arm/mach-shmobile/clock-r8a7791.c +++ b/arch/arm/mach-shmobile/clock-r8a7791.c | |||
@@ -59,6 +59,14 @@ | |||
59 | #define SMSTPCR10 0xE6150998 | 59 | #define SMSTPCR10 0xE6150998 |
60 | #define SMSTPCR11 0xE615099C | 60 | #define SMSTPCR11 0xE615099C |
61 | 61 | ||
62 | #define MSTPSR1 IOMEM(0xe6150038) | ||
63 | #define MSTPSR2 IOMEM(0xe6150040) | ||
64 | #define MSTPSR5 IOMEM(0xe615003c) | ||
65 | #define MSTPSR7 IOMEM(0xe61501c4) | ||
66 | #define MSTPSR8 IOMEM(0xe61509a0) | ||
67 | #define MSTPSR9 IOMEM(0xe61509a4) | ||
68 | #define MSTPSR11 IOMEM(0xe61509ac) | ||
69 | |||
62 | #define MODEMR 0xE6160060 | 70 | #define MODEMR 0xE6160060 |
63 | #define SDCKCR 0xE6150074 | 71 | #define SDCKCR 0xE6150074 |
64 | #define SD2CKCR 0xE6150078 | 72 | #define SD2CKCR 0xE6150078 |
@@ -103,7 +111,9 @@ SH_FIXED_RATIO_CLK_SET(hp_clk, pll1_clk, 1, 12); | |||
103 | SH_FIXED_RATIO_CLK_SET(p_clk, pll1_clk, 1, 24); | 111 | SH_FIXED_RATIO_CLK_SET(p_clk, pll1_clk, 1, 24); |
104 | SH_FIXED_RATIO_CLK_SET(rclk_clk, pll1_clk, 1, (48 * 1024)); | 112 | SH_FIXED_RATIO_CLK_SET(rclk_clk, pll1_clk, 1, (48 * 1024)); |
105 | SH_FIXED_RATIO_CLK_SET(mp_clk, pll1_div2_clk, 1, 15); | 113 | SH_FIXED_RATIO_CLK_SET(mp_clk, pll1_div2_clk, 1, 15); |
114 | SH_FIXED_RATIO_CLK_SET(zg_clk, pll1_clk, 1, 3); | ||
106 | SH_FIXED_RATIO_CLK_SET(zx_clk, pll1_clk, 1, 3); | 115 | SH_FIXED_RATIO_CLK_SET(zx_clk, pll1_clk, 1, 3); |
116 | SH_FIXED_RATIO_CLK_SET(zs_clk, pll1_clk, 1, 6); | ||
107 | 117 | ||
108 | static struct clk *main_clks[] = { | 118 | static struct clk *main_clks[] = { |
109 | &extal_clk, | 119 | &extal_clk, |
@@ -117,12 +127,17 @@ static struct clk *main_clks[] = { | |||
117 | &rclk_clk, | 127 | &rclk_clk, |
118 | &mp_clk, | 128 | &mp_clk, |
119 | &cp_clk, | 129 | &cp_clk, |
130 | &zg_clk, | ||
120 | &zx_clk, | 131 | &zx_clk, |
132 | &zs_clk, | ||
121 | }; | 133 | }; |
122 | 134 | ||
123 | /* MSTP */ | 135 | /* MSTP */ |
124 | enum { | 136 | enum { |
137 | MSTP931, MSTP930, MSTP929, MSTP928, MSTP927, MSTP925, | ||
138 | MSTP815, MSTP814, | ||
125 | MSTP813, | 139 | MSTP813, |
140 | MSTP811, MSTP810, MSTP809, | ||
126 | MSTP726, MSTP724, MSTP723, MSTP721, MSTP720, | 141 | MSTP726, MSTP724, MSTP723, MSTP721, MSTP720, |
127 | MSTP719, MSTP718, MSTP715, MSTP714, | 142 | MSTP719, MSTP718, MSTP715, MSTP714, |
128 | MSTP522, | 143 | MSTP522, |
@@ -133,27 +148,38 @@ enum { | |||
133 | }; | 148 | }; |
134 | 149 | ||
135 | static struct clk mstp_clks[MSTP_NR] = { | 150 | static struct clk mstp_clks[MSTP_NR] = { |
136 | [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */ | 151 | [MSTP931] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 31, MSTPSR9, 0), /* I2C0 */ |
137 | [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */ | 152 | [MSTP930] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 30, MSTPSR9, 0), /* I2C1 */ |
138 | [MSTP724] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 24, 0), /* DU0 */ | 153 | [MSTP929] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 29, MSTPSR9, 0), /* I2C2 */ |
139 | [MSTP723] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 23, 0), /* DU1 */ | 154 | [MSTP928] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */ |
140 | [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */ | 155 | [MSTP927] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 27, MSTPSR9, 0), /* I2C4 */ |
141 | [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ | 156 | [MSTP925] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 25, MSTPSR9, 0), /* I2C5 */ |
142 | [MSTP719] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 19, 0), /* SCIF2 */ | 157 | [MSTP815] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 15, MSTPSR8, 0), /* SATA0 */ |
143 | [MSTP718] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 18, 0), /* SCIF3 */ | 158 | [MSTP814] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 14, MSTPSR8, 0), /* SATA1 */ |
144 | [MSTP715] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 15, 0), /* SCIF4 */ | 159 | [MSTP813] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR8, 13, MSTPSR8, 0), /* Ether */ |
145 | [MSTP714] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 14, 0), /* SCIF5 */ | 160 | [MSTP811] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 11, MSTPSR8, 0), /* VIN0 */ |
146 | [MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */ | 161 | [MSTP810] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 10, MSTPSR8, 0), /* VIN1 */ |
147 | [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */ | 162 | [MSTP809] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 9, MSTPSR8, 0), /* VIN2 */ |
148 | [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */ | 163 | [MSTP726] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 26, MSTPSR7, 0), /* LVDS0 */ |
149 | [MSTP206] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 6, 0), /* SCIFB0 */ | 164 | [MSTP724] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 24, MSTPSR7, 0), /* DU0 */ |
150 | [MSTP204] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 4, 0), /* SCIFA0 */ | 165 | [MSTP723] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 23, MSTPSR7, 0), /* DU1 */ |
151 | [MSTP203] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 3, 0), /* SCIFA1 */ | 166 | [MSTP721] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 21, MSTPSR7, 0), /* SCIF0 */ |
152 | [MSTP202] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 2, 0), /* SCIFA2 */ | 167 | [MSTP720] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 20, MSTPSR7, 0), /* SCIF1 */ |
153 | [MSTP1105] = SH_CLK_MSTP32(&mp_clk, SMSTPCR11, 5, 0), /* SCIFA3 */ | 168 | [MSTP719] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 19, MSTPSR7, 0), /* SCIF2 */ |
154 | [MSTP1106] = SH_CLK_MSTP32(&mp_clk, SMSTPCR11, 6, 0), /* SCIFA4 */ | 169 | [MSTP718] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 18, MSTPSR7, 0), /* SCIF3 */ |
155 | [MSTP1107] = SH_CLK_MSTP32(&mp_clk, SMSTPCR11, 7, 0), /* SCIFA5 */ | 170 | [MSTP715] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 15, MSTPSR7, 0), /* SCIF4 */ |
156 | [MSTP124] = SH_CLK_MSTP32(&rclk_clk, SMSTPCR1, 24, 0), /* CMT0 */ | 171 | [MSTP714] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 14, MSTPSR7, 0), /* SCIF5 */ |
172 | [MSTP522] = SH_CLK_MSTP32_STS(&extal_clk, SMSTPCR5, 22, MSTPSR5, 0), /* Thermal */ | ||
173 | [MSTP216] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 16, MSTPSR2, 0), /* SCIFB2 */ | ||
174 | [MSTP207] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 7, MSTPSR2, 0), /* SCIFB1 */ | ||
175 | [MSTP206] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 6, MSTPSR2, 0), /* SCIFB0 */ | ||
176 | [MSTP204] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 4, MSTPSR2, 0), /* SCIFA0 */ | ||
177 | [MSTP203] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 3, MSTPSR2, 0), /* SCIFA1 */ | ||
178 | [MSTP202] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 2, MSTPSR2, 0), /* SCIFA2 */ | ||
179 | [MSTP1105] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 5, MSTPSR11, 0), /* SCIFA3 */ | ||
180 | [MSTP1106] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 6, MSTPSR11, 0), /* SCIFA4 */ | ||
181 | [MSTP1107] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 7, MSTPSR11, 0), /* SCIFA5 */ | ||
182 | [MSTP124] = SH_CLK_MSTP32_STS(&rclk_clk, SMSTPCR1, 24, MSTPSR1, 0), /* CMT0 */ | ||
157 | }; | 183 | }; |
158 | 184 | ||
159 | static struct clk_lookup lookups[] = { | 185 | static struct clk_lookup lookups[] = { |
@@ -165,6 +191,8 @@ static struct clk_lookup lookups[] = { | |||
165 | CLKDEV_CON_ID("pll1", &pll1_clk), | 191 | CLKDEV_CON_ID("pll1", &pll1_clk), |
166 | CLKDEV_CON_ID("pll1_div2", &pll1_div2_clk), | 192 | CLKDEV_CON_ID("pll1_div2", &pll1_div2_clk), |
167 | CLKDEV_CON_ID("pll3", &pll3_clk), | 193 | CLKDEV_CON_ID("pll3", &pll3_clk), |
194 | CLKDEV_CON_ID("zg", &zg_clk), | ||
195 | CLKDEV_CON_ID("zs", &zs_clk), | ||
168 | CLKDEV_CON_ID("hp", &hp_clk), | 196 | CLKDEV_CON_ID("hp", &hp_clk), |
169 | CLKDEV_CON_ID("p", &p_clk), | 197 | CLKDEV_CON_ID("p", &p_clk), |
170 | CLKDEV_CON_ID("rclk", &rclk_clk), | 198 | CLKDEV_CON_ID("rclk", &rclk_clk), |
@@ -194,7 +222,18 @@ static struct clk_lookup lookups[] = { | |||
194 | CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), | 222 | CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), |
195 | CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), | 223 | CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), |
196 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), | 224 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), |
225 | CLKDEV_DEV_ID("i2c-rcar_gen2.0", &mstp_clks[MSTP931]), | ||
226 | CLKDEV_DEV_ID("i2c-rcar_gen2.1", &mstp_clks[MSTP930]), | ||
227 | CLKDEV_DEV_ID("i2c-rcar_gen2.2", &mstp_clks[MSTP929]), | ||
228 | CLKDEV_DEV_ID("i2c-rcar_gen2.3", &mstp_clks[MSTP928]), | ||
229 | CLKDEV_DEV_ID("i2c-rcar_gen2.4", &mstp_clks[MSTP927]), | ||
230 | CLKDEV_DEV_ID("i2c-rcar_gen2.5", &mstp_clks[MSTP925]), | ||
197 | CLKDEV_DEV_ID("r8a7791-ether", &mstp_clks[MSTP813]), /* Ether */ | 231 | CLKDEV_DEV_ID("r8a7791-ether", &mstp_clks[MSTP813]), /* Ether */ |
232 | CLKDEV_DEV_ID("r8a7791-vin.0", &mstp_clks[MSTP811]), | ||
233 | CLKDEV_DEV_ID("r8a7791-vin.1", &mstp_clks[MSTP810]), | ||
234 | CLKDEV_DEV_ID("r8a7791-vin.2", &mstp_clks[MSTP809]), | ||
235 | CLKDEV_DEV_ID("sata-r8a7791.0", &mstp_clks[MSTP815]), | ||
236 | CLKDEV_DEV_ID("sata-r8a7791.1", &mstp_clks[MSTP814]), | ||
198 | }; | 237 | }; |
199 | 238 | ||
200 | #define R8A7791_CLOCK_ROOT(e, m, p0, p1, p30, p31) \ | 239 | #define R8A7791_CLOCK_ROOT(e, m, p0, p1, p30, p31) \ |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h index 5fbfa28b40b6..2177325af22f 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7790.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h | |||
@@ -3,6 +3,31 @@ | |||
3 | 3 | ||
4 | #include <mach/rcar-gen2.h> | 4 | #include <mach/rcar-gen2.h> |
5 | 5 | ||
6 | /* DMA slave IDs */ | ||
7 | enum { | ||
8 | RCAR_DMA_SLAVE_INVALID, | ||
9 | AUDIO_DMAC_SLAVE_SSI0_TX, | ||
10 | AUDIO_DMAC_SLAVE_SSI0_RX, | ||
11 | AUDIO_DMAC_SLAVE_SSI1_TX, | ||
12 | AUDIO_DMAC_SLAVE_SSI1_RX, | ||
13 | AUDIO_DMAC_SLAVE_SSI2_TX, | ||
14 | AUDIO_DMAC_SLAVE_SSI2_RX, | ||
15 | AUDIO_DMAC_SLAVE_SSI3_TX, | ||
16 | AUDIO_DMAC_SLAVE_SSI3_RX, | ||
17 | AUDIO_DMAC_SLAVE_SSI4_TX, | ||
18 | AUDIO_DMAC_SLAVE_SSI4_RX, | ||
19 | AUDIO_DMAC_SLAVE_SSI5_TX, | ||
20 | AUDIO_DMAC_SLAVE_SSI5_RX, | ||
21 | AUDIO_DMAC_SLAVE_SSI6_TX, | ||
22 | AUDIO_DMAC_SLAVE_SSI6_RX, | ||
23 | AUDIO_DMAC_SLAVE_SSI7_TX, | ||
24 | AUDIO_DMAC_SLAVE_SSI7_RX, | ||
25 | AUDIO_DMAC_SLAVE_SSI8_TX, | ||
26 | AUDIO_DMAC_SLAVE_SSI8_RX, | ||
27 | AUDIO_DMAC_SLAVE_SSI9_TX, | ||
28 | AUDIO_DMAC_SLAVE_SSI9_RX, | ||
29 | }; | ||
30 | |||
6 | void r8a7790_add_standard_devices(void); | 31 | void r8a7790_add_standard_devices(void); |
7 | void r8a7790_add_dt_devices(void); | 32 | void r8a7790_add_dt_devices(void); |
8 | void r8a7790_clock_init(void); | 33 | void r8a7790_clock_init(void); |
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index 6ab37aa1e919..c4616f0698c6 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c | |||
@@ -24,12 +24,100 @@ | |||
24 | #include <linux/platform_data/gpio-rcar.h> | 24 | #include <linux/platform_data/gpio-rcar.h> |
25 | #include <linux/platform_data/irq-renesas-irqc.h> | 25 | #include <linux/platform_data/irq-renesas-irqc.h> |
26 | #include <linux/serial_sci.h> | 26 | #include <linux/serial_sci.h> |
27 | #include <linux/sh_dma.h> | ||
27 | #include <linux/sh_timer.h> | 28 | #include <linux/sh_timer.h> |
28 | #include <mach/common.h> | 29 | #include <mach/common.h> |
30 | #include <mach/dma-register.h> | ||
29 | #include <mach/irqs.h> | 31 | #include <mach/irqs.h> |
30 | #include <mach/r8a7790.h> | 32 | #include <mach/r8a7790.h> |
31 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
32 | 34 | ||
35 | /* Audio-DMAC */ | ||
36 | #define AUDIO_DMAC_SLAVE(_id, _addr, t, r) \ | ||
37 | { \ | ||
38 | .slave_id = AUDIO_DMAC_SLAVE_## _id ##_TX, \ | ||
39 | .addr = _addr + 0x8, \ | ||
40 | .chcr = CHCR_TX(XMIT_SZ_32BIT), \ | ||
41 | .mid_rid = t, \ | ||
42 | }, { \ | ||
43 | .slave_id = AUDIO_DMAC_SLAVE_## _id ##_RX, \ | ||
44 | .addr = _addr + 0xc, \ | ||
45 | .chcr = CHCR_RX(XMIT_SZ_32BIT), \ | ||
46 | .mid_rid = r, \ | ||
47 | } | ||
48 | |||
49 | static const struct sh_dmae_slave_config r8a7790_audio_dmac_slaves[] = { | ||
50 | AUDIO_DMAC_SLAVE(SSI0, 0xec241000, 0x01, 0x02), | ||
51 | AUDIO_DMAC_SLAVE(SSI1, 0xec241040, 0x03, 0x04), | ||
52 | AUDIO_DMAC_SLAVE(SSI2, 0xec241080, 0x05, 0x06), | ||
53 | AUDIO_DMAC_SLAVE(SSI3, 0xec2410c0, 0x07, 0x08), | ||
54 | AUDIO_DMAC_SLAVE(SSI4, 0xec241100, 0x09, 0x0a), | ||
55 | AUDIO_DMAC_SLAVE(SSI5, 0xec241140, 0x0b, 0x0c), | ||
56 | AUDIO_DMAC_SLAVE(SSI6, 0xec241180, 0x0d, 0x0e), | ||
57 | AUDIO_DMAC_SLAVE(SSI7, 0xec2411c0, 0x0f, 0x10), | ||
58 | AUDIO_DMAC_SLAVE(SSI8, 0xec241200, 0x11, 0x12), | ||
59 | AUDIO_DMAC_SLAVE(SSI9, 0xec241240, 0x13, 0x14), | ||
60 | }; | ||
61 | |||
62 | #define DMAE_CHANNEL(a, b) \ | ||
63 | { \ | ||
64 | .offset = (a) - 0x20, \ | ||
65 | .dmars = (a) - 0x20 + 0x40, \ | ||
66 | .chclr_bit = (b), \ | ||
67 | .chclr_offset = 0x80 - 0x20, \ | ||
68 | } | ||
69 | |||
70 | static const struct sh_dmae_channel r8a7790_audio_dmac_channels[] = { | ||
71 | DMAE_CHANNEL(0x8000, 0), | ||
72 | DMAE_CHANNEL(0x8080, 1), | ||
73 | DMAE_CHANNEL(0x8100, 2), | ||
74 | DMAE_CHANNEL(0x8180, 3), | ||
75 | DMAE_CHANNEL(0x8200, 4), | ||
76 | DMAE_CHANNEL(0x8280, 5), | ||
77 | DMAE_CHANNEL(0x8300, 6), | ||
78 | DMAE_CHANNEL(0x8380, 7), | ||
79 | DMAE_CHANNEL(0x8400, 8), | ||
80 | DMAE_CHANNEL(0x8480, 9), | ||
81 | DMAE_CHANNEL(0x8500, 10), | ||
82 | DMAE_CHANNEL(0x8580, 11), | ||
83 | DMAE_CHANNEL(0x8600, 12), | ||
84 | }; | ||
85 | |||
86 | static struct sh_dmae_pdata r8a7790_audio_dmac_platform_data = { | ||
87 | .slave = r8a7790_audio_dmac_slaves, | ||
88 | .slave_num = ARRAY_SIZE(r8a7790_audio_dmac_slaves), | ||
89 | .channel = r8a7790_audio_dmac_channels, | ||
90 | .channel_num = ARRAY_SIZE(r8a7790_audio_dmac_channels), | ||
91 | .ts_low_shift = TS_LOW_SHIFT, | ||
92 | .ts_low_mask = TS_LOW_BIT << TS_LOW_SHIFT, | ||
93 | .ts_high_shift = TS_HI_SHIFT, | ||
94 | .ts_high_mask = TS_HI_BIT << TS_HI_SHIFT, | ||
95 | .ts_shift = dma_ts_shift, | ||
96 | .ts_shift_num = ARRAY_SIZE(dma_ts_shift), | ||
97 | .dmaor_init = DMAOR_DME, | ||
98 | .chclr_present = 1, | ||
99 | .chclr_bitwise = 1, | ||
100 | }; | ||
101 | |||
102 | static struct resource r8a7790_audio_dmac_resources[] = { | ||
103 | /* Channel registers and DMAOR for low */ | ||
104 | DEFINE_RES_MEM(0xec700020, 0x8663 - 0x20), | ||
105 | DEFINE_RES_IRQ(gic_spi(346)), | ||
106 | DEFINE_RES_NAMED(gic_spi(320), 13, NULL, IORESOURCE_IRQ), | ||
107 | |||
108 | /* Channel registers and DMAOR for hi */ | ||
109 | DEFINE_RES_MEM(0xec720020, 0x8663 - 0x20), /* hi */ | ||
110 | DEFINE_RES_IRQ(gic_spi(347)), | ||
111 | DEFINE_RES_NAMED(gic_spi(333), 13, NULL, IORESOURCE_IRQ), | ||
112 | }; | ||
113 | |||
114 | #define r8a7790_register_audio_dmac(id) \ | ||
115 | platform_device_register_resndata( \ | ||
116 | &platform_bus, "sh-dma-engine", id, \ | ||
117 | &r8a7790_audio_dmac_resources[id * 3], 3, \ | ||
118 | &r8a7790_audio_dmac_platform_data, \ | ||
119 | sizeof(r8a7790_audio_dmac_platform_data)) | ||
120 | |||
33 | static const struct resource pfc_resources[] __initconst = { | 121 | static const struct resource pfc_resources[] __initconst = { |
34 | DEFINE_RES_MEM(0xe6060000, 0x250), | 122 | DEFINE_RES_MEM(0xe6060000, 0x250), |
35 | }; | 123 | }; |
@@ -101,6 +189,8 @@ void __init r8a7790_pinmux_init(void) | |||
101 | r8a7790_register_i2c(1); | 189 | r8a7790_register_i2c(1); |
102 | r8a7790_register_i2c(2); | 190 | r8a7790_register_i2c(2); |
103 | r8a7790_register_i2c(3); | 191 | r8a7790_register_i2c(3); |
192 | r8a7790_register_audio_dmac(0); | ||
193 | r8a7790_register_audio_dmac(1); | ||
104 | } | 194 | } |
105 | 195 | ||
106 | #define __R8A7790_SCIF(scif_type, _scscr, index, baseaddr, irq) \ | 196 | #define __R8A7790_SCIF(scif_type, _scscr, index, baseaddr, irq) \ |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index a335126ae18f..f2c89fb8fca9 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -108,7 +108,7 @@ void __init versatile_init_irq(void) | |||
108 | 108 | ||
109 | np = of_find_matching_node_by_address(NULL, vic_of_match, | 109 | np = of_find_matching_node_by_address(NULL, vic_of_match, |
110 | VERSATILE_VIC_BASE); | 110 | VERSATILE_VIC_BASE); |
111 | __vic_init(VA_VIC_BASE, IRQ_VIC_START, ~0, 0, np); | 111 | __vic_init(VA_VIC_BASE, 0, IRQ_VIC_START, ~0, 0, np); |
112 | 112 | ||
113 | writel(~0, VA_SIC_BASE + SIC_IRQ_ENABLE_CLEAR); | 113 | writel(~0, VA_SIC_BASE + SIC_IRQ_ENABLE_CLEAR); |
114 | 114 | ||
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c index 1db2a5ca9ab8..8c09a8393fb6 100644 --- a/arch/arm/mach-zynq/common.c +++ b/arch/arm/mach-zynq/common.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/of_irq.h> | 25 | #include <linux/of_irq.h> |
26 | #include <linux/of_platform.h> | 26 | #include <linux/of_platform.h> |
27 | #include <linux/of.h> | 27 | #include <linux/of.h> |
28 | #include <linux/memblock.h> | ||
28 | #include <linux/irqchip.h> | 29 | #include <linux/irqchip.h> |
29 | #include <linux/irqchip/arm-gic.h> | 30 | #include <linux/irqchip/arm-gic.h> |
30 | 31 | ||
@@ -41,6 +42,18 @@ | |||
41 | 42 | ||
42 | void __iomem *zynq_scu_base; | 43 | void __iomem *zynq_scu_base; |
43 | 44 | ||
45 | /** | ||
46 | * zynq_memory_init - Initialize special memory | ||
47 | * | ||
48 | * We need to stop things allocating the low memory as DMA can't work in | ||
49 | * the 1st 512K of memory. | ||
50 | */ | ||
51 | static void __init zynq_memory_init(void) | ||
52 | { | ||
53 | if (!__pa(PAGE_OFFSET)) | ||
54 | memblock_reserve(__pa(PAGE_OFFSET), __pa(swapper_pg_dir)); | ||
55 | } | ||
56 | |||
44 | static struct platform_device zynq_cpuidle_device = { | 57 | static struct platform_device zynq_cpuidle_device = { |
45 | .name = "cpuidle-zynq", | 58 | .name = "cpuidle-zynq", |
46 | }; | 59 | }; |
@@ -117,5 +130,6 @@ DT_MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") | |||
117 | .init_machine = zynq_init_machine, | 130 | .init_machine = zynq_init_machine, |
118 | .init_time = zynq_timer_init, | 131 | .init_time = zynq_timer_init, |
119 | .dt_compat = zynq_dt_match, | 132 | .dt_compat = zynq_dt_match, |
133 | .reserve = zynq_memory_init, | ||
120 | .restart = zynq_system_reset, | 134 | .restart = zynq_system_reset, |
121 | MACHINE_END | 135 | MACHINE_END |