diff options
Diffstat (limited to 'arch/arm')
160 files changed, 2262 insertions, 901 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9f1f09a2bc9b..0a9dcde16a5c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -21,6 +21,7 @@ config ARM | |||
21 | select GENERIC_IDLE_POLL_SETUP | 21 | select GENERIC_IDLE_POLL_SETUP |
22 | select GENERIC_IRQ_PROBE | 22 | select GENERIC_IRQ_PROBE |
23 | select GENERIC_IRQ_SHOW | 23 | select GENERIC_IRQ_SHOW |
24 | select GENERIC_IRQ_SHOW_LEVEL | ||
24 | select GENERIC_PCI_IOMAP | 25 | select GENERIC_PCI_IOMAP |
25 | select GENERIC_SCHED_CLOCK | 26 | select GENERIC_SCHED_CLOCK |
26 | select GENERIC_SMP_IDLE_THREAD | 27 | select GENERIC_SMP_IDLE_THREAD |
@@ -1057,7 +1058,7 @@ config ARM_ERRATA_430973 | |||
1057 | depends on CPU_V7 | 1058 | depends on CPU_V7 |
1058 | help | 1059 | help |
1059 | This option enables the workaround for the 430973 Cortex-A8 | 1060 | This option enables the workaround for the 430973 Cortex-A8 |
1060 | (r1p0..r1p2) erratum. If a code sequence containing an ARM/Thumb | 1061 | r1p* erratum. If a code sequence containing an ARM/Thumb |
1061 | interworking branch is replaced with another code sequence at the | 1062 | interworking branch is replaced with another code sequence at the |
1062 | same virtual address, whether due to self-modifying code or virtual | 1063 | same virtual address, whether due to self-modifying code or virtual |
1063 | to physical address re-mapping, Cortex-A8 does not recover from the | 1064 | to physical address re-mapping, Cortex-A8 does not recover from the |
@@ -1126,6 +1127,7 @@ config ARM_ERRATA_742231 | |||
1126 | config ARM_ERRATA_643719 | 1127 | config ARM_ERRATA_643719 |
1127 | bool "ARM errata: LoUIS bit field in CLIDR register is incorrect" | 1128 | bool "ARM errata: LoUIS bit field in CLIDR register is incorrect" |
1128 | depends on CPU_V7 && SMP | 1129 | depends on CPU_V7 && SMP |
1130 | default y | ||
1129 | help | 1131 | help |
1130 | This option enables the workaround for the 643719 Cortex-A9 (prior to | 1132 | This option enables the workaround for the 643719 Cortex-A9 (prior to |
1131 | r1p0) erratum. On affected cores the LoUIS bit field of the CLIDR | 1133 | r1p0) erratum. On affected cores the LoUIS bit field of the CLIDR |
@@ -1343,7 +1345,7 @@ config SMP | |||
1343 | If you don't know what to do here, say N. | 1345 | If you don't know what to do here, say N. |
1344 | 1346 | ||
1345 | config SMP_ON_UP | 1347 | config SMP_ON_UP |
1346 | bool "Allow booting SMP kernel on uniprocessor systems (EXPERIMENTAL)" | 1348 | bool "Allow booting SMP kernel on uniprocessor systems" |
1347 | depends on SMP && !XIP_KERNEL && MMU | 1349 | depends on SMP && !XIP_KERNEL && MMU |
1348 | default y | 1350 | default y |
1349 | help | 1351 | help |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 6c13a84b6cd2..5575d9fa8806 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -13,7 +13,7 @@ | |||
13 | # Ensure linker flags are correct | 13 | # Ensure linker flags are correct |
14 | LDFLAGS := | 14 | LDFLAGS := |
15 | 15 | ||
16 | LDFLAGS_vmlinux :=-p --no-undefined -X | 16 | LDFLAGS_vmlinux :=-p --no-undefined -X --pic-veneer |
17 | ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) | 17 | ifeq ($(CONFIG_CPU_ENDIAN_BE8),y) |
18 | LDFLAGS_vmlinux += --be8 | 18 | LDFLAGS_vmlinux += --be8 |
19 | LDFLAGS_MODULE += --be8 | 19 | LDFLAGS_MODULE += --be8 |
@@ -150,6 +150,7 @@ machine-$(CONFIG_ARCH_BERLIN) += berlin | |||
150 | machine-$(CONFIG_ARCH_CLPS711X) += clps711x | 150 | machine-$(CONFIG_ARCH_CLPS711X) += clps711x |
151 | machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx | 151 | machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx |
152 | machine-$(CONFIG_ARCH_DAVINCI) += davinci | 152 | machine-$(CONFIG_ARCH_DAVINCI) += davinci |
153 | machine-$(CONFIG_ARCH_DIGICOLOR) += digicolor | ||
153 | machine-$(CONFIG_ARCH_DOVE) += dove | 154 | machine-$(CONFIG_ARCH_DOVE) += dove |
154 | machine-$(CONFIG_ARCH_EBSA110) += ebsa110 | 155 | machine-$(CONFIG_ARCH_EBSA110) += ebsa110 |
155 | machine-$(CONFIG_ARCH_EFM32) += efm32 | 156 | machine-$(CONFIG_ARCH_EFM32) += efm32 |
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index c41a793b519c..2c45b5709fa4 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -10,8 +10,11 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/linkage.h> | 11 | #include <linux/linkage.h> |
12 | #include <asm/assembler.h> | 12 | #include <asm/assembler.h> |
13 | #include <asm/v7m.h> | ||
14 | |||
15 | AR_CLASS( .arch armv7-a ) | ||
16 | M_CLASS( .arch armv7-m ) | ||
13 | 17 | ||
14 | .arch armv7-a | ||
15 | /* | 18 | /* |
16 | * Debugging stuff | 19 | * Debugging stuff |
17 | * | 20 | * |
@@ -114,7 +117,12 @@ | |||
114 | * sort out different calling conventions | 117 | * sort out different calling conventions |
115 | */ | 118 | */ |
116 | .align | 119 | .align |
117 | .arm @ Always enter in ARM state | 120 | /* |
121 | * Always enter in ARM state for CPUs that support the ARM ISA. | ||
122 | * As of today (2014) that's exactly the members of the A and R | ||
123 | * classes. | ||
124 | */ | ||
125 | AR_CLASS( .arm ) | ||
118 | start: | 126 | start: |
119 | .type start,#function | 127 | .type start,#function |
120 | .rept 7 | 128 | .rept 7 |
@@ -132,14 +140,15 @@ start: | |||
132 | 140 | ||
133 | THUMB( .thumb ) | 141 | THUMB( .thumb ) |
134 | 1: | 142 | 1: |
135 | ARM_BE8( setend be ) @ go BE8 if compiled for BE8 | 143 | ARM_BE8( setend be ) @ go BE8 if compiled for BE8 |
136 | mrs r9, cpsr | 144 | AR_CLASS( mrs r9, cpsr ) |
137 | #ifdef CONFIG_ARM_VIRT_EXT | 145 | #ifdef CONFIG_ARM_VIRT_EXT |
138 | bl __hyp_stub_install @ get into SVC mode, reversibly | 146 | bl __hyp_stub_install @ get into SVC mode, reversibly |
139 | #endif | 147 | #endif |
140 | mov r7, r1 @ save architecture ID | 148 | mov r7, r1 @ save architecture ID |
141 | mov r8, r2 @ save atags pointer | 149 | mov r8, r2 @ save atags pointer |
142 | 150 | ||
151 | #ifndef CONFIG_CPU_V7M | ||
143 | /* | 152 | /* |
144 | * Booting from Angel - need to enter SVC mode and disable | 153 | * Booting from Angel - need to enter SVC mode and disable |
145 | * FIQs/IRQs (numeric definitions from angel arm.h source). | 154 | * FIQs/IRQs (numeric definitions from angel arm.h source). |
@@ -155,6 +164,7 @@ not_angel: | |||
155 | safe_svcmode_maskall r0 | 164 | safe_svcmode_maskall r0 |
156 | msr spsr_cxsf, r9 @ Save the CPU boot mode in | 165 | msr spsr_cxsf, r9 @ Save the CPU boot mode in |
157 | @ SPSR | 166 | @ SPSR |
167 | #endif | ||
158 | /* | 168 | /* |
159 | * Note that some cache flushing and other stuff may | 169 | * Note that some cache flushing and other stuff may |
160 | * be needed here - is there an Angel SWI call for this? | 170 | * be needed here - is there an Angel SWI call for this? |
@@ -168,9 +178,26 @@ not_angel: | |||
168 | .text | 178 | .text |
169 | 179 | ||
170 | #ifdef CONFIG_AUTO_ZRELADDR | 180 | #ifdef CONFIG_AUTO_ZRELADDR |
171 | @ determine final kernel image address | 181 | /* |
182 | * Find the start of physical memory. As we are executing | ||
183 | * without the MMU on, we are in the physical address space. | ||
184 | * We just need to get rid of any offset by aligning the | ||
185 | * address. | ||
186 | * | ||
187 | * This alignment is a balance between the requirements of | ||
188 | * different platforms - we have chosen 128MB to allow | ||
189 | * platforms which align the start of their physical memory | ||
190 | * to 128MB to use this feature, while allowing the zImage | ||
191 | * to be placed within the first 128MB of memory on other | ||
192 | * platforms. Increasing the alignment means we place | ||
193 | * stricter alignment requirements on the start of physical | ||
194 | * memory, but relaxing it means that we break people who | ||
195 | * are already placing their zImage in (eg) the top 64MB | ||
196 | * of this range. | ||
197 | */ | ||
172 | mov r4, pc | 198 | mov r4, pc |
173 | and r4, r4, #0xf8000000 | 199 | and r4, r4, #0xf8000000 |
200 | /* Determine final kernel image address. */ | ||
174 | add r4, r4, #TEXT_OFFSET | 201 | add r4, r4, #TEXT_OFFSET |
175 | #else | 202 | #else |
176 | ldr r4, =zreladdr | 203 | ldr r4, =zreladdr |
@@ -810,6 +837,16 @@ __common_mmu_cache_on: | |||
810 | call_cache_fn: adr r12, proc_types | 837 | call_cache_fn: adr r12, proc_types |
811 | #ifdef CONFIG_CPU_CP15 | 838 | #ifdef CONFIG_CPU_CP15 |
812 | mrc p15, 0, r9, c0, c0 @ get processor ID | 839 | mrc p15, 0, r9, c0, c0 @ get processor ID |
840 | #elif defined(CONFIG_CPU_V7M) | ||
841 | /* | ||
842 | * On v7-M the processor id is located in the V7M_SCB_CPUID | ||
843 | * register, but as cache handling is IMPLEMENTATION DEFINED on | ||
844 | * v7-M (if existant at all) we just return early here. | ||
845 | * If V7M_SCB_CPUID were used the cpu ID functions (i.e. | ||
846 | * __armv7_mmu_cache_{on,off,flush}) would be selected which | ||
847 | * use cp15 registers that are not implemented on v7-M. | ||
848 | */ | ||
849 | bx lr | ||
813 | #else | 850 | #else |
814 | ldr r9, =CONFIG_PROCESSOR_ID | 851 | ldr r9, =CONFIG_PROCESSOR_ID |
815 | #endif | 852 | #endif |
@@ -1310,8 +1347,9 @@ __hyp_reentry_vectors: | |||
1310 | 1347 | ||
1311 | __enter_kernel: | 1348 | __enter_kernel: |
1312 | mov r0, #0 @ must be 0 | 1349 | mov r0, #0 @ must be 0 |
1313 | ARM( mov pc, r4 ) @ call kernel | 1350 | ARM( mov pc, r4 ) @ call kernel |
1314 | THUMB( bx r4 ) @ entry point is always ARM | 1351 | M_CLASS( add r4, r4, #1 ) @ enter in Thumb mode for M class |
1352 | THUMB( bx r4 ) @ entry point is always ARM for A/R classes | ||
1315 | 1353 | ||
1316 | reloc_code_end: | 1354 | reloc_code_end: |
1317 | 1355 | ||
diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi index 6cc25ed912ee..c3255e0c90aa 100644 --- a/arch/arm/boot/dts/am335x-bone-common.dtsi +++ b/arch/arm/boot/dts/am335x-bone-common.dtsi | |||
@@ -195,6 +195,7 @@ | |||
195 | 195 | ||
196 | &usb0 { | 196 | &usb0 { |
197 | status = "okay"; | 197 | status = "okay"; |
198 | dr_mode = "peripheral"; | ||
198 | }; | 199 | }; |
199 | 200 | ||
200 | &usb1 { | 201 | &usb1 { |
@@ -300,3 +301,11 @@ | |||
300 | cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; | 301 | cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; |
301 | cd-inverted; | 302 | cd-inverted; |
302 | }; | 303 | }; |
304 | |||
305 | &aes { | ||
306 | status = "okay"; | ||
307 | }; | ||
308 | |||
309 | &sham { | ||
310 | status = "okay"; | ||
311 | }; | ||
diff --git a/arch/arm/boot/dts/am335x-bone.dts b/arch/arm/boot/dts/am335x-bone.dts index 83d40f7655e5..6b8493720424 100644 --- a/arch/arm/boot/dts/am335x-bone.dts +++ b/arch/arm/boot/dts/am335x-bone.dts | |||
@@ -24,11 +24,3 @@ | |||
24 | &mmc1 { | 24 | &mmc1 { |
25 | vmmc-supply = <&ldo3_reg>; | 25 | vmmc-supply = <&ldo3_reg>; |
26 | }; | 26 | }; |
27 | |||
28 | &sham { | ||
29 | status = "okay"; | ||
30 | }; | ||
31 | |||
32 | &aes { | ||
33 | status = "okay"; | ||
34 | }; | ||
diff --git a/arch/arm/boot/dts/am335x-lxm.dts b/arch/arm/boot/dts/am335x-lxm.dts index 7266a00aab2e..5c5667a3624d 100644 --- a/arch/arm/boot/dts/am335x-lxm.dts +++ b/arch/arm/boot/dts/am335x-lxm.dts | |||
@@ -328,6 +328,10 @@ | |||
328 | dual_emac_res_vlan = <3>; | 328 | dual_emac_res_vlan = <3>; |
329 | }; | 329 | }; |
330 | 330 | ||
331 | &phy_sel { | ||
332 | rmii-clock-ext; | ||
333 | }; | ||
334 | |||
331 | &mac { | 335 | &mac { |
332 | pinctrl-names = "default", "sleep"; | 336 | pinctrl-names = "default", "sleep"; |
333 | pinctrl-0 = <&cpsw_default>; | 337 | pinctrl-0 = <&cpsw_default>; |
diff --git a/arch/arm/boot/dts/am33xx-clocks.dtsi b/arch/arm/boot/dts/am33xx-clocks.dtsi index 712edce7d6fb..071b56aa0c7e 100644 --- a/arch/arm/boot/dts/am33xx-clocks.dtsi +++ b/arch/arm/boot/dts/am33xx-clocks.dtsi | |||
@@ -99,7 +99,7 @@ | |||
99 | ehrpwm0_tbclk: ehrpwm0_tbclk@44e10664 { | 99 | ehrpwm0_tbclk: ehrpwm0_tbclk@44e10664 { |
100 | #clock-cells = <0>; | 100 | #clock-cells = <0>; |
101 | compatible = "ti,gate-clock"; | 101 | compatible = "ti,gate-clock"; |
102 | clocks = <&dpll_per_m2_ck>; | 102 | clocks = <&l4ls_gclk>; |
103 | ti,bit-shift = <0>; | 103 | ti,bit-shift = <0>; |
104 | reg = <0x0664>; | 104 | reg = <0x0664>; |
105 | }; | 105 | }; |
@@ -107,7 +107,7 @@ | |||
107 | ehrpwm1_tbclk: ehrpwm1_tbclk@44e10664 { | 107 | ehrpwm1_tbclk: ehrpwm1_tbclk@44e10664 { |
108 | #clock-cells = <0>; | 108 | #clock-cells = <0>; |
109 | compatible = "ti,gate-clock"; | 109 | compatible = "ti,gate-clock"; |
110 | clocks = <&dpll_per_m2_ck>; | 110 | clocks = <&l4ls_gclk>; |
111 | ti,bit-shift = <1>; | 111 | ti,bit-shift = <1>; |
112 | reg = <0x0664>; | 112 | reg = <0x0664>; |
113 | }; | 113 | }; |
@@ -115,7 +115,7 @@ | |||
115 | ehrpwm2_tbclk: ehrpwm2_tbclk@44e10664 { | 115 | ehrpwm2_tbclk: ehrpwm2_tbclk@44e10664 { |
116 | #clock-cells = <0>; | 116 | #clock-cells = <0>; |
117 | compatible = "ti,gate-clock"; | 117 | compatible = "ti,gate-clock"; |
118 | clocks = <&dpll_per_m2_ck>; | 118 | clocks = <&l4ls_gclk>; |
119 | ti,bit-shift = <2>; | 119 | ti,bit-shift = <2>; |
120 | reg = <0x0664>; | 120 | reg = <0x0664>; |
121 | }; | 121 | }; |
diff --git a/arch/arm/boot/dts/am437x-idk-evm.dts b/arch/arm/boot/dts/am437x-idk-evm.dts index f9a17e2ca8cb..0198f5a62b96 100644 --- a/arch/arm/boot/dts/am437x-idk-evm.dts +++ b/arch/arm/boot/dts/am437x-idk-evm.dts | |||
@@ -133,20 +133,6 @@ | |||
133 | >; | 133 | >; |
134 | }; | 134 | }; |
135 | 135 | ||
136 | i2c1_pins_default: i2c1_pins_default { | ||
137 | pinctrl-single,pins = < | ||
138 | 0x15c (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE2) /* spi0_cs0.i2c1_scl */ | ||
139 | 0x158 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE2) /* spi0_d1.i2c1_sda */ | ||
140 | >; | ||
141 | }; | ||
142 | |||
143 | i2c1_pins_sleep: i2c1_pins_sleep { | ||
144 | pinctrl-single,pins = < | ||
145 | 0x15c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* spi0_cs0.i2c1_scl */ | ||
146 | 0x158 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* spi0_d1.i2c1_sda */ | ||
147 | >; | ||
148 | }; | ||
149 | |||
150 | mmc1_pins_default: pinmux_mmc1_pins_default { | 136 | mmc1_pins_default: pinmux_mmc1_pins_default { |
151 | pinctrl-single,pins = < | 137 | pinctrl-single,pins = < |
152 | 0x100 (PIN_INPUT | MUX_MODE0) /* mmc0_clk.mmc0_clk */ | 138 | 0x100 (PIN_INPUT | MUX_MODE0) /* mmc0_clk.mmc0_clk */ |
@@ -254,7 +240,7 @@ | |||
254 | status = "okay"; | 240 | status = "okay"; |
255 | pinctrl-names = "default", "sleep"; | 241 | pinctrl-names = "default", "sleep"; |
256 | pinctrl-0 = <&i2c0_pins_default>; | 242 | pinctrl-0 = <&i2c0_pins_default>; |
257 | pinctrl-1 = <&i2c0_pins_default>; | 243 | pinctrl-1 = <&i2c0_pins_sleep>; |
258 | clock-frequency = <400000>; | 244 | clock-frequency = <400000>; |
259 | 245 | ||
260 | at24@50 { | 246 | at24@50 { |
@@ -262,17 +248,10 @@ | |||
262 | pagesize = <64>; | 248 | pagesize = <64>; |
263 | reg = <0x50>; | 249 | reg = <0x50>; |
264 | }; | 250 | }; |
265 | }; | ||
266 | |||
267 | &i2c1 { | ||
268 | status = "okay"; | ||
269 | pinctrl-names = "default", "sleep"; | ||
270 | pinctrl-0 = <&i2c1_pins_default>; | ||
271 | pinctrl-1 = <&i2c1_pins_default>; | ||
272 | clock-frequency = <400000>; | ||
273 | 251 | ||
274 | tps: tps62362@60 { | 252 | tps: tps62362@60 { |
275 | compatible = "ti,tps62362"; | 253 | compatible = "ti,tps62362"; |
254 | reg = <0x60>; | ||
276 | regulator-name = "VDD_MPU"; | 255 | regulator-name = "VDD_MPU"; |
277 | regulator-min-microvolt = <950000>; | 256 | regulator-min-microvolt = <950000>; |
278 | regulator-max-microvolt = <1330000>; | 257 | regulator-max-microvolt = <1330000>; |
diff --git a/arch/arm/boot/dts/am43xx-clocks.dtsi b/arch/arm/boot/dts/am43xx-clocks.dtsi index c7dc9dab93a4..cfb49686ab6a 100644 --- a/arch/arm/boot/dts/am43xx-clocks.dtsi +++ b/arch/arm/boot/dts/am43xx-clocks.dtsi | |||
@@ -107,7 +107,7 @@ | |||
107 | ehrpwm0_tbclk: ehrpwm0_tbclk { | 107 | ehrpwm0_tbclk: ehrpwm0_tbclk { |
108 | #clock-cells = <0>; | 108 | #clock-cells = <0>; |
109 | compatible = "ti,gate-clock"; | 109 | compatible = "ti,gate-clock"; |
110 | clocks = <&dpll_per_m2_ck>; | 110 | clocks = <&l4ls_gclk>; |
111 | ti,bit-shift = <0>; | 111 | ti,bit-shift = <0>; |
112 | reg = <0x0664>; | 112 | reg = <0x0664>; |
113 | }; | 113 | }; |
@@ -115,7 +115,7 @@ | |||
115 | ehrpwm1_tbclk: ehrpwm1_tbclk { | 115 | ehrpwm1_tbclk: ehrpwm1_tbclk { |
116 | #clock-cells = <0>; | 116 | #clock-cells = <0>; |
117 | compatible = "ti,gate-clock"; | 117 | compatible = "ti,gate-clock"; |
118 | clocks = <&dpll_per_m2_ck>; | 118 | clocks = <&l4ls_gclk>; |
119 | ti,bit-shift = <1>; | 119 | ti,bit-shift = <1>; |
120 | reg = <0x0664>; | 120 | reg = <0x0664>; |
121 | }; | 121 | }; |
@@ -123,7 +123,7 @@ | |||
123 | ehrpwm2_tbclk: ehrpwm2_tbclk { | 123 | ehrpwm2_tbclk: ehrpwm2_tbclk { |
124 | #clock-cells = <0>; | 124 | #clock-cells = <0>; |
125 | compatible = "ti,gate-clock"; | 125 | compatible = "ti,gate-clock"; |
126 | clocks = <&dpll_per_m2_ck>; | 126 | clocks = <&l4ls_gclk>; |
127 | ti,bit-shift = <2>; | 127 | ti,bit-shift = <2>; |
128 | reg = <0x0664>; | 128 | reg = <0x0664>; |
129 | }; | 129 | }; |
@@ -131,7 +131,7 @@ | |||
131 | ehrpwm3_tbclk: ehrpwm3_tbclk { | 131 | ehrpwm3_tbclk: ehrpwm3_tbclk { |
132 | #clock-cells = <0>; | 132 | #clock-cells = <0>; |
133 | compatible = "ti,gate-clock"; | 133 | compatible = "ti,gate-clock"; |
134 | clocks = <&dpll_per_m2_ck>; | 134 | clocks = <&l4ls_gclk>; |
135 | ti,bit-shift = <4>; | 135 | ti,bit-shift = <4>; |
136 | reg = <0x0664>; | 136 | reg = <0x0664>; |
137 | }; | 137 | }; |
@@ -139,7 +139,7 @@ | |||
139 | ehrpwm4_tbclk: ehrpwm4_tbclk { | 139 | ehrpwm4_tbclk: ehrpwm4_tbclk { |
140 | #clock-cells = <0>; | 140 | #clock-cells = <0>; |
141 | compatible = "ti,gate-clock"; | 141 | compatible = "ti,gate-clock"; |
142 | clocks = <&dpll_per_m2_ck>; | 142 | clocks = <&l4ls_gclk>; |
143 | ti,bit-shift = <5>; | 143 | ti,bit-shift = <5>; |
144 | reg = <0x0664>; | 144 | reg = <0x0664>; |
145 | }; | 145 | }; |
@@ -147,7 +147,7 @@ | |||
147 | ehrpwm5_tbclk: ehrpwm5_tbclk { | 147 | ehrpwm5_tbclk: ehrpwm5_tbclk { |
148 | #clock-cells = <0>; | 148 | #clock-cells = <0>; |
149 | compatible = "ti,gate-clock"; | 149 | compatible = "ti,gate-clock"; |
150 | clocks = <&dpll_per_m2_ck>; | 150 | clocks = <&l4ls_gclk>; |
151 | ti,bit-shift = <6>; | 151 | ti,bit-shift = <6>; |
152 | reg = <0x0664>; | 152 | reg = <0x0664>; |
153 | }; | 153 | }; |
diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts index 03750af3b49a..6463f9ef2b54 100644 --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts | |||
@@ -549,14 +549,6 @@ | |||
549 | pinctrl-0 = <&usb1_pins>; | 549 | pinctrl-0 = <&usb1_pins>; |
550 | }; | 550 | }; |
551 | 551 | ||
552 | &omap_dwc3_1 { | ||
553 | extcon = <&extcon_usb1>; | ||
554 | }; | ||
555 | |||
556 | &omap_dwc3_2 { | ||
557 | extcon = <&extcon_usb2>; | ||
558 | }; | ||
559 | |||
560 | &usb2 { | 552 | &usb2 { |
561 | dr_mode = "peripheral"; | 553 | dr_mode = "peripheral"; |
562 | }; | 554 | }; |
diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi index fff0ee69aab4..e7f0a4ae271c 100644 --- a/arch/arm/boot/dts/at91sam9260.dtsi +++ b/arch/arm/boot/dts/at91sam9260.dtsi | |||
@@ -494,12 +494,12 @@ | |||
494 | 494 | ||
495 | pinctrl_usart3_rts: usart3_rts-0 { | 495 | pinctrl_usart3_rts: usart3_rts-0 { |
496 | atmel,pins = | 496 | atmel,pins = |
497 | <AT91_PIOB 8 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC8 periph B */ | 497 | <AT91_PIOC 8 AT91_PERIPH_B AT91_PINCTRL_NONE>; |
498 | }; | 498 | }; |
499 | 499 | ||
500 | pinctrl_usart3_cts: usart3_cts-0 { | 500 | pinctrl_usart3_cts: usart3_cts-0 { |
501 | atmel,pins = | 501 | atmel,pins = |
502 | <AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC10 periph B */ | 502 | <AT91_PIOC 10 AT91_PERIPH_B AT91_PINCTRL_NONE>; |
503 | }; | 503 | }; |
504 | }; | 504 | }; |
505 | 505 | ||
@@ -853,7 +853,7 @@ | |||
853 | }; | 853 | }; |
854 | 854 | ||
855 | usb1: gadget@fffa4000 { | 855 | usb1: gadget@fffa4000 { |
856 | compatible = "atmel,at91rm9200-udc"; | 856 | compatible = "atmel,at91sam9260-udc"; |
857 | reg = <0xfffa4000 0x4000>; | 857 | reg = <0xfffa4000 0x4000>; |
858 | interrupts = <10 IRQ_TYPE_LEVEL_HIGH 2>; | 858 | interrupts = <10 IRQ_TYPE_LEVEL_HIGH 2>; |
859 | clocks = <&udc_clk>, <&udpck>; | 859 | clocks = <&udc_clk>, <&udpck>; |
@@ -976,7 +976,6 @@ | |||
976 | atmel,watchdog-type = "hardware"; | 976 | atmel,watchdog-type = "hardware"; |
977 | atmel,reset-type = "all"; | 977 | atmel,reset-type = "all"; |
978 | atmel,dbg-halt; | 978 | atmel,dbg-halt; |
979 | atmel,idle-halt; | ||
980 | status = "disabled"; | 979 | status = "disabled"; |
981 | }; | 980 | }; |
982 | 981 | ||
diff --git a/arch/arm/boot/dts/at91sam9261.dtsi b/arch/arm/boot/dts/at91sam9261.dtsi index e247b0b5fdab..d55fdf2487ef 100644 --- a/arch/arm/boot/dts/at91sam9261.dtsi +++ b/arch/arm/boot/dts/at91sam9261.dtsi | |||
@@ -124,11 +124,12 @@ | |||
124 | }; | 124 | }; |
125 | 125 | ||
126 | usb1: gadget@fffa4000 { | 126 | usb1: gadget@fffa4000 { |
127 | compatible = "atmel,at91rm9200-udc"; | 127 | compatible = "atmel,at91sam9261-udc"; |
128 | reg = <0xfffa4000 0x4000>; | 128 | reg = <0xfffa4000 0x4000>; |
129 | interrupts = <10 IRQ_TYPE_LEVEL_HIGH 2>; | 129 | interrupts = <10 IRQ_TYPE_LEVEL_HIGH 2>; |
130 | clocks = <&usb>, <&udc_clk>, <&udpck>; | 130 | clocks = <&udc_clk>, <&udpck>; |
131 | clock-names = "usb_clk", "udc_clk", "udpck"; | 131 | clock-names = "pclk", "hclk"; |
132 | atmel,matrix = <&matrix>; | ||
132 | status = "disabled"; | 133 | status = "disabled"; |
133 | }; | 134 | }; |
134 | 135 | ||
@@ -262,7 +263,7 @@ | |||
262 | }; | 263 | }; |
263 | 264 | ||
264 | matrix: matrix@ffffee00 { | 265 | matrix: matrix@ffffee00 { |
265 | compatible = "atmel,at91sam9260-bus-matrix"; | 266 | compatible = "atmel,at91sam9260-bus-matrix", "syscon"; |
266 | reg = <0xffffee00 0x200>; | 267 | reg = <0xffffee00 0x200>; |
267 | }; | 268 | }; |
268 | 269 | ||
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi index 1f67bb4c144e..fce301c4e9d6 100644 --- a/arch/arm/boot/dts/at91sam9263.dtsi +++ b/arch/arm/boot/dts/at91sam9263.dtsi | |||
@@ -69,7 +69,7 @@ | |||
69 | 69 | ||
70 | sram1: sram@00500000 { | 70 | sram1: sram@00500000 { |
71 | compatible = "mmio-sram"; | 71 | compatible = "mmio-sram"; |
72 | reg = <0x00300000 0x4000>; | 72 | reg = <0x00500000 0x4000>; |
73 | }; | 73 | }; |
74 | 74 | ||
75 | ahb { | 75 | ahb { |
@@ -856,7 +856,7 @@ | |||
856 | }; | 856 | }; |
857 | 857 | ||
858 | usb1: gadget@fff78000 { | 858 | usb1: gadget@fff78000 { |
859 | compatible = "atmel,at91rm9200-udc"; | 859 | compatible = "atmel,at91sam9263-udc"; |
860 | reg = <0xfff78000 0x4000>; | 860 | reg = <0xfff78000 0x4000>; |
861 | interrupts = <24 IRQ_TYPE_LEVEL_HIGH 2>; | 861 | interrupts = <24 IRQ_TYPE_LEVEL_HIGH 2>; |
862 | clocks = <&udc_clk>, <&udpck>; | 862 | clocks = <&udc_clk>, <&udpck>; |
@@ -905,7 +905,6 @@ | |||
905 | atmel,watchdog-type = "hardware"; | 905 | atmel,watchdog-type = "hardware"; |
906 | atmel,reset-type = "all"; | 906 | atmel,reset-type = "all"; |
907 | atmel,dbg-halt; | 907 | atmel,dbg-halt; |
908 | atmel,idle-halt; | ||
909 | status = "disabled"; | 908 | status = "disabled"; |
910 | }; | 909 | }; |
911 | 910 | ||
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi index ee80aa9c0759..488af63d5174 100644 --- a/arch/arm/boot/dts/at91sam9g45.dtsi +++ b/arch/arm/boot/dts/at91sam9g45.dtsi | |||
@@ -1116,7 +1116,6 @@ | |||
1116 | atmel,watchdog-type = "hardware"; | 1116 | atmel,watchdog-type = "hardware"; |
1117 | atmel,reset-type = "all"; | 1117 | atmel,reset-type = "all"; |
1118 | atmel,dbg-halt; | 1118 | atmel,dbg-halt; |
1119 | atmel,idle-halt; | ||
1120 | status = "disabled"; | 1119 | status = "disabled"; |
1121 | }; | 1120 | }; |
1122 | 1121 | ||
@@ -1301,7 +1300,7 @@ | |||
1301 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; | 1300 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; |
1302 | reg = <0x00800000 0x100000>; | 1301 | reg = <0x00800000 0x100000>; |
1303 | interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; | 1302 | interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; |
1304 | clocks = <&usb>, <&uhphs_clk>, <&uhphs_clk>, <&uhpck>; | 1303 | clocks = <&utmi>, <&uhphs_clk>, <&uhphs_clk>, <&uhpck>; |
1305 | clock-names = "usb_clk", "ehci_clk", "hclk", "uhpck"; | 1304 | clock-names = "usb_clk", "ehci_clk", "hclk", "uhpck"; |
1306 | status = "disabled"; | 1305 | status = "disabled"; |
1307 | }; | 1306 | }; |
diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi index c2666a7cb5b1..0c53a375ba99 100644 --- a/arch/arm/boot/dts/at91sam9n12.dtsi +++ b/arch/arm/boot/dts/at91sam9n12.dtsi | |||
@@ -894,7 +894,6 @@ | |||
894 | atmel,watchdog-type = "hardware"; | 894 | atmel,watchdog-type = "hardware"; |
895 | atmel,reset-type = "all"; | 895 | atmel,reset-type = "all"; |
896 | atmel,dbg-halt; | 896 | atmel,dbg-halt; |
897 | atmel,idle-halt; | ||
898 | status = "disabled"; | 897 | status = "disabled"; |
899 | }; | 898 | }; |
900 | 899 | ||
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi index 818dabdd8c0e..d221179d0f1a 100644 --- a/arch/arm/boot/dts/at91sam9x5.dtsi +++ b/arch/arm/boot/dts/at91sam9x5.dtsi | |||
@@ -1066,7 +1066,7 @@ | |||
1066 | reg = <0x00500000 0x80000 | 1066 | reg = <0x00500000 0x80000 |
1067 | 0xf803c000 0x400>; | 1067 | 0xf803c000 0x400>; |
1068 | interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>; | 1068 | interrupts = <23 IRQ_TYPE_LEVEL_HIGH 0>; |
1069 | clocks = <&usb>, <&udphs_clk>; | 1069 | clocks = <&utmi>, <&udphs_clk>; |
1070 | clock-names = "hclk", "pclk"; | 1070 | clock-names = "hclk", "pclk"; |
1071 | status = "disabled"; | 1071 | status = "disabled"; |
1072 | 1072 | ||
@@ -1130,7 +1130,6 @@ | |||
1130 | atmel,watchdog-type = "hardware"; | 1130 | atmel,watchdog-type = "hardware"; |
1131 | atmel,reset-type = "all"; | 1131 | atmel,reset-type = "all"; |
1132 | atmel,dbg-halt; | 1132 | atmel,dbg-halt; |
1133 | atmel,idle-halt; | ||
1134 | status = "disabled"; | 1133 | status = "disabled"; |
1135 | }; | 1134 | }; |
1136 | 1135 | ||
@@ -1186,7 +1185,7 @@ | |||
1186 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; | 1185 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; |
1187 | reg = <0x00700000 0x100000>; | 1186 | reg = <0x00700000 0x100000>; |
1188 | interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; | 1187 | interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>; |
1189 | clocks = <&usb>, <&uhphs_clk>, <&uhpck>; | 1188 | clocks = <&utmi>, <&uhphs_clk>, <&uhpck>; |
1190 | clock-names = "usb_clk", "ehci_clk", "uhpck"; | 1189 | clock-names = "usb_clk", "ehci_clk", "uhpck"; |
1191 | status = "disabled"; | 1190 | status = "disabled"; |
1192 | }; | 1191 | }; |
diff --git a/arch/arm/boot/dts/dm8168-evm.dts b/arch/arm/boot/dts/dm8168-evm.dts index 857d0289ad4d..d3a29c1b8417 100644 --- a/arch/arm/boot/dts/dm8168-evm.dts +++ b/arch/arm/boot/dts/dm8168-evm.dts | |||
@@ -35,6 +35,18 @@ | |||
35 | DM816X_IOPAD(0x0aac, PIN_INPUT | MUX_MODE0) /* SPI_D1 */ | 35 | DM816X_IOPAD(0x0aac, PIN_INPUT | MUX_MODE0) /* SPI_D1 */ |
36 | >; | 36 | >; |
37 | }; | 37 | }; |
38 | |||
39 | usb0_pins: pinmux_usb0_pins { | ||
40 | pinctrl-single,pins = < | ||
41 | DM816X_IOPAD(0x0d00, MUX_MODE0) /* USB0_DRVVBUS */ | ||
42 | >; | ||
43 | }; | ||
44 | |||
45 | usb1_pins: pinmux_usb0_pins { | ||
46 | pinctrl-single,pins = < | ||
47 | DM816X_IOPAD(0x0d04, MUX_MODE0) /* USB1_DRVVBUS */ | ||
48 | >; | ||
49 | }; | ||
38 | }; | 50 | }; |
39 | 51 | ||
40 | &i2c1 { | 52 | &i2c1 { |
@@ -127,3 +139,16 @@ | |||
127 | &mmc1 { | 139 | &mmc1 { |
128 | vmmc-supply = <&vmmcsd_fixed>; | 140 | vmmc-supply = <&vmmcsd_fixed>; |
129 | }; | 141 | }; |
142 | |||
143 | /* At least dm8168-evm rev c won't support multipoint, later may */ | ||
144 | &usb0 { | ||
145 | pinctrl-names = "default"; | ||
146 | pinctrl-0 = <&usb0_pins>; | ||
147 | mentor,multipoint = <0>; | ||
148 | }; | ||
149 | |||
150 | &usb1 { | ||
151 | pinctrl-names = "default"; | ||
152 | pinctrl-0 = <&usb1_pins>; | ||
153 | mentor,multipoint = <0>; | ||
154 | }; | ||
diff --git a/arch/arm/boot/dts/dm816x.dtsi b/arch/arm/boot/dts/dm816x.dtsi index d98d0f7de380..3c97b5f2addc 100644 --- a/arch/arm/boot/dts/dm816x.dtsi +++ b/arch/arm/boot/dts/dm816x.dtsi | |||
@@ -97,10 +97,31 @@ | |||
97 | 97 | ||
98 | /* Device Configuration Registers */ | 98 | /* Device Configuration Registers */ |
99 | scm_conf: syscon@600 { | 99 | scm_conf: syscon@600 { |
100 | compatible = "syscon"; | 100 | compatible = "syscon", "simple-bus"; |
101 | reg = <0x600 0x110>; | 101 | reg = <0x600 0x110>; |
102 | #address-cells = <1>; | 102 | #address-cells = <1>; |
103 | #size-cells = <1>; | 103 | #size-cells = <1>; |
104 | ranges = <0 0x600 0x110>; | ||
105 | |||
106 | usb_phy0: usb-phy@20 { | ||
107 | compatible = "ti,dm8168-usb-phy"; | ||
108 | reg = <0x20 0x8>; | ||
109 | reg-names = "phy"; | ||
110 | clocks = <&main_fapll 6>; | ||
111 | clock-names = "refclk"; | ||
112 | #phy-cells = <0>; | ||
113 | syscon = <&scm_conf>; | ||
114 | }; | ||
115 | |||
116 | usb_phy1: usb-phy@28 { | ||
117 | compatible = "ti,dm8168-usb-phy"; | ||
118 | reg = <0x28 0x8>; | ||
119 | reg-names = "phy"; | ||
120 | clocks = <&main_fapll 6>; | ||
121 | clock-names = "refclk"; | ||
122 | #phy-cells = <0>; | ||
123 | syscon = <&scm_conf>; | ||
124 | }; | ||
104 | }; | 125 | }; |
105 | 126 | ||
106 | scrm_clocks: clocks { | 127 | scrm_clocks: clocks { |
@@ -357,7 +378,10 @@ | |||
357 | reg-names = "mc", "control"; | 378 | reg-names = "mc", "control"; |
358 | interrupts = <18>; | 379 | interrupts = <18>; |
359 | interrupt-names = "mc"; | 380 | interrupt-names = "mc"; |
360 | dr_mode = "otg"; | 381 | dr_mode = "host"; |
382 | interface-type = <0>; | ||
383 | phys = <&usb_phy0>; | ||
384 | phy-names = "usb2-phy"; | ||
361 | mentor,multipoint = <1>; | 385 | mentor,multipoint = <1>; |
362 | mentor,num-eps = <16>; | 386 | mentor,num-eps = <16>; |
363 | mentor,ram-bits = <12>; | 387 | mentor,ram-bits = <12>; |
@@ -366,13 +390,15 @@ | |||
366 | 390 | ||
367 | usb1: usb@47401800 { | 391 | usb1: usb@47401800 { |
368 | compatible = "ti,musb-am33xx"; | 392 | compatible = "ti,musb-am33xx"; |
369 | status = "disabled"; | ||
370 | reg = <0x47401c00 0x400 | 393 | reg = <0x47401c00 0x400 |
371 | 0x47401800 0x200>; | 394 | 0x47401800 0x200>; |
372 | reg-names = "mc", "control"; | 395 | reg-names = "mc", "control"; |
373 | interrupts = <19>; | 396 | interrupts = <19>; |
374 | interrupt-names = "mc"; | 397 | interrupt-names = "mc"; |
375 | dr_mode = "otg"; | 398 | dr_mode = "host"; |
399 | interface-type = <0>; | ||
400 | phys = <&usb_phy1>; | ||
401 | phy-names = "usb2-phy"; | ||
376 | mentor,multipoint = <1>; | 402 | mentor,multipoint = <1>; |
377 | mentor,num-eps = <16>; | 403 | mentor,num-eps = <16>; |
378 | mentor,ram-bits = <12>; | 404 | mentor,ram-bits = <12>; |
diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts index 746cddb1b8f5..7563d7ce01bb 100644 --- a/arch/arm/boot/dts/dra7-evm.dts +++ b/arch/arm/boot/dts/dra7-evm.dts | |||
@@ -263,17 +263,15 @@ | |||
263 | 263 | ||
264 | dcan1_pins_default: dcan1_pins_default { | 264 | dcan1_pins_default: dcan1_pins_default { |
265 | pinctrl-single,pins = < | 265 | pinctrl-single,pins = < |
266 | 0x3d0 (PIN_OUTPUT | MUX_MODE0) /* dcan1_tx */ | 266 | 0x3d0 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* dcan1_tx */ |
267 | 0x3d4 (MUX_MODE15) /* dcan1_rx.off */ | 267 | 0x418 (PULL_UP | MUX_MODE1) /* wakeup0.dcan1_rx */ |
268 | 0x418 (PULL_DIS | MUX_MODE1) /* wakeup0.dcan1_rx */ | ||
269 | >; | 268 | >; |
270 | }; | 269 | }; |
271 | 270 | ||
272 | dcan1_pins_sleep: dcan1_pins_sleep { | 271 | dcan1_pins_sleep: dcan1_pins_sleep { |
273 | pinctrl-single,pins = < | 272 | pinctrl-single,pins = < |
274 | 0x3d0 (MUX_MODE15) /* dcan1_tx.off */ | 273 | 0x3d0 (MUX_MODE15 | PULL_UP) /* dcan1_tx.off */ |
275 | 0x3d4 (MUX_MODE15) /* dcan1_rx.off */ | 274 | 0x418 (MUX_MODE15 | PULL_UP) /* wakeup0.off */ |
276 | 0x418 (MUX_MODE15) /* wakeup0.off */ | ||
277 | >; | 275 | >; |
278 | }; | 276 | }; |
279 | }; | 277 | }; |
@@ -543,14 +541,6 @@ | |||
543 | }; | 541 | }; |
544 | }; | 542 | }; |
545 | 543 | ||
546 | &omap_dwc3_1 { | ||
547 | extcon = <&extcon_usb1>; | ||
548 | }; | ||
549 | |||
550 | &omap_dwc3_2 { | ||
551 | extcon = <&extcon_usb2>; | ||
552 | }; | ||
553 | |||
554 | &usb1 { | 544 | &usb1 { |
555 | dr_mode = "peripheral"; | 545 | dr_mode = "peripheral"; |
556 | pinctrl-names = "default"; | 546 | pinctrl-names = "default"; |
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi index 5827fedafd43..127608d79033 100644 --- a/arch/arm/boot/dts/dra7.dtsi +++ b/arch/arm/boot/dts/dra7.dtsi | |||
@@ -249,8 +249,8 @@ | |||
249 | <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, | 249 | <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, |
250 | <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; | 250 | <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; |
251 | #dma-cells = <1>; | 251 | #dma-cells = <1>; |
252 | #dma-channels = <32>; | 252 | dma-channels = <32>; |
253 | #dma-requests = <127>; | 253 | dma-requests = <127>; |
254 | }; | 254 | }; |
255 | 255 | ||
256 | gpio1: gpio@4ae10000 { | 256 | gpio1: gpio@4ae10000 { |
@@ -1090,8 +1090,8 @@ | |||
1090 | <0x4A096800 0x40>; /* pll_ctrl */ | 1090 | <0x4A096800 0x40>; /* pll_ctrl */ |
1091 | reg-names = "phy_rx", "phy_tx", "pll_ctrl"; | 1091 | reg-names = "phy_rx", "phy_tx", "pll_ctrl"; |
1092 | ctrl-module = <&omap_control_sata>; | 1092 | ctrl-module = <&omap_control_sata>; |
1093 | clocks = <&sys_clkin1>; | 1093 | clocks = <&sys_clkin1>, <&sata_ref_clk>; |
1094 | clock-names = "sysclk"; | 1094 | clock-names = "sysclk", "refclk"; |
1095 | #phy-cells = <0>; | 1095 | #phy-cells = <0>; |
1096 | }; | 1096 | }; |
1097 | 1097 | ||
diff --git a/arch/arm/boot/dts/dra72-evm.dts b/arch/arm/boot/dts/dra72-evm.dts index 4d8711713610..40ed539ce474 100644 --- a/arch/arm/boot/dts/dra72-evm.dts +++ b/arch/arm/boot/dts/dra72-evm.dts | |||
@@ -119,17 +119,15 @@ | |||
119 | 119 | ||
120 | dcan1_pins_default: dcan1_pins_default { | 120 | dcan1_pins_default: dcan1_pins_default { |
121 | pinctrl-single,pins = < | 121 | pinctrl-single,pins = < |
122 | 0x3d0 (PIN_OUTPUT | MUX_MODE0) /* dcan1_tx */ | 122 | 0x3d0 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* dcan1_tx */ |
123 | 0x3d4 (MUX_MODE15) /* dcan1_rx.off */ | 123 | 0x418 (PULL_UP | MUX_MODE1) /* wakeup0.dcan1_rx */ |
124 | 0x418 (PULL_DIS | MUX_MODE1) /* wakeup0.dcan1_rx */ | ||
125 | >; | 124 | >; |
126 | }; | 125 | }; |
127 | 126 | ||
128 | dcan1_pins_sleep: dcan1_pins_sleep { | 127 | dcan1_pins_sleep: dcan1_pins_sleep { |
129 | pinctrl-single,pins = < | 128 | pinctrl-single,pins = < |
130 | 0x3d0 (MUX_MODE15) /* dcan1_tx.off */ | 129 | 0x3d0 (MUX_MODE15 | PULL_UP) /* dcan1_tx.off */ |
131 | 0x3d4 (MUX_MODE15) /* dcan1_rx.off */ | 130 | 0x418 (MUX_MODE15 | PULL_UP) /* wakeup0.off */ |
132 | 0x418 (MUX_MODE15) /* wakeup0.off */ | ||
133 | >; | 131 | >; |
134 | }; | 132 | }; |
135 | 133 | ||
@@ -380,14 +378,6 @@ | |||
380 | phy-supply = <&ldo4_reg>; | 378 | phy-supply = <&ldo4_reg>; |
381 | }; | 379 | }; |
382 | 380 | ||
383 | &omap_dwc3_1 { | ||
384 | extcon = <&extcon_usb1>; | ||
385 | }; | ||
386 | |||
387 | &omap_dwc3_2 { | ||
388 | extcon = <&extcon_usb2>; | ||
389 | }; | ||
390 | |||
391 | &usb1 { | 381 | &usb1 { |
392 | dr_mode = "peripheral"; | 382 | dr_mode = "peripheral"; |
393 | pinctrl-names = "default"; | 383 | pinctrl-names = "default"; |
diff --git a/arch/arm/boot/dts/dra7xx-clocks.dtsi b/arch/arm/boot/dts/dra7xx-clocks.dtsi index 4bdcbd61ce47..99b09a44e269 100644 --- a/arch/arm/boot/dts/dra7xx-clocks.dtsi +++ b/arch/arm/boot/dts/dra7xx-clocks.dtsi | |||
@@ -243,10 +243,18 @@ | |||
243 | ti,invert-autoidle-bit; | 243 | ti,invert-autoidle-bit; |
244 | }; | 244 | }; |
245 | 245 | ||
246 | dpll_core_byp_mux: dpll_core_byp_mux { | ||
247 | #clock-cells = <0>; | ||
248 | compatible = "ti,mux-clock"; | ||
249 | clocks = <&sys_clkin1>, <&dpll_abe_m3x2_ck>; | ||
250 | ti,bit-shift = <23>; | ||
251 | reg = <0x012c>; | ||
252 | }; | ||
253 | |||
246 | dpll_core_ck: dpll_core_ck { | 254 | dpll_core_ck: dpll_core_ck { |
247 | #clock-cells = <0>; | 255 | #clock-cells = <0>; |
248 | compatible = "ti,omap4-dpll-core-clock"; | 256 | compatible = "ti,omap4-dpll-core-clock"; |
249 | clocks = <&sys_clkin1>, <&dpll_abe_m3x2_ck>; | 257 | clocks = <&sys_clkin1>, <&dpll_core_byp_mux>; |
250 | reg = <0x0120>, <0x0124>, <0x012c>, <0x0128>; | 258 | reg = <0x0120>, <0x0124>, <0x012c>, <0x0128>; |
251 | }; | 259 | }; |
252 | 260 | ||
@@ -309,10 +317,18 @@ | |||
309 | clock-div = <1>; | 317 | clock-div = <1>; |
310 | }; | 318 | }; |
311 | 319 | ||
320 | dpll_dsp_byp_mux: dpll_dsp_byp_mux { | ||
321 | #clock-cells = <0>; | ||
322 | compatible = "ti,mux-clock"; | ||
323 | clocks = <&sys_clkin1>, <&dsp_dpll_hs_clk_div>; | ||
324 | ti,bit-shift = <23>; | ||
325 | reg = <0x0240>; | ||
326 | }; | ||
327 | |||
312 | dpll_dsp_ck: dpll_dsp_ck { | 328 | dpll_dsp_ck: dpll_dsp_ck { |
313 | #clock-cells = <0>; | 329 | #clock-cells = <0>; |
314 | compatible = "ti,omap4-dpll-clock"; | 330 | compatible = "ti,omap4-dpll-clock"; |
315 | clocks = <&sys_clkin1>, <&dsp_dpll_hs_clk_div>; | 331 | clocks = <&sys_clkin1>, <&dpll_dsp_byp_mux>; |
316 | reg = <0x0234>, <0x0238>, <0x0240>, <0x023c>; | 332 | reg = <0x0234>, <0x0238>, <0x0240>, <0x023c>; |
317 | }; | 333 | }; |
318 | 334 | ||
@@ -335,10 +351,18 @@ | |||
335 | clock-div = <1>; | 351 | clock-div = <1>; |
336 | }; | 352 | }; |
337 | 353 | ||
354 | dpll_iva_byp_mux: dpll_iva_byp_mux { | ||
355 | #clock-cells = <0>; | ||
356 | compatible = "ti,mux-clock"; | ||
357 | clocks = <&sys_clkin1>, <&iva_dpll_hs_clk_div>; | ||
358 | ti,bit-shift = <23>; | ||
359 | reg = <0x01ac>; | ||
360 | }; | ||
361 | |||
338 | dpll_iva_ck: dpll_iva_ck { | 362 | dpll_iva_ck: dpll_iva_ck { |
339 | #clock-cells = <0>; | 363 | #clock-cells = <0>; |
340 | compatible = "ti,omap4-dpll-clock"; | 364 | compatible = "ti,omap4-dpll-clock"; |
341 | clocks = <&sys_clkin1>, <&iva_dpll_hs_clk_div>; | 365 | clocks = <&sys_clkin1>, <&dpll_iva_byp_mux>; |
342 | reg = <0x01a0>, <0x01a4>, <0x01ac>, <0x01a8>; | 366 | reg = <0x01a0>, <0x01a4>, <0x01ac>, <0x01a8>; |
343 | }; | 367 | }; |
344 | 368 | ||
@@ -361,10 +385,18 @@ | |||
361 | clock-div = <1>; | 385 | clock-div = <1>; |
362 | }; | 386 | }; |
363 | 387 | ||
388 | dpll_gpu_byp_mux: dpll_gpu_byp_mux { | ||
389 | #clock-cells = <0>; | ||
390 | compatible = "ti,mux-clock"; | ||
391 | clocks = <&sys_clkin1>, <&dpll_abe_m3x2_ck>; | ||
392 | ti,bit-shift = <23>; | ||
393 | reg = <0x02e4>; | ||
394 | }; | ||
395 | |||
364 | dpll_gpu_ck: dpll_gpu_ck { | 396 | dpll_gpu_ck: dpll_gpu_ck { |
365 | #clock-cells = <0>; | 397 | #clock-cells = <0>; |
366 | compatible = "ti,omap4-dpll-clock"; | 398 | compatible = "ti,omap4-dpll-clock"; |
367 | clocks = <&sys_clkin1>, <&dpll_abe_m3x2_ck>; | 399 | clocks = <&sys_clkin1>, <&dpll_gpu_byp_mux>; |
368 | reg = <0x02d8>, <0x02dc>, <0x02e4>, <0x02e0>; | 400 | reg = <0x02d8>, <0x02dc>, <0x02e4>, <0x02e0>; |
369 | }; | 401 | }; |
370 | 402 | ||
@@ -398,10 +430,18 @@ | |||
398 | clock-div = <1>; | 430 | clock-div = <1>; |
399 | }; | 431 | }; |
400 | 432 | ||
433 | dpll_ddr_byp_mux: dpll_ddr_byp_mux { | ||
434 | #clock-cells = <0>; | ||
435 | compatible = "ti,mux-clock"; | ||
436 | clocks = <&sys_clkin1>, <&dpll_abe_m3x2_ck>; | ||
437 | ti,bit-shift = <23>; | ||
438 | reg = <0x021c>; | ||
439 | }; | ||
440 | |||
401 | dpll_ddr_ck: dpll_ddr_ck { | 441 | dpll_ddr_ck: dpll_ddr_ck { |
402 | #clock-cells = <0>; | 442 | #clock-cells = <0>; |
403 | compatible = "ti,omap4-dpll-clock"; | 443 | compatible = "ti,omap4-dpll-clock"; |
404 | clocks = <&sys_clkin1>, <&dpll_abe_m3x2_ck>; | 444 | clocks = <&sys_clkin1>, <&dpll_ddr_byp_mux>; |
405 | reg = <0x0210>, <0x0214>, <0x021c>, <0x0218>; | 445 | reg = <0x0210>, <0x0214>, <0x021c>, <0x0218>; |
406 | }; | 446 | }; |
407 | 447 | ||
@@ -416,10 +456,18 @@ | |||
416 | ti,invert-autoidle-bit; | 456 | ti,invert-autoidle-bit; |
417 | }; | 457 | }; |
418 | 458 | ||
459 | dpll_gmac_byp_mux: dpll_gmac_byp_mux { | ||
460 | #clock-cells = <0>; | ||
461 | compatible = "ti,mux-clock"; | ||
462 | clocks = <&sys_clkin1>, <&dpll_abe_m3x2_ck>; | ||
463 | ti,bit-shift = <23>; | ||
464 | reg = <0x02b4>; | ||
465 | }; | ||
466 | |||
419 | dpll_gmac_ck: dpll_gmac_ck { | 467 | dpll_gmac_ck: dpll_gmac_ck { |
420 | #clock-cells = <0>; | 468 | #clock-cells = <0>; |
421 | compatible = "ti,omap4-dpll-clock"; | 469 | compatible = "ti,omap4-dpll-clock"; |
422 | clocks = <&sys_clkin1>, <&dpll_abe_m3x2_ck>; | 470 | clocks = <&sys_clkin1>, <&dpll_gmac_byp_mux>; |
423 | reg = <0x02a8>, <0x02ac>, <0x02b4>, <0x02b0>; | 471 | reg = <0x02a8>, <0x02ac>, <0x02b4>, <0x02b0>; |
424 | }; | 472 | }; |
425 | 473 | ||
@@ -482,10 +530,18 @@ | |||
482 | clock-div = <1>; | 530 | clock-div = <1>; |
483 | }; | 531 | }; |
484 | 532 | ||
533 | dpll_eve_byp_mux: dpll_eve_byp_mux { | ||
534 | #clock-cells = <0>; | ||
535 | compatible = "ti,mux-clock"; | ||
536 | clocks = <&sys_clkin1>, <&eve_dpll_hs_clk_div>; | ||
537 | ti,bit-shift = <23>; | ||
538 | reg = <0x0290>; | ||
539 | }; | ||
540 | |||
485 | dpll_eve_ck: dpll_eve_ck { | 541 | dpll_eve_ck: dpll_eve_ck { |
486 | #clock-cells = <0>; | 542 | #clock-cells = <0>; |
487 | compatible = "ti,omap4-dpll-clock"; | 543 | compatible = "ti,omap4-dpll-clock"; |
488 | clocks = <&sys_clkin1>, <&eve_dpll_hs_clk_div>; | 544 | clocks = <&sys_clkin1>, <&dpll_eve_byp_mux>; |
489 | reg = <0x0284>, <0x0288>, <0x0290>, <0x028c>; | 545 | reg = <0x0284>, <0x0288>, <0x0290>, <0x028c>; |
490 | }; | 546 | }; |
491 | 547 | ||
@@ -1249,10 +1305,18 @@ | |||
1249 | clock-div = <1>; | 1305 | clock-div = <1>; |
1250 | }; | 1306 | }; |
1251 | 1307 | ||
1308 | dpll_per_byp_mux: dpll_per_byp_mux { | ||
1309 | #clock-cells = <0>; | ||
1310 | compatible = "ti,mux-clock"; | ||
1311 | clocks = <&sys_clkin1>, <&per_dpll_hs_clk_div>; | ||
1312 | ti,bit-shift = <23>; | ||
1313 | reg = <0x014c>; | ||
1314 | }; | ||
1315 | |||
1252 | dpll_per_ck: dpll_per_ck { | 1316 | dpll_per_ck: dpll_per_ck { |
1253 | #clock-cells = <0>; | 1317 | #clock-cells = <0>; |
1254 | compatible = "ti,omap4-dpll-clock"; | 1318 | compatible = "ti,omap4-dpll-clock"; |
1255 | clocks = <&sys_clkin1>, <&per_dpll_hs_clk_div>; | 1319 | clocks = <&sys_clkin1>, <&dpll_per_byp_mux>; |
1256 | reg = <0x0140>, <0x0144>, <0x014c>, <0x0148>; | 1320 | reg = <0x0140>, <0x0144>, <0x014c>, <0x0148>; |
1257 | }; | 1321 | }; |
1258 | 1322 | ||
@@ -1275,10 +1339,18 @@ | |||
1275 | clock-div = <1>; | 1339 | clock-div = <1>; |
1276 | }; | 1340 | }; |
1277 | 1341 | ||
1342 | dpll_usb_byp_mux: dpll_usb_byp_mux { | ||
1343 | #clock-cells = <0>; | ||
1344 | compatible = "ti,mux-clock"; | ||
1345 | clocks = <&sys_clkin1>, <&usb_dpll_hs_clk_div>; | ||
1346 | ti,bit-shift = <23>; | ||
1347 | reg = <0x018c>; | ||
1348 | }; | ||
1349 | |||
1278 | dpll_usb_ck: dpll_usb_ck { | 1350 | dpll_usb_ck: dpll_usb_ck { |
1279 | #clock-cells = <0>; | 1351 | #clock-cells = <0>; |
1280 | compatible = "ti,omap4-dpll-j-type-clock"; | 1352 | compatible = "ti,omap4-dpll-j-type-clock"; |
1281 | clocks = <&sys_clkin1>, <&usb_dpll_hs_clk_div>; | 1353 | clocks = <&sys_clkin1>, <&dpll_usb_byp_mux>; |
1282 | reg = <0x0180>, <0x0184>, <0x018c>, <0x0188>; | 1354 | reg = <0x0180>, <0x0184>, <0x018c>, <0x0188>; |
1283 | }; | 1355 | }; |
1284 | 1356 | ||
diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi index 277b48b0b6f9..ac6b0ae42caf 100644 --- a/arch/arm/boot/dts/exynos3250.dtsi +++ b/arch/arm/boot/dts/exynos3250.dtsi | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include "skeleton.dtsi" | 20 | #include "skeleton.dtsi" |
21 | #include "exynos4-cpu-thermal.dtsi" | ||
21 | #include <dt-bindings/clock/exynos3250.h> | 22 | #include <dt-bindings/clock/exynos3250.h> |
22 | 23 | ||
23 | / { | 24 | / { |
@@ -193,6 +194,7 @@ | |||
193 | interrupts = <0 216 0>; | 194 | interrupts = <0 216 0>; |
194 | clocks = <&cmu CLK_TMU_APBIF>; | 195 | clocks = <&cmu CLK_TMU_APBIF>; |
195 | clock-names = "tmu_apbif"; | 196 | clock-names = "tmu_apbif"; |
197 | #include "exynos4412-tmu-sensor-conf.dtsi" | ||
196 | status = "disabled"; | 198 | status = "disabled"; |
197 | }; | 199 | }; |
198 | 200 | ||
diff --git a/arch/arm/boot/dts/exynos4-cpu-thermal.dtsi b/arch/arm/boot/dts/exynos4-cpu-thermal.dtsi new file mode 100644 index 000000000000..735cb2f10817 --- /dev/null +++ b/arch/arm/boot/dts/exynos4-cpu-thermal.dtsi | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * Device tree sources for Exynos4 thermal zone | ||
3 | * | ||
4 | * Copyright (c) 2014 Lukasz Majewski <l.majewski@samsung.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #include <dt-bindings/thermal/thermal.h> | ||
13 | |||
14 | / { | ||
15 | thermal-zones { | ||
16 | cpu_thermal: cpu-thermal { | ||
17 | thermal-sensors = <&tmu 0>; | ||
18 | polling-delay-passive = <0>; | ||
19 | polling-delay = <0>; | ||
20 | trips { | ||
21 | cpu_alert0: cpu-alert-0 { | ||
22 | temperature = <70000>; /* millicelsius */ | ||
23 | hysteresis = <10000>; /* millicelsius */ | ||
24 | type = "active"; | ||
25 | }; | ||
26 | cpu_alert1: cpu-alert-1 { | ||
27 | temperature = <95000>; /* millicelsius */ | ||
28 | hysteresis = <10000>; /* millicelsius */ | ||
29 | type = "active"; | ||
30 | }; | ||
31 | cpu_alert2: cpu-alert-2 { | ||
32 | temperature = <110000>; /* millicelsius */ | ||
33 | hysteresis = <10000>; /* millicelsius */ | ||
34 | type = "active"; | ||
35 | }; | ||
36 | cpu_crit0: cpu-crit-0 { | ||
37 | temperature = <120000>; /* millicelsius */ | ||
38 | hysteresis = <0>; /* millicelsius */ | ||
39 | type = "critical"; | ||
40 | }; | ||
41 | }; | ||
42 | cooling-maps { | ||
43 | map0 { | ||
44 | trip = <&cpu_alert0>; | ||
45 | }; | ||
46 | map1 { | ||
47 | trip = <&cpu_alert1>; | ||
48 | }; | ||
49 | }; | ||
50 | }; | ||
51 | }; | ||
52 | }; | ||
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index 76173cacd450..77ea547768f4 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi | |||
@@ -38,6 +38,7 @@ | |||
38 | i2c5 = &i2c_5; | 38 | i2c5 = &i2c_5; |
39 | i2c6 = &i2c_6; | 39 | i2c6 = &i2c_6; |
40 | i2c7 = &i2c_7; | 40 | i2c7 = &i2c_7; |
41 | i2c8 = &i2c_8; | ||
41 | csis0 = &csis_0; | 42 | csis0 = &csis_0; |
42 | csis1 = &csis_1; | 43 | csis1 = &csis_1; |
43 | fimc0 = &fimc_0; | 44 | fimc0 = &fimc_0; |
@@ -104,6 +105,7 @@ | |||
104 | compatible = "samsung,exynos4210-pd"; | 105 | compatible = "samsung,exynos4210-pd"; |
105 | reg = <0x10023C20 0x20>; | 106 | reg = <0x10023C20 0x20>; |
106 | #power-domain-cells = <0>; | 107 | #power-domain-cells = <0>; |
108 | power-domains = <&pd_lcd0>; | ||
107 | }; | 109 | }; |
108 | 110 | ||
109 | pd_cam: cam-power-domain@10023C00 { | 111 | pd_cam: cam-power-domain@10023C00 { |
@@ -554,6 +556,22 @@ | |||
554 | status = "disabled"; | 556 | status = "disabled"; |
555 | }; | 557 | }; |
556 | 558 | ||
559 | i2c_8: i2c@138E0000 { | ||
560 | #address-cells = <1>; | ||
561 | #size-cells = <0>; | ||
562 | compatible = "samsung,s3c2440-hdmiphy-i2c"; | ||
563 | reg = <0x138E0000 0x100>; | ||
564 | interrupts = <0 93 0>; | ||
565 | clocks = <&clock CLK_I2C_HDMI>; | ||
566 | clock-names = "i2c"; | ||
567 | status = "disabled"; | ||
568 | |||
569 | hdmi_i2c_phy: hdmiphy@38 { | ||
570 | compatible = "exynos4210-hdmiphy"; | ||
571 | reg = <0x38>; | ||
572 | }; | ||
573 | }; | ||
574 | |||
557 | spi_0: spi@13920000 { | 575 | spi_0: spi@13920000 { |
558 | compatible = "samsung,exynos4210-spi"; | 576 | compatible = "samsung,exynos4210-spi"; |
559 | reg = <0x13920000 0x100>; | 577 | reg = <0x13920000 0x100>; |
@@ -663,6 +681,33 @@ | |||
663 | status = "disabled"; | 681 | status = "disabled"; |
664 | }; | 682 | }; |
665 | 683 | ||
684 | tmu: tmu@100C0000 { | ||
685 | #include "exynos4412-tmu-sensor-conf.dtsi" | ||
686 | }; | ||
687 | |||
688 | hdmi: hdmi@12D00000 { | ||
689 | compatible = "samsung,exynos4210-hdmi"; | ||
690 | reg = <0x12D00000 0x70000>; | ||
691 | interrupts = <0 92 0>; | ||
692 | clock-names = "hdmi", "sclk_hdmi", "sclk_pixel", "sclk_hdmiphy", | ||
693 | "mout_hdmi"; | ||
694 | clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>, | ||
695 | <&clock CLK_SCLK_PIXEL>, <&clock CLK_SCLK_HDMIPHY>, | ||
696 | <&clock CLK_MOUT_HDMI>; | ||
697 | phy = <&hdmi_i2c_phy>; | ||
698 | power-domains = <&pd_tv>; | ||
699 | samsung,syscon-phandle = <&pmu_system_controller>; | ||
700 | status = "disabled"; | ||
701 | }; | ||
702 | |||
703 | mixer: mixer@12C10000 { | ||
704 | compatible = "samsung,exynos4210-mixer"; | ||
705 | interrupts = <0 91 0>; | ||
706 | reg = <0x12C10000 0x2100>, <0x12c00000 0x300>; | ||
707 | power-domains = <&pd_tv>; | ||
708 | status = "disabled"; | ||
709 | }; | ||
710 | |||
666 | ppmu_dmc0: ppmu_dmc0@106a0000 { | 711 | ppmu_dmc0: ppmu_dmc0@106a0000 { |
667 | compatible = "samsung,exynos-ppmu"; | 712 | compatible = "samsung,exynos-ppmu"; |
668 | reg = <0x106a0000 0x2000>; | 713 | reg = <0x106a0000 0x2000>; |
diff --git a/arch/arm/boot/dts/exynos4210-trats.dts b/arch/arm/boot/dts/exynos4210-trats.dts index 3d6652a4b6cb..32c5fd8f6269 100644 --- a/arch/arm/boot/dts/exynos4210-trats.dts +++ b/arch/arm/boot/dts/exynos4210-trats.dts | |||
@@ -426,6 +426,25 @@ | |||
426 | status = "okay"; | 426 | status = "okay"; |
427 | }; | 427 | }; |
428 | 428 | ||
429 | tmu@100C0000 { | ||
430 | status = "okay"; | ||
431 | }; | ||
432 | |||
433 | thermal-zones { | ||
434 | cpu_thermal: cpu-thermal { | ||
435 | cooling-maps { | ||
436 | map0 { | ||
437 | /* Corresponds to 800MHz at freq_table */ | ||
438 | cooling-device = <&cpu0 2 2>; | ||
439 | }; | ||
440 | map1 { | ||
441 | /* Corresponds to 200MHz at freq_table */ | ||
442 | cooling-device = <&cpu0 4 4>; | ||
443 | }; | ||
444 | }; | ||
445 | }; | ||
446 | }; | ||
447 | |||
429 | camera { | 448 | camera { |
430 | pinctrl-names = "default"; | 449 | pinctrl-names = "default"; |
431 | pinctrl-0 = <>; | 450 | pinctrl-0 = <>; |
diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch/arm/boot/dts/exynos4210-universal_c210.dts index b57e6b82ea20..d4f2b11319dd 100644 --- a/arch/arm/boot/dts/exynos4210-universal_c210.dts +++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts | |||
@@ -505,6 +505,63 @@ | |||
505 | assigned-clock-rates = <0>, <160000000>; | 505 | assigned-clock-rates = <0>, <160000000>; |
506 | }; | 506 | }; |
507 | }; | 507 | }; |
508 | |||
509 | hdmi_en: voltage-regulator-hdmi-5v { | ||
510 | compatible = "regulator-fixed"; | ||
511 | regulator-name = "HDMI_5V"; | ||
512 | regulator-min-microvolt = <5000000>; | ||
513 | regulator-max-microvolt = <5000000>; | ||
514 | gpio = <&gpe0 1 0>; | ||
515 | enable-active-high; | ||
516 | }; | ||
517 | |||
518 | hdmi_ddc: i2c-ddc { | ||
519 | compatible = "i2c-gpio"; | ||
520 | gpios = <&gpe4 2 0 &gpe4 3 0>; | ||
521 | i2c-gpio,delay-us = <100>; | ||
522 | #address-cells = <1>; | ||
523 | #size-cells = <0>; | ||
524 | |||
525 | pinctrl-0 = <&i2c_ddc_bus>; | ||
526 | pinctrl-names = "default"; | ||
527 | status = "okay"; | ||
528 | }; | ||
529 | |||
530 | mixer@12C10000 { | ||
531 | status = "okay"; | ||
532 | }; | ||
533 | |||
534 | hdmi@12D00000 { | ||
535 | hpd-gpio = <&gpx3 7 0>; | ||
536 | pinctrl-names = "default"; | ||
537 | pinctrl-0 = <&hdmi_hpd>; | ||
538 | hdmi-en-supply = <&hdmi_en>; | ||
539 | vdd-supply = <&ldo3_reg>; | ||
540 | vdd_osc-supply = <&ldo4_reg>; | ||
541 | vdd_pll-supply = <&ldo3_reg>; | ||
542 | ddc = <&hdmi_ddc>; | ||
543 | status = "okay"; | ||
544 | }; | ||
545 | |||
546 | i2c@138E0000 { | ||
547 | status = "okay"; | ||
548 | }; | ||
549 | }; | ||
550 | |||
551 | &pinctrl_1 { | ||
552 | hdmi_hpd: hdmi-hpd { | ||
553 | samsung,pins = "gpx3-7"; | ||
554 | samsung,pin-pud = <0>; | ||
555 | }; | ||
556 | }; | ||
557 | |||
558 | &pinctrl_0 { | ||
559 | i2c_ddc_bus: i2c-ddc-bus { | ||
560 | samsung,pins = "gpe4-2", "gpe4-3"; | ||
561 | samsung,pin-function = <2>; | ||
562 | samsung,pin-pud = <3>; | ||
563 | samsung,pin-drv = <0>; | ||
564 | }; | ||
508 | }; | 565 | }; |
509 | 566 | ||
510 | &mdma1 { | 567 | &mdma1 { |
diff --git a/arch/arm/boot/dts/exynos4210.dtsi b/arch/arm/boot/dts/exynos4210.dtsi index 67c832c9dcf1..be89f83f70e7 100644 --- a/arch/arm/boot/dts/exynos4210.dtsi +++ b/arch/arm/boot/dts/exynos4210.dtsi | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include "exynos4.dtsi" | 22 | #include "exynos4.dtsi" |
23 | #include "exynos4210-pinctrl.dtsi" | 23 | #include "exynos4210-pinctrl.dtsi" |
24 | #include "exynos4-cpu-thermal.dtsi" | ||
24 | 25 | ||
25 | / { | 26 | / { |
26 | compatible = "samsung,exynos4210", "samsung,exynos4"; | 27 | compatible = "samsung,exynos4210", "samsung,exynos4"; |
@@ -35,10 +36,13 @@ | |||
35 | #address-cells = <1>; | 36 | #address-cells = <1>; |
36 | #size-cells = <0>; | 37 | #size-cells = <0>; |
37 | 38 | ||
38 | cpu@900 { | 39 | cpu0: cpu@900 { |
39 | device_type = "cpu"; | 40 | device_type = "cpu"; |
40 | compatible = "arm,cortex-a9"; | 41 | compatible = "arm,cortex-a9"; |
41 | reg = <0x900>; | 42 | reg = <0x900>; |
43 | cooling-min-level = <4>; | ||
44 | cooling-max-level = <2>; | ||
45 | #cooling-cells = <2>; /* min followed by max */ | ||
42 | }; | 46 | }; |
43 | 47 | ||
44 | cpu@901 { | 48 | cpu@901 { |
@@ -153,16 +157,38 @@ | |||
153 | reg = <0x03860000 0x1000>; | 157 | reg = <0x03860000 0x1000>; |
154 | }; | 158 | }; |
155 | 159 | ||
156 | tmu@100C0000 { | 160 | tmu: tmu@100C0000 { |
157 | compatible = "samsung,exynos4210-tmu"; | 161 | compatible = "samsung,exynos4210-tmu"; |
158 | interrupt-parent = <&combiner>; | 162 | interrupt-parent = <&combiner>; |
159 | reg = <0x100C0000 0x100>; | 163 | reg = <0x100C0000 0x100>; |
160 | interrupts = <2 4>; | 164 | interrupts = <2 4>; |
161 | clocks = <&clock CLK_TMU_APBIF>; | 165 | clocks = <&clock CLK_TMU_APBIF>; |
162 | clock-names = "tmu_apbif"; | 166 | clock-names = "tmu_apbif"; |
167 | samsung,tmu_gain = <15>; | ||
168 | samsung,tmu_reference_voltage = <7>; | ||
163 | status = "disabled"; | 169 | status = "disabled"; |
164 | }; | 170 | }; |
165 | 171 | ||
172 | thermal-zones { | ||
173 | cpu_thermal: cpu-thermal { | ||
174 | polling-delay-passive = <0>; | ||
175 | polling-delay = <0>; | ||
176 | thermal-sensors = <&tmu 0>; | ||
177 | |||
178 | trips { | ||
179 | cpu_alert0: cpu-alert-0 { | ||
180 | temperature = <85000>; /* millicelsius */ | ||
181 | }; | ||
182 | cpu_alert1: cpu-alert-1 { | ||
183 | temperature = <100000>; /* millicelsius */ | ||
184 | }; | ||
185 | cpu_alert2: cpu-alert-2 { | ||
186 | temperature = <110000>; /* millicelsius */ | ||
187 | }; | ||
188 | }; | ||
189 | }; | ||
190 | }; | ||
191 | |||
166 | g2d@12800000 { | 192 | g2d@12800000 { |
167 | compatible = "samsung,s5pv210-g2d"; | 193 | compatible = "samsung,s5pv210-g2d"; |
168 | reg = <0x12800000 0x1000>; | 194 | reg = <0x12800000 0x1000>; |
@@ -203,6 +229,14 @@ | |||
203 | }; | 229 | }; |
204 | }; | 230 | }; |
205 | 231 | ||
232 | mixer: mixer@12C10000 { | ||
233 | clock-names = "mixer", "hdmi", "sclk_hdmi", "vp", "mout_mixer", | ||
234 | "sclk_mixer"; | ||
235 | clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>, | ||
236 | <&clock CLK_SCLK_HDMI>, <&clock CLK_VP>, | ||
237 | <&clock CLK_MOUT_MIXER>, <&clock CLK_SCLK_MIXER>; | ||
238 | }; | ||
239 | |||
206 | ppmu_lcd1: ppmu_lcd1@12240000 { | 240 | ppmu_lcd1: ppmu_lcd1@12240000 { |
207 | compatible = "samsung,exynos-ppmu"; | 241 | compatible = "samsung,exynos-ppmu"; |
208 | reg = <0x12240000 0x2000>; | 242 | reg = <0x12240000 0x2000>; |
diff --git a/arch/arm/boot/dts/exynos4212.dtsi b/arch/arm/boot/dts/exynos4212.dtsi index dd0a43ec56da..5be03288f1ee 100644 --- a/arch/arm/boot/dts/exynos4212.dtsi +++ b/arch/arm/boot/dts/exynos4212.dtsi | |||
@@ -26,10 +26,13 @@ | |||
26 | #address-cells = <1>; | 26 | #address-cells = <1>; |
27 | #size-cells = <0>; | 27 | #size-cells = <0>; |
28 | 28 | ||
29 | cpu@A00 { | 29 | cpu0: cpu@A00 { |
30 | device_type = "cpu"; | 30 | device_type = "cpu"; |
31 | compatible = "arm,cortex-a9"; | 31 | compatible = "arm,cortex-a9"; |
32 | reg = <0xA00>; | 32 | reg = <0xA00>; |
33 | cooling-min-level = <13>; | ||
34 | cooling-max-level = <7>; | ||
35 | #cooling-cells = <2>; /* min followed by max */ | ||
33 | }; | 36 | }; |
34 | 37 | ||
35 | cpu@A01 { | 38 | cpu@A01 { |
diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi index de80b5bba204..adb4f6a97a1d 100644 --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi | |||
@@ -249,6 +249,20 @@ | |||
249 | regulator-always-on; | 249 | regulator-always-on; |
250 | }; | 250 | }; |
251 | 251 | ||
252 | ldo8_reg: ldo@8 { | ||
253 | regulator-compatible = "LDO8"; | ||
254 | regulator-name = "VDD10_HDMI_1.0V"; | ||
255 | regulator-min-microvolt = <1000000>; | ||
256 | regulator-max-microvolt = <1000000>; | ||
257 | }; | ||
258 | |||
259 | ldo10_reg: ldo@10 { | ||
260 | regulator-compatible = "LDO10"; | ||
261 | regulator-name = "VDDQ_MIPIHSI_1.8V"; | ||
262 | regulator-min-microvolt = <1800000>; | ||
263 | regulator-max-microvolt = <1800000>; | ||
264 | }; | ||
265 | |||
252 | ldo11_reg: LDO11 { | 266 | ldo11_reg: LDO11 { |
253 | regulator-name = "VDD18_ABB1_1.8V"; | 267 | regulator-name = "VDD18_ABB1_1.8V"; |
254 | regulator-min-microvolt = <1800000>; | 268 | regulator-min-microvolt = <1800000>; |
@@ -411,6 +425,51 @@ | |||
411 | ehci: ehci@12580000 { | 425 | ehci: ehci@12580000 { |
412 | status = "okay"; | 426 | status = "okay"; |
413 | }; | 427 | }; |
428 | |||
429 | tmu@100C0000 { | ||
430 | vtmu-supply = <&ldo10_reg>; | ||
431 | status = "okay"; | ||
432 | }; | ||
433 | |||
434 | thermal-zones { | ||
435 | cpu_thermal: cpu-thermal { | ||
436 | cooling-maps { | ||
437 | map0 { | ||
438 | /* Corresponds to 800MHz at freq_table */ | ||
439 | cooling-device = <&cpu0 7 7>; | ||
440 | }; | ||
441 | map1 { | ||
442 | /* Corresponds to 200MHz at freq_table */ | ||
443 | cooling-device = <&cpu0 13 13>; | ||
444 | }; | ||
445 | }; | ||
446 | }; | ||
447 | }; | ||
448 | |||
449 | mixer: mixer@12C10000 { | ||
450 | status = "okay"; | ||
451 | }; | ||
452 | |||
453 | hdmi@12D00000 { | ||
454 | hpd-gpio = <&gpx3 7 0>; | ||
455 | pinctrl-names = "default"; | ||
456 | pinctrl-0 = <&hdmi_hpd>; | ||
457 | vdd-supply = <&ldo8_reg>; | ||
458 | vdd_osc-supply = <&ldo10_reg>; | ||
459 | vdd_pll-supply = <&ldo8_reg>; | ||
460 | ddc = <&hdmi_ddc>; | ||
461 | status = "okay"; | ||
462 | }; | ||
463 | |||
464 | hdmi_ddc: i2c@13880000 { | ||
465 | status = "okay"; | ||
466 | pinctrl-names = "default"; | ||
467 | pinctrl-0 = <&i2c2_bus>; | ||
468 | }; | ||
469 | |||
470 | i2c@138E0000 { | ||
471 | status = "okay"; | ||
472 | }; | ||
414 | }; | 473 | }; |
415 | 474 | ||
416 | &pinctrl_1 { | 475 | &pinctrl_1 { |
@@ -425,4 +484,9 @@ | |||
425 | samsung,pin-pud = <0>; | 484 | samsung,pin-pud = <0>; |
426 | samsung,pin-drv = <0>; | 485 | samsung,pin-drv = <0>; |
427 | }; | 486 | }; |
487 | |||
488 | hdmi_hpd: hdmi-hpd { | ||
489 | samsung,pins = "gpx3-7"; | ||
490 | samsung,pin-pud = <1>; | ||
491 | }; | ||
428 | }; | 492 | }; |
diff --git a/arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi b/arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi new file mode 100644 index 000000000000..e3f7934d19d0 --- /dev/null +++ b/arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * Device tree sources for Exynos4412 TMU sensor configuration | ||
3 | * | ||
4 | * Copyright (c) 2014 Lukasz Majewski <l.majewski@samsung.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #include <dt-bindings/thermal/thermal_exynos.h> | ||
13 | |||
14 | #thermal-sensor-cells = <0>; | ||
15 | samsung,tmu_gain = <8>; | ||
16 | samsung,tmu_reference_voltage = <16>; | ||
17 | samsung,tmu_noise_cancel_mode = <4>; | ||
18 | samsung,tmu_efuse_value = <55>; | ||
19 | samsung,tmu_min_efuse_value = <40>; | ||
20 | samsung,tmu_max_efuse_value = <100>; | ||
21 | samsung,tmu_first_point_trim = <25>; | ||
22 | samsung,tmu_second_point_trim = <85>; | ||
23 | samsung,tmu_default_temp_offset = <50>; | ||
24 | samsung,tmu_cal_type = <TYPE_ONE_POINT_TRIMMING>; | ||
diff --git a/arch/arm/boot/dts/exynos4412-trats2.dts b/arch/arm/boot/dts/exynos4412-trats2.dts index 21f748083586..173ffa479ad3 100644 --- a/arch/arm/boot/dts/exynos4412-trats2.dts +++ b/arch/arm/boot/dts/exynos4412-trats2.dts | |||
@@ -927,6 +927,21 @@ | |||
927 | pulldown-ohm = <100000>; /* 100K */ | 927 | pulldown-ohm = <100000>; /* 100K */ |
928 | io-channels = <&adc 2>; /* Battery temperature */ | 928 | io-channels = <&adc 2>; /* Battery temperature */ |
929 | }; | 929 | }; |
930 | |||
931 | thermal-zones { | ||
932 | cpu_thermal: cpu-thermal { | ||
933 | cooling-maps { | ||
934 | map0 { | ||
935 | /* Corresponds to 800MHz at freq_table */ | ||
936 | cooling-device = <&cpu0 7 7>; | ||
937 | }; | ||
938 | map1 { | ||
939 | /* Corresponds to 200MHz at freq_table */ | ||
940 | cooling-device = <&cpu0 13 13>; | ||
941 | }; | ||
942 | }; | ||
943 | }; | ||
944 | }; | ||
930 | }; | 945 | }; |
931 | 946 | ||
932 | &pmu_system_controller { | 947 | &pmu_system_controller { |
diff --git a/arch/arm/boot/dts/exynos4412.dtsi b/arch/arm/boot/dts/exynos4412.dtsi index 0f6ec93bb1d8..68ad43b391ae 100644 --- a/arch/arm/boot/dts/exynos4412.dtsi +++ b/arch/arm/boot/dts/exynos4412.dtsi | |||
@@ -26,10 +26,13 @@ | |||
26 | #address-cells = <1>; | 26 | #address-cells = <1>; |
27 | #size-cells = <0>; | 27 | #size-cells = <0>; |
28 | 28 | ||
29 | cpu@A00 { | 29 | cpu0: cpu@A00 { |
30 | device_type = "cpu"; | 30 | device_type = "cpu"; |
31 | compatible = "arm,cortex-a9"; | 31 | compatible = "arm,cortex-a9"; |
32 | reg = <0xA00>; | 32 | reg = <0xA00>; |
33 | cooling-min-level = <13>; | ||
34 | cooling-max-level = <7>; | ||
35 | #cooling-cells = <2>; /* min followed by max */ | ||
33 | }; | 36 | }; |
34 | 37 | ||
35 | cpu@A01 { | 38 | cpu@A01 { |
diff --git a/arch/arm/boot/dts/exynos4x12.dtsi b/arch/arm/boot/dts/exynos4x12.dtsi index f5e0ae780d6c..6a6abe14fd9b 100644 --- a/arch/arm/boot/dts/exynos4x12.dtsi +++ b/arch/arm/boot/dts/exynos4x12.dtsi | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include "exynos4.dtsi" | 20 | #include "exynos4.dtsi" |
21 | #include "exynos4x12-pinctrl.dtsi" | 21 | #include "exynos4x12-pinctrl.dtsi" |
22 | #include "exynos4-cpu-thermal.dtsi" | ||
22 | 23 | ||
23 | / { | 24 | / { |
24 | aliases { | 25 | aliases { |
@@ -297,4 +298,15 @@ | |||
297 | clock-names = "tmu_apbif"; | 298 | clock-names = "tmu_apbif"; |
298 | status = "disabled"; | 299 | status = "disabled"; |
299 | }; | 300 | }; |
301 | |||
302 | hdmi: hdmi@12D00000 { | ||
303 | compatible = "samsung,exynos4212-hdmi"; | ||
304 | }; | ||
305 | |||
306 | mixer: mixer@12C10000 { | ||
307 | compatible = "samsung,exynos4212-mixer"; | ||
308 | clock-names = "mixer", "hdmi", "sclk_hdmi", "vp"; | ||
309 | clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>, | ||
310 | <&clock CLK_SCLK_HDMI>, <&clock CLK_VP>; | ||
311 | }; | ||
300 | }; | 312 | }; |
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 9bb1b0b738f5..adbde1adad95 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <dt-bindings/clock/exynos5250.h> | 20 | #include <dt-bindings/clock/exynos5250.h> |
21 | #include "exynos5.dtsi" | 21 | #include "exynos5.dtsi" |
22 | #include "exynos5250-pinctrl.dtsi" | 22 | #include "exynos5250-pinctrl.dtsi" |
23 | 23 | #include "exynos4-cpu-thermal.dtsi" | |
24 | #include <dt-bindings/clock/exynos-audss-clk.h> | 24 | #include <dt-bindings/clock/exynos-audss-clk.h> |
25 | 25 | ||
26 | / { | 26 | / { |
@@ -58,11 +58,14 @@ | |||
58 | #address-cells = <1>; | 58 | #address-cells = <1>; |
59 | #size-cells = <0>; | 59 | #size-cells = <0>; |
60 | 60 | ||
61 | cpu@0 { | 61 | cpu0: cpu@0 { |
62 | device_type = "cpu"; | 62 | device_type = "cpu"; |
63 | compatible = "arm,cortex-a15"; | 63 | compatible = "arm,cortex-a15"; |
64 | reg = <0>; | 64 | reg = <0>; |
65 | clock-frequency = <1700000000>; | 65 | clock-frequency = <1700000000>; |
66 | cooling-min-level = <15>; | ||
67 | cooling-max-level = <9>; | ||
68 | #cooling-cells = <2>; /* min followed by max */ | ||
66 | }; | 69 | }; |
67 | cpu@1 { | 70 | cpu@1 { |
68 | device_type = "cpu"; | 71 | device_type = "cpu"; |
@@ -102,6 +105,12 @@ | |||
102 | #power-domain-cells = <0>; | 105 | #power-domain-cells = <0>; |
103 | }; | 106 | }; |
104 | 107 | ||
108 | pd_disp1: disp1-power-domain@100440A0 { | ||
109 | compatible = "samsung,exynos4210-pd"; | ||
110 | reg = <0x100440A0 0x20>; | ||
111 | #power-domain-cells = <0>; | ||
112 | }; | ||
113 | |||
105 | clock: clock-controller@10010000 { | 114 | clock: clock-controller@10010000 { |
106 | compatible = "samsung,exynos5250-clock"; | 115 | compatible = "samsung,exynos5250-clock"; |
107 | reg = <0x10010000 0x30000>; | 116 | reg = <0x10010000 0x30000>; |
@@ -235,12 +244,32 @@ | |||
235 | status = "disabled"; | 244 | status = "disabled"; |
236 | }; | 245 | }; |
237 | 246 | ||
238 | tmu@10060000 { | 247 | tmu: tmu@10060000 { |
239 | compatible = "samsung,exynos5250-tmu"; | 248 | compatible = "samsung,exynos5250-tmu"; |
240 | reg = <0x10060000 0x100>; | 249 | reg = <0x10060000 0x100>; |
241 | interrupts = <0 65 0>; | 250 | interrupts = <0 65 0>; |
242 | clocks = <&clock CLK_TMU>; | 251 | clocks = <&clock CLK_TMU>; |
243 | clock-names = "tmu_apbif"; | 252 | clock-names = "tmu_apbif"; |
253 | #include "exynos4412-tmu-sensor-conf.dtsi" | ||
254 | }; | ||
255 | |||
256 | thermal-zones { | ||
257 | cpu_thermal: cpu-thermal { | ||
258 | polling-delay-passive = <0>; | ||
259 | polling-delay = <0>; | ||
260 | thermal-sensors = <&tmu 0>; | ||
261 | |||
262 | cooling-maps { | ||
263 | map0 { | ||
264 | /* Corresponds to 800MHz at freq_table */ | ||
265 | cooling-device = <&cpu0 9 9>; | ||
266 | }; | ||
267 | map1 { | ||
268 | /* Corresponds to 200MHz at freq_table */ | ||
269 | cooling-device = <&cpu0 15 15>; | ||
270 | }; | ||
271 | }; | ||
272 | }; | ||
244 | }; | 273 | }; |
245 | 274 | ||
246 | serial@12C00000 { | 275 | serial@12C00000 { |
@@ -719,6 +748,7 @@ | |||
719 | hdmi: hdmi { | 748 | hdmi: hdmi { |
720 | compatible = "samsung,exynos4212-hdmi"; | 749 | compatible = "samsung,exynos4212-hdmi"; |
721 | reg = <0x14530000 0x70000>; | 750 | reg = <0x14530000 0x70000>; |
751 | power-domains = <&pd_disp1>; | ||
722 | interrupts = <0 95 0>; | 752 | interrupts = <0 95 0>; |
723 | clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>, | 753 | clocks = <&clock CLK_HDMI>, <&clock CLK_SCLK_HDMI>, |
724 | <&clock CLK_SCLK_PIXEL>, <&clock CLK_SCLK_HDMIPHY>, | 754 | <&clock CLK_SCLK_PIXEL>, <&clock CLK_SCLK_HDMIPHY>, |
@@ -731,9 +761,11 @@ | |||
731 | mixer { | 761 | mixer { |
732 | compatible = "samsung,exynos5250-mixer"; | 762 | compatible = "samsung,exynos5250-mixer"; |
733 | reg = <0x14450000 0x10000>; | 763 | reg = <0x14450000 0x10000>; |
764 | power-domains = <&pd_disp1>; | ||
734 | interrupts = <0 94 0>; | 765 | interrupts = <0 94 0>; |
735 | clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>; | 766 | clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>, |
736 | clock-names = "mixer", "sclk_hdmi"; | 767 | <&clock CLK_SCLK_HDMI>; |
768 | clock-names = "mixer", "hdmi", "sclk_hdmi"; | ||
737 | }; | 769 | }; |
738 | 770 | ||
739 | dp_phy: video-phy@10040720 { | 771 | dp_phy: video-phy@10040720 { |
@@ -743,6 +775,7 @@ | |||
743 | }; | 775 | }; |
744 | 776 | ||
745 | dp: dp-controller@145B0000 { | 777 | dp: dp-controller@145B0000 { |
778 | power-domains = <&pd_disp1>; | ||
746 | clocks = <&clock CLK_DP>; | 779 | clocks = <&clock CLK_DP>; |
747 | clock-names = "dp"; | 780 | clock-names = "dp"; |
748 | phys = <&dp_phy>; | 781 | phys = <&dp_phy>; |
@@ -750,6 +783,7 @@ | |||
750 | }; | 783 | }; |
751 | 784 | ||
752 | fimd: fimd@14400000 { | 785 | fimd: fimd@14400000 { |
786 | power-domains = <&pd_disp1>; | ||
753 | clocks = <&clock CLK_SCLK_FIMD1>, <&clock CLK_FIMD1>; | 787 | clocks = <&clock CLK_SCLK_FIMD1>, <&clock CLK_FIMD1>; |
754 | clock-names = "sclk_fimd", "fimd"; | 788 | clock-names = "sclk_fimd", "fimd"; |
755 | }; | 789 | }; |
diff --git a/arch/arm/boot/dts/exynos5420-trip-points.dtsi b/arch/arm/boot/dts/exynos5420-trip-points.dtsi new file mode 100644 index 000000000000..5d31fc140823 --- /dev/null +++ b/arch/arm/boot/dts/exynos5420-trip-points.dtsi | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Device tree sources for default Exynos5420 thermal zone definition | ||
3 | * | ||
4 | * Copyright (c) 2014 Lukasz Majewski <l.majewski@samsung.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | polling-delay-passive = <0>; | ||
13 | polling-delay = <0>; | ||
14 | trips { | ||
15 | cpu-alert-0 { | ||
16 | temperature = <85000>; /* millicelsius */ | ||
17 | hysteresis = <10000>; /* millicelsius */ | ||
18 | type = "active"; | ||
19 | }; | ||
20 | cpu-alert-1 { | ||
21 | temperature = <103000>; /* millicelsius */ | ||
22 | hysteresis = <10000>; /* millicelsius */ | ||
23 | type = "active"; | ||
24 | }; | ||
25 | cpu-alert-2 { | ||
26 | temperature = <110000>; /* millicelsius */ | ||
27 | hysteresis = <10000>; /* millicelsius */ | ||
28 | type = "active"; | ||
29 | }; | ||
30 | cpu-crit-0 { | ||
31 | temperature = <1200000>; /* millicelsius */ | ||
32 | hysteresis = <0>; /* millicelsius */ | ||
33 | type = "critical"; | ||
34 | }; | ||
35 | }; | ||
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index 9dc2e9773b30..c0e98cf3514f 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi | |||
@@ -740,8 +740,9 @@ | |||
740 | compatible = "samsung,exynos5420-mixer"; | 740 | compatible = "samsung,exynos5420-mixer"; |
741 | reg = <0x14450000 0x10000>; | 741 | reg = <0x14450000 0x10000>; |
742 | interrupts = <0 94 0>; | 742 | interrupts = <0 94 0>; |
743 | clocks = <&clock CLK_MIXER>, <&clock CLK_SCLK_HDMI>; | 743 | clocks = <&clock CLK_MIXER>, <&clock CLK_HDMI>, |
744 | clock-names = "mixer", "sclk_hdmi"; | 744 | <&clock CLK_SCLK_HDMI>; |
745 | clock-names = "mixer", "hdmi", "sclk_hdmi"; | ||
745 | power-domains = <&disp_pd>; | 746 | power-domains = <&disp_pd>; |
746 | }; | 747 | }; |
747 | 748 | ||
@@ -782,6 +783,7 @@ | |||
782 | interrupts = <0 65 0>; | 783 | interrupts = <0 65 0>; |
783 | clocks = <&clock CLK_TMU>; | 784 | clocks = <&clock CLK_TMU>; |
784 | clock-names = "tmu_apbif"; | 785 | clock-names = "tmu_apbif"; |
786 | #include "exynos4412-tmu-sensor-conf.dtsi" | ||
785 | }; | 787 | }; |
786 | 788 | ||
787 | tmu_cpu1: tmu@10064000 { | 789 | tmu_cpu1: tmu@10064000 { |
@@ -790,6 +792,7 @@ | |||
790 | interrupts = <0 183 0>; | 792 | interrupts = <0 183 0>; |
791 | clocks = <&clock CLK_TMU>; | 793 | clocks = <&clock CLK_TMU>; |
792 | clock-names = "tmu_apbif"; | 794 | clock-names = "tmu_apbif"; |
795 | #include "exynos4412-tmu-sensor-conf.dtsi" | ||
793 | }; | 796 | }; |
794 | 797 | ||
795 | tmu_cpu2: tmu@10068000 { | 798 | tmu_cpu2: tmu@10068000 { |
@@ -798,6 +801,7 @@ | |||
798 | interrupts = <0 184 0>; | 801 | interrupts = <0 184 0>; |
799 | clocks = <&clock CLK_TMU>, <&clock CLK_TMU>; | 802 | clocks = <&clock CLK_TMU>, <&clock CLK_TMU>; |
800 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; | 803 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; |
804 | #include "exynos4412-tmu-sensor-conf.dtsi" | ||
801 | }; | 805 | }; |
802 | 806 | ||
803 | tmu_cpu3: tmu@1006c000 { | 807 | tmu_cpu3: tmu@1006c000 { |
@@ -806,6 +810,7 @@ | |||
806 | interrupts = <0 185 0>; | 810 | interrupts = <0 185 0>; |
807 | clocks = <&clock CLK_TMU>, <&clock CLK_TMU_GPU>; | 811 | clocks = <&clock CLK_TMU>, <&clock CLK_TMU_GPU>; |
808 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; | 812 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; |
813 | #include "exynos4412-tmu-sensor-conf.dtsi" | ||
809 | }; | 814 | }; |
810 | 815 | ||
811 | tmu_gpu: tmu@100a0000 { | 816 | tmu_gpu: tmu@100a0000 { |
@@ -814,6 +819,30 @@ | |||
814 | interrupts = <0 215 0>; | 819 | interrupts = <0 215 0>; |
815 | clocks = <&clock CLK_TMU_GPU>, <&clock CLK_TMU>; | 820 | clocks = <&clock CLK_TMU_GPU>, <&clock CLK_TMU>; |
816 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; | 821 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; |
822 | #include "exynos4412-tmu-sensor-conf.dtsi" | ||
823 | }; | ||
824 | |||
825 | thermal-zones { | ||
826 | cpu0_thermal: cpu0-thermal { | ||
827 | thermal-sensors = <&tmu_cpu0>; | ||
828 | #include "exynos5420-trip-points.dtsi" | ||
829 | }; | ||
830 | cpu1_thermal: cpu1-thermal { | ||
831 | thermal-sensors = <&tmu_cpu1>; | ||
832 | #include "exynos5420-trip-points.dtsi" | ||
833 | }; | ||
834 | cpu2_thermal: cpu2-thermal { | ||
835 | thermal-sensors = <&tmu_cpu2>; | ||
836 | #include "exynos5420-trip-points.dtsi" | ||
837 | }; | ||
838 | cpu3_thermal: cpu3-thermal { | ||
839 | thermal-sensors = <&tmu_cpu3>; | ||
840 | #include "exynos5420-trip-points.dtsi" | ||
841 | }; | ||
842 | gpu_thermal: gpu-thermal { | ||
843 | thermal-sensors = <&tmu_gpu>; | ||
844 | #include "exynos5420-trip-points.dtsi" | ||
845 | }; | ||
817 | }; | 846 | }; |
818 | 847 | ||
819 | watchdog: watchdog@101D0000 { | 848 | watchdog: watchdog@101D0000 { |
diff --git a/arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi b/arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi new file mode 100644 index 000000000000..7b2fba0ae92b --- /dev/null +++ b/arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * Device tree sources for Exynos5440 TMU sensor configuration | ||
3 | * | ||
4 | * Copyright (c) 2014 Lukasz Majewski <l.majewski@samsung.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #include <dt-bindings/thermal/thermal_exynos.h> | ||
13 | |||
14 | #thermal-sensor-cells = <0>; | ||
15 | samsung,tmu_gain = <5>; | ||
16 | samsung,tmu_reference_voltage = <16>; | ||
17 | samsung,tmu_noise_cancel_mode = <4>; | ||
18 | samsung,tmu_efuse_value = <0x5d2d>; | ||
19 | samsung,tmu_min_efuse_value = <16>; | ||
20 | samsung,tmu_max_efuse_value = <76>; | ||
21 | samsung,tmu_first_point_trim = <25>; | ||
22 | samsung,tmu_second_point_trim = <70>; | ||
23 | samsung,tmu_default_temp_offset = <25>; | ||
24 | samsung,tmu_cal_type = <TYPE_ONE_POINT_TRIMMING>; | ||
diff --git a/arch/arm/boot/dts/exynos5440-trip-points.dtsi b/arch/arm/boot/dts/exynos5440-trip-points.dtsi new file mode 100644 index 000000000000..48adfa8f4300 --- /dev/null +++ b/arch/arm/boot/dts/exynos5440-trip-points.dtsi | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Device tree sources for default Exynos5440 thermal zone definition | ||
3 | * | ||
4 | * Copyright (c) 2014 Lukasz Majewski <l.majewski@samsung.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | polling-delay-passive = <0>; | ||
13 | polling-delay = <0>; | ||
14 | trips { | ||
15 | cpu-alert-0 { | ||
16 | temperature = <100000>; /* millicelsius */ | ||
17 | hysteresis = <0>; /* millicelsius */ | ||
18 | type = "active"; | ||
19 | }; | ||
20 | cpu-crit-0 { | ||
21 | temperature = <1050000>; /* millicelsius */ | ||
22 | hysteresis = <0>; /* millicelsius */ | ||
23 | type = "critical"; | ||
24 | }; | ||
25 | }; | ||
diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi index 8f3373cd7b87..59d9416b3b03 100644 --- a/arch/arm/boot/dts/exynos5440.dtsi +++ b/arch/arm/boot/dts/exynos5440.dtsi | |||
@@ -219,6 +219,7 @@ | |||
219 | interrupts = <0 58 0>; | 219 | interrupts = <0 58 0>; |
220 | clocks = <&clock CLK_B_125>; | 220 | clocks = <&clock CLK_B_125>; |
221 | clock-names = "tmu_apbif"; | 221 | clock-names = "tmu_apbif"; |
222 | #include "exynos5440-tmu-sensor-conf.dtsi" | ||
222 | }; | 223 | }; |
223 | 224 | ||
224 | tmuctrl_1: tmuctrl@16011C { | 225 | tmuctrl_1: tmuctrl@16011C { |
@@ -227,6 +228,7 @@ | |||
227 | interrupts = <0 58 0>; | 228 | interrupts = <0 58 0>; |
228 | clocks = <&clock CLK_B_125>; | 229 | clocks = <&clock CLK_B_125>; |
229 | clock-names = "tmu_apbif"; | 230 | clock-names = "tmu_apbif"; |
231 | #include "exynos5440-tmu-sensor-conf.dtsi" | ||
230 | }; | 232 | }; |
231 | 233 | ||
232 | tmuctrl_2: tmuctrl@160120 { | 234 | tmuctrl_2: tmuctrl@160120 { |
@@ -235,6 +237,22 @@ | |||
235 | interrupts = <0 58 0>; | 237 | interrupts = <0 58 0>; |
236 | clocks = <&clock CLK_B_125>; | 238 | clocks = <&clock CLK_B_125>; |
237 | clock-names = "tmu_apbif"; | 239 | clock-names = "tmu_apbif"; |
240 | #include "exynos5440-tmu-sensor-conf.dtsi" | ||
241 | }; | ||
242 | |||
243 | thermal-zones { | ||
244 | cpu0_thermal: cpu0-thermal { | ||
245 | thermal-sensors = <&tmuctrl_0>; | ||
246 | #include "exynos5440-trip-points.dtsi" | ||
247 | }; | ||
248 | cpu1_thermal: cpu1-thermal { | ||
249 | thermal-sensors = <&tmuctrl_1>; | ||
250 | #include "exynos5440-trip-points.dtsi" | ||
251 | }; | ||
252 | cpu2_thermal: cpu2-thermal { | ||
253 | thermal-sensors = <&tmuctrl_2>; | ||
254 | #include "exynos5440-trip-points.dtsi" | ||
255 | }; | ||
238 | }; | 256 | }; |
239 | 257 | ||
240 | sata@210000 { | 258 | sata@210000 { |
diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi index f1cd2147421d..a626e6dd8022 100644 --- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi | |||
@@ -35,6 +35,7 @@ | |||
35 | regulator-max-microvolt = <5000000>; | 35 | regulator-max-microvolt = <5000000>; |
36 | gpio = <&gpio3 22 0>; | 36 | gpio = <&gpio3 22 0>; |
37 | enable-active-high; | 37 | enable-active-high; |
38 | vin-supply = <&swbst_reg>; | ||
38 | }; | 39 | }; |
39 | 40 | ||
40 | reg_usb_h1_vbus: regulator@1 { | 41 | reg_usb_h1_vbus: regulator@1 { |
@@ -45,6 +46,7 @@ | |||
45 | regulator-max-microvolt = <5000000>; | 46 | regulator-max-microvolt = <5000000>; |
46 | gpio = <&gpio1 29 0>; | 47 | gpio = <&gpio1 29 0>; |
47 | enable-active-high; | 48 | enable-active-high; |
49 | vin-supply = <&swbst_reg>; | ||
48 | }; | 50 | }; |
49 | 51 | ||
50 | reg_audio: regulator@2 { | 52 | reg_audio: regulator@2 { |
diff --git a/arch/arm/boot/dts/imx6sl-evk.dts b/arch/arm/boot/dts/imx6sl-evk.dts index fda4932faefd..945887d3fdb3 100644 --- a/arch/arm/boot/dts/imx6sl-evk.dts +++ b/arch/arm/boot/dts/imx6sl-evk.dts | |||
@@ -52,6 +52,7 @@ | |||
52 | regulator-max-microvolt = <5000000>; | 52 | regulator-max-microvolt = <5000000>; |
53 | gpio = <&gpio4 0 0>; | 53 | gpio = <&gpio4 0 0>; |
54 | enable-active-high; | 54 | enable-active-high; |
55 | vin-supply = <&swbst_reg>; | ||
55 | }; | 56 | }; |
56 | 57 | ||
57 | reg_usb_otg2_vbus: regulator@1 { | 58 | reg_usb_otg2_vbus: regulator@1 { |
@@ -62,6 +63,7 @@ | |||
62 | regulator-max-microvolt = <5000000>; | 63 | regulator-max-microvolt = <5000000>; |
63 | gpio = <&gpio4 2 0>; | 64 | gpio = <&gpio4 2 0>; |
64 | enable-active-high; | 65 | enable-active-high; |
66 | vin-supply = <&swbst_reg>; | ||
65 | }; | 67 | }; |
66 | 68 | ||
67 | reg_aud3v: regulator@2 { | 69 | reg_aud3v: regulator@2 { |
diff --git a/arch/arm/boot/dts/omap2.dtsi b/arch/arm/boot/dts/omap2.dtsi index 59d1c297bb30..578fa2a54dce 100644 --- a/arch/arm/boot/dts/omap2.dtsi +++ b/arch/arm/boot/dts/omap2.dtsi | |||
@@ -87,8 +87,8 @@ | |||
87 | <14>, | 87 | <14>, |
88 | <15>; | 88 | <15>; |
89 | #dma-cells = <1>; | 89 | #dma-cells = <1>; |
90 | #dma-channels = <32>; | 90 | dma-channels = <32>; |
91 | #dma-requests = <64>; | 91 | dma-requests = <64>; |
92 | }; | 92 | }; |
93 | 93 | ||
94 | i2c1: i2c@48070000 { | 94 | i2c1: i2c@48070000 { |
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index 60403273f83e..db80f9d376fa 100644 --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts | |||
@@ -16,6 +16,13 @@ | |||
16 | model = "Nokia N900"; | 16 | model = "Nokia N900"; |
17 | compatible = "nokia,omap3-n900", "ti,omap3430", "ti,omap3"; | 17 | compatible = "nokia,omap3-n900", "ti,omap3430", "ti,omap3"; |
18 | 18 | ||
19 | aliases { | ||
20 | i2c0; | ||
21 | i2c1 = &i2c1; | ||
22 | i2c2 = &i2c2; | ||
23 | i2c3 = &i2c3; | ||
24 | }; | ||
25 | |||
19 | cpus { | 26 | cpus { |
20 | cpu@0 { | 27 | cpu@0 { |
21 | cpu0-supply = <&vcc>; | 28 | cpu0-supply = <&vcc>; |
@@ -704,7 +711,7 @@ | |||
704 | compatible = "smsc,lan91c94"; | 711 | compatible = "smsc,lan91c94"; |
705 | interrupt-parent = <&gpio2>; | 712 | interrupt-parent = <&gpio2>; |
706 | interrupts = <22 IRQ_TYPE_LEVEL_HIGH>; /* gpio54 */ | 713 | interrupts = <22 IRQ_TYPE_LEVEL_HIGH>; /* gpio54 */ |
707 | reg = <1 0x300 0xf>; /* 16 byte IO range at offset 0x300 */ | 714 | reg = <1 0 0xf>; /* 16 byte IO range */ |
708 | bank-width = <2>; | 715 | bank-width = <2>; |
709 | pinctrl-names = "default"; | 716 | pinctrl-names = "default"; |
710 | pinctrl-0 = <ðernet_pins>; | 717 | pinctrl-0 = <ðernet_pins>; |
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 01b71111bd55..f4f78c40b564 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi | |||
@@ -155,8 +155,8 @@ | |||
155 | <14>, | 155 | <14>, |
156 | <15>; | 156 | <15>; |
157 | #dma-cells = <1>; | 157 | #dma-cells = <1>; |
158 | #dma-channels = <32>; | 158 | dma-channels = <32>; |
159 | #dma-requests = <96>; | 159 | dma-requests = <96>; |
160 | }; | 160 | }; |
161 | 161 | ||
162 | omap3_pmx_core: pinmux@48002030 { | 162 | omap3_pmx_core: pinmux@48002030 { |
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi index 074147cebae4..87401d9f4d8b 100644 --- a/arch/arm/boot/dts/omap4.dtsi +++ b/arch/arm/boot/dts/omap4.dtsi | |||
@@ -223,8 +223,8 @@ | |||
223 | <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>, | 223 | <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>, |
224 | <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; | 224 | <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; |
225 | #dma-cells = <1>; | 225 | #dma-cells = <1>; |
226 | #dma-channels = <32>; | 226 | dma-channels = <32>; |
227 | #dma-requests = <127>; | 227 | dma-requests = <127>; |
228 | }; | 228 | }; |
229 | 229 | ||
230 | gpio1: gpio@4a310000 { | 230 | gpio1: gpio@4a310000 { |
diff --git a/arch/arm/boot/dts/omap5-core-thermal.dtsi b/arch/arm/boot/dts/omap5-core-thermal.dtsi index 19212ac6eef0..de8a3d456cf7 100644 --- a/arch/arm/boot/dts/omap5-core-thermal.dtsi +++ b/arch/arm/boot/dts/omap5-core-thermal.dtsi | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | core_thermal: core_thermal { | 14 | core_thermal: core_thermal { |
15 | polling-delay-passive = <250>; /* milliseconds */ | 15 | polling-delay-passive = <250>; /* milliseconds */ |
16 | polling-delay = <1000>; /* milliseconds */ | 16 | polling-delay = <500>; /* milliseconds */ |
17 | 17 | ||
18 | /* sensor ID */ | 18 | /* sensor ID */ |
19 | thermal-sensors = <&bandgap 2>; | 19 | thermal-sensors = <&bandgap 2>; |
diff --git a/arch/arm/boot/dts/omap5-gpu-thermal.dtsi b/arch/arm/boot/dts/omap5-gpu-thermal.dtsi index 1b87aca88b77..bc3090f2e84b 100644 --- a/arch/arm/boot/dts/omap5-gpu-thermal.dtsi +++ b/arch/arm/boot/dts/omap5-gpu-thermal.dtsi | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | gpu_thermal: gpu_thermal { | 14 | gpu_thermal: gpu_thermal { |
15 | polling-delay-passive = <250>; /* milliseconds */ | 15 | polling-delay-passive = <250>; /* milliseconds */ |
16 | polling-delay = <1000>; /* milliseconds */ | 16 | polling-delay = <500>; /* milliseconds */ |
17 | 17 | ||
18 | /* sensor ID */ | 18 | /* sensor ID */ |
19 | thermal-sensors = <&bandgap 1>; | 19 | thermal-sensors = <&bandgap 1>; |
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi index b321fdf42c9f..4a485b63a141 100644 --- a/arch/arm/boot/dts/omap5.dtsi +++ b/arch/arm/boot/dts/omap5.dtsi | |||
@@ -238,8 +238,8 @@ | |||
238 | <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>, | 238 | <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>, |
239 | <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; | 239 | <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; |
240 | #dma-cells = <1>; | 240 | #dma-cells = <1>; |
241 | #dma-channels = <32>; | 241 | dma-channels = <32>; |
242 | #dma-requests = <127>; | 242 | dma-requests = <127>; |
243 | }; | 243 | }; |
244 | 244 | ||
245 | gpio1: gpio@4ae10000 { | 245 | gpio1: gpio@4ae10000 { |
@@ -929,8 +929,8 @@ | |||
929 | <0x4A096800 0x40>; /* pll_ctrl */ | 929 | <0x4A096800 0x40>; /* pll_ctrl */ |
930 | reg-names = "phy_rx", "phy_tx", "pll_ctrl"; | 930 | reg-names = "phy_rx", "phy_tx", "pll_ctrl"; |
931 | ctrl-module = <&omap_control_sata>; | 931 | ctrl-module = <&omap_control_sata>; |
932 | clocks = <&sys_clkin>; | 932 | clocks = <&sys_clkin>, <&sata_ref_clk>; |
933 | clock-names = "sysclk"; | 933 | clock-names = "sysclk", "refclk"; |
934 | #phy-cells = <0>; | 934 | #phy-cells = <0>; |
935 | }; | 935 | }; |
936 | }; | 936 | }; |
@@ -1079,4 +1079,8 @@ | |||
1079 | }; | 1079 | }; |
1080 | }; | 1080 | }; |
1081 | 1081 | ||
1082 | &cpu_thermal { | ||
1083 | polling-delay = <500>; /* milliseconds */ | ||
1084 | }; | ||
1085 | |||
1082 | /include/ "omap54xx-clocks.dtsi" | 1086 | /include/ "omap54xx-clocks.dtsi" |
diff --git a/arch/arm/boot/dts/omap54xx-clocks.dtsi b/arch/arm/boot/dts/omap54xx-clocks.dtsi index 58c27466f012..83b425fb3ac2 100644 --- a/arch/arm/boot/dts/omap54xx-clocks.dtsi +++ b/arch/arm/boot/dts/omap54xx-clocks.dtsi | |||
@@ -167,10 +167,18 @@ | |||
167 | ti,index-starts-at-one; | 167 | ti,index-starts-at-one; |
168 | }; | 168 | }; |
169 | 169 | ||
170 | dpll_core_byp_mux: dpll_core_byp_mux { | ||
171 | #clock-cells = <0>; | ||
172 | compatible = "ti,mux-clock"; | ||
173 | clocks = <&sys_clkin>, <&dpll_abe_m3x2_ck>; | ||
174 | ti,bit-shift = <23>; | ||
175 | reg = <0x012c>; | ||
176 | }; | ||
177 | |||
170 | dpll_core_ck: dpll_core_ck { | 178 | dpll_core_ck: dpll_core_ck { |
171 | #clock-cells = <0>; | 179 | #clock-cells = <0>; |
172 | compatible = "ti,omap4-dpll-core-clock"; | 180 | compatible = "ti,omap4-dpll-core-clock"; |
173 | clocks = <&sys_clkin>, <&dpll_abe_m3x2_ck>; | 181 | clocks = <&sys_clkin>, <&dpll_core_byp_mux>; |
174 | reg = <0x0120>, <0x0124>, <0x012c>, <0x0128>; | 182 | reg = <0x0120>, <0x0124>, <0x012c>, <0x0128>; |
175 | }; | 183 | }; |
176 | 184 | ||
@@ -294,10 +302,18 @@ | |||
294 | clock-div = <1>; | 302 | clock-div = <1>; |
295 | }; | 303 | }; |
296 | 304 | ||
305 | dpll_iva_byp_mux: dpll_iva_byp_mux { | ||
306 | #clock-cells = <0>; | ||
307 | compatible = "ti,mux-clock"; | ||
308 | clocks = <&sys_clkin>, <&iva_dpll_hs_clk_div>; | ||
309 | ti,bit-shift = <23>; | ||
310 | reg = <0x01ac>; | ||
311 | }; | ||
312 | |||
297 | dpll_iva_ck: dpll_iva_ck { | 313 | dpll_iva_ck: dpll_iva_ck { |
298 | #clock-cells = <0>; | 314 | #clock-cells = <0>; |
299 | compatible = "ti,omap4-dpll-clock"; | 315 | compatible = "ti,omap4-dpll-clock"; |
300 | clocks = <&sys_clkin>, <&iva_dpll_hs_clk_div>; | 316 | clocks = <&sys_clkin>, <&dpll_iva_byp_mux>; |
301 | reg = <0x01a0>, <0x01a4>, <0x01ac>, <0x01a8>; | 317 | reg = <0x01a0>, <0x01a4>, <0x01ac>, <0x01a8>; |
302 | }; | 318 | }; |
303 | 319 | ||
@@ -599,10 +615,19 @@ | |||
599 | }; | 615 | }; |
600 | }; | 616 | }; |
601 | &cm_core_clocks { | 617 | &cm_core_clocks { |
618 | |||
619 | dpll_per_byp_mux: dpll_per_byp_mux { | ||
620 | #clock-cells = <0>; | ||
621 | compatible = "ti,mux-clock"; | ||
622 | clocks = <&sys_clkin>, <&per_dpll_hs_clk_div>; | ||
623 | ti,bit-shift = <23>; | ||
624 | reg = <0x014c>; | ||
625 | }; | ||
626 | |||
602 | dpll_per_ck: dpll_per_ck { | 627 | dpll_per_ck: dpll_per_ck { |
603 | #clock-cells = <0>; | 628 | #clock-cells = <0>; |
604 | compatible = "ti,omap4-dpll-clock"; | 629 | compatible = "ti,omap4-dpll-clock"; |
605 | clocks = <&sys_clkin>, <&per_dpll_hs_clk_div>; | 630 | clocks = <&sys_clkin>, <&dpll_per_byp_mux>; |
606 | reg = <0x0140>, <0x0144>, <0x014c>, <0x0148>; | 631 | reg = <0x0140>, <0x0144>, <0x014c>, <0x0148>; |
607 | }; | 632 | }; |
608 | 633 | ||
@@ -714,10 +739,18 @@ | |||
714 | ti,index-starts-at-one; | 739 | ti,index-starts-at-one; |
715 | }; | 740 | }; |
716 | 741 | ||
742 | dpll_usb_byp_mux: dpll_usb_byp_mux { | ||
743 | #clock-cells = <0>; | ||
744 | compatible = "ti,mux-clock"; | ||
745 | clocks = <&sys_clkin>, <&usb_dpll_hs_clk_div>; | ||
746 | ti,bit-shift = <23>; | ||
747 | reg = <0x018c>; | ||
748 | }; | ||
749 | |||
717 | dpll_usb_ck: dpll_usb_ck { | 750 | dpll_usb_ck: dpll_usb_ck { |
718 | #clock-cells = <0>; | 751 | #clock-cells = <0>; |
719 | compatible = "ti,omap4-dpll-j-type-clock"; | 752 | compatible = "ti,omap4-dpll-j-type-clock"; |
720 | clocks = <&sys_clkin>, <&usb_dpll_hs_clk_div>; | 753 | clocks = <&sys_clkin>, <&dpll_usb_byp_mux>; |
721 | reg = <0x0180>, <0x0184>, <0x018c>, <0x0188>; | 754 | reg = <0x0180>, <0x0184>, <0x018c>, <0x0188>; |
722 | }; | 755 | }; |
723 | 756 | ||
diff --git a/arch/arm/boot/dts/sama5d3.dtsi b/arch/arm/boot/dts/sama5d3.dtsi index 261311bdf65b..367af53c1b84 100644 --- a/arch/arm/boot/dts/sama5d3.dtsi +++ b/arch/arm/boot/dts/sama5d3.dtsi | |||
@@ -1248,7 +1248,6 @@ | |||
1248 | atmel,watchdog-type = "hardware"; | 1248 | atmel,watchdog-type = "hardware"; |
1249 | atmel,reset-type = "all"; | 1249 | atmel,reset-type = "all"; |
1250 | atmel,dbg-halt; | 1250 | atmel,dbg-halt; |
1251 | atmel,idle-halt; | ||
1252 | status = "disabled"; | 1251 | status = "disabled"; |
1253 | }; | 1252 | }; |
1254 | 1253 | ||
@@ -1416,7 +1415,7 @@ | |||
1416 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; | 1415 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; |
1417 | reg = <0x00700000 0x100000>; | 1416 | reg = <0x00700000 0x100000>; |
1418 | interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>; | 1417 | interrupts = <32 IRQ_TYPE_LEVEL_HIGH 2>; |
1419 | clocks = <&usb>, <&uhphs_clk>, <&uhpck>; | 1418 | clocks = <&utmi>, <&uhphs_clk>, <&uhpck>; |
1420 | clock-names = "usb_clk", "ehci_clk", "uhpck"; | 1419 | clock-names = "usb_clk", "ehci_clk", "uhpck"; |
1421 | status = "disabled"; | 1420 | status = "disabled"; |
1422 | }; | 1421 | }; |
diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi index d986b41b9654..4303874889c6 100644 --- a/arch/arm/boot/dts/sama5d4.dtsi +++ b/arch/arm/boot/dts/sama5d4.dtsi | |||
@@ -66,6 +66,7 @@ | |||
66 | gpio4 = &pioE; | 66 | gpio4 = &pioE; |
67 | tcb0 = &tcb0; | 67 | tcb0 = &tcb0; |
68 | tcb1 = &tcb1; | 68 | tcb1 = &tcb1; |
69 | i2c0 = &i2c0; | ||
69 | i2c2 = &i2c2; | 70 | i2c2 = &i2c2; |
70 | }; | 71 | }; |
71 | cpus { | 72 | cpus { |
@@ -259,7 +260,7 @@ | |||
259 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; | 260 | compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; |
260 | reg = <0x00600000 0x100000>; | 261 | reg = <0x00600000 0x100000>; |
261 | interrupts = <46 IRQ_TYPE_LEVEL_HIGH 2>; | 262 | interrupts = <46 IRQ_TYPE_LEVEL_HIGH 2>; |
262 | clocks = <&usb>, <&uhphs_clk>, <&uhpck>; | 263 | clocks = <&utmi>, <&uhphs_clk>, <&uhpck>; |
263 | clock-names = "usb_clk", "ehci_clk", "uhpck"; | 264 | clock-names = "usb_clk", "ehci_clk", "uhpck"; |
264 | status = "disabled"; | 265 | status = "disabled"; |
265 | }; | 266 | }; |
@@ -461,8 +462,8 @@ | |||
461 | 462 | ||
462 | lcdck: lcdck { | 463 | lcdck: lcdck { |
463 | #clock-cells = <0>; | 464 | #clock-cells = <0>; |
464 | reg = <4>; | 465 | reg = <3>; |
465 | clocks = <&smd>; | 466 | clocks = <&mck>; |
466 | }; | 467 | }; |
467 | 468 | ||
468 | smdck: smdck { | 469 | smdck: smdck { |
@@ -770,7 +771,7 @@ | |||
770 | reg = <50>; | 771 | reg = <50>; |
771 | }; | 772 | }; |
772 | 773 | ||
773 | lcd_clk: lcd_clk { | 774 | lcdc_clk: lcdc_clk { |
774 | #clock-cells = <0>; | 775 | #clock-cells = <0>; |
775 | reg = <51>; | 776 | reg = <51>; |
776 | }; | 777 | }; |
diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi index 252c3d1bda50..9d8760956752 100644 --- a/arch/arm/boot/dts/socfpga.dtsi +++ b/arch/arm/boot/dts/socfpga.dtsi | |||
@@ -713,6 +713,9 @@ | |||
713 | reg-shift = <2>; | 713 | reg-shift = <2>; |
714 | reg-io-width = <4>; | 714 | reg-io-width = <4>; |
715 | clocks = <&l4_sp_clk>; | 715 | clocks = <&l4_sp_clk>; |
716 | dmas = <&pdma 28>, | ||
717 | <&pdma 29>; | ||
718 | dma-names = "tx", "rx"; | ||
716 | }; | 719 | }; |
717 | 720 | ||
718 | uart1: serial1@ffc03000 { | 721 | uart1: serial1@ffc03000 { |
@@ -722,6 +725,9 @@ | |||
722 | reg-shift = <2>; | 725 | reg-shift = <2>; |
723 | reg-io-width = <4>; | 726 | reg-io-width = <4>; |
724 | clocks = <&l4_sp_clk>; | 727 | clocks = <&l4_sp_clk>; |
728 | dmas = <&pdma 30>, | ||
729 | <&pdma 31>; | ||
730 | dma-names = "tx", "rx"; | ||
725 | }; | 731 | }; |
726 | 732 | ||
727 | rst: rstmgr@ffd05000 { | 733 | rst: rstmgr@ffd05000 { |
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig index f2670f638e97..811e72bbe642 100644 --- a/arch/arm/configs/at91_dt_defconfig +++ b/arch/arm/configs/at91_dt_defconfig | |||
@@ -70,6 +70,7 @@ CONFIG_SCSI=y | |||
70 | CONFIG_BLK_DEV_SD=y | 70 | CONFIG_BLK_DEV_SD=y |
71 | # CONFIG_SCSI_LOWLEVEL is not set | 71 | # CONFIG_SCSI_LOWLEVEL is not set |
72 | CONFIG_NETDEVICES=y | 72 | CONFIG_NETDEVICES=y |
73 | CONFIG_ARM_AT91_ETHER=y | ||
73 | CONFIG_MACB=y | 74 | CONFIG_MACB=y |
74 | # CONFIG_NET_VENDOR_BROADCOM is not set | 75 | # CONFIG_NET_VENDOR_BROADCOM is not set |
75 | CONFIG_DM9000=y | 76 | CONFIG_DM9000=y |
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index e8a4c955241b..06075b6d2463 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig | |||
@@ -62,6 +62,17 @@ CONFIG_MACH_SPEAR1340=y | |||
62 | CONFIG_ARCH_STI=y | 62 | CONFIG_ARCH_STI=y |
63 | CONFIG_ARCH_EXYNOS=y | 63 | CONFIG_ARCH_EXYNOS=y |
64 | CONFIG_EXYNOS5420_MCPM=y | 64 | CONFIG_EXYNOS5420_MCPM=y |
65 | CONFIG_ARCH_SHMOBILE_MULTI=y | ||
66 | CONFIG_ARCH_EMEV2=y | ||
67 | CONFIG_ARCH_R7S72100=y | ||
68 | CONFIG_ARCH_R8A73A4=y | ||
69 | CONFIG_ARCH_R8A7740=y | ||
70 | CONFIG_ARCH_R8A7779=y | ||
71 | CONFIG_ARCH_R8A7790=y | ||
72 | CONFIG_ARCH_R8A7791=y | ||
73 | CONFIG_ARCH_R8A7794=y | ||
74 | CONFIG_ARCH_SH73A0=y | ||
75 | CONFIG_MACH_MARZEN=y | ||
65 | CONFIG_ARCH_SUNXI=y | 76 | CONFIG_ARCH_SUNXI=y |
66 | CONFIG_ARCH_SIRF=y | 77 | CONFIG_ARCH_SIRF=y |
67 | CONFIG_ARCH_TEGRA=y | 78 | CONFIG_ARCH_TEGRA=y |
@@ -84,9 +95,11 @@ CONFIG_PCI_KEYSTONE=y | |||
84 | CONFIG_PCI_MSI=y | 95 | CONFIG_PCI_MSI=y |
85 | CONFIG_PCI_MVEBU=y | 96 | CONFIG_PCI_MVEBU=y |
86 | CONFIG_PCI_TEGRA=y | 97 | CONFIG_PCI_TEGRA=y |
98 | CONFIG_PCI_RCAR_GEN2=y | ||
99 | CONFIG_PCI_RCAR_GEN2_PCIE=y | ||
87 | CONFIG_PCIEPORTBUS=y | 100 | CONFIG_PCIEPORTBUS=y |
88 | CONFIG_SMP=y | 101 | CONFIG_SMP=y |
89 | CONFIG_NR_CPUS=8 | 102 | CONFIG_NR_CPUS=16 |
90 | CONFIG_HIGHPTE=y | 103 | CONFIG_HIGHPTE=y |
91 | CONFIG_CMA=y | 104 | CONFIG_CMA=y |
92 | CONFIG_ARM_APPENDED_DTB=y | 105 | CONFIG_ARM_APPENDED_DTB=y |
@@ -130,6 +143,7 @@ CONFIG_DEVTMPFS_MOUNT=y | |||
130 | CONFIG_DMA_CMA=y | 143 | CONFIG_DMA_CMA=y |
131 | CONFIG_CMA_SIZE_MBYTES=64 | 144 | CONFIG_CMA_SIZE_MBYTES=64 |
132 | CONFIG_OMAP_OCP2SCP=y | 145 | CONFIG_OMAP_OCP2SCP=y |
146 | CONFIG_SIMPLE_PM_BUS=y | ||
133 | CONFIG_MTD=y | 147 | CONFIG_MTD=y |
134 | CONFIG_MTD_CMDLINE_PARTS=y | 148 | CONFIG_MTD_CMDLINE_PARTS=y |
135 | CONFIG_MTD_BLOCK=y | 149 | CONFIG_MTD_BLOCK=y |
@@ -157,6 +171,7 @@ CONFIG_AHCI_SUNXI=y | |||
157 | CONFIG_AHCI_TEGRA=y | 171 | CONFIG_AHCI_TEGRA=y |
158 | CONFIG_SATA_HIGHBANK=y | 172 | CONFIG_SATA_HIGHBANK=y |
159 | CONFIG_SATA_MV=y | 173 | CONFIG_SATA_MV=y |
174 | CONFIG_SATA_RCAR=y | ||
160 | CONFIG_NETDEVICES=y | 175 | CONFIG_NETDEVICES=y |
161 | CONFIG_HIX5HD2_GMAC=y | 176 | CONFIG_HIX5HD2_GMAC=y |
162 | CONFIG_SUN4I_EMAC=y | 177 | CONFIG_SUN4I_EMAC=y |
@@ -167,14 +182,17 @@ CONFIG_MV643XX_ETH=y | |||
167 | CONFIG_MVNETA=y | 182 | CONFIG_MVNETA=y |
168 | CONFIG_KS8851=y | 183 | CONFIG_KS8851=y |
169 | CONFIG_R8169=y | 184 | CONFIG_R8169=y |
185 | CONFIG_SH_ETH=y | ||
170 | CONFIG_SMSC911X=y | 186 | CONFIG_SMSC911X=y |
171 | CONFIG_STMMAC_ETH=y | 187 | CONFIG_STMMAC_ETH=y |
172 | CONFIG_TI_CPSW=y | 188 | CONFIG_TI_CPSW=y |
173 | CONFIG_XILINX_EMACLITE=y | 189 | CONFIG_XILINX_EMACLITE=y |
174 | CONFIG_AT803X_PHY=y | 190 | CONFIG_AT803X_PHY=y |
175 | CONFIG_MARVELL_PHY=y | 191 | CONFIG_MARVELL_PHY=y |
192 | CONFIG_SMSC_PHY=y | ||
176 | CONFIG_BROADCOM_PHY=y | 193 | CONFIG_BROADCOM_PHY=y |
177 | CONFIG_ICPLUS_PHY=y | 194 | CONFIG_ICPLUS_PHY=y |
195 | CONFIG_MICREL_PHY=y | ||
178 | CONFIG_USB_PEGASUS=y | 196 | CONFIG_USB_PEGASUS=y |
179 | CONFIG_USB_USBNET=y | 197 | CONFIG_USB_USBNET=y |
180 | CONFIG_USB_NET_SMSC75XX=y | 198 | CONFIG_USB_NET_SMSC75XX=y |
@@ -192,15 +210,18 @@ CONFIG_KEYBOARD_CROS_EC=y | |||
192 | CONFIG_MOUSE_PS2_ELANTECH=y | 210 | CONFIG_MOUSE_PS2_ELANTECH=y |
193 | CONFIG_INPUT_TOUCHSCREEN=y | 211 | CONFIG_INPUT_TOUCHSCREEN=y |
194 | CONFIG_TOUCHSCREEN_ATMEL_MXT=y | 212 | CONFIG_TOUCHSCREEN_ATMEL_MXT=y |
213 | CONFIG_TOUCHSCREEN_ST1232=m | ||
195 | CONFIG_TOUCHSCREEN_STMPE=y | 214 | CONFIG_TOUCHSCREEN_STMPE=y |
196 | CONFIG_TOUCHSCREEN_SUN4I=y | 215 | CONFIG_TOUCHSCREEN_SUN4I=y |
197 | CONFIG_INPUT_MISC=y | 216 | CONFIG_INPUT_MISC=y |
198 | CONFIG_INPUT_MPU3050=y | 217 | CONFIG_INPUT_MPU3050=y |
199 | CONFIG_INPUT_AXP20X_PEK=y | 218 | CONFIG_INPUT_AXP20X_PEK=y |
219 | CONFIG_INPUT_ADXL34X=m | ||
200 | CONFIG_SERIO_AMBAKMI=y | 220 | CONFIG_SERIO_AMBAKMI=y |
201 | CONFIG_SERIAL_8250=y | 221 | CONFIG_SERIAL_8250=y |
202 | CONFIG_SERIAL_8250_CONSOLE=y | 222 | CONFIG_SERIAL_8250_CONSOLE=y |
203 | CONFIG_SERIAL_8250_DW=y | 223 | CONFIG_SERIAL_8250_DW=y |
224 | CONFIG_SERIAL_8250_EM=y | ||
204 | CONFIG_SERIAL_8250_MT6577=y | 225 | CONFIG_SERIAL_8250_MT6577=y |
205 | CONFIG_SERIAL_AMBA_PL011=y | 226 | CONFIG_SERIAL_AMBA_PL011=y |
206 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y | 227 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y |
@@ -213,6 +234,9 @@ CONFIG_SERIAL_SIRFSOC_CONSOLE=y | |||
213 | CONFIG_SERIAL_TEGRA=y | 234 | CONFIG_SERIAL_TEGRA=y |
214 | CONFIG_SERIAL_IMX=y | 235 | CONFIG_SERIAL_IMX=y |
215 | CONFIG_SERIAL_IMX_CONSOLE=y | 236 | CONFIG_SERIAL_IMX_CONSOLE=y |
237 | CONFIG_SERIAL_SH_SCI=y | ||
238 | CONFIG_SERIAL_SH_SCI_NR_UARTS=20 | ||
239 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | ||
216 | CONFIG_SERIAL_MSM=y | 240 | CONFIG_SERIAL_MSM=y |
217 | CONFIG_SERIAL_MSM_CONSOLE=y | 241 | CONFIG_SERIAL_MSM_CONSOLE=y |
218 | CONFIG_SERIAL_VT8500=y | 242 | CONFIG_SERIAL_VT8500=y |
@@ -233,19 +257,26 @@ CONFIG_I2C_MUX_PCA954x=y | |||
233 | CONFIG_I2C_MUX_PINCTRL=y | 257 | CONFIG_I2C_MUX_PINCTRL=y |
234 | CONFIG_I2C_CADENCE=y | 258 | CONFIG_I2C_CADENCE=y |
235 | CONFIG_I2C_DESIGNWARE_PLATFORM=y | 259 | CONFIG_I2C_DESIGNWARE_PLATFORM=y |
260 | CONFIG_I2C_GPIO=m | ||
236 | CONFIG_I2C_EXYNOS5=y | 261 | CONFIG_I2C_EXYNOS5=y |
237 | CONFIG_I2C_MV64XXX=y | 262 | CONFIG_I2C_MV64XXX=y |
263 | CONFIG_I2C_RIIC=y | ||
238 | CONFIG_I2C_S3C2410=y | 264 | CONFIG_I2C_S3C2410=y |
265 | CONFIG_I2C_SH_MOBILE=y | ||
239 | CONFIG_I2C_SIRF=y | 266 | CONFIG_I2C_SIRF=y |
240 | CONFIG_I2C_TEGRA=y | ||
241 | CONFIG_I2C_ST=y | 267 | CONFIG_I2C_ST=y |
242 | CONFIG_SPI=y | 268 | CONFIG_I2C_TEGRA=y |
243 | CONFIG_I2C_XILINX=y | 269 | CONFIG_I2C_XILINX=y |
244 | CONFIG_SPI_DAVINCI=y | 270 | CONFIG_I2C_RCAR=y |
271 | CONFIG_SPI=y | ||
245 | CONFIG_SPI_CADENCE=y | 272 | CONFIG_SPI_CADENCE=y |
273 | CONFIG_SPI_DAVINCI=y | ||
246 | CONFIG_SPI_OMAP24XX=y | 274 | CONFIG_SPI_OMAP24XX=y |
247 | CONFIG_SPI_ORION=y | 275 | CONFIG_SPI_ORION=y |
248 | CONFIG_SPI_PL022=y | 276 | CONFIG_SPI_PL022=y |
277 | CONFIG_SPI_RSPI=y | ||
278 | CONFIG_SPI_SH_MSIOF=m | ||
279 | CONFIG_SPI_SH_HSPI=y | ||
249 | CONFIG_SPI_SIRF=y | 280 | CONFIG_SPI_SIRF=y |
250 | CONFIG_SPI_SUN4I=y | 281 | CONFIG_SPI_SUN4I=y |
251 | CONFIG_SPI_SUN6I=y | 282 | CONFIG_SPI_SUN6I=y |
@@ -259,12 +290,15 @@ CONFIG_PINCTRL_PALMAS=y | |||
259 | CONFIG_PINCTRL_APQ8084=y | 290 | CONFIG_PINCTRL_APQ8084=y |
260 | CONFIG_GPIO_SYSFS=y | 291 | CONFIG_GPIO_SYSFS=y |
261 | CONFIG_GPIO_GENERIC_PLATFORM=y | 292 | CONFIG_GPIO_GENERIC_PLATFORM=y |
262 | CONFIG_GPIO_DWAPB=y | ||
263 | CONFIG_GPIO_DAVINCI=y | 293 | CONFIG_GPIO_DAVINCI=y |
294 | CONFIG_GPIO_DWAPB=y | ||
295 | CONFIG_GPIO_EM=y | ||
296 | CONFIG_GPIO_RCAR=y | ||
264 | CONFIG_GPIO_XILINX=y | 297 | CONFIG_GPIO_XILINX=y |
265 | CONFIG_GPIO_ZYNQ=y | 298 | CONFIG_GPIO_ZYNQ=y |
266 | CONFIG_GPIO_PCA953X=y | 299 | CONFIG_GPIO_PCA953X=y |
267 | CONFIG_GPIO_PCA953X_IRQ=y | 300 | CONFIG_GPIO_PCA953X_IRQ=y |
301 | CONFIG_GPIO_PCF857X=y | ||
268 | CONFIG_GPIO_TWL4030=y | 302 | CONFIG_GPIO_TWL4030=y |
269 | CONFIG_GPIO_PALMAS=y | 303 | CONFIG_GPIO_PALMAS=y |
270 | CONFIG_GPIO_SYSCON=y | 304 | CONFIG_GPIO_SYSCON=y |
@@ -276,10 +310,12 @@ CONFIG_POWER_RESET_AS3722=y | |||
276 | CONFIG_POWER_RESET_GPIO=y | 310 | CONFIG_POWER_RESET_GPIO=y |
277 | CONFIG_POWER_RESET_KEYSTONE=y | 311 | CONFIG_POWER_RESET_KEYSTONE=y |
278 | CONFIG_POWER_RESET_SUN6I=y | 312 | CONFIG_POWER_RESET_SUN6I=y |
313 | CONFIG_POWER_RESET_RMOBILE=y | ||
279 | CONFIG_SENSORS_LM90=y | 314 | CONFIG_SENSORS_LM90=y |
280 | CONFIG_SENSORS_LM95245=y | 315 | CONFIG_SENSORS_LM95245=y |
281 | CONFIG_THERMAL=y | 316 | CONFIG_THERMAL=y |
282 | CONFIG_CPU_THERMAL=y | 317 | CONFIG_CPU_THERMAL=y |
318 | CONFIG_RCAR_THERMAL=y | ||
283 | CONFIG_ARMADA_THERMAL=y | 319 | CONFIG_ARMADA_THERMAL=y |
284 | CONFIG_DAVINCI_WATCHDOG | 320 | CONFIG_DAVINCI_WATCHDOG |
285 | CONFIG_ST_THERMAL_SYSCFG=y | 321 | CONFIG_ST_THERMAL_SYSCFG=y |
@@ -290,6 +326,7 @@ CONFIG_ARM_SP805_WATCHDOG=y | |||
290 | CONFIG_ORION_WATCHDOG=y | 326 | CONFIG_ORION_WATCHDOG=y |
291 | CONFIG_SUNXI_WATCHDOG=y | 327 | CONFIG_SUNXI_WATCHDOG=y |
292 | CONFIG_MESON_WATCHDOG=y | 328 | CONFIG_MESON_WATCHDOG=y |
329 | CONFIG_MFD_AS3711=y | ||
293 | CONFIG_MFD_AS3722=y | 330 | CONFIG_MFD_AS3722=y |
294 | CONFIG_MFD_BCM590XX=y | 331 | CONFIG_MFD_BCM590XX=y |
295 | CONFIG_MFD_AXP20X=y | 332 | CONFIG_MFD_AXP20X=y |
@@ -304,13 +341,16 @@ CONFIG_MFD_TPS65090=y | |||
304 | CONFIG_MFD_TPS6586X=y | 341 | CONFIG_MFD_TPS6586X=y |
305 | CONFIG_MFD_TPS65910=y | 342 | CONFIG_MFD_TPS65910=y |
306 | CONFIG_REGULATOR_AB8500=y | 343 | CONFIG_REGULATOR_AB8500=y |
344 | CONFIG_REGULATOR_AS3711=y | ||
307 | CONFIG_REGULATOR_AS3722=y | 345 | CONFIG_REGULATOR_AS3722=y |
308 | CONFIG_REGULATOR_AXP20X=y | 346 | CONFIG_REGULATOR_AXP20X=y |
309 | CONFIG_REGULATOR_BCM590XX=y | 347 | CONFIG_REGULATOR_BCM590XX=y |
348 | CONFIG_REGULATOR_DA9210=y | ||
310 | CONFIG_REGULATOR_GPIO=y | 349 | CONFIG_REGULATOR_GPIO=y |
311 | CONFIG_MFD_SYSCON=y | 350 | CONFIG_MFD_SYSCON=y |
312 | CONFIG_POWER_RESET_SYSCON=y | 351 | CONFIG_POWER_RESET_SYSCON=y |
313 | CONFIG_REGULATOR_MAX8907=y | 352 | CONFIG_REGULATOR_MAX8907=y |
353 | CONFIG_REGULATOR_MAX8973=y | ||
314 | CONFIG_REGULATOR_MAX77686=y | 354 | CONFIG_REGULATOR_MAX77686=y |
315 | CONFIG_REGULATOR_PALMAS=y | 355 | CONFIG_REGULATOR_PALMAS=y |
316 | CONFIG_REGULATOR_S2MPS11=y | 356 | CONFIG_REGULATOR_S2MPS11=y |
@@ -324,18 +364,32 @@ CONFIG_REGULATOR_TWL4030=y | |||
324 | CONFIG_REGULATOR_VEXPRESS=y | 364 | CONFIG_REGULATOR_VEXPRESS=y |
325 | CONFIG_MEDIA_SUPPORT=y | 365 | CONFIG_MEDIA_SUPPORT=y |
326 | CONFIG_MEDIA_CAMERA_SUPPORT=y | 366 | CONFIG_MEDIA_CAMERA_SUPPORT=y |
367 | CONFIG_MEDIA_CONTROLLER=y | ||
368 | CONFIG_VIDEO_V4L2_SUBDEV_API=y | ||
327 | CONFIG_MEDIA_USB_SUPPORT=y | 369 | CONFIG_MEDIA_USB_SUPPORT=y |
328 | CONFIG_USB_VIDEO_CLASS=y | 370 | CONFIG_USB_VIDEO_CLASS=y |
329 | CONFIG_USB_GSPCA=y | 371 | CONFIG_USB_GSPCA=y |
372 | CONFIG_V4L_PLATFORM_DRIVERS=y | ||
373 | CONFIG_SOC_CAMERA=m | ||
374 | CONFIG_SOC_CAMERA_PLATFORM=m | ||
375 | CONFIG_VIDEO_RCAR_VIN=m | ||
376 | CONFIG_V4L_MEM2MEM_DRIVERS=y | ||
377 | CONFIG_VIDEO_RENESAS_VSP1=m | ||
378 | # CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set | ||
379 | CONFIG_VIDEO_ADV7180=m | ||
330 | CONFIG_DRM=y | 380 | CONFIG_DRM=y |
381 | CONFIG_DRM_RCAR_DU=m | ||
331 | CONFIG_DRM_TEGRA=y | 382 | CONFIG_DRM_TEGRA=y |
332 | CONFIG_DRM_PANEL_SIMPLE=y | 383 | CONFIG_DRM_PANEL_SIMPLE=y |
333 | CONFIG_FB_ARMCLCD=y | 384 | CONFIG_FB_ARMCLCD=y |
334 | CONFIG_FB_WM8505=y | 385 | CONFIG_FB_WM8505=y |
386 | CONFIG_FB_SH_MOBILE_LCDC=y | ||
335 | CONFIG_FB_SIMPLE=y | 387 | CONFIG_FB_SIMPLE=y |
388 | CONFIG_FB_SH_MOBILE_MERAM=y | ||
336 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | 389 | CONFIG_BACKLIGHT_LCD_SUPPORT=y |
337 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | 390 | CONFIG_BACKLIGHT_CLASS_DEVICE=y |
338 | CONFIG_BACKLIGHT_PWM=y | 391 | CONFIG_BACKLIGHT_PWM=y |
392 | CONFIG_BACKLIGHT_AS3711=y | ||
339 | CONFIG_FRAMEBUFFER_CONSOLE=y | 393 | CONFIG_FRAMEBUFFER_CONSOLE=y |
340 | CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y | 394 | CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y |
341 | CONFIG_SOUND=y | 395 | CONFIG_SOUND=y |
@@ -343,6 +397,8 @@ CONFIG_SND=y | |||
343 | CONFIG_SND_DYNAMIC_MINORS=y | 397 | CONFIG_SND_DYNAMIC_MINORS=y |
344 | CONFIG_SND_USB_AUDIO=y | 398 | CONFIG_SND_USB_AUDIO=y |
345 | CONFIG_SND_SOC=y | 399 | CONFIG_SND_SOC=y |
400 | CONFIG_SND_SOC_SH4_FSI=m | ||
401 | CONFIG_SND_SOC_RCAR=m | ||
346 | CONFIG_SND_SOC_TEGRA=y | 402 | CONFIG_SND_SOC_TEGRA=y |
347 | CONFIG_SND_SOC_TEGRA_RT5640=y | 403 | CONFIG_SND_SOC_TEGRA_RT5640=y |
348 | CONFIG_SND_SOC_TEGRA_WM8753=y | 404 | CONFIG_SND_SOC_TEGRA_WM8753=y |
@@ -350,6 +406,8 @@ CONFIG_SND_SOC_TEGRA_WM8903=y | |||
350 | CONFIG_SND_SOC_TEGRA_TRIMSLICE=y | 406 | CONFIG_SND_SOC_TEGRA_TRIMSLICE=y |
351 | CONFIG_SND_SOC_TEGRA_ALC5632=y | 407 | CONFIG_SND_SOC_TEGRA_ALC5632=y |
352 | CONFIG_SND_SOC_TEGRA_MAX98090=y | 408 | CONFIG_SND_SOC_TEGRA_MAX98090=y |
409 | CONFIG_SND_SOC_AK4642=m | ||
410 | CONFIG_SND_SOC_WM8978=m | ||
353 | CONFIG_USB=y | 411 | CONFIG_USB=y |
354 | CONFIG_USB_XHCI_HCD=y | 412 | CONFIG_USB_XHCI_HCD=y |
355 | CONFIG_USB_XHCI_MVEBU=y | 413 | CONFIG_USB_XHCI_MVEBU=y |
@@ -362,6 +420,8 @@ CONFIG_USB_ISP1760_HCD=y | |||
362 | CONFIG_USB_OHCI_HCD=y | 420 | CONFIG_USB_OHCI_HCD=y |
363 | CONFIG_USB_OHCI_HCD_STI=y | 421 | CONFIG_USB_OHCI_HCD_STI=y |
364 | CONFIG_USB_OHCI_HCD_PLATFORM=y | 422 | CONFIG_USB_OHCI_HCD_PLATFORM=y |
423 | CONFIG_USB_R8A66597_HCD=m | ||
424 | CONFIG_USB_RENESAS_USBHS=m | ||
365 | CONFIG_USB_STORAGE=y | 425 | CONFIG_USB_STORAGE=y |
366 | CONFIG_USB_DWC3=y | 426 | CONFIG_USB_DWC3=y |
367 | CONFIG_USB_CHIPIDEA=y | 427 | CONFIG_USB_CHIPIDEA=y |
@@ -374,6 +434,10 @@ CONFIG_SAMSUNG_USB3PHY=y | |||
374 | CONFIG_USB_GPIO_VBUS=y | 434 | CONFIG_USB_GPIO_VBUS=y |
375 | CONFIG_USB_ISP1301=y | 435 | CONFIG_USB_ISP1301=y |
376 | CONFIG_USB_MXS_PHY=y | 436 | CONFIG_USB_MXS_PHY=y |
437 | CONFIG_USB_RCAR_PHY=m | ||
438 | CONFIG_USB_RCAR_GEN2_PHY=m | ||
439 | CONFIG_USB_GADGET=y | ||
440 | CONFIG_USB_RENESAS_USBHS_UDC=m | ||
377 | CONFIG_MMC=y | 441 | CONFIG_MMC=y |
378 | CONFIG_MMC_BLOCK_MINORS=16 | 442 | CONFIG_MMC_BLOCK_MINORS=16 |
379 | CONFIG_MMC_ARMMMCI=y | 443 | CONFIG_MMC_ARMMMCI=y |
@@ -392,12 +456,14 @@ CONFIG_MMC_SDHCI_ST=y | |||
392 | CONFIG_MMC_OMAP=y | 456 | CONFIG_MMC_OMAP=y |
393 | CONFIG_MMC_OMAP_HS=y | 457 | CONFIG_MMC_OMAP_HS=y |
394 | CONFIG_MMC_MVSDIO=y | 458 | CONFIG_MMC_MVSDIO=y |
395 | CONFIG_MMC_SUNXI=y | 459 | CONFIG_MMC_SDHI=y |
396 | CONFIG_MMC_DW=y | 460 | CONFIG_MMC_DW=y |
397 | CONFIG_MMC_DW_IDMAC=y | 461 | CONFIG_MMC_DW_IDMAC=y |
398 | CONFIG_MMC_DW_PLTFM=y | 462 | CONFIG_MMC_DW_PLTFM=y |
399 | CONFIG_MMC_DW_EXYNOS=y | 463 | CONFIG_MMC_DW_EXYNOS=y |
400 | CONFIG_MMC_DW_ROCKCHIP=y | 464 | CONFIG_MMC_DW_ROCKCHIP=y |
465 | CONFIG_MMC_SH_MMCIF=y | ||
466 | CONFIG_MMC_SUNXI=y | ||
401 | CONFIG_NEW_LEDS=y | 467 | CONFIG_NEW_LEDS=y |
402 | CONFIG_LEDS_CLASS=y | 468 | CONFIG_LEDS_CLASS=y |
403 | CONFIG_LEDS_GPIO=y | 469 | CONFIG_LEDS_GPIO=y |
@@ -421,10 +487,12 @@ CONFIG_RTC_DRV_AS3722=y | |||
421 | CONFIG_RTC_DRV_DS1307=y | 487 | CONFIG_RTC_DRV_DS1307=y |
422 | CONFIG_RTC_DRV_MAX8907=y | 488 | CONFIG_RTC_DRV_MAX8907=y |
423 | CONFIG_RTC_DRV_MAX77686=y | 489 | CONFIG_RTC_DRV_MAX77686=y |
490 | CONFIG_RTC_DRV_RS5C372=m | ||
424 | CONFIG_RTC_DRV_PALMAS=y | 491 | CONFIG_RTC_DRV_PALMAS=y |
425 | CONFIG_RTC_DRV_TWL4030=y | 492 | CONFIG_RTC_DRV_TWL4030=y |
426 | CONFIG_RTC_DRV_TPS6586X=y | 493 | CONFIG_RTC_DRV_TPS6586X=y |
427 | CONFIG_RTC_DRV_TPS65910=y | 494 | CONFIG_RTC_DRV_TPS65910=y |
495 | CONFIG_RTC_DRV_S35390A=m | ||
428 | CONFIG_RTC_DRV_EM3027=y | 496 | CONFIG_RTC_DRV_EM3027=y |
429 | CONFIG_RTC_DRV_PL031=y | 497 | CONFIG_RTC_DRV_PL031=y |
430 | CONFIG_RTC_DRV_VT8500=y | 498 | CONFIG_RTC_DRV_VT8500=y |
@@ -436,6 +504,9 @@ CONFIG_DMADEVICES=y | |||
436 | CONFIG_DW_DMAC=y | 504 | CONFIG_DW_DMAC=y |
437 | CONFIG_MV_XOR=y | 505 | CONFIG_MV_XOR=y |
438 | CONFIG_TEGRA20_APB_DMA=y | 506 | CONFIG_TEGRA20_APB_DMA=y |
507 | CONFIG_SH_DMAE=y | ||
508 | CONFIG_RCAR_AUDMAC_PP=m | ||
509 | CONFIG_RCAR_DMAC=y | ||
439 | CONFIG_STE_DMA40=y | 510 | CONFIG_STE_DMA40=y |
440 | CONFIG_SIRF_DMA=y | 511 | CONFIG_SIRF_DMA=y |
441 | CONFIG_TI_EDMA=y | 512 | CONFIG_TI_EDMA=y |
@@ -468,6 +539,7 @@ CONFIG_IIO=y | |||
468 | CONFIG_XILINX_XADC=y | 539 | CONFIG_XILINX_XADC=y |
469 | CONFIG_AK8975=y | 540 | CONFIG_AK8975=y |
470 | CONFIG_PWM=y | 541 | CONFIG_PWM=y |
542 | CONFIG_PWM_RENESAS_TPU=y | ||
471 | CONFIG_PWM_TEGRA=y | 543 | CONFIG_PWM_TEGRA=y |
472 | CONFIG_PWM_VT8500=y | 544 | CONFIG_PWM_VT8500=y |
473 | CONFIG_PHY_HIX5HD2_SATA=y | 545 | CONFIG_PHY_HIX5HD2_SATA=y |
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index b7386524c356..8e108599e1af 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig | |||
@@ -114,6 +114,7 @@ CONFIG_MTD_PHYSMAP_OF=y | |||
114 | CONFIG_MTD_NAND=y | 114 | CONFIG_MTD_NAND=y |
115 | CONFIG_MTD_NAND_ECC_BCH=y | 115 | CONFIG_MTD_NAND_ECC_BCH=y |
116 | CONFIG_MTD_NAND_OMAP2=y | 116 | CONFIG_MTD_NAND_OMAP2=y |
117 | CONFIG_MTD_NAND_OMAP_BCH=y | ||
117 | CONFIG_MTD_ONENAND=y | 118 | CONFIG_MTD_ONENAND=y |
118 | CONFIG_MTD_ONENAND_VERIFY_WRITE=y | 119 | CONFIG_MTD_ONENAND_VERIFY_WRITE=y |
119 | CONFIG_MTD_ONENAND_OMAP2=y | 120 | CONFIG_MTD_ONENAND_OMAP2=y |
@@ -248,6 +249,7 @@ CONFIG_TWL6040_CORE=y | |||
248 | CONFIG_REGULATOR_PALMAS=y | 249 | CONFIG_REGULATOR_PALMAS=y |
249 | CONFIG_REGULATOR_PBIAS=y | 250 | CONFIG_REGULATOR_PBIAS=y |
250 | CONFIG_REGULATOR_TI_ABB=y | 251 | CONFIG_REGULATOR_TI_ABB=y |
252 | CONFIG_REGULATOR_TPS62360=m | ||
251 | CONFIG_REGULATOR_TPS65023=y | 253 | CONFIG_REGULATOR_TPS65023=y |
252 | CONFIG_REGULATOR_TPS6507X=y | 254 | CONFIG_REGULATOR_TPS6507X=y |
253 | CONFIG_REGULATOR_TPS65217=y | 255 | CONFIG_REGULATOR_TPS65217=y |
@@ -374,7 +376,8 @@ CONFIG_PWM_TIEHRPWM=m | |||
374 | CONFIG_PWM_TWL=m | 376 | CONFIG_PWM_TWL=m |
375 | CONFIG_PWM_TWL_LED=m | 377 | CONFIG_PWM_TWL_LED=m |
376 | CONFIG_OMAP_USB2=m | 378 | CONFIG_OMAP_USB2=m |
377 | CONFIG_TI_PIPE3=m | 379 | CONFIG_TI_PIPE3=y |
380 | CONFIG_TWL4030_USB=m | ||
378 | CONFIG_EXT2_FS=y | 381 | CONFIG_EXT2_FS=y |
379 | CONFIG_EXT3_FS=y | 382 | CONFIG_EXT3_FS=y |
380 | # CONFIG_EXT3_FS_XATTR is not set | 383 | # CONFIG_EXT3_FS_XATTR is not set |
diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig index 41d856effe6c..510c747c65b4 100644 --- a/arch/arm/configs/sama5_defconfig +++ b/arch/arm/configs/sama5_defconfig | |||
@@ -3,8 +3,6 @@ | |||
3 | CONFIG_SYSVIPC=y | 3 | CONFIG_SYSVIPC=y |
4 | CONFIG_IRQ_DOMAIN_DEBUG=y | 4 | CONFIG_IRQ_DOMAIN_DEBUG=y |
5 | CONFIG_LOG_BUF_SHIFT=14 | 5 | CONFIG_LOG_BUF_SHIFT=14 |
6 | CONFIG_SYSFS_DEPRECATED=y | ||
7 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
8 | CONFIG_BLK_DEV_INITRD=y | 6 | CONFIG_BLK_DEV_INITRD=y |
9 | CONFIG_EMBEDDED=y | 7 | CONFIG_EMBEDDED=y |
10 | CONFIG_SLAB=y | 8 | CONFIG_SLAB=y |
diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig index 38840a812924..8f6a5702b696 100644 --- a/arch/arm/configs/sunxi_defconfig +++ b/arch/arm/configs/sunxi_defconfig | |||
@@ -4,6 +4,7 @@ CONFIG_BLK_DEV_INITRD=y | |||
4 | CONFIG_PERF_EVENTS=y | 4 | CONFIG_PERF_EVENTS=y |
5 | CONFIG_ARCH_SUNXI=y | 5 | CONFIG_ARCH_SUNXI=y |
6 | CONFIG_SMP=y | 6 | CONFIG_SMP=y |
7 | CONFIG_NR_CPUS=8 | ||
7 | CONFIG_AEABI=y | 8 | CONFIG_AEABI=y |
8 | CONFIG_HIGHMEM=y | 9 | CONFIG_HIGHMEM=y |
9 | CONFIG_HIGHPTE=y | 10 | CONFIG_HIGHPTE=y |
diff --git a/arch/arm/configs/vexpress_defconfig b/arch/arm/configs/vexpress_defconfig index f489fdaa19b8..37fe607a4ede 100644 --- a/arch/arm/configs/vexpress_defconfig +++ b/arch/arm/configs/vexpress_defconfig | |||
@@ -118,8 +118,8 @@ CONFIG_HID_ZEROPLUS=y | |||
118 | CONFIG_USB=y | 118 | CONFIG_USB=y |
119 | CONFIG_USB_ANNOUNCE_NEW_DEVICES=y | 119 | CONFIG_USB_ANNOUNCE_NEW_DEVICES=y |
120 | CONFIG_USB_MON=y | 120 | CONFIG_USB_MON=y |
121 | CONFIG_USB_ISP1760_HCD=y | ||
122 | CONFIG_USB_STORAGE=y | 121 | CONFIG_USB_STORAGE=y |
122 | CONFIG_USB_ISP1760=y | ||
123 | CONFIG_MMC=y | 123 | CONFIG_MMC=y |
124 | CONFIG_MMC_ARMMMCI=y | 124 | CONFIG_MMC_ARMMMCI=y |
125 | CONFIG_NEW_LEDS=y | 125 | CONFIG_NEW_LEDS=y |
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index f67fd3afebdf..186270b3e194 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h | |||
@@ -237,6 +237,9 @@ | |||
237 | .pushsection ".alt.smp.init", "a" ;\ | 237 | .pushsection ".alt.smp.init", "a" ;\ |
238 | .long 9998b ;\ | 238 | .long 9998b ;\ |
239 | 9997: instr ;\ | 239 | 9997: instr ;\ |
240 | .if . - 9997b == 2 ;\ | ||
241 | nop ;\ | ||
242 | .endif ;\ | ||
240 | .if . - 9997b != 4 ;\ | 243 | .if . - 9997b != 4 ;\ |
241 | .error "ALT_UP() content must assemble to exactly 4 bytes";\ | 244 | .error "ALT_UP() content must assemble to exactly 4 bytes";\ |
242 | .endif ;\ | 245 | .endif ;\ |
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h index 819777d0e91f..85e374f873ac 100644 --- a/arch/arm/include/asm/cputype.h +++ b/arch/arm/include/asm/cputype.h | |||
@@ -253,4 +253,20 @@ static inline int cpu_is_pj4(void) | |||
253 | #else | 253 | #else |
254 | #define cpu_is_pj4() 0 | 254 | #define cpu_is_pj4() 0 |
255 | #endif | 255 | #endif |
256 | |||
257 | static inline int __attribute_const__ cpuid_feature_extract_field(u32 features, | ||
258 | int field) | ||
259 | { | ||
260 | int feature = (features >> field) & 15; | ||
261 | |||
262 | /* feature registers are signed values */ | ||
263 | if (feature > 8) | ||
264 | feature -= 16; | ||
265 | |||
266 | return feature; | ||
267 | } | ||
268 | |||
269 | #define cpuid_feature_extract(reg, field) \ | ||
270 | cpuid_feature_extract_field(read_cpuid_ext(reg), field) | ||
271 | |||
256 | #endif | 272 | #endif |
diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h index ac3f17fb4c8d..e2f4781630f6 100644 --- a/arch/arm/include/asm/elf.h +++ b/arch/arm/include/asm/elf.h | |||
@@ -117,7 +117,7 @@ int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs); | |||
117 | the loader. We need to make sure that it is out of the way of the program | 117 | the loader. We need to make sure that it is out of the way of the program |
118 | that it will "exec", and that there is sufficient room for the brk. */ | 118 | that it will "exec", and that there is sufficient room for the brk. */ |
119 | 119 | ||
120 | #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) | 120 | #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2) |
121 | 121 | ||
122 | /* When the program starts, a1 contains a pointer to a function to be | 122 | /* When the program starts, a1 contains a pointer to a function to be |
123 | registered with atexit, as per the SVR4 ABI. A value of 0 means we | 123 | registered with atexit, as per the SVR4 ABI. A value of 0 means we |
diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h index 53e69dae796f..4e78065a16aa 100644 --- a/arch/arm/include/asm/futex.h +++ b/arch/arm/include/asm/futex.h | |||
@@ -13,7 +13,7 @@ | |||
13 | " .align 3\n" \ | 13 | " .align 3\n" \ |
14 | " .long 1b, 4f, 2b, 4f\n" \ | 14 | " .long 1b, 4f, 2b, 4f\n" \ |
15 | " .popsection\n" \ | 15 | " .popsection\n" \ |
16 | " .pushsection .fixup,\"ax\"\n" \ | 16 | " .pushsection .text.fixup,\"ax\"\n" \ |
17 | " .align 2\n" \ | 17 | " .align 2\n" \ |
18 | "4: mov %0, " err_reg "\n" \ | 18 | "4: mov %0, " err_reg "\n" \ |
19 | " b 3b\n" \ | 19 | " b 3b\n" \ |
diff --git a/arch/arm/include/asm/kvm_mmu.h b/arch/arm/include/asm/kvm_mmu.h index 37ca2a4c6f09..bf0fe99e8ca9 100644 --- a/arch/arm/include/asm/kvm_mmu.h +++ b/arch/arm/include/asm/kvm_mmu.h | |||
@@ -207,7 +207,7 @@ static inline void __coherent_cache_guest_page(struct kvm_vcpu *vcpu, pfn_t pfn, | |||
207 | 207 | ||
208 | bool need_flush = !vcpu_has_cache_enabled(vcpu) || ipa_uncached; | 208 | bool need_flush = !vcpu_has_cache_enabled(vcpu) || ipa_uncached; |
209 | 209 | ||
210 | VM_BUG_ON(size & PAGE_MASK); | 210 | VM_BUG_ON(size & ~PAGE_MASK); |
211 | 211 | ||
212 | if (!need_flush && !icache_is_pipt()) | 212 | if (!need_flush && !icache_is_pipt()) |
213 | goto vipt_cache; | 213 | goto vipt_cache; |
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h index b1596bd59129..675e4ab79f68 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h | |||
@@ -92,6 +92,7 @@ struct pmu_hw_events { | |||
92 | struct arm_pmu { | 92 | struct arm_pmu { |
93 | struct pmu pmu; | 93 | struct pmu pmu; |
94 | cpumask_t active_irqs; | 94 | cpumask_t active_irqs; |
95 | int *irq_affinity; | ||
95 | char *name; | 96 | char *name; |
96 | irqreturn_t (*handle_irq)(int irq_num, void *dev); | 97 | irqreturn_t (*handle_irq)(int irq_num, void *dev); |
97 | void (*enable)(struct perf_event *event); | 98 | void (*enable)(struct perf_event *event); |
diff --git a/arch/arm/include/asm/smp_plat.h b/arch/arm/include/asm/smp_plat.h index 0ad7d490ee6f..993e5224d8f7 100644 --- a/arch/arm/include/asm/smp_plat.h +++ b/arch/arm/include/asm/smp_plat.h | |||
@@ -104,6 +104,7 @@ static inline u32 mpidr_hash_size(void) | |||
104 | return 1 << mpidr_hash.bits; | 104 | return 1 << mpidr_hash.bits; |
105 | } | 105 | } |
106 | 106 | ||
107 | extern int platform_can_secondary_boot(void); | ||
107 | extern int platform_can_cpu_hotplug(void); | 108 | extern int platform_can_cpu_hotplug(void); |
108 | 109 | ||
109 | #endif | 110 | #endif |
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index ce0786efd26c..74b17d09ef7a 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -315,7 +315,7 @@ do { \ | |||
315 | __asm__ __volatile__( \ | 315 | __asm__ __volatile__( \ |
316 | "1: " TUSER(ldrb) " %1,[%2],#0\n" \ | 316 | "1: " TUSER(ldrb) " %1,[%2],#0\n" \ |
317 | "2:\n" \ | 317 | "2:\n" \ |
318 | " .pushsection .fixup,\"ax\"\n" \ | 318 | " .pushsection .text.fixup,\"ax\"\n" \ |
319 | " .align 2\n" \ | 319 | " .align 2\n" \ |
320 | "3: mov %0, %3\n" \ | 320 | "3: mov %0, %3\n" \ |
321 | " mov %1, #0\n" \ | 321 | " mov %1, #0\n" \ |
@@ -351,7 +351,7 @@ do { \ | |||
351 | __asm__ __volatile__( \ | 351 | __asm__ __volatile__( \ |
352 | "1: " TUSER(ldr) " %1,[%2],#0\n" \ | 352 | "1: " TUSER(ldr) " %1,[%2],#0\n" \ |
353 | "2:\n" \ | 353 | "2:\n" \ |
354 | " .pushsection .fixup,\"ax\"\n" \ | 354 | " .pushsection .text.fixup,\"ax\"\n" \ |
355 | " .align 2\n" \ | 355 | " .align 2\n" \ |
356 | "3: mov %0, %3\n" \ | 356 | "3: mov %0, %3\n" \ |
357 | " mov %1, #0\n" \ | 357 | " mov %1, #0\n" \ |
@@ -397,7 +397,7 @@ do { \ | |||
397 | __asm__ __volatile__( \ | 397 | __asm__ __volatile__( \ |
398 | "1: " TUSER(strb) " %1,[%2],#0\n" \ | 398 | "1: " TUSER(strb) " %1,[%2],#0\n" \ |
399 | "2:\n" \ | 399 | "2:\n" \ |
400 | " .pushsection .fixup,\"ax\"\n" \ | 400 | " .pushsection .text.fixup,\"ax\"\n" \ |
401 | " .align 2\n" \ | 401 | " .align 2\n" \ |
402 | "3: mov %0, %3\n" \ | 402 | "3: mov %0, %3\n" \ |
403 | " b 2b\n" \ | 403 | " b 2b\n" \ |
@@ -430,7 +430,7 @@ do { \ | |||
430 | __asm__ __volatile__( \ | 430 | __asm__ __volatile__( \ |
431 | "1: " TUSER(str) " %1,[%2],#0\n" \ | 431 | "1: " TUSER(str) " %1,[%2],#0\n" \ |
432 | "2:\n" \ | 432 | "2:\n" \ |
433 | " .pushsection .fixup,\"ax\"\n" \ | 433 | " .pushsection .text.fixup,\"ax\"\n" \ |
434 | " .align 2\n" \ | 434 | " .align 2\n" \ |
435 | "3: mov %0, %3\n" \ | 435 | "3: mov %0, %3\n" \ |
436 | " b 2b\n" \ | 436 | " b 2b\n" \ |
@@ -458,7 +458,7 @@ do { \ | |||
458 | THUMB( "1: " TUSER(str) " " __reg_oper1 ", [%1]\n" ) \ | 458 | THUMB( "1: " TUSER(str) " " __reg_oper1 ", [%1]\n" ) \ |
459 | THUMB( "2: " TUSER(str) " " __reg_oper0 ", [%1, #4]\n" ) \ | 459 | THUMB( "2: " TUSER(str) " " __reg_oper0 ", [%1, #4]\n" ) \ |
460 | "3:\n" \ | 460 | "3:\n" \ |
461 | " .pushsection .fixup,\"ax\"\n" \ | 461 | " .pushsection .text.fixup,\"ax\"\n" \ |
462 | " .align 2\n" \ | 462 | " .align 2\n" \ |
463 | "4: mov %0, %3\n" \ | 463 | "4: mov %0, %3\n" \ |
464 | " b 3b\n" \ | 464 | " b 3b\n" \ |
diff --git a/arch/arm/include/asm/unified.h b/arch/arm/include/asm/unified.h index b88beaba6b4a..200f9a7cd623 100644 --- a/arch/arm/include/asm/unified.h +++ b/arch/arm/include/asm/unified.h | |||
@@ -24,6 +24,14 @@ | |||
24 | .syntax unified | 24 | .syntax unified |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #ifdef CONFIG_CPU_V7M | ||
28 | #define AR_CLASS(x...) | ||
29 | #define M_CLASS(x...) x | ||
30 | #else | ||
31 | #define AR_CLASS(x...) x | ||
32 | #define M_CLASS(x...) | ||
33 | #endif | ||
34 | |||
27 | #ifdef CONFIG_THUMB2_KERNEL | 35 | #ifdef CONFIG_THUMB2_KERNEL |
28 | 36 | ||
29 | #if __GNUC__ < 4 | 37 | #if __GNUC__ < 4 |
diff --git a/arch/arm/include/asm/word-at-a-time.h b/arch/arm/include/asm/word-at-a-time.h index a6d0a29861e7..5831dce4b51c 100644 --- a/arch/arm/include/asm/word-at-a-time.h +++ b/arch/arm/include/asm/word-at-a-time.h | |||
@@ -71,7 +71,7 @@ static inline unsigned long load_unaligned_zeropad(const void *addr) | |||
71 | asm( | 71 | asm( |
72 | "1: ldr %0, [%2]\n" | 72 | "1: ldr %0, [%2]\n" |
73 | "2:\n" | 73 | "2:\n" |
74 | " .pushsection .fixup,\"ax\"\n" | 74 | " .pushsection .text.fixup,\"ax\"\n" |
75 | " .align 2\n" | 75 | " .align 2\n" |
76 | "3: and %1, %2, #0x3\n" | 76 | "3: and %1, %2, #0x3\n" |
77 | " bic %2, %2, #0x3\n" | 77 | " bic %2, %2, #0x3\n" |
diff --git a/arch/arm/include/debug/at91.S b/arch/arm/include/debug/at91.S index 80a6501b4d50..c3c45e628e33 100644 --- a/arch/arm/include/debug/at91.S +++ b/arch/arm/include/debug/at91.S | |||
@@ -18,8 +18,11 @@ | |||
18 | #define AT91_DBGU 0xfc00c000 /* SAMA5D4_BASE_USART3 */ | 18 | #define AT91_DBGU 0xfc00c000 /* SAMA5D4_BASE_USART3 */ |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | /* Keep in sync with mach-at91/include/mach/hardware.h */ | 21 | #ifdef CONFIG_MMU |
22 | #define AT91_IO_P2V(x) ((x) - 0x01000000) | 22 | #define AT91_IO_P2V(x) ((x) - 0x01000000) |
23 | #else | ||
24 | #define AT91_IO_P2V(x) (x) | ||
25 | #endif | ||
23 | 26 | ||
24 | #define AT91_DBGU_SR (0x14) /* Status Register */ | 27 | #define AT91_DBGU_SR (0x14) /* Status Register */ |
25 | #define AT91_DBGU_THR (0x1c) /* Transmitter Holding Register */ | 28 | #define AT91_DBGU_THR (0x1c) /* Transmitter Holding Register */ |
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 3e316ca54e40..ba5f83226011 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -16,7 +16,7 @@ CFLAGS_REMOVE_return_address.o = -pg | |||
16 | # Object file lists. | 16 | # Object file lists. |
17 | 17 | ||
18 | obj-y := elf.o entry-common.o irq.o opcodes.o \ | 18 | obj-y := elf.o entry-common.o irq.o opcodes.o \ |
19 | process.o ptrace.o return_address.o \ | 19 | process.o ptrace.o reboot.o return_address.o \ |
20 | setup.o signal.o sigreturn_codes.o \ | 20 | setup.o signal.o sigreturn_codes.o \ |
21 | stacktrace.o sys_arm.o time.o traps.o | 21 | stacktrace.o sys_arm.o time.o traps.o |
22 | 22 | ||
@@ -87,7 +87,7 @@ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | |||
87 | 87 | ||
88 | obj-$(CONFIG_ARM_VIRT_EXT) += hyp-stub.o | 88 | obj-$(CONFIG_ARM_VIRT_EXT) += hyp-stub.o |
89 | ifeq ($(CONFIG_ARM_PSCI),y) | 89 | ifeq ($(CONFIG_ARM_PSCI),y) |
90 | obj-y += psci.o | 90 | obj-y += psci.o psci-call.o |
91 | obj-$(CONFIG_SMP) += psci_smp.o | 91 | obj-$(CONFIG_SMP) += psci_smp.o |
92 | endif | 92 | endif |
93 | 93 | ||
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index ab19b7c03423..fcbbbb1b9e95 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c | |||
@@ -618,21 +618,15 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) | |||
618 | int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | 618 | int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, |
619 | enum pci_mmap_state mmap_state, int write_combine) | 619 | enum pci_mmap_state mmap_state, int write_combine) |
620 | { | 620 | { |
621 | struct pci_sys_data *root = dev->sysdata; | 621 | if (mmap_state == pci_mmap_io) |
622 | unsigned long phys; | ||
623 | |||
624 | if (mmap_state == pci_mmap_io) { | ||
625 | return -EINVAL; | 622 | return -EINVAL; |
626 | } else { | ||
627 | phys = vma->vm_pgoff + (root->mem_offset >> PAGE_SHIFT); | ||
628 | } | ||
629 | 623 | ||
630 | /* | 624 | /* |
631 | * Mark this as IO | 625 | * Mark this as IO |
632 | */ | 626 | */ |
633 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | 627 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
634 | 628 | ||
635 | if (remap_pfn_range(vma, vma->vm_start, phys, | 629 | if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, |
636 | vma->vm_end - vma->vm_start, | 630 | vma->vm_end - vma->vm_start, |
637 | vma->vm_page_prot)) | 631 | vma->vm_page_prot)) |
638 | return -EAGAIN; | 632 | return -EAGAIN; |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 672b21942fff..570306c49406 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -545,7 +545,7 @@ ENDPROC(__und_usr) | |||
545 | /* | 545 | /* |
546 | * The out of line fixup for the ldrt instructions above. | 546 | * The out of line fixup for the ldrt instructions above. |
547 | */ | 547 | */ |
548 | .pushsection .fixup, "ax" | 548 | .pushsection .text.fixup, "ax" |
549 | .align 2 | 549 | .align 2 |
550 | 4: str r4, [sp, #S_PC] @ retry current instruction | 550 | 4: str r4, [sp, #S_PC] @ retry current instruction |
551 | ret r9 | 551 | ret r9 |
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S index cc176b67c134..aebfbf79a1a3 100644 --- a/arch/arm/kernel/head-nommu.S +++ b/arch/arm/kernel/head-nommu.S | |||
@@ -80,9 +80,9 @@ ENTRY(stext) | |||
80 | ldr r13, =__mmap_switched @ address to jump to after | 80 | ldr r13, =__mmap_switched @ address to jump to after |
81 | @ initialising sctlr | 81 | @ initialising sctlr |
82 | adr lr, BSYM(1f) @ return (PIC) address | 82 | adr lr, BSYM(1f) @ return (PIC) address |
83 | ARM( add pc, r10, #PROCINFO_INITFUNC ) | 83 | ldr r12, [r10, #PROCINFO_INITFUNC] |
84 | THUMB( add r12, r10, #PROCINFO_INITFUNC ) | 84 | add r12, r12, r10 |
85 | THUMB( ret r12 ) | 85 | ret r12 |
86 | 1: b __after_proc_init | 86 | 1: b __after_proc_init |
87 | ENDPROC(stext) | 87 | ENDPROC(stext) |
88 | 88 | ||
@@ -117,9 +117,9 @@ ENTRY(secondary_startup) | |||
117 | 117 | ||
118 | adr lr, BSYM(__after_proc_init) @ return address | 118 | adr lr, BSYM(__after_proc_init) @ return address |
119 | mov r13, r12 @ __secondary_switched address | 119 | mov r13, r12 @ __secondary_switched address |
120 | ARM( add pc, r10, #PROCINFO_INITFUNC ) | 120 | ldr r12, [r10, #PROCINFO_INITFUNC] |
121 | THUMB( add r12, r10, #PROCINFO_INITFUNC ) | 121 | add r12, r12, r10 |
122 | THUMB( ret r12 ) | 122 | ret r12 |
123 | ENDPROC(secondary_startup) | 123 | ENDPROC(secondary_startup) |
124 | 124 | ||
125 | ENTRY(__secondary_switched) | 125 | ENTRY(__secondary_switched) |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 01963273c07a..3637973a9708 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -138,9 +138,9 @@ ENTRY(stext) | |||
138 | @ mmu has been enabled | 138 | @ mmu has been enabled |
139 | adr lr, BSYM(1f) @ return (PIC) address | 139 | adr lr, BSYM(1f) @ return (PIC) address |
140 | mov r8, r4 @ set TTBR1 to swapper_pg_dir | 140 | mov r8, r4 @ set TTBR1 to swapper_pg_dir |
141 | ARM( add pc, r10, #PROCINFO_INITFUNC ) | 141 | ldr r12, [r10, #PROCINFO_INITFUNC] |
142 | THUMB( add r12, r10, #PROCINFO_INITFUNC ) | 142 | add r12, r12, r10 |
143 | THUMB( ret r12 ) | 143 | ret r12 |
144 | 1: b __enable_mmu | 144 | 1: b __enable_mmu |
145 | ENDPROC(stext) | 145 | ENDPROC(stext) |
146 | .ltorg | 146 | .ltorg |
@@ -386,10 +386,10 @@ ENTRY(secondary_startup) | |||
386 | ldr r8, [r7, lr] @ get secondary_data.swapper_pg_dir | 386 | ldr r8, [r7, lr] @ get secondary_data.swapper_pg_dir |
387 | adr lr, BSYM(__enable_mmu) @ return address | 387 | adr lr, BSYM(__enable_mmu) @ return address |
388 | mov r13, r12 @ __secondary_switched address | 388 | mov r13, r12 @ __secondary_switched address |
389 | ARM( add pc, r10, #PROCINFO_INITFUNC ) @ initialise processor | 389 | ldr r12, [r10, #PROCINFO_INITFUNC] |
390 | @ (return control reg) | 390 | add r12, r12, r10 @ initialise processor |
391 | THUMB( add r12, r10, #PROCINFO_INITFUNC ) | 391 | @ (return control reg) |
392 | THUMB( ret r12 ) | 392 | ret r12 |
393 | ENDPROC(secondary_startup) | 393 | ENDPROC(secondary_startup) |
394 | ENDPROC(secondary_startup_arm) | 394 | ENDPROC(secondary_startup_arm) |
395 | 395 | ||
diff --git a/arch/arm/kernel/hibernate.c b/arch/arm/kernel/hibernate.c index c4cc50e58c13..a71501ff6f18 100644 --- a/arch/arm/kernel/hibernate.c +++ b/arch/arm/kernel/hibernate.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/suspend.h> | 22 | #include <asm/suspend.h> |
23 | #include <asm/memory.h> | 23 | #include <asm/memory.h> |
24 | #include <asm/sections.h> | 24 | #include <asm/sections.h> |
25 | #include "reboot.h" | ||
25 | 26 | ||
26 | int pfn_is_nosave(unsigned long pfn) | 27 | int pfn_is_nosave(unsigned long pfn) |
27 | { | 28 | { |
@@ -61,7 +62,7 @@ static int notrace arch_save_image(unsigned long unused) | |||
61 | 62 | ||
62 | ret = swsusp_save(); | 63 | ret = swsusp_save(); |
63 | if (ret == 0) | 64 | if (ret == 0) |
64 | soft_restart(virt_to_phys(cpu_resume)); | 65 | _soft_restart(virt_to_phys(cpu_resume), false); |
65 | return ret; | 66 | return ret; |
66 | } | 67 | } |
67 | 68 | ||
@@ -86,7 +87,7 @@ static void notrace arch_restore_image(void *unused) | |||
86 | for (pbe = restore_pblist; pbe; pbe = pbe->next) | 87 | for (pbe = restore_pblist; pbe; pbe = pbe->next) |
87 | copy_page(pbe->orig_address, pbe->address); | 88 | copy_page(pbe->orig_address, pbe->address); |
88 | 89 | ||
89 | soft_restart(virt_to_phys(cpu_resume)); | 90 | _soft_restart(virt_to_phys(cpu_resume), false); |
90 | } | 91 | } |
91 | 92 | ||
92 | static u64 resume_stack[PAGE_SIZE/2/sizeof(u64)] __nosavedata; | 93 | static u64 resume_stack[PAGE_SIZE/2/sizeof(u64)] __nosavedata; |
@@ -99,7 +100,6 @@ static u64 resume_stack[PAGE_SIZE/2/sizeof(u64)] __nosavedata; | |||
99 | */ | 100 | */ |
100 | int swsusp_arch_resume(void) | 101 | int swsusp_arch_resume(void) |
101 | { | 102 | { |
102 | extern void call_with_stack(void (*fn)(void *), void *arg, void *sp); | ||
103 | call_with_stack(arch_restore_image, 0, | 103 | call_with_stack(arch_restore_image, 0, |
104 | resume_stack + ARRAY_SIZE(resume_stack)); | 104 | resume_stack + ARRAY_SIZE(resume_stack)); |
105 | return 0; | 105 | return 0; |
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index de2b085ad753..8bf3b7c09888 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
@@ -46,7 +46,8 @@ int machine_kexec_prepare(struct kimage *image) | |||
46 | * and implements CPU hotplug for the current HW. If not, we won't be | 46 | * and implements CPU hotplug for the current HW. If not, we won't be |
47 | * able to kexec reliably, so fail the prepare operation. | 47 | * able to kexec reliably, so fail the prepare operation. |
48 | */ | 48 | */ |
49 | if (num_possible_cpus() > 1 && !platform_can_cpu_hotplug()) | 49 | if (num_possible_cpus() > 1 && platform_can_secondary_boot() && |
50 | !platform_can_cpu_hotplug()) | ||
50 | return -EINVAL; | 51 | return -EINVAL; |
51 | 52 | ||
52 | /* | 53 | /* |
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 2e11961f65ae..af791f4a6205 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
@@ -98,14 +98,19 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, | |||
98 | case R_ARM_PC24: | 98 | case R_ARM_PC24: |
99 | case R_ARM_CALL: | 99 | case R_ARM_CALL: |
100 | case R_ARM_JUMP24: | 100 | case R_ARM_JUMP24: |
101 | if (sym->st_value & 3) { | ||
102 | pr_err("%s: section %u reloc %u sym '%s': unsupported interworking call (ARM -> Thumb)\n", | ||
103 | module->name, relindex, i, symname); | ||
104 | return -ENOEXEC; | ||
105 | } | ||
106 | |||
101 | offset = __mem_to_opcode_arm(*(u32 *)loc); | 107 | offset = __mem_to_opcode_arm(*(u32 *)loc); |
102 | offset = (offset & 0x00ffffff) << 2; | 108 | offset = (offset & 0x00ffffff) << 2; |
103 | if (offset & 0x02000000) | 109 | if (offset & 0x02000000) |
104 | offset -= 0x04000000; | 110 | offset -= 0x04000000; |
105 | 111 | ||
106 | offset += sym->st_value - loc; | 112 | offset += sym->st_value - loc; |
107 | if (offset & 3 || | 113 | if (offset <= (s32)0xfe000000 || |
108 | offset <= (s32)0xfe000000 || | ||
109 | offset >= (s32)0x02000000) { | 114 | offset >= (s32)0x02000000) { |
110 | pr_err("%s: section %u reloc %u sym '%s': relocation %u out of range (%#lx -> %#x)\n", | 115 | pr_err("%s: section %u reloc %u sym '%s': relocation %u out of range (%#lx -> %#x)\n", |
111 | module->name, relindex, i, symname, | 116 | module->name, relindex, i, symname, |
@@ -155,6 +160,22 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, | |||
155 | #ifdef CONFIG_THUMB2_KERNEL | 160 | #ifdef CONFIG_THUMB2_KERNEL |
156 | case R_ARM_THM_CALL: | 161 | case R_ARM_THM_CALL: |
157 | case R_ARM_THM_JUMP24: | 162 | case R_ARM_THM_JUMP24: |
163 | /* | ||
164 | * For function symbols, only Thumb addresses are | ||
165 | * allowed (no interworking). | ||
166 | * | ||
167 | * For non-function symbols, the destination | ||
168 | * has no specific ARM/Thumb disposition, so | ||
169 | * the branch is resolved under the assumption | ||
170 | * that interworking is not required. | ||
171 | */ | ||
172 | if (ELF32_ST_TYPE(sym->st_info) == STT_FUNC && | ||
173 | !(sym->st_value & 1)) { | ||
174 | pr_err("%s: section %u reloc %u sym '%s': unsupported interworking call (Thumb -> ARM)\n", | ||
175 | module->name, relindex, i, symname); | ||
176 | return -ENOEXEC; | ||
177 | } | ||
178 | |||
158 | upper = __mem_to_opcode_thumb16(*(u16 *)loc); | 179 | upper = __mem_to_opcode_thumb16(*(u16 *)loc); |
159 | lower = __mem_to_opcode_thumb16(*(u16 *)(loc + 2)); | 180 | lower = __mem_to_opcode_thumb16(*(u16 *)(loc + 2)); |
160 | 181 | ||
@@ -182,18 +203,7 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, | |||
182 | offset -= 0x02000000; | 203 | offset -= 0x02000000; |
183 | offset += sym->st_value - loc; | 204 | offset += sym->st_value - loc; |
184 | 205 | ||
185 | /* | 206 | if (offset <= (s32)0xff000000 || |
186 | * For function symbols, only Thumb addresses are | ||
187 | * allowed (no interworking). | ||
188 | * | ||
189 | * For non-function symbols, the destination | ||
190 | * has no specific ARM/Thumb disposition, so | ||
191 | * the branch is resolved under the assumption | ||
192 | * that interworking is not required. | ||
193 | */ | ||
194 | if ((ELF32_ST_TYPE(sym->st_info) == STT_FUNC && | ||
195 | !(offset & 1)) || | ||
196 | offset <= (s32)0xff000000 || | ||
197 | offset >= (s32)0x01000000) { | 207 | offset >= (s32)0x01000000) { |
198 | pr_err("%s: section %u reloc %u sym '%s': relocation %u out of range (%#lx -> %#x)\n", | 208 | pr_err("%s: section %u reloc %u sym '%s': relocation %u out of range (%#lx -> %#x)\n", |
199 | module->name, relindex, i, symname, | 209 | module->name, relindex, i, symname, |
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 557e128e4df0..4a86a0133ac3 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -259,20 +259,29 @@ out: | |||
259 | } | 259 | } |
260 | 260 | ||
261 | static int | 261 | static int |
262 | validate_event(struct pmu_hw_events *hw_events, | 262 | validate_event(struct pmu *pmu, struct pmu_hw_events *hw_events, |
263 | struct perf_event *event) | 263 | struct perf_event *event) |
264 | { | 264 | { |
265 | struct arm_pmu *armpmu = to_arm_pmu(event->pmu); | 265 | struct arm_pmu *armpmu; |
266 | 266 | ||
267 | if (is_software_event(event)) | 267 | if (is_software_event(event)) |
268 | return 1; | 268 | return 1; |
269 | 269 | ||
270 | /* | ||
271 | * Reject groups spanning multiple HW PMUs (e.g. CPU + CCI). The | ||
272 | * core perf code won't check that the pmu->ctx == leader->ctx | ||
273 | * until after pmu->event_init(event). | ||
274 | */ | ||
275 | if (event->pmu != pmu) | ||
276 | return 0; | ||
277 | |||
270 | if (event->state < PERF_EVENT_STATE_OFF) | 278 | if (event->state < PERF_EVENT_STATE_OFF) |
271 | return 1; | 279 | return 1; |
272 | 280 | ||
273 | if (event->state == PERF_EVENT_STATE_OFF && !event->attr.enable_on_exec) | 281 | if (event->state == PERF_EVENT_STATE_OFF && !event->attr.enable_on_exec) |
274 | return 1; | 282 | return 1; |
275 | 283 | ||
284 | armpmu = to_arm_pmu(event->pmu); | ||
276 | return armpmu->get_event_idx(hw_events, event) >= 0; | 285 | return armpmu->get_event_idx(hw_events, event) >= 0; |
277 | } | 286 | } |
278 | 287 | ||
@@ -288,15 +297,15 @@ validate_group(struct perf_event *event) | |||
288 | */ | 297 | */ |
289 | memset(&fake_pmu.used_mask, 0, sizeof(fake_pmu.used_mask)); | 298 | memset(&fake_pmu.used_mask, 0, sizeof(fake_pmu.used_mask)); |
290 | 299 | ||
291 | if (!validate_event(&fake_pmu, leader)) | 300 | if (!validate_event(event->pmu, &fake_pmu, leader)) |
292 | return -EINVAL; | 301 | return -EINVAL; |
293 | 302 | ||
294 | list_for_each_entry(sibling, &leader->sibling_list, group_entry) { | 303 | list_for_each_entry(sibling, &leader->sibling_list, group_entry) { |
295 | if (!validate_event(&fake_pmu, sibling)) | 304 | if (!validate_event(event->pmu, &fake_pmu, sibling)) |
296 | return -EINVAL; | 305 | return -EINVAL; |
297 | } | 306 | } |
298 | 307 | ||
299 | if (!validate_event(&fake_pmu, event)) | 308 | if (!validate_event(event->pmu, &fake_pmu, event)) |
300 | return -EINVAL; | 309 | return -EINVAL; |
301 | 310 | ||
302 | return 0; | 311 | return 0; |
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c index 61b53c46edfa..91c7ba182dcd 100644 --- a/arch/arm/kernel/perf_event_cpu.c +++ b/arch/arm/kernel/perf_event_cpu.c | |||
@@ -92,11 +92,16 @@ static void cpu_pmu_free_irq(struct arm_pmu *cpu_pmu) | |||
92 | free_percpu_irq(irq, &hw_events->percpu_pmu); | 92 | free_percpu_irq(irq, &hw_events->percpu_pmu); |
93 | } else { | 93 | } else { |
94 | for (i = 0; i < irqs; ++i) { | 94 | for (i = 0; i < irqs; ++i) { |
95 | if (!cpumask_test_and_clear_cpu(i, &cpu_pmu->active_irqs)) | 95 | int cpu = i; |
96 | |||
97 | if (cpu_pmu->irq_affinity) | ||
98 | cpu = cpu_pmu->irq_affinity[i]; | ||
99 | |||
100 | if (!cpumask_test_and_clear_cpu(cpu, &cpu_pmu->active_irqs)) | ||
96 | continue; | 101 | continue; |
97 | irq = platform_get_irq(pmu_device, i); | 102 | irq = platform_get_irq(pmu_device, i); |
98 | if (irq >= 0) | 103 | if (irq >= 0) |
99 | free_irq(irq, per_cpu_ptr(&hw_events->percpu_pmu, i)); | 104 | free_irq(irq, per_cpu_ptr(&hw_events->percpu_pmu, cpu)); |
100 | } | 105 | } |
101 | } | 106 | } |
102 | } | 107 | } |
@@ -128,32 +133,37 @@ static int cpu_pmu_request_irq(struct arm_pmu *cpu_pmu, irq_handler_t handler) | |||
128 | on_each_cpu(cpu_pmu_enable_percpu_irq, &irq, 1); | 133 | on_each_cpu(cpu_pmu_enable_percpu_irq, &irq, 1); |
129 | } else { | 134 | } else { |
130 | for (i = 0; i < irqs; ++i) { | 135 | for (i = 0; i < irqs; ++i) { |
136 | int cpu = i; | ||
137 | |||
131 | err = 0; | 138 | err = 0; |
132 | irq = platform_get_irq(pmu_device, i); | 139 | irq = platform_get_irq(pmu_device, i); |
133 | if (irq < 0) | 140 | if (irq < 0) |
134 | continue; | 141 | continue; |
135 | 142 | ||
143 | if (cpu_pmu->irq_affinity) | ||
144 | cpu = cpu_pmu->irq_affinity[i]; | ||
145 | |||
136 | /* | 146 | /* |
137 | * If we have a single PMU interrupt that we can't shift, | 147 | * If we have a single PMU interrupt that we can't shift, |
138 | * assume that we're running on a uniprocessor machine and | 148 | * assume that we're running on a uniprocessor machine and |
139 | * continue. Otherwise, continue without this interrupt. | 149 | * continue. Otherwise, continue without this interrupt. |
140 | */ | 150 | */ |
141 | if (irq_set_affinity(irq, cpumask_of(i)) && irqs > 1) { | 151 | if (irq_set_affinity(irq, cpumask_of(cpu)) && irqs > 1) { |
142 | pr_warn("unable to set irq affinity (irq=%d, cpu=%u)\n", | 152 | pr_warn("unable to set irq affinity (irq=%d, cpu=%u)\n", |
143 | irq, i); | 153 | irq, cpu); |
144 | continue; | 154 | continue; |
145 | } | 155 | } |
146 | 156 | ||
147 | err = request_irq(irq, handler, | 157 | err = request_irq(irq, handler, |
148 | IRQF_NOBALANCING | IRQF_NO_THREAD, "arm-pmu", | 158 | IRQF_NOBALANCING | IRQF_NO_THREAD, "arm-pmu", |
149 | per_cpu_ptr(&hw_events->percpu_pmu, i)); | 159 | per_cpu_ptr(&hw_events->percpu_pmu, cpu)); |
150 | if (err) { | 160 | if (err) { |
151 | pr_err("unable to request IRQ%d for ARM PMU counters\n", | 161 | pr_err("unable to request IRQ%d for ARM PMU counters\n", |
152 | irq); | 162 | irq); |
153 | return err; | 163 | return err; |
154 | } | 164 | } |
155 | 165 | ||
156 | cpumask_set_cpu(i, &cpu_pmu->active_irqs); | 166 | cpumask_set_cpu(cpu, &cpu_pmu->active_irqs); |
157 | } | 167 | } |
158 | } | 168 | } |
159 | 169 | ||
@@ -243,6 +253,8 @@ static const struct of_device_id cpu_pmu_of_device_ids[] = { | |||
243 | {.compatible = "arm,arm1176-pmu", .data = armv6_1176_pmu_init}, | 253 | {.compatible = "arm,arm1176-pmu", .data = armv6_1176_pmu_init}, |
244 | {.compatible = "arm,arm1136-pmu", .data = armv6_1136_pmu_init}, | 254 | {.compatible = "arm,arm1136-pmu", .data = armv6_1136_pmu_init}, |
245 | {.compatible = "qcom,krait-pmu", .data = krait_pmu_init}, | 255 | {.compatible = "qcom,krait-pmu", .data = krait_pmu_init}, |
256 | {.compatible = "qcom,scorpion-pmu", .data = scorpion_pmu_init}, | ||
257 | {.compatible = "qcom,scorpion-mp-pmu", .data = scorpion_mp_pmu_init}, | ||
246 | {}, | 258 | {}, |
247 | }; | 259 | }; |
248 | 260 | ||
@@ -289,6 +301,48 @@ static int probe_current_pmu(struct arm_pmu *pmu) | |||
289 | return ret; | 301 | return ret; |
290 | } | 302 | } |
291 | 303 | ||
304 | static int of_pmu_irq_cfg(struct platform_device *pdev) | ||
305 | { | ||
306 | int i; | ||
307 | int *irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL); | ||
308 | |||
309 | if (!irqs) | ||
310 | return -ENOMEM; | ||
311 | |||
312 | for (i = 0; i < pdev->num_resources; ++i) { | ||
313 | struct device_node *dn; | ||
314 | int cpu; | ||
315 | |||
316 | dn = of_parse_phandle(pdev->dev.of_node, "interrupt-affinity", | ||
317 | i); | ||
318 | if (!dn) { | ||
319 | pr_warn("Failed to parse %s/interrupt-affinity[%d]\n", | ||
320 | of_node_full_name(dn), i); | ||
321 | break; | ||
322 | } | ||
323 | |||
324 | for_each_possible_cpu(cpu) | ||
325 | if (arch_find_n_match_cpu_physical_id(dn, cpu, NULL)) | ||
326 | break; | ||
327 | |||
328 | of_node_put(dn); | ||
329 | if (cpu >= nr_cpu_ids) { | ||
330 | pr_warn("Failed to find logical CPU for %s\n", | ||
331 | dn->name); | ||
332 | break; | ||
333 | } | ||
334 | |||
335 | irqs[i] = cpu; | ||
336 | } | ||
337 | |||
338 | if (i == pdev->num_resources) | ||
339 | cpu_pmu->irq_affinity = irqs; | ||
340 | else | ||
341 | kfree(irqs); | ||
342 | |||
343 | return 0; | ||
344 | } | ||
345 | |||
292 | static int cpu_pmu_device_probe(struct platform_device *pdev) | 346 | static int cpu_pmu_device_probe(struct platform_device *pdev) |
293 | { | 347 | { |
294 | const struct of_device_id *of_id; | 348 | const struct of_device_id *of_id; |
@@ -313,7 +367,10 @@ static int cpu_pmu_device_probe(struct platform_device *pdev) | |||
313 | 367 | ||
314 | if (node && (of_id = of_match_node(cpu_pmu_of_device_ids, pdev->dev.of_node))) { | 368 | if (node && (of_id = of_match_node(cpu_pmu_of_device_ids, pdev->dev.of_node))) { |
315 | init_fn = of_id->data; | 369 | init_fn = of_id->data; |
316 | ret = init_fn(pmu); | 370 | |
371 | ret = of_pmu_irq_cfg(pdev); | ||
372 | if (!ret) | ||
373 | ret = init_fn(pmu); | ||
317 | } else { | 374 | } else { |
318 | ret = probe_current_pmu(pmu); | 375 | ret = probe_current_pmu(pmu); |
319 | } | 376 | } |
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index 8993770c47de..f4207a4dcb01 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c | |||
@@ -140,6 +140,23 @@ enum krait_perf_types { | |||
140 | KRAIT_PERFCTR_L1_DTLB_ACCESS = 0x12210, | 140 | KRAIT_PERFCTR_L1_DTLB_ACCESS = 0x12210, |
141 | }; | 141 | }; |
142 | 142 | ||
143 | /* ARMv7 Scorpion specific event types */ | ||
144 | enum scorpion_perf_types { | ||
145 | SCORPION_LPM0_GROUP0 = 0x4c, | ||
146 | SCORPION_LPM1_GROUP0 = 0x50, | ||
147 | SCORPION_LPM2_GROUP0 = 0x54, | ||
148 | SCORPION_L2LPM_GROUP0 = 0x58, | ||
149 | SCORPION_VLPM_GROUP0 = 0x5c, | ||
150 | |||
151 | SCORPION_ICACHE_ACCESS = 0x10053, | ||
152 | SCORPION_ICACHE_MISS = 0x10052, | ||
153 | |||
154 | SCORPION_DTLB_ACCESS = 0x12013, | ||
155 | SCORPION_DTLB_MISS = 0x12012, | ||
156 | |||
157 | SCORPION_ITLB_MISS = 0x12021, | ||
158 | }; | ||
159 | |||
143 | /* | 160 | /* |
144 | * Cortex-A8 HW events mapping | 161 | * Cortex-A8 HW events mapping |
145 | * | 162 | * |
@@ -482,6 +499,49 @@ static const unsigned krait_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | |||
482 | }; | 499 | }; |
483 | 500 | ||
484 | /* | 501 | /* |
502 | * Scorpion HW events mapping | ||
503 | */ | ||
504 | static const unsigned scorpion_perf_map[PERF_COUNT_HW_MAX] = { | ||
505 | PERF_MAP_ALL_UNSUPPORTED, | ||
506 | [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, | ||
507 | [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, | ||
508 | [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, | ||
509 | [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
510 | [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_CLOCK_CYCLES, | ||
511 | }; | ||
512 | |||
513 | static const unsigned scorpion_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] | ||
514 | [PERF_COUNT_HW_CACHE_OP_MAX] | ||
515 | [PERF_COUNT_HW_CACHE_RESULT_MAX] = { | ||
516 | PERF_CACHE_MAP_ALL_UNSUPPORTED, | ||
517 | /* | ||
518 | * The performance counters don't differentiate between read and write | ||
519 | * accesses/misses so this isn't strictly correct, but it's the best we | ||
520 | * can do. Writes and reads get combined. | ||
521 | */ | ||
522 | [C(L1D)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, | ||
523 | [C(L1D)][C(OP_READ)][C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, | ||
524 | [C(L1D)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, | ||
525 | [C(L1D)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, | ||
526 | [C(L1I)][C(OP_READ)][C(RESULT_ACCESS)] = SCORPION_ICACHE_ACCESS, | ||
527 | [C(L1I)][C(OP_READ)][C(RESULT_MISS)] = SCORPION_ICACHE_MISS, | ||
528 | /* | ||
529 | * Only ITLB misses and DTLB refills are supported. If users want the | ||
530 | * DTLB refills misses a raw counter must be used. | ||
531 | */ | ||
532 | [C(DTLB)][C(OP_READ)][C(RESULT_ACCESS)] = SCORPION_DTLB_ACCESS, | ||
533 | [C(DTLB)][C(OP_READ)][C(RESULT_MISS)] = SCORPION_DTLB_MISS, | ||
534 | [C(DTLB)][C(OP_WRITE)][C(RESULT_ACCESS)] = SCORPION_DTLB_ACCESS, | ||
535 | [C(DTLB)][C(OP_WRITE)][C(RESULT_MISS)] = SCORPION_DTLB_MISS, | ||
536 | [C(ITLB)][C(OP_READ)][C(RESULT_MISS)] = SCORPION_ITLB_MISS, | ||
537 | [C(ITLB)][C(OP_WRITE)][C(RESULT_MISS)] = SCORPION_ITLB_MISS, | ||
538 | [C(BPU)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, | ||
539 | [C(BPU)][C(OP_READ)][C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
540 | [C(BPU)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, | ||
541 | [C(BPU)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, | ||
542 | }; | ||
543 | |||
544 | /* | ||
485 | * Perf Events' indices | 545 | * Perf Events' indices |
486 | */ | 546 | */ |
487 | #define ARMV7_IDX_CYCLE_COUNTER 0 | 547 | #define ARMV7_IDX_CYCLE_COUNTER 0 |
@@ -976,6 +1036,12 @@ static int krait_map_event_no_branch(struct perf_event *event) | |||
976 | &krait_perf_cache_map, 0xFFFFF); | 1036 | &krait_perf_cache_map, 0xFFFFF); |
977 | } | 1037 | } |
978 | 1038 | ||
1039 | static int scorpion_map_event(struct perf_event *event) | ||
1040 | { | ||
1041 | return armpmu_map_event(event, &scorpion_perf_map, | ||
1042 | &scorpion_perf_cache_map, 0xFFFFF); | ||
1043 | } | ||
1044 | |||
979 | static void armv7pmu_init(struct arm_pmu *cpu_pmu) | 1045 | static void armv7pmu_init(struct arm_pmu *cpu_pmu) |
980 | { | 1046 | { |
981 | cpu_pmu->handle_irq = armv7pmu_handle_irq; | 1047 | cpu_pmu->handle_irq = armv7pmu_handle_irq; |
@@ -1103,6 +1169,12 @@ static int armv7_a17_pmu_init(struct arm_pmu *cpu_pmu) | |||
1103 | #define KRAIT_EVENT_MASK (KRAIT_EVENT | VENUM_EVENT) | 1169 | #define KRAIT_EVENT_MASK (KRAIT_EVENT | VENUM_EVENT) |
1104 | #define PMRESRn_EN BIT(31) | 1170 | #define PMRESRn_EN BIT(31) |
1105 | 1171 | ||
1172 | #define EVENT_REGION(event) (((event) >> 12) & 0xf) /* R */ | ||
1173 | #define EVENT_GROUP(event) ((event) & 0xf) /* G */ | ||
1174 | #define EVENT_CODE(event) (((event) >> 4) & 0xff) /* CC */ | ||
1175 | #define EVENT_VENUM(event) (!!(event & VENUM_EVENT)) /* N=2 */ | ||
1176 | #define EVENT_CPU(event) (!!(event & KRAIT_EVENT)) /* N=1 */ | ||
1177 | |||
1106 | static u32 krait_read_pmresrn(int n) | 1178 | static u32 krait_read_pmresrn(int n) |
1107 | { | 1179 | { |
1108 | u32 val; | 1180 | u32 val; |
@@ -1141,19 +1213,19 @@ static void krait_write_pmresrn(int n, u32 val) | |||
1141 | } | 1213 | } |
1142 | } | 1214 | } |
1143 | 1215 | ||
1144 | static u32 krait_read_vpmresr0(void) | 1216 | static u32 venum_read_pmresr(void) |
1145 | { | 1217 | { |
1146 | u32 val; | 1218 | u32 val; |
1147 | asm volatile("mrc p10, 7, %0, c11, c0, 0" : "=r" (val)); | 1219 | asm volatile("mrc p10, 7, %0, c11, c0, 0" : "=r" (val)); |
1148 | return val; | 1220 | return val; |
1149 | } | 1221 | } |
1150 | 1222 | ||
1151 | static void krait_write_vpmresr0(u32 val) | 1223 | static void venum_write_pmresr(u32 val) |
1152 | { | 1224 | { |
1153 | asm volatile("mcr p10, 7, %0, c11, c0, 0" : : "r" (val)); | 1225 | asm volatile("mcr p10, 7, %0, c11, c0, 0" : : "r" (val)); |
1154 | } | 1226 | } |
1155 | 1227 | ||
1156 | static void krait_pre_vpmresr0(u32 *venum_orig_val, u32 *fp_orig_val) | 1228 | static void venum_pre_pmresr(u32 *venum_orig_val, u32 *fp_orig_val) |
1157 | { | 1229 | { |
1158 | u32 venum_new_val; | 1230 | u32 venum_new_val; |
1159 | u32 fp_new_val; | 1231 | u32 fp_new_val; |
@@ -1170,7 +1242,7 @@ static void krait_pre_vpmresr0(u32 *venum_orig_val, u32 *fp_orig_val) | |||
1170 | fmxr(FPEXC, fp_new_val); | 1242 | fmxr(FPEXC, fp_new_val); |
1171 | } | 1243 | } |
1172 | 1244 | ||
1173 | static void krait_post_vpmresr0(u32 venum_orig_val, u32 fp_orig_val) | 1245 | static void venum_post_pmresr(u32 venum_orig_val, u32 fp_orig_val) |
1174 | { | 1246 | { |
1175 | BUG_ON(preemptible()); | 1247 | BUG_ON(preemptible()); |
1176 | /* Restore FPEXC */ | 1248 | /* Restore FPEXC */ |
@@ -1193,16 +1265,11 @@ static void krait_evt_setup(int idx, u32 config_base) | |||
1193 | u32 val; | 1265 | u32 val; |
1194 | u32 mask; | 1266 | u32 mask; |
1195 | u32 vval, fval; | 1267 | u32 vval, fval; |
1196 | unsigned int region; | 1268 | unsigned int region = EVENT_REGION(config_base); |
1197 | unsigned int group; | 1269 | unsigned int group = EVENT_GROUP(config_base); |
1198 | unsigned int code; | 1270 | unsigned int code = EVENT_CODE(config_base); |
1199 | unsigned int group_shift; | 1271 | unsigned int group_shift; |
1200 | bool venum_event; | 1272 | bool venum_event = EVENT_VENUM(config_base); |
1201 | |||
1202 | venum_event = !!(config_base & VENUM_EVENT); | ||
1203 | region = (config_base >> 12) & 0xf; | ||
1204 | code = (config_base >> 4) & 0xff; | ||
1205 | group = (config_base >> 0) & 0xf; | ||
1206 | 1273 | ||
1207 | group_shift = group * 8; | 1274 | group_shift = group * 8; |
1208 | mask = 0xff << group_shift; | 1275 | mask = 0xff << group_shift; |
@@ -1217,16 +1284,14 @@ static void krait_evt_setup(int idx, u32 config_base) | |||
1217 | val |= config_base & (ARMV7_EXCLUDE_USER | ARMV7_EXCLUDE_PL1); | 1284 | val |= config_base & (ARMV7_EXCLUDE_USER | ARMV7_EXCLUDE_PL1); |
1218 | armv7_pmnc_write_evtsel(idx, val); | 1285 | armv7_pmnc_write_evtsel(idx, val); |
1219 | 1286 | ||
1220 | asm volatile("mcr p15, 0, %0, c9, c15, 0" : : "r" (0)); | ||
1221 | |||
1222 | if (venum_event) { | 1287 | if (venum_event) { |
1223 | krait_pre_vpmresr0(&vval, &fval); | 1288 | venum_pre_pmresr(&vval, &fval); |
1224 | val = krait_read_vpmresr0(); | 1289 | val = venum_read_pmresr(); |
1225 | val &= ~mask; | 1290 | val &= ~mask; |
1226 | val |= code << group_shift; | 1291 | val |= code << group_shift; |
1227 | val |= PMRESRn_EN; | 1292 | val |= PMRESRn_EN; |
1228 | krait_write_vpmresr0(val); | 1293 | venum_write_pmresr(val); |
1229 | krait_post_vpmresr0(vval, fval); | 1294 | venum_post_pmresr(vval, fval); |
1230 | } else { | 1295 | } else { |
1231 | val = krait_read_pmresrn(region); | 1296 | val = krait_read_pmresrn(region); |
1232 | val &= ~mask; | 1297 | val &= ~mask; |
@@ -1236,7 +1301,7 @@ static void krait_evt_setup(int idx, u32 config_base) | |||
1236 | } | 1301 | } |
1237 | } | 1302 | } |
1238 | 1303 | ||
1239 | static u32 krait_clear_pmresrn_group(u32 val, int group) | 1304 | static u32 clear_pmresrn_group(u32 val, int group) |
1240 | { | 1305 | { |
1241 | u32 mask; | 1306 | u32 mask; |
1242 | int group_shift; | 1307 | int group_shift; |
@@ -1256,23 +1321,19 @@ static void krait_clearpmu(u32 config_base) | |||
1256 | { | 1321 | { |
1257 | u32 val; | 1322 | u32 val; |
1258 | u32 vval, fval; | 1323 | u32 vval, fval; |
1259 | unsigned int region; | 1324 | unsigned int region = EVENT_REGION(config_base); |
1260 | unsigned int group; | 1325 | unsigned int group = EVENT_GROUP(config_base); |
1261 | bool venum_event; | 1326 | bool venum_event = EVENT_VENUM(config_base); |
1262 | |||
1263 | venum_event = !!(config_base & VENUM_EVENT); | ||
1264 | region = (config_base >> 12) & 0xf; | ||
1265 | group = (config_base >> 0) & 0xf; | ||
1266 | 1327 | ||
1267 | if (venum_event) { | 1328 | if (venum_event) { |
1268 | krait_pre_vpmresr0(&vval, &fval); | 1329 | venum_pre_pmresr(&vval, &fval); |
1269 | val = krait_read_vpmresr0(); | 1330 | val = venum_read_pmresr(); |
1270 | val = krait_clear_pmresrn_group(val, group); | 1331 | val = clear_pmresrn_group(val, group); |
1271 | krait_write_vpmresr0(val); | 1332 | venum_write_pmresr(val); |
1272 | krait_post_vpmresr0(vval, fval); | 1333 | venum_post_pmresr(vval, fval); |
1273 | } else { | 1334 | } else { |
1274 | val = krait_read_pmresrn(region); | 1335 | val = krait_read_pmresrn(region); |
1275 | val = krait_clear_pmresrn_group(val, group); | 1336 | val = clear_pmresrn_group(val, group); |
1276 | krait_write_pmresrn(region, val); | 1337 | krait_write_pmresrn(region, val); |
1277 | } | 1338 | } |
1278 | } | 1339 | } |
@@ -1342,6 +1403,8 @@ static void krait_pmu_enable_event(struct perf_event *event) | |||
1342 | static void krait_pmu_reset(void *info) | 1403 | static void krait_pmu_reset(void *info) |
1343 | { | 1404 | { |
1344 | u32 vval, fval; | 1405 | u32 vval, fval; |
1406 | struct arm_pmu *cpu_pmu = info; | ||
1407 | u32 idx, nb_cnt = cpu_pmu->num_events; | ||
1345 | 1408 | ||
1346 | armv7pmu_reset(info); | 1409 | armv7pmu_reset(info); |
1347 | 1410 | ||
@@ -1350,9 +1413,16 @@ static void krait_pmu_reset(void *info) | |||
1350 | krait_write_pmresrn(1, 0); | 1413 | krait_write_pmresrn(1, 0); |
1351 | krait_write_pmresrn(2, 0); | 1414 | krait_write_pmresrn(2, 0); |
1352 | 1415 | ||
1353 | krait_pre_vpmresr0(&vval, &fval); | 1416 | venum_pre_pmresr(&vval, &fval); |
1354 | krait_write_vpmresr0(0); | 1417 | venum_write_pmresr(0); |
1355 | krait_post_vpmresr0(vval, fval); | 1418 | venum_post_pmresr(vval, fval); |
1419 | |||
1420 | /* Reset PMxEVNCTCR to sane default */ | ||
1421 | for (idx = ARMV7_IDX_CYCLE_COUNTER; idx < nb_cnt; ++idx) { | ||
1422 | armv7_pmnc_select_counter(idx); | ||
1423 | asm volatile("mcr p15, 0, %0, c9, c15, 0" : : "r" (0)); | ||
1424 | } | ||
1425 | |||
1356 | } | 1426 | } |
1357 | 1427 | ||
1358 | static int krait_event_to_bit(struct perf_event *event, unsigned int region, | 1428 | static int krait_event_to_bit(struct perf_event *event, unsigned int region, |
@@ -1386,26 +1456,18 @@ static int krait_pmu_get_event_idx(struct pmu_hw_events *cpuc, | |||
1386 | { | 1456 | { |
1387 | int idx; | 1457 | int idx; |
1388 | int bit = -1; | 1458 | int bit = -1; |
1389 | unsigned int prefix; | ||
1390 | unsigned int region; | ||
1391 | unsigned int code; | ||
1392 | unsigned int group; | ||
1393 | bool krait_event; | ||
1394 | struct hw_perf_event *hwc = &event->hw; | 1459 | struct hw_perf_event *hwc = &event->hw; |
1460 | unsigned int region = EVENT_REGION(hwc->config_base); | ||
1461 | unsigned int code = EVENT_CODE(hwc->config_base); | ||
1462 | unsigned int group = EVENT_GROUP(hwc->config_base); | ||
1463 | bool venum_event = EVENT_VENUM(hwc->config_base); | ||
1464 | bool krait_event = EVENT_CPU(hwc->config_base); | ||
1395 | 1465 | ||
1396 | region = (hwc->config_base >> 12) & 0xf; | 1466 | if (venum_event || krait_event) { |
1397 | code = (hwc->config_base >> 4) & 0xff; | ||
1398 | group = (hwc->config_base >> 0) & 0xf; | ||
1399 | krait_event = !!(hwc->config_base & KRAIT_EVENT_MASK); | ||
1400 | |||
1401 | if (krait_event) { | ||
1402 | /* Ignore invalid events */ | 1467 | /* Ignore invalid events */ |
1403 | if (group > 3 || region > 2) | 1468 | if (group > 3 || region > 2) |
1404 | return -EINVAL; | 1469 | return -EINVAL; |
1405 | prefix = hwc->config_base & KRAIT_EVENT_MASK; | 1470 | if (venum_event && (code & 0xe0)) |
1406 | if (prefix != KRAIT_EVENT && prefix != VENUM_EVENT) | ||
1407 | return -EINVAL; | ||
1408 | if (prefix == VENUM_EVENT && (code & 0xe0)) | ||
1409 | return -EINVAL; | 1471 | return -EINVAL; |
1410 | 1472 | ||
1411 | bit = krait_event_to_bit(event, region, group); | 1473 | bit = krait_event_to_bit(event, region, group); |
@@ -1425,15 +1487,12 @@ static void krait_pmu_clear_event_idx(struct pmu_hw_events *cpuc, | |||
1425 | { | 1487 | { |
1426 | int bit; | 1488 | int bit; |
1427 | struct hw_perf_event *hwc = &event->hw; | 1489 | struct hw_perf_event *hwc = &event->hw; |
1428 | unsigned int region; | 1490 | unsigned int region = EVENT_REGION(hwc->config_base); |
1429 | unsigned int group; | 1491 | unsigned int group = EVENT_GROUP(hwc->config_base); |
1430 | bool krait_event; | 1492 | bool venum_event = EVENT_VENUM(hwc->config_base); |
1493 | bool krait_event = EVENT_CPU(hwc->config_base); | ||
1431 | 1494 | ||
1432 | region = (hwc->config_base >> 12) & 0xf; | 1495 | if (venum_event || krait_event) { |
1433 | group = (hwc->config_base >> 0) & 0xf; | ||
1434 | krait_event = !!(hwc->config_base & KRAIT_EVENT_MASK); | ||
1435 | |||
1436 | if (krait_event) { | ||
1437 | bit = krait_event_to_bit(event, region, group); | 1496 | bit = krait_event_to_bit(event, region, group); |
1438 | clear_bit(bit, cpuc->used_mask); | 1497 | clear_bit(bit, cpuc->used_mask); |
1439 | } | 1498 | } |
@@ -1458,6 +1517,344 @@ static int krait_pmu_init(struct arm_pmu *cpu_pmu) | |||
1458 | cpu_pmu->clear_event_idx = krait_pmu_clear_event_idx; | 1517 | cpu_pmu->clear_event_idx = krait_pmu_clear_event_idx; |
1459 | return 0; | 1518 | return 0; |
1460 | } | 1519 | } |
1520 | |||
1521 | /* | ||
1522 | * Scorpion Local Performance Monitor Register (LPMn) | ||
1523 | * | ||
1524 | * 31 30 24 16 8 0 | ||
1525 | * +--------------------------------+ | ||
1526 | * LPM0 | EN | CC | CC | CC | CC | N = 1, R = 0 | ||
1527 | * +--------------------------------+ | ||
1528 | * LPM1 | EN | CC | CC | CC | CC | N = 1, R = 1 | ||
1529 | * +--------------------------------+ | ||
1530 | * LPM2 | EN | CC | CC | CC | CC | N = 1, R = 2 | ||
1531 | * +--------------------------------+ | ||
1532 | * L2LPM | EN | CC | CC | CC | CC | N = 1, R = 3 | ||
1533 | * +--------------------------------+ | ||
1534 | * VLPM | EN | CC | CC | CC | CC | N = 2, R = ? | ||
1535 | * +--------------------------------+ | ||
1536 | * EN | G=3 | G=2 | G=1 | G=0 | ||
1537 | * | ||
1538 | * | ||
1539 | * Event Encoding: | ||
1540 | * | ||
1541 | * hwc->config_base = 0xNRCCG | ||
1542 | * | ||
1543 | * N = prefix, 1 for Scorpion CPU (LPMn/L2LPM), 2 for Venum VFP (VLPM) | ||
1544 | * R = region register | ||
1545 | * CC = class of events the group G is choosing from | ||
1546 | * G = group or particular event | ||
1547 | * | ||
1548 | * Example: 0x12021 is a Scorpion CPU event in LPM2's group 1 with code 2 | ||
1549 | * | ||
1550 | * A region (R) corresponds to a piece of the CPU (execution unit, instruction | ||
1551 | * unit, etc.) while the event code (CC) corresponds to a particular class of | ||
1552 | * events (interrupts for example). An event code is broken down into | ||
1553 | * groups (G) that can be mapped into the PMU (irq, fiqs, and irq+fiqs for | ||
1554 | * example). | ||
1555 | */ | ||
1556 | |||
1557 | static u32 scorpion_read_pmresrn(int n) | ||
1558 | { | ||
1559 | u32 val; | ||
1560 | |||
1561 | switch (n) { | ||
1562 | case 0: | ||
1563 | asm volatile("mrc p15, 0, %0, c15, c0, 0" : "=r" (val)); | ||
1564 | break; | ||
1565 | case 1: | ||
1566 | asm volatile("mrc p15, 1, %0, c15, c0, 0" : "=r" (val)); | ||
1567 | break; | ||
1568 | case 2: | ||
1569 | asm volatile("mrc p15, 2, %0, c15, c0, 0" : "=r" (val)); | ||
1570 | break; | ||
1571 | case 3: | ||
1572 | asm volatile("mrc p15, 3, %0, c15, c2, 0" : "=r" (val)); | ||
1573 | break; | ||
1574 | default: | ||
1575 | BUG(); /* Should be validated in scorpion_pmu_get_event_idx() */ | ||
1576 | } | ||
1577 | |||
1578 | return val; | ||
1579 | } | ||
1580 | |||
1581 | static void scorpion_write_pmresrn(int n, u32 val) | ||
1582 | { | ||
1583 | switch (n) { | ||
1584 | case 0: | ||
1585 | asm volatile("mcr p15, 0, %0, c15, c0, 0" : : "r" (val)); | ||
1586 | break; | ||
1587 | case 1: | ||
1588 | asm volatile("mcr p15, 1, %0, c15, c0, 0" : : "r" (val)); | ||
1589 | break; | ||
1590 | case 2: | ||
1591 | asm volatile("mcr p15, 2, %0, c15, c0, 0" : : "r" (val)); | ||
1592 | break; | ||
1593 | case 3: | ||
1594 | asm volatile("mcr p15, 3, %0, c15, c2, 0" : : "r" (val)); | ||
1595 | break; | ||
1596 | default: | ||
1597 | BUG(); /* Should be validated in scorpion_pmu_get_event_idx() */ | ||
1598 | } | ||
1599 | } | ||
1600 | |||
1601 | static u32 scorpion_get_pmresrn_event(unsigned int region) | ||
1602 | { | ||
1603 | static const u32 pmresrn_table[] = { SCORPION_LPM0_GROUP0, | ||
1604 | SCORPION_LPM1_GROUP0, | ||
1605 | SCORPION_LPM2_GROUP0, | ||
1606 | SCORPION_L2LPM_GROUP0 }; | ||
1607 | return pmresrn_table[region]; | ||
1608 | } | ||
1609 | |||
1610 | static void scorpion_evt_setup(int idx, u32 config_base) | ||
1611 | { | ||
1612 | u32 val; | ||
1613 | u32 mask; | ||
1614 | u32 vval, fval; | ||
1615 | unsigned int region = EVENT_REGION(config_base); | ||
1616 | unsigned int group = EVENT_GROUP(config_base); | ||
1617 | unsigned int code = EVENT_CODE(config_base); | ||
1618 | unsigned int group_shift; | ||
1619 | bool venum_event = EVENT_VENUM(config_base); | ||
1620 | |||
1621 | group_shift = group * 8; | ||
1622 | mask = 0xff << group_shift; | ||
1623 | |||
1624 | /* Configure evtsel for the region and group */ | ||
1625 | if (venum_event) | ||
1626 | val = SCORPION_VLPM_GROUP0; | ||
1627 | else | ||
1628 | val = scorpion_get_pmresrn_event(region); | ||
1629 | val += group; | ||
1630 | /* Mix in mode-exclusion bits */ | ||
1631 | val |= config_base & (ARMV7_EXCLUDE_USER | ARMV7_EXCLUDE_PL1); | ||
1632 | armv7_pmnc_write_evtsel(idx, val); | ||
1633 | |||
1634 | asm volatile("mcr p15, 0, %0, c9, c15, 0" : : "r" (0)); | ||
1635 | |||
1636 | if (venum_event) { | ||
1637 | venum_pre_pmresr(&vval, &fval); | ||
1638 | val = venum_read_pmresr(); | ||
1639 | val &= ~mask; | ||
1640 | val |= code << group_shift; | ||
1641 | val |= PMRESRn_EN; | ||
1642 | venum_write_pmresr(val); | ||
1643 | venum_post_pmresr(vval, fval); | ||
1644 | } else { | ||
1645 | val = scorpion_read_pmresrn(region); | ||
1646 | val &= ~mask; | ||
1647 | val |= code << group_shift; | ||
1648 | val |= PMRESRn_EN; | ||
1649 | scorpion_write_pmresrn(region, val); | ||
1650 | } | ||
1651 | } | ||
1652 | |||
1653 | static void scorpion_clearpmu(u32 config_base) | ||
1654 | { | ||
1655 | u32 val; | ||
1656 | u32 vval, fval; | ||
1657 | unsigned int region = EVENT_REGION(config_base); | ||
1658 | unsigned int group = EVENT_GROUP(config_base); | ||
1659 | bool venum_event = EVENT_VENUM(config_base); | ||
1660 | |||
1661 | if (venum_event) { | ||
1662 | venum_pre_pmresr(&vval, &fval); | ||
1663 | val = venum_read_pmresr(); | ||
1664 | val = clear_pmresrn_group(val, group); | ||
1665 | venum_write_pmresr(val); | ||
1666 | venum_post_pmresr(vval, fval); | ||
1667 | } else { | ||
1668 | val = scorpion_read_pmresrn(region); | ||
1669 | val = clear_pmresrn_group(val, group); | ||
1670 | scorpion_write_pmresrn(region, val); | ||
1671 | } | ||
1672 | } | ||
1673 | |||
1674 | static void scorpion_pmu_disable_event(struct perf_event *event) | ||
1675 | { | ||
1676 | unsigned long flags; | ||
1677 | struct hw_perf_event *hwc = &event->hw; | ||
1678 | int idx = hwc->idx; | ||
1679 | struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); | ||
1680 | struct pmu_hw_events *events = this_cpu_ptr(cpu_pmu->hw_events); | ||
1681 | |||
1682 | /* Disable counter and interrupt */ | ||
1683 | raw_spin_lock_irqsave(&events->pmu_lock, flags); | ||
1684 | |||
1685 | /* Disable counter */ | ||
1686 | armv7_pmnc_disable_counter(idx); | ||
1687 | |||
1688 | /* | ||
1689 | * Clear pmresr code (if destined for PMNx counters) | ||
1690 | */ | ||
1691 | if (hwc->config_base & KRAIT_EVENT_MASK) | ||
1692 | scorpion_clearpmu(hwc->config_base); | ||
1693 | |||
1694 | /* Disable interrupt for this counter */ | ||
1695 | armv7_pmnc_disable_intens(idx); | ||
1696 | |||
1697 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); | ||
1698 | } | ||
1699 | |||
1700 | static void scorpion_pmu_enable_event(struct perf_event *event) | ||
1701 | { | ||
1702 | unsigned long flags; | ||
1703 | struct hw_perf_event *hwc = &event->hw; | ||
1704 | int idx = hwc->idx; | ||
1705 | struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); | ||
1706 | struct pmu_hw_events *events = this_cpu_ptr(cpu_pmu->hw_events); | ||
1707 | |||
1708 | /* | ||
1709 | * Enable counter and interrupt, and set the counter to count | ||
1710 | * the event that we're interested in. | ||
1711 | */ | ||
1712 | raw_spin_lock_irqsave(&events->pmu_lock, flags); | ||
1713 | |||
1714 | /* Disable counter */ | ||
1715 | armv7_pmnc_disable_counter(idx); | ||
1716 | |||
1717 | /* | ||
1718 | * Set event (if destined for PMNx counters) | ||
1719 | * We don't set the event for the cycle counter because we | ||
1720 | * don't have the ability to perform event filtering. | ||
1721 | */ | ||
1722 | if (hwc->config_base & KRAIT_EVENT_MASK) | ||
1723 | scorpion_evt_setup(idx, hwc->config_base); | ||
1724 | else if (idx != ARMV7_IDX_CYCLE_COUNTER) | ||
1725 | armv7_pmnc_write_evtsel(idx, hwc->config_base); | ||
1726 | |||
1727 | /* Enable interrupt for this counter */ | ||
1728 | armv7_pmnc_enable_intens(idx); | ||
1729 | |||
1730 | /* Enable counter */ | ||
1731 | armv7_pmnc_enable_counter(idx); | ||
1732 | |||
1733 | raw_spin_unlock_irqrestore(&events->pmu_lock, flags); | ||
1734 | } | ||
1735 | |||
1736 | static void scorpion_pmu_reset(void *info) | ||
1737 | { | ||
1738 | u32 vval, fval; | ||
1739 | struct arm_pmu *cpu_pmu = info; | ||
1740 | u32 idx, nb_cnt = cpu_pmu->num_events; | ||
1741 | |||
1742 | armv7pmu_reset(info); | ||
1743 | |||
1744 | /* Clear all pmresrs */ | ||
1745 | scorpion_write_pmresrn(0, 0); | ||
1746 | scorpion_write_pmresrn(1, 0); | ||
1747 | scorpion_write_pmresrn(2, 0); | ||
1748 | scorpion_write_pmresrn(3, 0); | ||
1749 | |||
1750 | venum_pre_pmresr(&vval, &fval); | ||
1751 | venum_write_pmresr(0); | ||
1752 | venum_post_pmresr(vval, fval); | ||
1753 | |||
1754 | /* Reset PMxEVNCTCR to sane default */ | ||
1755 | for (idx = ARMV7_IDX_CYCLE_COUNTER; idx < nb_cnt; ++idx) { | ||
1756 | armv7_pmnc_select_counter(idx); | ||
1757 | asm volatile("mcr p15, 0, %0, c9, c15, 0" : : "r" (0)); | ||
1758 | } | ||
1759 | } | ||
1760 | |||
1761 | static int scorpion_event_to_bit(struct perf_event *event, unsigned int region, | ||
1762 | unsigned int group) | ||
1763 | { | ||
1764 | int bit; | ||
1765 | struct hw_perf_event *hwc = &event->hw; | ||
1766 | struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); | ||
1767 | |||
1768 | if (hwc->config_base & VENUM_EVENT) | ||
1769 | bit = SCORPION_VLPM_GROUP0; | ||
1770 | else | ||
1771 | bit = scorpion_get_pmresrn_event(region); | ||
1772 | bit -= scorpion_get_pmresrn_event(0); | ||
1773 | bit += group; | ||
1774 | /* | ||
1775 | * Lower bits are reserved for use by the counters (see | ||
1776 | * armv7pmu_get_event_idx() for more info) | ||
1777 | */ | ||
1778 | bit += ARMV7_IDX_COUNTER_LAST(cpu_pmu) + 1; | ||
1779 | |||
1780 | return bit; | ||
1781 | } | ||
1782 | |||
1783 | /* | ||
1784 | * We check for column exclusion constraints here. | ||
1785 | * Two events cant use the same group within a pmresr register. | ||
1786 | */ | ||
1787 | static int scorpion_pmu_get_event_idx(struct pmu_hw_events *cpuc, | ||
1788 | struct perf_event *event) | ||
1789 | { | ||
1790 | int idx; | ||
1791 | int bit = -1; | ||
1792 | struct hw_perf_event *hwc = &event->hw; | ||
1793 | unsigned int region = EVENT_REGION(hwc->config_base); | ||
1794 | unsigned int group = EVENT_GROUP(hwc->config_base); | ||
1795 | bool venum_event = EVENT_VENUM(hwc->config_base); | ||
1796 | bool scorpion_event = EVENT_CPU(hwc->config_base); | ||
1797 | |||
1798 | if (venum_event || scorpion_event) { | ||
1799 | /* Ignore invalid events */ | ||
1800 | if (group > 3 || region > 3) | ||
1801 | return -EINVAL; | ||
1802 | |||
1803 | bit = scorpion_event_to_bit(event, region, group); | ||
1804 | if (test_and_set_bit(bit, cpuc->used_mask)) | ||
1805 | return -EAGAIN; | ||
1806 | } | ||
1807 | |||
1808 | idx = armv7pmu_get_event_idx(cpuc, event); | ||
1809 | if (idx < 0 && bit >= 0) | ||
1810 | clear_bit(bit, cpuc->used_mask); | ||
1811 | |||
1812 | return idx; | ||
1813 | } | ||
1814 | |||
1815 | static void scorpion_pmu_clear_event_idx(struct pmu_hw_events *cpuc, | ||
1816 | struct perf_event *event) | ||
1817 | { | ||
1818 | int bit; | ||
1819 | struct hw_perf_event *hwc = &event->hw; | ||
1820 | unsigned int region = EVENT_REGION(hwc->config_base); | ||
1821 | unsigned int group = EVENT_GROUP(hwc->config_base); | ||
1822 | bool venum_event = EVENT_VENUM(hwc->config_base); | ||
1823 | bool scorpion_event = EVENT_CPU(hwc->config_base); | ||
1824 | |||
1825 | if (venum_event || scorpion_event) { | ||
1826 | bit = scorpion_event_to_bit(event, region, group); | ||
1827 | clear_bit(bit, cpuc->used_mask); | ||
1828 | } | ||
1829 | } | ||
1830 | |||
1831 | static int scorpion_pmu_init(struct arm_pmu *cpu_pmu) | ||
1832 | { | ||
1833 | armv7pmu_init(cpu_pmu); | ||
1834 | cpu_pmu->name = "armv7_scorpion"; | ||
1835 | cpu_pmu->map_event = scorpion_map_event; | ||
1836 | cpu_pmu->num_events = armv7_read_num_pmnc_events(); | ||
1837 | cpu_pmu->reset = scorpion_pmu_reset; | ||
1838 | cpu_pmu->enable = scorpion_pmu_enable_event; | ||
1839 | cpu_pmu->disable = scorpion_pmu_disable_event; | ||
1840 | cpu_pmu->get_event_idx = scorpion_pmu_get_event_idx; | ||
1841 | cpu_pmu->clear_event_idx = scorpion_pmu_clear_event_idx; | ||
1842 | return 0; | ||
1843 | } | ||
1844 | |||
1845 | static int scorpion_mp_pmu_init(struct arm_pmu *cpu_pmu) | ||
1846 | { | ||
1847 | armv7pmu_init(cpu_pmu); | ||
1848 | cpu_pmu->name = "armv7_scorpion_mp"; | ||
1849 | cpu_pmu->map_event = scorpion_map_event; | ||
1850 | cpu_pmu->num_events = armv7_read_num_pmnc_events(); | ||
1851 | cpu_pmu->reset = scorpion_pmu_reset; | ||
1852 | cpu_pmu->enable = scorpion_pmu_enable_event; | ||
1853 | cpu_pmu->disable = scorpion_pmu_disable_event; | ||
1854 | cpu_pmu->get_event_idx = scorpion_pmu_get_event_idx; | ||
1855 | cpu_pmu->clear_event_idx = scorpion_pmu_clear_event_idx; | ||
1856 | return 0; | ||
1857 | } | ||
1461 | #else | 1858 | #else |
1462 | static inline int armv7_a8_pmu_init(struct arm_pmu *cpu_pmu) | 1859 | static inline int armv7_a8_pmu_init(struct arm_pmu *cpu_pmu) |
1463 | { | 1860 | { |
@@ -1498,4 +1895,14 @@ static inline int krait_pmu_init(struct arm_pmu *cpu_pmu) | |||
1498 | { | 1895 | { |
1499 | return -ENODEV; | 1896 | return -ENODEV; |
1500 | } | 1897 | } |
1898 | |||
1899 | static inline int scorpion_pmu_init(struct arm_pmu *cpu_pmu) | ||
1900 | { | ||
1901 | return -ENODEV; | ||
1902 | } | ||
1903 | |||
1904 | static inline int scorpion_mp_pmu_init(struct arm_pmu *cpu_pmu) | ||
1905 | { | ||
1906 | return -ENODEV; | ||
1907 | } | ||
1501 | #endif /* CONFIG_CPU_V7 */ | 1908 | #endif /* CONFIG_CPU_V7 */ |
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index c50fe212fd89..f192a2a41719 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -17,12 +17,9 @@ | |||
17 | #include <linux/stddef.h> | 17 | #include <linux/stddef.h> |
18 | #include <linux/unistd.h> | 18 | #include <linux/unistd.h> |
19 | #include <linux/user.h> | 19 | #include <linux/user.h> |
20 | #include <linux/delay.h> | ||
21 | #include <linux/reboot.h> | ||
22 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
23 | #include <linux/kallsyms.h> | 21 | #include <linux/kallsyms.h> |
24 | #include <linux/init.h> | 22 | #include <linux/init.h> |
25 | #include <linux/cpu.h> | ||
26 | #include <linux/elfcore.h> | 23 | #include <linux/elfcore.h> |
27 | #include <linux/pm.h> | 24 | #include <linux/pm.h> |
28 | #include <linux/tick.h> | 25 | #include <linux/tick.h> |
@@ -31,10 +28,7 @@ | |||
31 | #include <linux/random.h> | 28 | #include <linux/random.h> |
32 | #include <linux/hw_breakpoint.h> | 29 | #include <linux/hw_breakpoint.h> |
33 | #include <linux/leds.h> | 30 | #include <linux/leds.h> |
34 | #include <linux/reboot.h> | ||
35 | 31 | ||
36 | #include <asm/cacheflush.h> | ||
37 | #include <asm/idmap.h> | ||
38 | #include <asm/processor.h> | 32 | #include <asm/processor.h> |
39 | #include <asm/thread_notify.h> | 33 | #include <asm/thread_notify.h> |
40 | #include <asm/stacktrace.h> | 34 | #include <asm/stacktrace.h> |
@@ -60,69 +54,6 @@ static const char *isa_modes[] __maybe_unused = { | |||
60 | "ARM" , "Thumb" , "Jazelle", "ThumbEE" | 54 | "ARM" , "Thumb" , "Jazelle", "ThumbEE" |
61 | }; | 55 | }; |
62 | 56 | ||
63 | extern void call_with_stack(void (*fn)(void *), void *arg, void *sp); | ||
64 | typedef void (*phys_reset_t)(unsigned long); | ||
65 | |||
66 | /* | ||
67 | * A temporary stack to use for CPU reset. This is static so that we | ||
68 | * don't clobber it with the identity mapping. When running with this | ||
69 | * stack, any references to the current task *will not work* so you | ||
70 | * should really do as little as possible before jumping to your reset | ||
71 | * code. | ||
72 | */ | ||
73 | static u64 soft_restart_stack[16]; | ||
74 | |||
75 | static void __soft_restart(void *addr) | ||
76 | { | ||
77 | phys_reset_t phys_reset; | ||
78 | |||
79 | /* Take out a flat memory mapping. */ | ||
80 | setup_mm_for_reboot(); | ||
81 | |||
82 | /* Clean and invalidate caches */ | ||
83 | flush_cache_all(); | ||
84 | |||
85 | /* Turn off caching */ | ||
86 | cpu_proc_fin(); | ||
87 | |||
88 | /* Push out any further dirty data, and ensure cache is empty */ | ||
89 | flush_cache_all(); | ||
90 | |||
91 | /* Switch to the identity mapping. */ | ||
92 | phys_reset = (phys_reset_t)(unsigned long)virt_to_phys(cpu_reset); | ||
93 | phys_reset((unsigned long)addr); | ||
94 | |||
95 | /* Should never get here. */ | ||
96 | BUG(); | ||
97 | } | ||
98 | |||
99 | void soft_restart(unsigned long addr) | ||
100 | { | ||
101 | u64 *stack = soft_restart_stack + ARRAY_SIZE(soft_restart_stack); | ||
102 | |||
103 | /* Disable interrupts first */ | ||
104 | raw_local_irq_disable(); | ||
105 | local_fiq_disable(); | ||
106 | |||
107 | /* Disable the L2 if we're the last man standing. */ | ||
108 | if (num_online_cpus() == 1) | ||
109 | outer_disable(); | ||
110 | |||
111 | /* Change to the new stack and continue with the reset. */ | ||
112 | call_with_stack(__soft_restart, (void *)addr, (void *)stack); | ||
113 | |||
114 | /* Should never get here. */ | ||
115 | BUG(); | ||
116 | } | ||
117 | |||
118 | /* | ||
119 | * Function pointers to optional machine specific functions | ||
120 | */ | ||
121 | void (*pm_power_off)(void); | ||
122 | EXPORT_SYMBOL(pm_power_off); | ||
123 | |||
124 | void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd); | ||
125 | |||
126 | /* | 57 | /* |
127 | * This is our default idle handler. | 58 | * This is our default idle handler. |
128 | */ | 59 | */ |
@@ -167,79 +98,6 @@ void arch_cpu_idle_dead(void) | |||
167 | } | 98 | } |
168 | #endif | 99 | #endif |
169 | 100 | ||
170 | /* | ||
171 | * Called by kexec, immediately prior to machine_kexec(). | ||
172 | * | ||
173 | * This must completely disable all secondary CPUs; simply causing those CPUs | ||
174 | * to execute e.g. a RAM-based pin loop is not sufficient. This allows the | ||
175 | * kexec'd kernel to use any and all RAM as it sees fit, without having to | ||
176 | * avoid any code or data used by any SW CPU pin loop. The CPU hotplug | ||
177 | * functionality embodied in disable_nonboot_cpus() to achieve this. | ||
178 | */ | ||
179 | void machine_shutdown(void) | ||
180 | { | ||
181 | disable_nonboot_cpus(); | ||
182 | } | ||
183 | |||
184 | /* | ||
185 | * Halting simply requires that the secondary CPUs stop performing any | ||
186 | * activity (executing tasks, handling interrupts). smp_send_stop() | ||
187 | * achieves this. | ||
188 | */ | ||
189 | void machine_halt(void) | ||
190 | { | ||
191 | local_irq_disable(); | ||
192 | smp_send_stop(); | ||
193 | |||
194 | local_irq_disable(); | ||
195 | while (1); | ||
196 | } | ||
197 | |||
198 | /* | ||
199 | * Power-off simply requires that the secondary CPUs stop performing any | ||
200 | * activity (executing tasks, handling interrupts). smp_send_stop() | ||
201 | * achieves this. When the system power is turned off, it will take all CPUs | ||
202 | * with it. | ||
203 | */ | ||
204 | void machine_power_off(void) | ||
205 | { | ||
206 | local_irq_disable(); | ||
207 | smp_send_stop(); | ||
208 | |||
209 | if (pm_power_off) | ||
210 | pm_power_off(); | ||
211 | } | ||
212 | |||
213 | /* | ||
214 | * Restart requires that the secondary CPUs stop performing any activity | ||
215 | * while the primary CPU resets the system. Systems with a single CPU can | ||
216 | * use soft_restart() as their machine descriptor's .restart hook, since that | ||
217 | * will cause the only available CPU to reset. Systems with multiple CPUs must | ||
218 | * provide a HW restart implementation, to ensure that all CPUs reset at once. | ||
219 | * This is required so that any code running after reset on the primary CPU | ||
220 | * doesn't have to co-ordinate with other CPUs to ensure they aren't still | ||
221 | * executing pre-reset code, and using RAM that the primary CPU's code wishes | ||
222 | * to use. Implementing such co-ordination would be essentially impossible. | ||
223 | */ | ||
224 | void machine_restart(char *cmd) | ||
225 | { | ||
226 | local_irq_disable(); | ||
227 | smp_send_stop(); | ||
228 | |||
229 | if (arm_pm_restart) | ||
230 | arm_pm_restart(reboot_mode, cmd); | ||
231 | else | ||
232 | do_kernel_restart(cmd); | ||
233 | |||
234 | /* Give a grace period for failure to restart of 1s */ | ||
235 | mdelay(1000); | ||
236 | |||
237 | /* Whoops - the platform was unable to reboot. Tell the user! */ | ||
238 | printk("Reboot failed -- System halted\n"); | ||
239 | local_irq_disable(); | ||
240 | while (1); | ||
241 | } | ||
242 | |||
243 | void __show_regs(struct pt_regs *regs) | 101 | void __show_regs(struct pt_regs *regs) |
244 | { | 102 | { |
245 | unsigned long flags; | 103 | unsigned long flags; |
diff --git a/arch/arm/kernel/psci-call.S b/arch/arm/kernel/psci-call.S new file mode 100644 index 000000000000..a78e9e1e206d --- /dev/null +++ b/arch/arm/kernel/psci-call.S | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License version 2 as | ||
4 | * published by the Free Software Foundation. | ||
5 | * | ||
6 | * This program is distributed in the hope that it will be useful, | ||
7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
9 | * GNU General Public License for more details. | ||
10 | * | ||
11 | * Copyright (C) 2015 ARM Limited | ||
12 | * | ||
13 | * Author: Mark Rutland <mark.rutland@arm.com> | ||
14 | */ | ||
15 | |||
16 | #include <linux/linkage.h> | ||
17 | |||
18 | #include <asm/opcodes-sec.h> | ||
19 | #include <asm/opcodes-virt.h> | ||
20 | |||
21 | /* int __invoke_psci_fn_hvc(u32 function_id, u32 arg0, u32 arg1, u32 arg2) */ | ||
22 | ENTRY(__invoke_psci_fn_hvc) | ||
23 | __HVC(0) | ||
24 | bx lr | ||
25 | ENDPROC(__invoke_psci_fn_hvc) | ||
26 | |||
27 | /* int __invoke_psci_fn_smc(u32 function_id, u32 arg0, u32 arg1, u32 arg2) */ | ||
28 | ENTRY(__invoke_psci_fn_smc) | ||
29 | __SMC(0) | ||
30 | bx lr | ||
31 | ENDPROC(__invoke_psci_fn_smc) | ||
diff --git a/arch/arm/kernel/psci.c b/arch/arm/kernel/psci.c index f73891b6b730..f90fdf4ce7c7 100644 --- a/arch/arm/kernel/psci.c +++ b/arch/arm/kernel/psci.c | |||
@@ -23,8 +23,6 @@ | |||
23 | 23 | ||
24 | #include <asm/compiler.h> | 24 | #include <asm/compiler.h> |
25 | #include <asm/errno.h> | 25 | #include <asm/errno.h> |
26 | #include <asm/opcodes-sec.h> | ||
27 | #include <asm/opcodes-virt.h> | ||
28 | #include <asm/psci.h> | 26 | #include <asm/psci.h> |
29 | #include <asm/system_misc.h> | 27 | #include <asm/system_misc.h> |
30 | 28 | ||
@@ -33,6 +31,9 @@ struct psci_operations psci_ops; | |||
33 | static int (*invoke_psci_fn)(u32, u32, u32, u32); | 31 | static int (*invoke_psci_fn)(u32, u32, u32, u32); |
34 | typedef int (*psci_initcall_t)(const struct device_node *); | 32 | typedef int (*psci_initcall_t)(const struct device_node *); |
35 | 33 | ||
34 | asmlinkage int __invoke_psci_fn_hvc(u32, u32, u32, u32); | ||
35 | asmlinkage int __invoke_psci_fn_smc(u32, u32, u32, u32); | ||
36 | |||
36 | enum psci_function { | 37 | enum psci_function { |
37 | PSCI_FN_CPU_SUSPEND, | 38 | PSCI_FN_CPU_SUSPEND, |
38 | PSCI_FN_CPU_ON, | 39 | PSCI_FN_CPU_ON, |
@@ -71,40 +72,6 @@ static u32 psci_power_state_pack(struct psci_power_state state) | |||
71 | & PSCI_0_2_POWER_STATE_AFFL_MASK); | 72 | & PSCI_0_2_POWER_STATE_AFFL_MASK); |
72 | } | 73 | } |
73 | 74 | ||
74 | /* | ||
75 | * The following two functions are invoked via the invoke_psci_fn pointer | ||
76 | * and will not be inlined, allowing us to piggyback on the AAPCS. | ||
77 | */ | ||
78 | static noinline int __invoke_psci_fn_hvc(u32 function_id, u32 arg0, u32 arg1, | ||
79 | u32 arg2) | ||
80 | { | ||
81 | asm volatile( | ||
82 | __asmeq("%0", "r0") | ||
83 | __asmeq("%1", "r1") | ||
84 | __asmeq("%2", "r2") | ||
85 | __asmeq("%3", "r3") | ||
86 | __HVC(0) | ||
87 | : "+r" (function_id) | ||
88 | : "r" (arg0), "r" (arg1), "r" (arg2)); | ||
89 | |||
90 | return function_id; | ||
91 | } | ||
92 | |||
93 | static noinline int __invoke_psci_fn_smc(u32 function_id, u32 arg0, u32 arg1, | ||
94 | u32 arg2) | ||
95 | { | ||
96 | asm volatile( | ||
97 | __asmeq("%0", "r0") | ||
98 | __asmeq("%1", "r1") | ||
99 | __asmeq("%2", "r2") | ||
100 | __asmeq("%3", "r3") | ||
101 | __SMC(0) | ||
102 | : "+r" (function_id) | ||
103 | : "r" (arg0), "r" (arg1), "r" (arg2)); | ||
104 | |||
105 | return function_id; | ||
106 | } | ||
107 | |||
108 | static int psci_get_version(void) | 75 | static int psci_get_version(void) |
109 | { | 76 | { |
110 | int err; | 77 | int err; |
diff --git a/arch/arm/kernel/reboot.c b/arch/arm/kernel/reboot.c new file mode 100644 index 000000000000..1a4d232796be --- /dev/null +++ b/arch/arm/kernel/reboot.c | |||
@@ -0,0 +1,155 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1996-2000 Russell King - Converted to ARM. | ||
3 | * Original Copyright (C) 1995 Linus Torvalds | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | #include <linux/cpu.h> | ||
10 | #include <linux/delay.h> | ||
11 | #include <linux/reboot.h> | ||
12 | |||
13 | #include <asm/cacheflush.h> | ||
14 | #include <asm/idmap.h> | ||
15 | |||
16 | #include "reboot.h" | ||
17 | |||
18 | typedef void (*phys_reset_t)(unsigned long); | ||
19 | |||
20 | /* | ||
21 | * Function pointers to optional machine specific functions | ||
22 | */ | ||
23 | void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd); | ||
24 | void (*pm_power_off)(void); | ||
25 | EXPORT_SYMBOL(pm_power_off); | ||
26 | |||
27 | /* | ||
28 | * A temporary stack to use for CPU reset. This is static so that we | ||
29 | * don't clobber it with the identity mapping. When running with this | ||
30 | * stack, any references to the current task *will not work* so you | ||
31 | * should really do as little as possible before jumping to your reset | ||
32 | * code. | ||
33 | */ | ||
34 | static u64 soft_restart_stack[16]; | ||
35 | |||
36 | static void __soft_restart(void *addr) | ||
37 | { | ||
38 | phys_reset_t phys_reset; | ||
39 | |||
40 | /* Take out a flat memory mapping. */ | ||
41 | setup_mm_for_reboot(); | ||
42 | |||
43 | /* Clean and invalidate caches */ | ||
44 | flush_cache_all(); | ||
45 | |||
46 | /* Turn off caching */ | ||
47 | cpu_proc_fin(); | ||
48 | |||
49 | /* Push out any further dirty data, and ensure cache is empty */ | ||
50 | flush_cache_all(); | ||
51 | |||
52 | /* Switch to the identity mapping. */ | ||
53 | phys_reset = (phys_reset_t)(unsigned long)virt_to_phys(cpu_reset); | ||
54 | phys_reset((unsigned long)addr); | ||
55 | |||
56 | /* Should never get here. */ | ||
57 | BUG(); | ||
58 | } | ||
59 | |||
60 | void _soft_restart(unsigned long addr, bool disable_l2) | ||
61 | { | ||
62 | u64 *stack = soft_restart_stack + ARRAY_SIZE(soft_restart_stack); | ||
63 | |||
64 | /* Disable interrupts first */ | ||
65 | raw_local_irq_disable(); | ||
66 | local_fiq_disable(); | ||
67 | |||
68 | /* Disable the L2 if we're the last man standing. */ | ||
69 | if (disable_l2) | ||
70 | outer_disable(); | ||
71 | |||
72 | /* Change to the new stack and continue with the reset. */ | ||
73 | call_with_stack(__soft_restart, (void *)addr, (void *)stack); | ||
74 | |||
75 | /* Should never get here. */ | ||
76 | BUG(); | ||
77 | } | ||
78 | |||
79 | void soft_restart(unsigned long addr) | ||
80 | { | ||
81 | _soft_restart(addr, num_online_cpus() == 1); | ||
82 | } | ||
83 | |||
84 | /* | ||
85 | * Called by kexec, immediately prior to machine_kexec(). | ||
86 | * | ||
87 | * This must completely disable all secondary CPUs; simply causing those CPUs | ||
88 | * to execute e.g. a RAM-based pin loop is not sufficient. This allows the | ||
89 | * kexec'd kernel to use any and all RAM as it sees fit, without having to | ||
90 | * avoid any code or data used by any SW CPU pin loop. The CPU hotplug | ||
91 | * functionality embodied in disable_nonboot_cpus() to achieve this. | ||
92 | */ | ||
93 | void machine_shutdown(void) | ||
94 | { | ||
95 | disable_nonboot_cpus(); | ||
96 | } | ||
97 | |||
98 | /* | ||
99 | * Halting simply requires that the secondary CPUs stop performing any | ||
100 | * activity (executing tasks, handling interrupts). smp_send_stop() | ||
101 | * achieves this. | ||
102 | */ | ||
103 | void machine_halt(void) | ||
104 | { | ||
105 | local_irq_disable(); | ||
106 | smp_send_stop(); | ||
107 | |||
108 | local_irq_disable(); | ||
109 | while (1); | ||
110 | } | ||
111 | |||
112 | /* | ||
113 | * Power-off simply requires that the secondary CPUs stop performing any | ||
114 | * activity (executing tasks, handling interrupts). smp_send_stop() | ||
115 | * achieves this. When the system power is turned off, it will take all CPUs | ||
116 | * with it. | ||
117 | */ | ||
118 | void machine_power_off(void) | ||
119 | { | ||
120 | local_irq_disable(); | ||
121 | smp_send_stop(); | ||
122 | |||
123 | if (pm_power_off) | ||
124 | pm_power_off(); | ||
125 | } | ||
126 | |||
127 | /* | ||
128 | * Restart requires that the secondary CPUs stop performing any activity | ||
129 | * while the primary CPU resets the system. Systems with a single CPU can | ||
130 | * use soft_restart() as their machine descriptor's .restart hook, since that | ||
131 | * will cause the only available CPU to reset. Systems with multiple CPUs must | ||
132 | * provide a HW restart implementation, to ensure that all CPUs reset at once. | ||
133 | * This is required so that any code running after reset on the primary CPU | ||
134 | * doesn't have to co-ordinate with other CPUs to ensure they aren't still | ||
135 | * executing pre-reset code, and using RAM that the primary CPU's code wishes | ||
136 | * to use. Implementing such co-ordination would be essentially impossible. | ||
137 | */ | ||
138 | void machine_restart(char *cmd) | ||
139 | { | ||
140 | local_irq_disable(); | ||
141 | smp_send_stop(); | ||
142 | |||
143 | if (arm_pm_restart) | ||
144 | arm_pm_restart(reboot_mode, cmd); | ||
145 | else | ||
146 | do_kernel_restart(cmd); | ||
147 | |||
148 | /* Give a grace period for failure to restart of 1s */ | ||
149 | mdelay(1000); | ||
150 | |||
151 | /* Whoops - the platform was unable to reboot. Tell the user! */ | ||
152 | printk("Reboot failed -- System halted\n"); | ||
153 | local_irq_disable(); | ||
154 | while (1); | ||
155 | } | ||
diff --git a/arch/arm/kernel/reboot.h b/arch/arm/kernel/reboot.h new file mode 100644 index 000000000000..bf7a0b1f076e --- /dev/null +++ b/arch/arm/kernel/reboot.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef REBOOT_H | ||
2 | #define REBOOT_H | ||
3 | |||
4 | extern void call_with_stack(void (*fn)(void *), void *arg, void *sp); | ||
5 | extern void _soft_restart(unsigned long addr, bool disable_l2); | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c index 24b4a04846eb..36ed35073289 100644 --- a/arch/arm/kernel/return_address.c +++ b/arch/arm/kernel/return_address.c | |||
@@ -56,8 +56,6 @@ void *return_address(unsigned int level) | |||
56 | return NULL; | 56 | return NULL; |
57 | } | 57 | } |
58 | 58 | ||
59 | #else /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) */ | 59 | #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) */ |
60 | |||
61 | #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */ | ||
62 | 60 | ||
63 | EXPORT_SYMBOL_GPL(return_address); | 61 | EXPORT_SYMBOL_GPL(return_address); |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index e55408e96559..6c777e908a24 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -246,12 +246,9 @@ static int __get_cpu_architecture(void) | |||
246 | if (cpu_arch) | 246 | if (cpu_arch) |
247 | cpu_arch += CPU_ARCH_ARMv3; | 247 | cpu_arch += CPU_ARCH_ARMv3; |
248 | } else if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) { | 248 | } else if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) { |
249 | unsigned int mmfr0; | ||
250 | |||
251 | /* Revised CPUID format. Read the Memory Model Feature | 249 | /* Revised CPUID format. Read the Memory Model Feature |
252 | * Register 0 and check for VMSAv7 or PMSAv7 */ | 250 | * Register 0 and check for VMSAv7 or PMSAv7 */ |
253 | asm("mrc p15, 0, %0, c0, c1, 4" | 251 | unsigned int mmfr0 = read_cpuid_ext(CPUID_EXT_MMFR0); |
254 | : "=r" (mmfr0)); | ||
255 | if ((mmfr0 & 0x0000000f) >= 0x00000003 || | 252 | if ((mmfr0 & 0x0000000f) >= 0x00000003 || |
256 | (mmfr0 & 0x000000f0) >= 0x00000030) | 253 | (mmfr0 & 0x000000f0) >= 0x00000030) |
257 | cpu_arch = CPU_ARCH_ARMv7; | 254 | cpu_arch = CPU_ARCH_ARMv7; |
@@ -375,30 +372,48 @@ void __init early_print(const char *str, ...) | |||
375 | 372 | ||
376 | static void __init cpuid_init_hwcaps(void) | 373 | static void __init cpuid_init_hwcaps(void) |
377 | { | 374 | { |
378 | unsigned int divide_instrs, vmsa; | 375 | int block; |
376 | u32 isar5; | ||
379 | 377 | ||
380 | if (cpu_architecture() < CPU_ARCH_ARMv7) | 378 | if (cpu_architecture() < CPU_ARCH_ARMv7) |
381 | return; | 379 | return; |
382 | 380 | ||
383 | divide_instrs = (read_cpuid_ext(CPUID_EXT_ISAR0) & 0x0f000000) >> 24; | 381 | block = cpuid_feature_extract(CPUID_EXT_ISAR0, 24); |
384 | 382 | if (block >= 2) | |
385 | switch (divide_instrs) { | ||
386 | case 2: | ||
387 | elf_hwcap |= HWCAP_IDIVA; | 383 | elf_hwcap |= HWCAP_IDIVA; |
388 | case 1: | 384 | if (block >= 1) |
389 | elf_hwcap |= HWCAP_IDIVT; | 385 | elf_hwcap |= HWCAP_IDIVT; |
390 | } | ||
391 | 386 | ||
392 | /* LPAE implies atomic ldrd/strd instructions */ | 387 | /* LPAE implies atomic ldrd/strd instructions */ |
393 | vmsa = (read_cpuid_ext(CPUID_EXT_MMFR0) & 0xf) >> 0; | 388 | block = cpuid_feature_extract(CPUID_EXT_MMFR0, 0); |
394 | if (vmsa >= 5) | 389 | if (block >= 5) |
395 | elf_hwcap |= HWCAP_LPAE; | 390 | elf_hwcap |= HWCAP_LPAE; |
391 | |||
392 | /* check for supported v8 Crypto instructions */ | ||
393 | isar5 = read_cpuid_ext(CPUID_EXT_ISAR5); | ||
394 | |||
395 | block = cpuid_feature_extract_field(isar5, 4); | ||
396 | if (block >= 2) | ||
397 | elf_hwcap2 |= HWCAP2_PMULL; | ||
398 | if (block >= 1) | ||
399 | elf_hwcap2 |= HWCAP2_AES; | ||
400 | |||
401 | block = cpuid_feature_extract_field(isar5, 8); | ||
402 | if (block >= 1) | ||
403 | elf_hwcap2 |= HWCAP2_SHA1; | ||
404 | |||
405 | block = cpuid_feature_extract_field(isar5, 12); | ||
406 | if (block >= 1) | ||
407 | elf_hwcap2 |= HWCAP2_SHA2; | ||
408 | |||
409 | block = cpuid_feature_extract_field(isar5, 16); | ||
410 | if (block >= 1) | ||
411 | elf_hwcap2 |= HWCAP2_CRC32; | ||
396 | } | 412 | } |
397 | 413 | ||
398 | static void __init elf_hwcap_fixup(void) | 414 | static void __init elf_hwcap_fixup(void) |
399 | { | 415 | { |
400 | unsigned id = read_cpuid_id(); | 416 | unsigned id = read_cpuid_id(); |
401 | unsigned sync_prim; | ||
402 | 417 | ||
403 | /* | 418 | /* |
404 | * HWCAP_TLS is available only on 1136 r1p0 and later, | 419 | * HWCAP_TLS is available only on 1136 r1p0 and later, |
@@ -419,9 +434,9 @@ static void __init elf_hwcap_fixup(void) | |||
419 | * avoid advertising SWP; it may not be atomic with | 434 | * avoid advertising SWP; it may not be atomic with |
420 | * multiprocessing cores. | 435 | * multiprocessing cores. |
421 | */ | 436 | */ |
422 | sync_prim = ((read_cpuid_ext(CPUID_EXT_ISAR3) >> 8) & 0xf0) | | 437 | if (cpuid_feature_extract(CPUID_EXT_ISAR3, 12) > 1 || |
423 | ((read_cpuid_ext(CPUID_EXT_ISAR4) >> 20) & 0x0f); | 438 | (cpuid_feature_extract(CPUID_EXT_ISAR3, 12) == 1 && |
424 | if (sync_prim >= 0x13) | 439 | cpuid_feature_extract(CPUID_EXT_ISAR3, 20) >= 3)) |
425 | elf_hwcap &= ~HWCAP_SWP; | 440 | elf_hwcap &= ~HWCAP_SWP; |
426 | } | 441 | } |
427 | 442 | ||
diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S index e1e60e5a7a27..7d37bfc50830 100644 --- a/arch/arm/kernel/sleep.S +++ b/arch/arm/kernel/sleep.S | |||
@@ -116,14 +116,7 @@ cpu_resume_after_mmu: | |||
116 | ldmfd sp!, {r4 - r11, pc} | 116 | ldmfd sp!, {r4 - r11, pc} |
117 | ENDPROC(cpu_resume_after_mmu) | 117 | ENDPROC(cpu_resume_after_mmu) |
118 | 118 | ||
119 | /* | 119 | .text |
120 | * Note: Yes, part of the following code is located into the .data section. | ||
121 | * This is to allow sleep_save_sp to be accessed with a relative load | ||
122 | * while we can't rely on any MMU translation. We could have put | ||
123 | * sleep_save_sp in the .text section as well, but some setups might | ||
124 | * insist on it to be truly read-only. | ||
125 | */ | ||
126 | .data | ||
127 | .align | 120 | .align |
128 | ENTRY(cpu_resume) | 121 | ENTRY(cpu_resume) |
129 | ARM_BE8(setend be) @ ensure we are in BE mode | 122 | ARM_BE8(setend be) @ ensure we are in BE mode |
@@ -145,6 +138,8 @@ ARM_BE8(setend be) @ ensure we are in BE mode | |||
145 | compute_mpidr_hash r1, r4, r5, r6, r0, r3 | 138 | compute_mpidr_hash r1, r4, r5, r6, r0, r3 |
146 | 1: | 139 | 1: |
147 | adr r0, _sleep_save_sp | 140 | adr r0, _sleep_save_sp |
141 | ldr r2, [r0] | ||
142 | add r0, r0, r2 | ||
148 | ldr r0, [r0, #SLEEP_SAVE_SP_PHYS] | 143 | ldr r0, [r0, #SLEEP_SAVE_SP_PHYS] |
149 | ldr r0, [r0, r1, lsl #2] | 144 | ldr r0, [r0, r1, lsl #2] |
150 | 145 | ||
@@ -156,10 +151,12 @@ THUMB( bx r3 ) | |||
156 | ENDPROC(cpu_resume) | 151 | ENDPROC(cpu_resume) |
157 | 152 | ||
158 | .align 2 | 153 | .align 2 |
154 | _sleep_save_sp: | ||
155 | .long sleep_save_sp - . | ||
159 | mpidr_hash_ptr: | 156 | mpidr_hash_ptr: |
160 | .long mpidr_hash - . @ mpidr_hash struct offset | 157 | .long mpidr_hash - . @ mpidr_hash struct offset |
161 | 158 | ||
159 | .data | ||
162 | .type sleep_save_sp, #object | 160 | .type sleep_save_sp, #object |
163 | ENTRY(sleep_save_sp) | 161 | ENTRY(sleep_save_sp) |
164 | _sleep_save_sp: | ||
165 | .space SLEEP_SAVE_SP_SZ @ struct sleep_save_sp | 162 | .space SLEEP_SAVE_SP_SZ @ struct sleep_save_sp |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 86ef244c5a24..cca5b8758185 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -145,6 +145,11 @@ void __init smp_init_cpus(void) | |||
145 | smp_ops.smp_init_cpus(); | 145 | smp_ops.smp_init_cpus(); |
146 | } | 146 | } |
147 | 147 | ||
148 | int platform_can_secondary_boot(void) | ||
149 | { | ||
150 | return !!smp_ops.smp_boot_secondary; | ||
151 | } | ||
152 | |||
148 | int platform_can_cpu_hotplug(void) | 153 | int platform_can_cpu_hotplug(void) |
149 | { | 154 | { |
150 | #ifdef CONFIG_HOTPLUG_CPU | 155 | #ifdef CONFIG_HOTPLUG_CPU |
diff --git a/arch/arm/kernel/swp_emulate.c b/arch/arm/kernel/swp_emulate.c index afdd51e30bec..1361756782c7 100644 --- a/arch/arm/kernel/swp_emulate.c +++ b/arch/arm/kernel/swp_emulate.c | |||
@@ -42,7 +42,7 @@ | |||
42 | " cmp %0, #0\n" \ | 42 | " cmp %0, #0\n" \ |
43 | " movne %0, %4\n" \ | 43 | " movne %0, %4\n" \ |
44 | "2:\n" \ | 44 | "2:\n" \ |
45 | " .section .fixup,\"ax\"\n" \ | 45 | " .section .text.fixup,\"ax\"\n" \ |
46 | " .align 2\n" \ | 46 | " .align 2\n" \ |
47 | "3: mov %0, %5\n" \ | 47 | "3: mov %0, %5\n" \ |
48 | " b 2b\n" \ | 48 | " b 2b\n" \ |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index b31aa73e8076..7a301be9ac67 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -74,7 +74,7 @@ SECTIONS | |||
74 | ARM_EXIT_DISCARD(EXIT_DATA) | 74 | ARM_EXIT_DISCARD(EXIT_DATA) |
75 | EXIT_CALL | 75 | EXIT_CALL |
76 | #ifndef CONFIG_MMU | 76 | #ifndef CONFIG_MMU |
77 | *(.fixup) | 77 | *(.text.fixup) |
78 | *(__ex_table) | 78 | *(__ex_table) |
79 | #endif | 79 | #endif |
80 | #ifndef CONFIG_SMP_ON_UP | 80 | #ifndef CONFIG_SMP_ON_UP |
@@ -100,6 +100,7 @@ SECTIONS | |||
100 | 100 | ||
101 | .text : { /* Real text segment */ | 101 | .text : { /* Real text segment */ |
102 | _stext = .; /* Text and read-only data */ | 102 | _stext = .; /* Text and read-only data */ |
103 | IDMAP_TEXT | ||
103 | __exception_text_start = .; | 104 | __exception_text_start = .; |
104 | *(.exception.text) | 105 | *(.exception.text) |
105 | __exception_text_end = .; | 106 | __exception_text_end = .; |
@@ -108,10 +109,6 @@ SECTIONS | |||
108 | SCHED_TEXT | 109 | SCHED_TEXT |
109 | LOCK_TEXT | 110 | LOCK_TEXT |
110 | KPROBES_TEXT | 111 | KPROBES_TEXT |
111 | IDMAP_TEXT | ||
112 | #ifdef CONFIG_MMU | ||
113 | *(.fixup) | ||
114 | #endif | ||
115 | *(.gnu.warning) | 112 | *(.gnu.warning) |
116 | *(.glue_7) | 113 | *(.glue_7) |
117 | *(.glue_7t) | 114 | *(.glue_7t) |
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 07e7eb1d7ab6..5560f74f9eee 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c | |||
@@ -540,7 +540,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
540 | 540 | ||
541 | vcpu->mode = OUTSIDE_GUEST_MODE; | 541 | vcpu->mode = OUTSIDE_GUEST_MODE; |
542 | kvm_guest_exit(); | 542 | kvm_guest_exit(); |
543 | trace_kvm_exit(*vcpu_pc(vcpu)); | 543 | trace_kvm_exit(kvm_vcpu_trap_get_class(vcpu), *vcpu_pc(vcpu)); |
544 | /* | 544 | /* |
545 | * We may have taken a host interrupt in HYP mode (ie | 545 | * We may have taken a host interrupt in HYP mode (ie |
546 | * while executing the guest). This interrupt is still | 546 | * while executing the guest). This interrupt is still |
diff --git a/arch/arm/kvm/trace.h b/arch/arm/kvm/trace.h index 881874b1a036..6817664b46b8 100644 --- a/arch/arm/kvm/trace.h +++ b/arch/arm/kvm/trace.h | |||
@@ -25,18 +25,22 @@ TRACE_EVENT(kvm_entry, | |||
25 | ); | 25 | ); |
26 | 26 | ||
27 | TRACE_EVENT(kvm_exit, | 27 | TRACE_EVENT(kvm_exit, |
28 | TP_PROTO(unsigned long vcpu_pc), | 28 | TP_PROTO(unsigned int exit_reason, unsigned long vcpu_pc), |
29 | TP_ARGS(vcpu_pc), | 29 | TP_ARGS(exit_reason, vcpu_pc), |
30 | 30 | ||
31 | TP_STRUCT__entry( | 31 | TP_STRUCT__entry( |
32 | __field( unsigned int, exit_reason ) | ||
32 | __field( unsigned long, vcpu_pc ) | 33 | __field( unsigned long, vcpu_pc ) |
33 | ), | 34 | ), |
34 | 35 | ||
35 | TP_fast_assign( | 36 | TP_fast_assign( |
37 | __entry->exit_reason = exit_reason; | ||
36 | __entry->vcpu_pc = vcpu_pc; | 38 | __entry->vcpu_pc = vcpu_pc; |
37 | ), | 39 | ), |
38 | 40 | ||
39 | TP_printk("PC: 0x%08lx", __entry->vcpu_pc) | 41 | TP_printk("HSR_EC: 0x%04x, PC: 0x%08lx", |
42 | __entry->exit_reason, | ||
43 | __entry->vcpu_pc) | ||
40 | ); | 44 | ); |
41 | 45 | ||
42 | TRACE_EVENT(kvm_guest_fault, | 46 | TRACE_EVENT(kvm_guest_fault, |
diff --git a/arch/arm/lib/clear_user.S b/arch/arm/lib/clear_user.S index 14a0d988c82c..1710fd7db2d5 100644 --- a/arch/arm/lib/clear_user.S +++ b/arch/arm/lib/clear_user.S | |||
@@ -47,7 +47,7 @@ USER( strnebt r2, [r0]) | |||
47 | ENDPROC(__clear_user) | 47 | ENDPROC(__clear_user) |
48 | ENDPROC(__clear_user_std) | 48 | ENDPROC(__clear_user_std) |
49 | 49 | ||
50 | .pushsection .fixup,"ax" | 50 | .pushsection .text.fixup,"ax" |
51 | .align 0 | 51 | .align 0 |
52 | 9001: ldmfd sp!, {r0, pc} | 52 | 9001: ldmfd sp!, {r0, pc} |
53 | .popsection | 53 | .popsection |
diff --git a/arch/arm/lib/copy_to_user.S b/arch/arm/lib/copy_to_user.S index a9d3db16ecb5..9648b0675a3e 100644 --- a/arch/arm/lib/copy_to_user.S +++ b/arch/arm/lib/copy_to_user.S | |||
@@ -100,7 +100,7 @@ WEAK(__copy_to_user) | |||
100 | ENDPROC(__copy_to_user) | 100 | ENDPROC(__copy_to_user) |
101 | ENDPROC(__copy_to_user_std) | 101 | ENDPROC(__copy_to_user_std) |
102 | 102 | ||
103 | .pushsection .fixup,"ax" | 103 | .pushsection .text.fixup,"ax" |
104 | .align 0 | 104 | .align 0 |
105 | copy_abort_preamble | 105 | copy_abort_preamble |
106 | ldmfd sp!, {r1, r2, r3} | 106 | ldmfd sp!, {r1, r2, r3} |
diff --git a/arch/arm/lib/csumpartialcopyuser.S b/arch/arm/lib/csumpartialcopyuser.S index 7d08b43d2c0e..1d0957e61f89 100644 --- a/arch/arm/lib/csumpartialcopyuser.S +++ b/arch/arm/lib/csumpartialcopyuser.S | |||
@@ -68,7 +68,7 @@ | |||
68 | * so properly, we would have to add in whatever registers were loaded before | 68 | * so properly, we would have to add in whatever registers were loaded before |
69 | * the fault, which, with the current asm above is not predictable. | 69 | * the fault, which, with the current asm above is not predictable. |
70 | */ | 70 | */ |
71 | .pushsection .fixup,"ax" | 71 | .pushsection .text.fixup,"ax" |
72 | .align 4 | 72 | .align 4 |
73 | 9001: mov r4, #-EFAULT | 73 | 9001: mov r4, #-EFAULT |
74 | ldr r5, [sp, #8*4] @ *err_ptr | 74 | ldr r5, [sp, #8*4] @ *err_ptr |
diff --git a/arch/arm/lib/delay.c b/arch/arm/lib/delay.c index 312d43eb686a..8044591dca72 100644 --- a/arch/arm/lib/delay.c +++ b/arch/arm/lib/delay.c | |||
@@ -83,6 +83,12 @@ void __init register_current_timer_delay(const struct delay_timer *timer) | |||
83 | NSEC_PER_SEC, 3600); | 83 | NSEC_PER_SEC, 3600); |
84 | res = cyc_to_ns(1ULL, new_mult, new_shift); | 84 | res = cyc_to_ns(1ULL, new_mult, new_shift); |
85 | 85 | ||
86 | if (res > 1000) { | ||
87 | pr_err("Ignoring delay timer %ps, which has insufficient resolution of %lluns\n", | ||
88 | timer, res); | ||
89 | return; | ||
90 | } | ||
91 | |||
86 | if (!delay_calibrated && (!delay_res || (res < delay_res))) { | 92 | if (!delay_calibrated && (!delay_res || (res < delay_res))) { |
87 | pr_info("Switching to timer-based delay loop, resolution %lluns\n", res); | 93 | pr_info("Switching to timer-based delay loop, resolution %lluns\n", res); |
88 | delay_timer = timer; | 94 | delay_timer = timer; |
diff --git a/arch/arm/mach-asm9260/Kconfig b/arch/arm/mach-asm9260/Kconfig index 8423be76080e..52241207a82a 100644 --- a/arch/arm/mach-asm9260/Kconfig +++ b/arch/arm/mach-asm9260/Kconfig | |||
@@ -2,5 +2,7 @@ config MACH_ASM9260 | |||
2 | bool "Alphascale ASM9260" | 2 | bool "Alphascale ASM9260" |
3 | depends on ARCH_MULTI_V5 | 3 | depends on ARCH_MULTI_V5 |
4 | select CPU_ARM926T | 4 | select CPU_ARM926T |
5 | select ASM9260_TIMER | ||
6 | select GENERIC_CLOCKEVENTS | ||
5 | help | 7 | help |
6 | Support for Alphascale ASM9260 based platform. | 8 | Support for Alphascale ASM9260 based platform. |
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 5e34fb143309..aa4116e9452f 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -270,37 +270,35 @@ static void __init at91_pm_sram_init(void) | |||
270 | phys_addr_t sram_pbase; | 270 | phys_addr_t sram_pbase; |
271 | unsigned long sram_base; | 271 | unsigned long sram_base; |
272 | struct device_node *node; | 272 | struct device_node *node; |
273 | struct platform_device *pdev; | 273 | struct platform_device *pdev = NULL; |
274 | 274 | ||
275 | node = of_find_compatible_node(NULL, NULL, "mmio-sram"); | 275 | for_each_compatible_node(node, NULL, "mmio-sram") { |
276 | if (!node) { | 276 | pdev = of_find_device_by_node(node); |
277 | pr_warn("%s: failed to find sram node!\n", __func__); | 277 | if (pdev) { |
278 | return; | 278 | of_node_put(node); |
279 | break; | ||
280 | } | ||
279 | } | 281 | } |
280 | 282 | ||
281 | pdev = of_find_device_by_node(node); | ||
282 | if (!pdev) { | 283 | if (!pdev) { |
283 | pr_warn("%s: failed to find sram device!\n", __func__); | 284 | pr_warn("%s: failed to find sram device!\n", __func__); |
284 | goto put_node; | 285 | return; |
285 | } | 286 | } |
286 | 287 | ||
287 | sram_pool = dev_get_gen_pool(&pdev->dev); | 288 | sram_pool = dev_get_gen_pool(&pdev->dev); |
288 | if (!sram_pool) { | 289 | if (!sram_pool) { |
289 | pr_warn("%s: sram pool unavailable!\n", __func__); | 290 | pr_warn("%s: sram pool unavailable!\n", __func__); |
290 | goto put_node; | 291 | return; |
291 | } | 292 | } |
292 | 293 | ||
293 | sram_base = gen_pool_alloc(sram_pool, at91_slow_clock_sz); | 294 | sram_base = gen_pool_alloc(sram_pool, at91_slow_clock_sz); |
294 | if (!sram_base) { | 295 | if (!sram_base) { |
295 | pr_warn("%s: unable to alloc ocram!\n", __func__); | 296 | pr_warn("%s: unable to alloc ocram!\n", __func__); |
296 | goto put_node; | 297 | return; |
297 | } | 298 | } |
298 | 299 | ||
299 | sram_pbase = gen_pool_virt_to_phys(sram_pool, sram_base); | 300 | sram_pbase = gen_pool_virt_to_phys(sram_pool, sram_base); |
300 | slow_clock = __arm_ioremap_exec(sram_pbase, at91_slow_clock_sz, false); | 301 | slow_clock = __arm_ioremap_exec(sram_pbase, at91_slow_clock_sz, false); |
301 | |||
302 | put_node: | ||
303 | of_node_put(node); | ||
304 | } | 302 | } |
305 | #endif | 303 | #endif |
306 | 304 | ||
diff --git a/arch/arm/mach-at91/pm.h b/arch/arm/mach-at91/pm.h index d2c89963af2d..86c0aa819d25 100644 --- a/arch/arm/mach-at91/pm.h +++ b/arch/arm/mach-at91/pm.h | |||
@@ -44,7 +44,7 @@ static inline void at91rm9200_standby(void) | |||
44 | " mcr p15, 0, %0, c7, c0, 4\n\t" | 44 | " mcr p15, 0, %0, c7, c0, 4\n\t" |
45 | " str %5, [%1, %2]" | 45 | " str %5, [%1, %2]" |
46 | : | 46 | : |
47 | : "r" (0), "r" (AT91_BASE_SYS), "r" (AT91RM9200_SDRAMC_LPR), | 47 | : "r" (0), "r" (at91_ramc_base[0]), "r" (AT91RM9200_SDRAMC_LPR), |
48 | "r" (1), "r" (AT91RM9200_SDRAMC_SRR), | 48 | "r" (1), "r" (AT91RM9200_SDRAMC_SRR), |
49 | "r" (lpr)); | 49 | "r" (lpr)); |
50 | } | 50 | } |
diff --git a/arch/arm/mach-at91/pm_slowclock.S b/arch/arm/mach-at91/pm_slowclock.S index 556151e85ec4..931f0e302c03 100644 --- a/arch/arm/mach-at91/pm_slowclock.S +++ b/arch/arm/mach-at91/pm_slowclock.S | |||
@@ -25,11 +25,6 @@ | |||
25 | */ | 25 | */ |
26 | #undef SLOWDOWN_MASTER_CLOCK | 26 | #undef SLOWDOWN_MASTER_CLOCK |
27 | 27 | ||
28 | #define MCKRDY_TIMEOUT 1000 | ||
29 | #define MOSCRDY_TIMEOUT 1000 | ||
30 | #define PLLALOCK_TIMEOUT 1000 | ||
31 | #define PLLBLOCK_TIMEOUT 1000 | ||
32 | |||
33 | pmc .req r0 | 28 | pmc .req r0 |
34 | sdramc .req r1 | 29 | sdramc .req r1 |
35 | ramc1 .req r2 | 30 | ramc1 .req r2 |
@@ -41,60 +36,42 @@ tmp2 .req r5 | |||
41 | * Wait until master clock is ready (after switching master clock source) | 36 | * Wait until master clock is ready (after switching master clock source) |
42 | */ | 37 | */ |
43 | .macro wait_mckrdy | 38 | .macro wait_mckrdy |
44 | mov tmp2, #MCKRDY_TIMEOUT | 39 | 1: ldr tmp1, [pmc, #AT91_PMC_SR] |
45 | 1: sub tmp2, tmp2, #1 | ||
46 | cmp tmp2, #0 | ||
47 | beq 2f | ||
48 | ldr tmp1, [pmc, #AT91_PMC_SR] | ||
49 | tst tmp1, #AT91_PMC_MCKRDY | 40 | tst tmp1, #AT91_PMC_MCKRDY |
50 | beq 1b | 41 | beq 1b |
51 | 2: | ||
52 | .endm | 42 | .endm |
53 | 43 | ||
54 | /* | 44 | /* |
55 | * Wait until master oscillator has stabilized. | 45 | * Wait until master oscillator has stabilized. |
56 | */ | 46 | */ |
57 | .macro wait_moscrdy | 47 | .macro wait_moscrdy |
58 | mov tmp2, #MOSCRDY_TIMEOUT | 48 | 1: ldr tmp1, [pmc, #AT91_PMC_SR] |
59 | 1: sub tmp2, tmp2, #1 | ||
60 | cmp tmp2, #0 | ||
61 | beq 2f | ||
62 | ldr tmp1, [pmc, #AT91_PMC_SR] | ||
63 | tst tmp1, #AT91_PMC_MOSCS | 49 | tst tmp1, #AT91_PMC_MOSCS |
64 | beq 1b | 50 | beq 1b |
65 | 2: | ||
66 | .endm | 51 | .endm |
67 | 52 | ||
68 | /* | 53 | /* |
69 | * Wait until PLLA has locked. | 54 | * Wait until PLLA has locked. |
70 | */ | 55 | */ |
71 | .macro wait_pllalock | 56 | .macro wait_pllalock |
72 | mov tmp2, #PLLALOCK_TIMEOUT | 57 | 1: ldr tmp1, [pmc, #AT91_PMC_SR] |
73 | 1: sub tmp2, tmp2, #1 | ||
74 | cmp tmp2, #0 | ||
75 | beq 2f | ||
76 | ldr tmp1, [pmc, #AT91_PMC_SR] | ||
77 | tst tmp1, #AT91_PMC_LOCKA | 58 | tst tmp1, #AT91_PMC_LOCKA |
78 | beq 1b | 59 | beq 1b |
79 | 2: | ||
80 | .endm | 60 | .endm |
81 | 61 | ||
82 | /* | 62 | /* |
83 | * Wait until PLLB has locked. | 63 | * Wait until PLLB has locked. |
84 | */ | 64 | */ |
85 | .macro wait_pllblock | 65 | .macro wait_pllblock |
86 | mov tmp2, #PLLBLOCK_TIMEOUT | 66 | 1: ldr tmp1, [pmc, #AT91_PMC_SR] |
87 | 1: sub tmp2, tmp2, #1 | ||
88 | cmp tmp2, #0 | ||
89 | beq 2f | ||
90 | ldr tmp1, [pmc, #AT91_PMC_SR] | ||
91 | tst tmp1, #AT91_PMC_LOCKB | 67 | tst tmp1, #AT91_PMC_LOCKB |
92 | beq 1b | 68 | beq 1b |
93 | 2: | ||
94 | .endm | 69 | .endm |
95 | 70 | ||
96 | .text | 71 | .text |
97 | 72 | ||
73 | .arm | ||
74 | |||
98 | /* void at91_slow_clock(void __iomem *pmc, void __iomem *sdramc, | 75 | /* void at91_slow_clock(void __iomem *pmc, void __iomem *sdramc, |
99 | * void __iomem *ramc1, int memctrl) | 76 | * void __iomem *ramc1, int memctrl) |
100 | */ | 77 | */ |
@@ -134,6 +111,16 @@ ddr_sr_enable: | |||
134 | cmp memctrl, #AT91_MEMCTRL_DDRSDR | 111 | cmp memctrl, #AT91_MEMCTRL_DDRSDR |
135 | bne sdr_sr_enable | 112 | bne sdr_sr_enable |
136 | 113 | ||
114 | /* LPDDR1 --> force DDR2 mode during self-refresh */ | ||
115 | ldr tmp1, [sdramc, #AT91_DDRSDRC_MDR] | ||
116 | str tmp1, .saved_sam9_mdr | ||
117 | bic tmp1, tmp1, #~AT91_DDRSDRC_MD | ||
118 | cmp tmp1, #AT91_DDRSDRC_MD_LOW_POWER_DDR | ||
119 | ldreq tmp1, [sdramc, #AT91_DDRSDRC_MDR] | ||
120 | biceq tmp1, tmp1, #AT91_DDRSDRC_MD | ||
121 | orreq tmp1, tmp1, #AT91_DDRSDRC_MD_DDR2 | ||
122 | streq tmp1, [sdramc, #AT91_DDRSDRC_MDR] | ||
123 | |||
137 | /* prepare for DDRAM self-refresh mode */ | 124 | /* prepare for DDRAM self-refresh mode */ |
138 | ldr tmp1, [sdramc, #AT91_DDRSDRC_LPR] | 125 | ldr tmp1, [sdramc, #AT91_DDRSDRC_LPR] |
139 | str tmp1, .saved_sam9_lpr | 126 | str tmp1, .saved_sam9_lpr |
@@ -142,14 +129,26 @@ ddr_sr_enable: | |||
142 | 129 | ||
143 | /* figure out if we use the second ram controller */ | 130 | /* figure out if we use the second ram controller */ |
144 | cmp ramc1, #0 | 131 | cmp ramc1, #0 |
145 | ldrne tmp2, [ramc1, #AT91_DDRSDRC_LPR] | 132 | beq ddr_no_2nd_ctrl |
146 | strne tmp2, .saved_sam9_lpr1 | 133 | |
147 | bicne tmp2, #AT91_DDRSDRC_LPCB | 134 | ldr tmp2, [ramc1, #AT91_DDRSDRC_MDR] |
148 | orrne tmp2, #AT91_DDRSDRC_LPCB_SELF_REFRESH | 135 | str tmp2, .saved_sam9_mdr1 |
136 | bic tmp2, tmp2, #~AT91_DDRSDRC_MD | ||
137 | cmp tmp2, #AT91_DDRSDRC_MD_LOW_POWER_DDR | ||
138 | ldreq tmp2, [ramc1, #AT91_DDRSDRC_MDR] | ||
139 | biceq tmp2, tmp2, #AT91_DDRSDRC_MD | ||
140 | orreq tmp2, tmp2, #AT91_DDRSDRC_MD_DDR2 | ||
141 | streq tmp2, [ramc1, #AT91_DDRSDRC_MDR] | ||
142 | |||
143 | ldr tmp2, [ramc1, #AT91_DDRSDRC_LPR] | ||
144 | str tmp2, .saved_sam9_lpr1 | ||
145 | bic tmp2, #AT91_DDRSDRC_LPCB | ||
146 | orr tmp2, #AT91_DDRSDRC_LPCB_SELF_REFRESH | ||
149 | 147 | ||
150 | /* Enable DDRAM self-refresh mode */ | 148 | /* Enable DDRAM self-refresh mode */ |
149 | str tmp2, [ramc1, #AT91_DDRSDRC_LPR] | ||
150 | ddr_no_2nd_ctrl: | ||
151 | str tmp1, [sdramc, #AT91_DDRSDRC_LPR] | 151 | str tmp1, [sdramc, #AT91_DDRSDRC_LPR] |
152 | strne tmp2, [ramc1, #AT91_DDRSDRC_LPR] | ||
153 | 152 | ||
154 | b sdr_sr_done | 153 | b sdr_sr_done |
155 | 154 | ||
@@ -208,6 +207,7 @@ sdr_sr_done: | |||
208 | /* Turn off the main oscillator */ | 207 | /* Turn off the main oscillator */ |
209 | ldr tmp1, [pmc, #AT91_CKGR_MOR] | 208 | ldr tmp1, [pmc, #AT91_CKGR_MOR] |
210 | bic tmp1, tmp1, #AT91_PMC_MOSCEN | 209 | bic tmp1, tmp1, #AT91_PMC_MOSCEN |
210 | orr tmp1, tmp1, #AT91_PMC_KEY | ||
211 | str tmp1, [pmc, #AT91_CKGR_MOR] | 211 | str tmp1, [pmc, #AT91_CKGR_MOR] |
212 | 212 | ||
213 | /* Wait for interrupt */ | 213 | /* Wait for interrupt */ |
@@ -216,6 +216,7 @@ sdr_sr_done: | |||
216 | /* Turn on the main oscillator */ | 216 | /* Turn on the main oscillator */ |
217 | ldr tmp1, [pmc, #AT91_CKGR_MOR] | 217 | ldr tmp1, [pmc, #AT91_CKGR_MOR] |
218 | orr tmp1, tmp1, #AT91_PMC_MOSCEN | 218 | orr tmp1, tmp1, #AT91_PMC_MOSCEN |
219 | orr tmp1, tmp1, #AT91_PMC_KEY | ||
219 | str tmp1, [pmc, #AT91_CKGR_MOR] | 220 | str tmp1, [pmc, #AT91_CKGR_MOR] |
220 | 221 | ||
221 | wait_moscrdy | 222 | wait_moscrdy |
@@ -280,12 +281,17 @@ sdr_sr_done: | |||
280 | */ | 281 | */ |
281 | cmp memctrl, #AT91_MEMCTRL_DDRSDR | 282 | cmp memctrl, #AT91_MEMCTRL_DDRSDR |
282 | bne sdr_en_restore | 283 | bne sdr_en_restore |
284 | /* Restore MDR in case of LPDDR1 */ | ||
285 | ldr tmp1, .saved_sam9_mdr | ||
286 | str tmp1, [sdramc, #AT91_DDRSDRC_MDR] | ||
283 | /* Restore LPR on AT91 with DDRAM */ | 287 | /* Restore LPR on AT91 with DDRAM */ |
284 | ldr tmp1, .saved_sam9_lpr | 288 | ldr tmp1, .saved_sam9_lpr |
285 | str tmp1, [sdramc, #AT91_DDRSDRC_LPR] | 289 | str tmp1, [sdramc, #AT91_DDRSDRC_LPR] |
286 | 290 | ||
287 | /* if we use the second ram controller */ | 291 | /* if we use the second ram controller */ |
288 | cmp ramc1, #0 | 292 | cmp ramc1, #0 |
293 | ldrne tmp2, .saved_sam9_mdr1 | ||
294 | strne tmp2, [ramc1, #AT91_DDRSDRC_MDR] | ||
289 | ldrne tmp2, .saved_sam9_lpr1 | 295 | ldrne tmp2, .saved_sam9_lpr1 |
290 | strne tmp2, [ramc1, #AT91_DDRSDRC_LPR] | 296 | strne tmp2, [ramc1, #AT91_DDRSDRC_LPR] |
291 | 297 | ||
@@ -319,5 +325,11 @@ ram_restored: | |||
319 | .saved_sam9_lpr1: | 325 | .saved_sam9_lpr1: |
320 | .word 0 | 326 | .word 0 |
321 | 327 | ||
328 | .saved_sam9_mdr: | ||
329 | .word 0 | ||
330 | |||
331 | .saved_sam9_mdr1: | ||
332 | .word 0 | ||
333 | |||
322 | ENTRY(at91_slow_clock_sz) | 334 | ENTRY(at91_slow_clock_sz) |
323 | .word .-at91_slow_clock | 335 | .word .-at91_slow_clock |
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 3f32c47a6d74..d2e9f12d12f1 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c | |||
@@ -126,8 +126,7 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) | |||
126 | */ | 126 | */ |
127 | void exynos_cpu_power_down(int cpu) | 127 | void exynos_cpu_power_down(int cpu) |
128 | { | 128 | { |
129 | if (cpu == 0 && (of_machine_is_compatible("samsung,exynos5420") || | 129 | if (cpu == 0 && (soc_is_exynos5420() || soc_is_exynos5800())) { |
130 | of_machine_is_compatible("samsung,exynos5800"))) { | ||
131 | /* | 130 | /* |
132 | * Bypass power down for CPU0 during suspend. Check for | 131 | * Bypass power down for CPU0 during suspend. Check for |
133 | * the SYS_PWR_REG value to decide if we are suspending | 132 | * the SYS_PWR_REG value to decide if we are suspending |
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index 20f267121b3e..37266a826437 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c | |||
@@ -161,6 +161,34 @@ no_clk: | |||
161 | of_genpd_add_provider_simple(np, &pd->pd); | 161 | of_genpd_add_provider_simple(np, &pd->pd); |
162 | } | 162 | } |
163 | 163 | ||
164 | /* Assign the child power domains to their parents */ | ||
165 | for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") { | ||
166 | struct generic_pm_domain *child_domain, *parent_domain; | ||
167 | struct of_phandle_args args; | ||
168 | |||
169 | args.np = np; | ||
170 | args.args_count = 0; | ||
171 | child_domain = of_genpd_get_from_provider(&args); | ||
172 | if (!child_domain) | ||
173 | continue; | ||
174 | |||
175 | if (of_parse_phandle_with_args(np, "power-domains", | ||
176 | "#power-domain-cells", 0, &args) != 0) | ||
177 | continue; | ||
178 | |||
179 | parent_domain = of_genpd_get_from_provider(&args); | ||
180 | if (!parent_domain) | ||
181 | continue; | ||
182 | |||
183 | if (pm_genpd_add_subdomain(parent_domain, child_domain)) | ||
184 | pr_warn("%s failed to add subdomain: %s\n", | ||
185 | parent_domain->name, child_domain->name); | ||
186 | else | ||
187 | pr_info("%s has as child subdomain: %s.\n", | ||
188 | parent_domain->name, child_domain->name); | ||
189 | of_node_put(np); | ||
190 | } | ||
191 | |||
164 | return 0; | 192 | return 0; |
165 | } | 193 | } |
166 | arch_initcall(exynos4_pm_init_power_domain); | 194 | arch_initcall(exynos4_pm_init_power_domain); |
diff --git a/arch/arm/mach-exynos/sleep.S b/arch/arm/mach-exynos/sleep.S index 31d25834b9c4..cf950790fbdc 100644 --- a/arch/arm/mach-exynos/sleep.S +++ b/arch/arm/mach-exynos/sleep.S | |||
@@ -23,14 +23,7 @@ | |||
23 | #define CPU_MASK 0xff0ffff0 | 23 | #define CPU_MASK 0xff0ffff0 |
24 | #define CPU_CORTEX_A9 0x410fc090 | 24 | #define CPU_CORTEX_A9 0x410fc090 |
25 | 25 | ||
26 | /* | 26 | .text |
27 | * The following code is located into the .data section. This is to | ||
28 | * allow l2x0_regs_phys to be accessed with a relative load while we | ||
29 | * can't rely on any MMU translation. We could have put l2x0_regs_phys | ||
30 | * in the .text section as well, but some setups might insist on it to | ||
31 | * be truly read-only. (Reference from: arch/arm/kernel/sleep.S) | ||
32 | */ | ||
33 | .data | ||
34 | .align | 27 | .align |
35 | 28 | ||
36 | /* | 29 | /* |
@@ -69,10 +62,12 @@ ENTRY(exynos_cpu_resume_ns) | |||
69 | cmp r0, r1 | 62 | cmp r0, r1 |
70 | bne skip_cp15 | 63 | bne skip_cp15 |
71 | 64 | ||
72 | adr r0, cp15_save_power | 65 | adr r0, _cp15_save_power |
73 | ldr r1, [r0] | 66 | ldr r1, [r0] |
74 | adr r0, cp15_save_diag | 67 | ldr r1, [r0, r1] |
68 | adr r0, _cp15_save_diag | ||
75 | ldr r2, [r0] | 69 | ldr r2, [r0] |
70 | ldr r2, [r0, r2] | ||
76 | mov r0, #SMC_CMD_C15RESUME | 71 | mov r0, #SMC_CMD_C15RESUME |
77 | dsb | 72 | dsb |
78 | smc #0 | 73 | smc #0 |
@@ -118,14 +113,20 @@ skip_l2x0: | |||
118 | skip_cp15: | 113 | skip_cp15: |
119 | b cpu_resume | 114 | b cpu_resume |
120 | ENDPROC(exynos_cpu_resume_ns) | 115 | ENDPROC(exynos_cpu_resume_ns) |
116 | |||
117 | .align | ||
118 | _cp15_save_power: | ||
119 | .long cp15_save_power - . | ||
120 | _cp15_save_diag: | ||
121 | .long cp15_save_diag - . | ||
122 | #ifdef CONFIG_CACHE_L2X0 | ||
123 | 1: .long l2x0_saved_regs - . | ||
124 | #endif /* CONFIG_CACHE_L2X0 */ | ||
125 | |||
126 | .data | ||
121 | .globl cp15_save_diag | 127 | .globl cp15_save_diag |
122 | cp15_save_diag: | 128 | cp15_save_diag: |
123 | .long 0 @ cp15 diagnostic | 129 | .long 0 @ cp15 diagnostic |
124 | .globl cp15_save_power | 130 | .globl cp15_save_power |
125 | cp15_save_power: | 131 | cp15_save_power: |
126 | .long 0 @ cp15 power control | 132 | .long 0 @ cp15 power control |
127 | |||
128 | #ifdef CONFIG_CACHE_L2X0 | ||
129 | .align | ||
130 | 1: .long l2x0_saved_regs - . | ||
131 | #endif /* CONFIG_CACHE_L2X0 */ | ||
diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index 52e2b1a2fddb..318d127df147 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c | |||
@@ -87,8 +87,8 @@ static unsigned int exynos_pmu_spare3; | |||
87 | static u32 exynos_irqwake_intmask = 0xffffffff; | 87 | static u32 exynos_irqwake_intmask = 0xffffffff; |
88 | 88 | ||
89 | static const struct exynos_wkup_irq exynos3250_wkup_irq[] = { | 89 | static const struct exynos_wkup_irq exynos3250_wkup_irq[] = { |
90 | { 73, BIT(1) }, /* RTC alarm */ | 90 | { 105, BIT(1) }, /* RTC alarm */ |
91 | { 74, BIT(2) }, /* RTC tick */ | 91 | { 106, BIT(2) }, /* RTC tick */ |
92 | { /* sentinel */ }, | 92 | { /* sentinel */ }, |
93 | }; | 93 | }; |
94 | 94 | ||
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 4ad6e473cf83..9de3412af406 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -211,8 +211,9 @@ static void __init imx6q_1588_init(void) | |||
211 | * set bit IOMUXC_GPR1[21]. Or the PTP clock must be from pad | 211 | * set bit IOMUXC_GPR1[21]. Or the PTP clock must be from pad |
212 | * (external OSC), and we need to clear the bit. | 212 | * (external OSC), and we need to clear the bit. |
213 | */ | 213 | */ |
214 | clksel = ptp_clk == enet_ref ? IMX6Q_GPR1_ENET_CLK_SEL_ANATOP : | 214 | clksel = clk_is_match(ptp_clk, enet_ref) ? |
215 | IMX6Q_GPR1_ENET_CLK_SEL_PAD; | 215 | IMX6Q_GPR1_ENET_CLK_SEL_ANATOP : |
216 | IMX6Q_GPR1_ENET_CLK_SEL_PAD; | ||
216 | gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr"); | 217 | gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr"); |
217 | if (!IS_ERR(gpr)) | 218 | if (!IS_ERR(gpr)) |
218 | regmap_update_bits(gpr, IOMUXC_GPR1, | 219 | regmap_update_bits(gpr, IOMUXC_GPR1, |
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c index 61bfe584a9d7..fc832040c6e9 100644 --- a/arch/arm/mach-msm/board-halibut.c +++ b/arch/arm/mach-msm/board-halibut.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/input.h> | 20 | #include <linux/input.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/smc91x.h> | ||
23 | 24 | ||
24 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
@@ -46,15 +47,20 @@ static struct resource smc91x_resources[] = { | |||
46 | [1] = { | 47 | [1] = { |
47 | .start = MSM_GPIO_TO_INT(49), | 48 | .start = MSM_GPIO_TO_INT(49), |
48 | .end = MSM_GPIO_TO_INT(49), | 49 | .end = MSM_GPIO_TO_INT(49), |
49 | .flags = IORESOURCE_IRQ, | 50 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
50 | }, | 51 | }, |
51 | }; | 52 | }; |
52 | 53 | ||
54 | static struct smc91x_platdata smc91x_platdata = { | ||
55 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | ||
56 | }; | ||
57 | |||
53 | static struct platform_device smc91x_device = { | 58 | static struct platform_device smc91x_device = { |
54 | .name = "smc91x", | 59 | .name = "smc91x", |
55 | .id = 0, | 60 | .id = 0, |
56 | .num_resources = ARRAY_SIZE(smc91x_resources), | 61 | .num_resources = ARRAY_SIZE(smc91x_resources), |
57 | .resource = smc91x_resources, | 62 | .resource = smc91x_resources, |
63 | .dev.platform_data = &smc91x_platdata, | ||
58 | }; | 64 | }; |
59 | 65 | ||
60 | static struct platform_device *devices[] __initdata = { | 66 | static struct platform_device *devices[] __initdata = { |
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c index 4c748616ef47..10016a3bc698 100644 --- a/arch/arm/mach-msm/board-qsd8x50.c +++ b/arch/arm/mach-msm/board-qsd8x50.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/usb/msm_hsusb.h> | 22 | #include <linux/usb/msm_hsusb.h> |
23 | #include <linux/err.h> | 23 | #include <linux/err.h> |
24 | #include <linux/clkdev.h> | 24 | #include <linux/clkdev.h> |
25 | #include <linux/smc91x.h> | ||
25 | 26 | ||
26 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
27 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
@@ -49,15 +50,20 @@ static struct resource smc91x_resources[] = { | |||
49 | .flags = IORESOURCE_MEM, | 50 | .flags = IORESOURCE_MEM, |
50 | }, | 51 | }, |
51 | [1] = { | 52 | [1] = { |
52 | .flags = IORESOURCE_IRQ, | 53 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
53 | }, | 54 | }, |
54 | }; | 55 | }; |
55 | 56 | ||
57 | static struct smc91x_platdata smc91x_platdata = { | ||
58 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | ||
59 | }; | ||
60 | |||
56 | static struct platform_device smc91x_device = { | 61 | static struct platform_device smc91x_device = { |
57 | .name = "smc91x", | 62 | .name = "smc91x", |
58 | .id = 0, | 63 | .id = 0, |
59 | .num_resources = ARRAY_SIZE(smc91x_resources), | 64 | .num_resources = ARRAY_SIZE(smc91x_resources), |
60 | .resource = smc91x_resources, | 65 | .resource = smc91x_resources, |
66 | .dev.platform_data = &smc91x_platdata, | ||
61 | }; | 67 | }; |
62 | 68 | ||
63 | static int __init msm_init_smc91x(void) | 69 | static int __init msm_init_smc91x(void) |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 92afb723dcfc..355b08936871 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -1692,16 +1692,15 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name) | |||
1692 | if (ret == -EBUSY) | 1692 | if (ret == -EBUSY) |
1693 | pr_warn("omap_hwmod: %s: failed to hardreset\n", oh->name); | 1693 | pr_warn("omap_hwmod: %s: failed to hardreset\n", oh->name); |
1694 | 1694 | ||
1695 | if (!ret) { | 1695 | if (oh->clkdm) { |
1696 | /* | 1696 | /* |
1697 | * Set the clockdomain to HW_AUTO, assuming that the | 1697 | * Set the clockdomain to HW_AUTO, assuming that the |
1698 | * previous state was HW_AUTO. | 1698 | * previous state was HW_AUTO. |
1699 | */ | 1699 | */ |
1700 | if (oh->clkdm && hwsup) | 1700 | if (hwsup) |
1701 | clkdm_allow_idle(oh->clkdm); | 1701 | clkdm_allow_idle(oh->clkdm); |
1702 | } else { | 1702 | |
1703 | if (oh->clkdm) | 1703 | clkdm_hwmod_disable(oh->clkdm, oh); |
1704 | clkdm_hwmod_disable(oh->clkdm, oh); | ||
1705 | } | 1704 | } |
1706 | 1705 | ||
1707 | return ret; | 1706 | return ret; |
@@ -2698,6 +2697,7 @@ static int __init _register(struct omap_hwmod *oh) | |||
2698 | INIT_LIST_HEAD(&oh->master_ports); | 2697 | INIT_LIST_HEAD(&oh->master_ports); |
2699 | INIT_LIST_HEAD(&oh->slave_ports); | 2698 | INIT_LIST_HEAD(&oh->slave_ports); |
2700 | spin_lock_init(&oh->_lock); | 2699 | spin_lock_init(&oh->_lock); |
2700 | lockdep_set_class(&oh->_lock, &oh->hwmod_key); | ||
2701 | 2701 | ||
2702 | oh->_state = _HWMOD_STATE_REGISTERED; | 2702 | oh->_state = _HWMOD_STATE_REGISTERED; |
2703 | 2703 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h index 9d4bec6ee742..9611c91d9b82 100644 --- a/arch/arm/mach-omap2/omap_hwmod.h +++ b/arch/arm/mach-omap2/omap_hwmod.h | |||
@@ -674,6 +674,7 @@ struct omap_hwmod { | |||
674 | u32 _sysc_cache; | 674 | u32 _sysc_cache; |
675 | void __iomem *_mpu_rt_va; | 675 | void __iomem *_mpu_rt_va; |
676 | spinlock_t _lock; | 676 | spinlock_t _lock; |
677 | struct lock_class_key hwmod_key; /* unique lock class */ | ||
677 | struct list_head node; | 678 | struct list_head node; |
678 | struct omap_hwmod_ocp_if *_mpu_port; | 679 | struct omap_hwmod_ocp_if *_mpu_port; |
679 | unsigned int (*xlate_irq)(unsigned int); | 680 | unsigned int (*xlate_irq)(unsigned int); |
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c index e8692e7675b8..16fe7a1b7a35 100644 --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c | |||
@@ -1466,55 +1466,18 @@ static struct omap_hwmod dra7xx_ocp2scp3_hwmod = { | |||
1466 | * | 1466 | * |
1467 | */ | 1467 | */ |
1468 | 1468 | ||
1469 | static struct omap_hwmod_class dra7xx_pcie_hwmod_class = { | 1469 | static struct omap_hwmod_class dra7xx_pciess_hwmod_class = { |
1470 | .name = "pcie", | 1470 | .name = "pcie", |
1471 | }; | 1471 | }; |
1472 | 1472 | ||
1473 | /* pcie1 */ | 1473 | /* pcie1 */ |
1474 | static struct omap_hwmod dra7xx_pcie1_hwmod = { | 1474 | static struct omap_hwmod dra7xx_pciess1_hwmod = { |
1475 | .name = "pcie1", | 1475 | .name = "pcie1", |
1476 | .class = &dra7xx_pcie_hwmod_class, | 1476 | .class = &dra7xx_pciess_hwmod_class, |
1477 | .clkdm_name = "pcie_clkdm", | 1477 | .clkdm_name = "pcie_clkdm", |
1478 | .main_clk = "l4_root_clk_div", | 1478 | .main_clk = "l4_root_clk_div", |
1479 | .prcm = { | 1479 | .prcm = { |
1480 | .omap4 = { | 1480 | .omap4 = { |
1481 | .clkctrl_offs = DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET, | ||
1482 | .modulemode = MODULEMODE_SWCTRL, | ||
1483 | }, | ||
1484 | }, | ||
1485 | }; | ||
1486 | |||
1487 | /* pcie2 */ | ||
1488 | static struct omap_hwmod dra7xx_pcie2_hwmod = { | ||
1489 | .name = "pcie2", | ||
1490 | .class = &dra7xx_pcie_hwmod_class, | ||
1491 | .clkdm_name = "pcie_clkdm", | ||
1492 | .main_clk = "l4_root_clk_div", | ||
1493 | .prcm = { | ||
1494 | .omap4 = { | ||
1495 | .clkctrl_offs = DRA7XX_CM_PCIE_CLKSTCTRL_OFFSET, | ||
1496 | .modulemode = MODULEMODE_SWCTRL, | ||
1497 | }, | ||
1498 | }, | ||
1499 | }; | ||
1500 | |||
1501 | /* | ||
1502 | * 'PCIE PHY' class | ||
1503 | * | ||
1504 | */ | ||
1505 | |||
1506 | static struct omap_hwmod_class dra7xx_pcie_phy_hwmod_class = { | ||
1507 | .name = "pcie-phy", | ||
1508 | }; | ||
1509 | |||
1510 | /* pcie1 phy */ | ||
1511 | static struct omap_hwmod dra7xx_pcie1_phy_hwmod = { | ||
1512 | .name = "pcie1-phy", | ||
1513 | .class = &dra7xx_pcie_phy_hwmod_class, | ||
1514 | .clkdm_name = "l3init_clkdm", | ||
1515 | .main_clk = "l4_root_clk_div", | ||
1516 | .prcm = { | ||
1517 | .omap4 = { | ||
1518 | .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET, | 1481 | .clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET, |
1519 | .context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET, | 1482 | .context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET, |
1520 | .modulemode = MODULEMODE_SWCTRL, | 1483 | .modulemode = MODULEMODE_SWCTRL, |
@@ -1522,11 +1485,11 @@ static struct omap_hwmod dra7xx_pcie1_phy_hwmod = { | |||
1522 | }, | 1485 | }, |
1523 | }; | 1486 | }; |
1524 | 1487 | ||
1525 | /* pcie2 phy */ | 1488 | /* pcie2 */ |
1526 | static struct omap_hwmod dra7xx_pcie2_phy_hwmod = { | 1489 | static struct omap_hwmod dra7xx_pciess2_hwmod = { |
1527 | .name = "pcie2-phy", | 1490 | .name = "pcie2", |
1528 | .class = &dra7xx_pcie_phy_hwmod_class, | 1491 | .class = &dra7xx_pciess_hwmod_class, |
1529 | .clkdm_name = "l3init_clkdm", | 1492 | .clkdm_name = "pcie_clkdm", |
1530 | .main_clk = "l4_root_clk_div", | 1493 | .main_clk = "l4_root_clk_div", |
1531 | .prcm = { | 1494 | .prcm = { |
1532 | .omap4 = { | 1495 | .omap4 = { |
@@ -2877,50 +2840,34 @@ static struct omap_hwmod_ocp_if dra7xx_l4_cfg__ocp2scp3 = { | |||
2877 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2840 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2878 | }; | 2841 | }; |
2879 | 2842 | ||
2880 | /* l3_main_1 -> pcie1 */ | 2843 | /* l3_main_1 -> pciess1 */ |
2881 | static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pcie1 = { | 2844 | static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess1 = { |
2882 | .master = &dra7xx_l3_main_1_hwmod, | 2845 | .master = &dra7xx_l3_main_1_hwmod, |
2883 | .slave = &dra7xx_pcie1_hwmod, | 2846 | .slave = &dra7xx_pciess1_hwmod, |
2884 | .clk = "l3_iclk_div", | 2847 | .clk = "l3_iclk_div", |
2885 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2848 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2886 | }; | 2849 | }; |
2887 | 2850 | ||
2888 | /* l4_cfg -> pcie1 */ | 2851 | /* l4_cfg -> pciess1 */ |
2889 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie1 = { | 2852 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess1 = { |
2890 | .master = &dra7xx_l4_cfg_hwmod, | 2853 | .master = &dra7xx_l4_cfg_hwmod, |
2891 | .slave = &dra7xx_pcie1_hwmod, | 2854 | .slave = &dra7xx_pciess1_hwmod, |
2892 | .clk = "l4_root_clk_div", | 2855 | .clk = "l4_root_clk_div", |
2893 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2856 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2894 | }; | 2857 | }; |
2895 | 2858 | ||
2896 | /* l3_main_1 -> pcie2 */ | 2859 | /* l3_main_1 -> pciess2 */ |
2897 | static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pcie2 = { | 2860 | static struct omap_hwmod_ocp_if dra7xx_l3_main_1__pciess2 = { |
2898 | .master = &dra7xx_l3_main_1_hwmod, | 2861 | .master = &dra7xx_l3_main_1_hwmod, |
2899 | .slave = &dra7xx_pcie2_hwmod, | 2862 | .slave = &dra7xx_pciess2_hwmod, |
2900 | .clk = "l3_iclk_div", | 2863 | .clk = "l3_iclk_div", |
2901 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2864 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2902 | }; | 2865 | }; |
2903 | 2866 | ||
2904 | /* l4_cfg -> pcie2 */ | 2867 | /* l4_cfg -> pciess2 */ |
2905 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie2 = { | 2868 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pciess2 = { |
2906 | .master = &dra7xx_l4_cfg_hwmod, | ||
2907 | .slave = &dra7xx_pcie2_hwmod, | ||
2908 | .clk = "l4_root_clk_div", | ||
2909 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2910 | }; | ||
2911 | |||
2912 | /* l4_cfg -> pcie1 phy */ | ||
2913 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie1_phy = { | ||
2914 | .master = &dra7xx_l4_cfg_hwmod, | ||
2915 | .slave = &dra7xx_pcie1_phy_hwmod, | ||
2916 | .clk = "l4_root_clk_div", | ||
2917 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2918 | }; | ||
2919 | |||
2920 | /* l4_cfg -> pcie2 phy */ | ||
2921 | static struct omap_hwmod_ocp_if dra7xx_l4_cfg__pcie2_phy = { | ||
2922 | .master = &dra7xx_l4_cfg_hwmod, | 2869 | .master = &dra7xx_l4_cfg_hwmod, |
2923 | .slave = &dra7xx_pcie2_phy_hwmod, | 2870 | .slave = &dra7xx_pciess2_hwmod, |
2924 | .clk = "l4_root_clk_div", | 2871 | .clk = "l4_root_clk_div", |
2925 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 2872 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
2926 | }; | 2873 | }; |
@@ -3327,12 +3274,10 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { | |||
3327 | &dra7xx_l4_cfg__mpu, | 3274 | &dra7xx_l4_cfg__mpu, |
3328 | &dra7xx_l4_cfg__ocp2scp1, | 3275 | &dra7xx_l4_cfg__ocp2scp1, |
3329 | &dra7xx_l4_cfg__ocp2scp3, | 3276 | &dra7xx_l4_cfg__ocp2scp3, |
3330 | &dra7xx_l3_main_1__pcie1, | 3277 | &dra7xx_l3_main_1__pciess1, |
3331 | &dra7xx_l4_cfg__pcie1, | 3278 | &dra7xx_l4_cfg__pciess1, |
3332 | &dra7xx_l3_main_1__pcie2, | 3279 | &dra7xx_l3_main_1__pciess2, |
3333 | &dra7xx_l4_cfg__pcie2, | 3280 | &dra7xx_l4_cfg__pciess2, |
3334 | &dra7xx_l4_cfg__pcie1_phy, | ||
3335 | &dra7xx_l4_cfg__pcie2_phy, | ||
3336 | &dra7xx_l3_main_1__qspi, | 3281 | &dra7xx_l3_main_1__qspi, |
3337 | &dra7xx_l4_per3__rtcss, | 3282 | &dra7xx_l4_per3__rtcss, |
3338 | &dra7xx_l4_cfg__sata, | 3283 | &dra7xx_l4_cfg__sata, |
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 190fa43e7479..e642b079e9f3 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c | |||
@@ -173,6 +173,7 @@ static void __init omap3_igep0030_rev_g_legacy_init(void) | |||
173 | 173 | ||
174 | static void __init omap3_evm_legacy_init(void) | 174 | static void __init omap3_evm_legacy_init(void) |
175 | { | 175 | { |
176 | hsmmc2_internal_input_clk(); | ||
176 | legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 149); | 177 | legacy_init_wl12xx(WL12XX_REFCLOCK_38, 0, 149); |
177 | } | 178 | } |
178 | 179 | ||
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c index a08a617a6c11..d6d6bc39e05c 100644 --- a/arch/arm/mach-omap2/prm44xx.c +++ b/arch/arm/mach-omap2/prm44xx.c | |||
@@ -252,10 +252,10 @@ static void omap44xx_prm_save_and_clear_irqen(u32 *saved_mask) | |||
252 | { | 252 | { |
253 | saved_mask[0] = | 253 | saved_mask[0] = |
254 | omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST, | 254 | omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST, |
255 | OMAP4_PRM_IRQSTATUS_MPU_OFFSET); | 255 | OMAP4_PRM_IRQENABLE_MPU_OFFSET); |
256 | saved_mask[1] = | 256 | saved_mask[1] = |
257 | omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST, | 257 | omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST, |
258 | OMAP4_PRM_IRQSTATUS_MPU_2_OFFSET); | 258 | OMAP4_PRM_IRQENABLE_MPU_2_OFFSET); |
259 | 259 | ||
260 | omap4_prm_write_inst_reg(0, OMAP4430_PRM_OCP_SOCKET_INST, | 260 | omap4_prm_write_inst_reg(0, OMAP4430_PRM_OCP_SOCKET_INST, |
261 | OMAP4_PRM_IRQENABLE_MPU_OFFSET); | 261 | OMAP4_PRM_IRQENABLE_MPU_OFFSET); |
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c index 343c4e3a7c5d..f6d02e4cbcda 100644 --- a/arch/arm/mach-pxa/idp.c +++ b/arch/arm/mach-pxa/idp.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/platform_data/video-pxafb.h> | 36 | #include <linux/platform_data/video-pxafb.h> |
37 | #include <mach/bitfield.h> | 37 | #include <mach/bitfield.h> |
38 | #include <linux/platform_data/mmc-pxamci.h> | 38 | #include <linux/platform_data/mmc-pxamci.h> |
39 | #include <linux/smc91x.h> | ||
39 | 40 | ||
40 | #include "generic.h" | 41 | #include "generic.h" |
41 | #include "devices.h" | 42 | #include "devices.h" |
@@ -81,11 +82,16 @@ static struct resource smc91x_resources[] = { | |||
81 | } | 82 | } |
82 | }; | 83 | }; |
83 | 84 | ||
85 | static struct smc91x_platdata smc91x_platdata = { | ||
86 | .flags = SMC91X_USE_32BIT | SMC91X_USE_DMA | SMC91X_NOWAIT, | ||
87 | }; | ||
88 | |||
84 | static struct platform_device smc91x_device = { | 89 | static struct platform_device smc91x_device = { |
85 | .name = "smc91x", | 90 | .name = "smc91x", |
86 | .id = 0, | 91 | .id = 0, |
87 | .num_resources = ARRAY_SIZE(smc91x_resources), | 92 | .num_resources = ARRAY_SIZE(smc91x_resources), |
88 | .resource = smc91x_resources, | 93 | .resource = smc91x_resources, |
94 | .dev.platform_data = &smc91x_platdata, | ||
89 | }; | 95 | }; |
90 | 96 | ||
91 | static void idp_backlight_power(int on) | 97 | static void idp_backlight_power(int on) |
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c index ad777b353bd5..eaee2c20b189 100644 --- a/arch/arm/mach-pxa/lpd270.c +++ b/arch/arm/mach-pxa/lpd270.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/mtd/mtd.h> | 24 | #include <linux/mtd/mtd.h> |
25 | #include <linux/mtd/partitions.h> | 25 | #include <linux/mtd/partitions.h> |
26 | #include <linux/pwm_backlight.h> | 26 | #include <linux/pwm_backlight.h> |
27 | #include <linux/smc91x.h> | ||
27 | 28 | ||
28 | #include <asm/types.h> | 29 | #include <asm/types.h> |
29 | #include <asm/setup.h> | 30 | #include <asm/setup.h> |
@@ -189,15 +190,20 @@ static struct resource smc91x_resources[] = { | |||
189 | [1] = { | 190 | [1] = { |
190 | .start = LPD270_ETHERNET_IRQ, | 191 | .start = LPD270_ETHERNET_IRQ, |
191 | .end = LPD270_ETHERNET_IRQ, | 192 | .end = LPD270_ETHERNET_IRQ, |
192 | .flags = IORESOURCE_IRQ, | 193 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
193 | }, | 194 | }, |
194 | }; | 195 | }; |
195 | 196 | ||
197 | struct smc91x_platdata smc91x_platdata = { | ||
198 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | ||
199 | }; | ||
200 | |||
196 | static struct platform_device smc91x_device = { | 201 | static struct platform_device smc91x_device = { |
197 | .name = "smc91x", | 202 | .name = "smc91x", |
198 | .id = 0, | 203 | .id = 0, |
199 | .num_resources = ARRAY_SIZE(smc91x_resources), | 204 | .num_resources = ARRAY_SIZE(smc91x_resources), |
200 | .resource = smc91x_resources, | 205 | .resource = smc91x_resources, |
206 | .dev.platform_data = &smc91x_platdata, | ||
201 | }; | 207 | }; |
202 | 208 | ||
203 | static struct resource lpd270_flash_resources[] = { | 209 | static struct resource lpd270_flash_resources[] = { |
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 850e506926df..c309593abdb2 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/platform_data/video-clcd-versatile.h> | 28 | #include <linux/platform_data/video-clcd-versatile.h> |
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <linux/smsc911x.h> | 30 | #include <linux/smsc911x.h> |
31 | #include <linux/smc91x.h> | ||
31 | #include <linux/ata_platform.h> | 32 | #include <linux/ata_platform.h> |
32 | #include <linux/amba/mmci.h> | 33 | #include <linux/amba/mmci.h> |
33 | #include <linux/gfp.h> | 34 | #include <linux/gfp.h> |
@@ -94,6 +95,10 @@ static struct smsc911x_platform_config smsc911x_config = { | |||
94 | .phy_interface = PHY_INTERFACE_MODE_MII, | 95 | .phy_interface = PHY_INTERFACE_MODE_MII, |
95 | }; | 96 | }; |
96 | 97 | ||
98 | static struct smc91x_platdata smc91x_platdata = { | ||
99 | .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT, | ||
100 | }; | ||
101 | |||
97 | static struct platform_device realview_eth_device = { | 102 | static struct platform_device realview_eth_device = { |
98 | .name = "smsc911x", | 103 | .name = "smsc911x", |
99 | .id = 0, | 104 | .id = 0, |
@@ -107,6 +112,8 @@ int realview_eth_register(const char *name, struct resource *res) | |||
107 | realview_eth_device.resource = res; | 112 | realview_eth_device.resource = res; |
108 | if (strcmp(realview_eth_device.name, "smsc911x") == 0) | 113 | if (strcmp(realview_eth_device.name, "smsc911x") == 0) |
109 | realview_eth_device.dev.platform_data = &smsc911x_config; | 114 | realview_eth_device.dev.platform_data = &smsc911x_config; |
115 | else | ||
116 | realview_eth_device.dev.platform_data = &smc91x_platdata; | ||
110 | 117 | ||
111 | return platform_device_register(&realview_eth_device); | 118 | return platform_device_register(&realview_eth_device); |
112 | } | 119 | } |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index 64c88d657f9e..b3869cbbcc68 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -234,7 +234,7 @@ static struct resource realview_eb_eth_resources[] = { | |||
234 | [1] = { | 234 | [1] = { |
235 | .start = IRQ_EB_ETH, | 235 | .start = IRQ_EB_ETH, |
236 | .end = IRQ_EB_ETH, | 236 | .end = IRQ_EB_ETH, |
237 | .flags = IORESOURCE_IRQ, | 237 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
238 | }, | 238 | }, |
239 | }; | 239 | }; |
240 | 240 | ||
diff --git a/arch/arm/mach-s5pv210/sleep.S b/arch/arm/mach-s5pv210/sleep.S index 7c43ddd33ba8..dfbfc0f7f8b8 100644 --- a/arch/arm/mach-s5pv210/sleep.S +++ b/arch/arm/mach-s5pv210/sleep.S | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
16 | 16 | ||
17 | .data | 17 | .text |
18 | .align | 18 | .align |
19 | 19 | ||
20 | /* | 20 | /* |
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c index 169262e3040d..af868d258e66 100644 --- a/arch/arm/mach-sa1100/neponset.c +++ b/arch/arm/mach-sa1100/neponset.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/pm.h> | 12 | #include <linux/pm.h> |
13 | #include <linux/serial_core.h> | 13 | #include <linux/serial_core.h> |
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/smc91x.h> | ||
15 | 16 | ||
16 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
17 | #include <asm/mach/map.h> | 18 | #include <asm/mach/map.h> |
@@ -258,12 +259,17 @@ static int neponset_probe(struct platform_device *dev) | |||
258 | 0x02000000, "smc91x-attrib"), | 259 | 0x02000000, "smc91x-attrib"), |
259 | { .flags = IORESOURCE_IRQ }, | 260 | { .flags = IORESOURCE_IRQ }, |
260 | }; | 261 | }; |
262 | struct smc91x_platdata smc91x_platdata = { | ||
263 | .flags = SMC91X_USE_8BIT | SMC91X_IO_SHIFT_2 | SMC91X_NOWAIT, | ||
264 | }; | ||
261 | struct platform_device_info smc91x_devinfo = { | 265 | struct platform_device_info smc91x_devinfo = { |
262 | .parent = &dev->dev, | 266 | .parent = &dev->dev, |
263 | .name = "smc91x", | 267 | .name = "smc91x", |
264 | .id = 0, | 268 | .id = 0, |
265 | .res = smc91x_resources, | 269 | .res = smc91x_resources, |
266 | .num_res = ARRAY_SIZE(smc91x_resources), | 270 | .num_res = ARRAY_SIZE(smc91x_resources), |
271 | .data = &smc91x_platdata, | ||
272 | .size_data = sizeof(smc91x_platdata), | ||
267 | }; | 273 | }; |
268 | int ret, irq; | 274 | int ret, irq; |
269 | 275 | ||
diff --git a/arch/arm/mach-sa1100/pleb.c b/arch/arm/mach-sa1100/pleb.c index 091261878eff..1525d7b5f1b7 100644 --- a/arch/arm/mach-sa1100/pleb.c +++ b/arch/arm/mach-sa1100/pleb.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
12 | #include <linux/io.h> | 12 | #include <linux/io.h> |
13 | #include <linux/mtd/partitions.h> | 13 | #include <linux/mtd/partitions.h> |
14 | #include <linux/smc91x.h> | ||
14 | 15 | ||
15 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
16 | #include <asm/setup.h> | 17 | #include <asm/setup.h> |
@@ -43,12 +44,18 @@ static struct resource smc91x_resources[] = { | |||
43 | #endif | 44 | #endif |
44 | }; | 45 | }; |
45 | 46 | ||
47 | static struct smc91x_platdata smc91x_platdata = { | ||
48 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | ||
49 | }; | ||
46 | 50 | ||
47 | static struct platform_device smc91x_device = { | 51 | static struct platform_device smc91x_device = { |
48 | .name = "smc91x", | 52 | .name = "smc91x", |
49 | .id = 0, | 53 | .id = 0, |
50 | .num_resources = ARRAY_SIZE(smc91x_resources), | 54 | .num_resources = ARRAY_SIZE(smc91x_resources), |
51 | .resource = smc91x_resources, | 55 | .resource = smc91x_resources, |
56 | .dev = { | ||
57 | .platform_data = &smc91x_platdata, | ||
58 | }, | ||
52 | }; | 59 | }; |
53 | 60 | ||
54 | static struct platform_device *devices[] __initdata = { | 61 | static struct platform_device *devices[] __initdata = { |
diff --git a/arch/arm/mach-socfpga/core.h b/arch/arm/mach-socfpga/core.h index 483cb467bf65..a0f3b1cd497c 100644 --- a/arch/arm/mach-socfpga/core.h +++ b/arch/arm/mach-socfpga/core.h | |||
@@ -45,6 +45,6 @@ extern char secondary_trampoline, secondary_trampoline_end; | |||
45 | 45 | ||
46 | extern unsigned long socfpga_cpu1start_addr; | 46 | extern unsigned long socfpga_cpu1start_addr; |
47 | 47 | ||
48 | #define SOCFPGA_SCU_VIRT_BASE 0xfffec000 | 48 | #define SOCFPGA_SCU_VIRT_BASE 0xfee00000 |
49 | 49 | ||
50 | #endif | 50 | #endif |
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c index 383d61e138af..f5e597c207b9 100644 --- a/arch/arm/mach-socfpga/socfpga.c +++ b/arch/arm/mach-socfpga/socfpga.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/hardware/cache-l2x0.h> | 23 | #include <asm/hardware/cache-l2x0.h> |
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
26 | #include <asm/cacheflush.h> | ||
26 | 27 | ||
27 | #include "core.h" | 28 | #include "core.h" |
28 | 29 | ||
@@ -73,6 +74,10 @@ void __init socfpga_sysmgr_init(void) | |||
73 | (u32 *) &socfpga_cpu1start_addr)) | 74 | (u32 *) &socfpga_cpu1start_addr)) |
74 | pr_err("SMP: Need cpu1-start-addr in device tree.\n"); | 75 | pr_err("SMP: Need cpu1-start-addr in device tree.\n"); |
75 | 76 | ||
77 | /* Ensure that socfpga_cpu1start_addr is visible to other CPUs */ | ||
78 | smp_wmb(); | ||
79 | sync_cache_w(&socfpga_cpu1start_addr); | ||
80 | |||
76 | sys_manager_base_addr = of_iomap(np, 0); | 81 | sys_manager_base_addr = of_iomap(np, 0); |
77 | 82 | ||
78 | np = of_find_compatible_node(NULL, NULL, "altr,rst-mgr"); | 83 | np = of_find_compatible_node(NULL, NULL, "altr,rst-mgr"); |
diff --git a/arch/arm/mach-sti/board-dt.c b/arch/arm/mach-sti/board-dt.c index b067390cef4e..b373acade338 100644 --- a/arch/arm/mach-sti/board-dt.c +++ b/arch/arm/mach-sti/board-dt.c | |||
@@ -18,6 +18,7 @@ static const char *stih41x_dt_match[] __initdata = { | |||
18 | "st,stih415", | 18 | "st,stih415", |
19 | "st,stih416", | 19 | "st,stih416", |
20 | "st,stih407", | 20 | "st,stih407", |
21 | "st,stih410", | ||
21 | "st,stih418", | 22 | "st,stih418", |
22 | NULL | 23 | NULL |
23 | }; | 24 | }; |
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index 3c2509b4b694..4be537977040 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig | |||
@@ -42,6 +42,7 @@ if ARCH_VEXPRESS | |||
42 | config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA | 42 | config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA |
43 | bool "Enable A5 and A9 only errata work-arounds" | 43 | bool "Enable A5 and A9 only errata work-arounds" |
44 | default y | 44 | default y |
45 | select ARM_ERRATA_643719 if SMP | ||
45 | select ARM_ERRATA_720789 | 46 | select ARM_ERRATA_720789 |
46 | select PL310_ERRATA_753970 if CACHE_L2X0 | 47 | select PL310_ERRATA_753970 if CACHE_L2X0 |
47 | help | 48 | help |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 16ae9051b262..b4f92b9a13ac 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -738,7 +738,7 @@ config CPU_ICACHE_DISABLE | |||
738 | 738 | ||
739 | config CPU_DCACHE_DISABLE | 739 | config CPU_DCACHE_DISABLE |
740 | bool "Disable D-Cache (C-bit)" | 740 | bool "Disable D-Cache (C-bit)" |
741 | depends on CPU_CP15 | 741 | depends on CPU_CP15 && !SMP |
742 | help | 742 | help |
743 | Say Y here to disable the processor data cache. Unless | 743 | Say Y here to disable the processor data cache. Unless |
744 | you have a reason not to or are unsure, say N. | 744 | you have a reason not to or are unsure, say N. |
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index 2c0c541c60ca..9769f1eefe3b 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -201,7 +201,7 @@ union offset_union { | |||
201 | THUMB( "1: "ins" %1, [%2]\n" ) \ | 201 | THUMB( "1: "ins" %1, [%2]\n" ) \ |
202 | THUMB( " add %2, %2, #1\n" ) \ | 202 | THUMB( " add %2, %2, #1\n" ) \ |
203 | "2:\n" \ | 203 | "2:\n" \ |
204 | " .pushsection .fixup,\"ax\"\n" \ | 204 | " .pushsection .text.fixup,\"ax\"\n" \ |
205 | " .align 2\n" \ | 205 | " .align 2\n" \ |
206 | "3: mov %0, #1\n" \ | 206 | "3: mov %0, #1\n" \ |
207 | " b 2b\n" \ | 207 | " b 2b\n" \ |
@@ -261,7 +261,7 @@ union offset_union { | |||
261 | " mov %1, %1, "NEXT_BYTE"\n" \ | 261 | " mov %1, %1, "NEXT_BYTE"\n" \ |
262 | "2: "ins" %1, [%2]\n" \ | 262 | "2: "ins" %1, [%2]\n" \ |
263 | "3:\n" \ | 263 | "3:\n" \ |
264 | " .pushsection .fixup,\"ax\"\n" \ | 264 | " .pushsection .text.fixup,\"ax\"\n" \ |
265 | " .align 2\n" \ | 265 | " .align 2\n" \ |
266 | "4: mov %0, #1\n" \ | 266 | "4: mov %0, #1\n" \ |
267 | " b 3b\n" \ | 267 | " b 3b\n" \ |
@@ -301,7 +301,7 @@ union offset_union { | |||
301 | " mov %1, %1, "NEXT_BYTE"\n" \ | 301 | " mov %1, %1, "NEXT_BYTE"\n" \ |
302 | "4: "ins" %1, [%2]\n" \ | 302 | "4: "ins" %1, [%2]\n" \ |
303 | "5:\n" \ | 303 | "5:\n" \ |
304 | " .pushsection .fixup,\"ax\"\n" \ | 304 | " .pushsection .text.fixup,\"ax\"\n" \ |
305 | " .align 2\n" \ | 305 | " .align 2\n" \ |
306 | "6: mov %0, #1\n" \ | 306 | "6: mov %0, #1\n" \ |
307 | " b 5b\n" \ | 307 | " b 5b\n" \ |
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index c6c7696b8db9..e309c8f35af5 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -1131,23 +1131,22 @@ static void __init l2c310_of_parse(const struct device_node *np, | |||
1131 | } | 1131 | } |
1132 | 1132 | ||
1133 | ret = l2x0_cache_size_of_parse(np, aux_val, aux_mask, &assoc, SZ_512K); | 1133 | ret = l2x0_cache_size_of_parse(np, aux_val, aux_mask, &assoc, SZ_512K); |
1134 | if (ret) | 1134 | if (!ret) { |
1135 | return; | 1135 | switch (assoc) { |
1136 | 1136 | case 16: | |
1137 | switch (assoc) { | 1137 | *aux_val &= ~L2X0_AUX_CTRL_ASSOC_MASK; |
1138 | case 16: | 1138 | *aux_val |= L310_AUX_CTRL_ASSOCIATIVITY_16; |
1139 | *aux_val &= ~L2X0_AUX_CTRL_ASSOC_MASK; | 1139 | *aux_mask &= ~L2X0_AUX_CTRL_ASSOC_MASK; |
1140 | *aux_val |= L310_AUX_CTRL_ASSOCIATIVITY_16; | 1140 | break; |
1141 | *aux_mask &= ~L2X0_AUX_CTRL_ASSOC_MASK; | 1141 | case 8: |
1142 | break; | 1142 | *aux_val &= ~L2X0_AUX_CTRL_ASSOC_MASK; |
1143 | case 8: | 1143 | *aux_mask &= ~L2X0_AUX_CTRL_ASSOC_MASK; |
1144 | *aux_val &= ~L2X0_AUX_CTRL_ASSOC_MASK; | 1144 | break; |
1145 | *aux_mask &= ~L2X0_AUX_CTRL_ASSOC_MASK; | 1145 | default: |
1146 | break; | 1146 | pr_err("L2C-310 OF cache associativity %d invalid, only 8 or 16 permitted\n", |
1147 | default: | 1147 | assoc); |
1148 | pr_err("L2C-310 OF cache associativity %d invalid, only 8 or 16 permitted\n", | 1148 | break; |
1149 | assoc); | 1149 | } |
1150 | break; | ||
1151 | } | 1150 | } |
1152 | 1151 | ||
1153 | prefetch = l2x0_saved_regs.prefetch_ctrl; | 1152 | prefetch = l2x0_saved_regs.prefetch_ctrl; |
@@ -1648,6 +1647,7 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask) | |||
1648 | struct device_node *np; | 1647 | struct device_node *np; |
1649 | struct resource res; | 1648 | struct resource res; |
1650 | u32 cache_id, old_aux; | 1649 | u32 cache_id, old_aux; |
1650 | u32 cache_level = 2; | ||
1651 | 1651 | ||
1652 | np = of_find_matching_node(NULL, l2x0_ids); | 1652 | np = of_find_matching_node(NULL, l2x0_ids); |
1653 | if (!np) | 1653 | if (!np) |
@@ -1680,6 +1680,12 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask) | |||
1680 | if (!of_property_read_bool(np, "cache-unified")) | 1680 | if (!of_property_read_bool(np, "cache-unified")) |
1681 | pr_err("L2C: device tree omits to specify unified cache\n"); | 1681 | pr_err("L2C: device tree omits to specify unified cache\n"); |
1682 | 1682 | ||
1683 | if (of_property_read_u32(np, "cache-level", &cache_level)) | ||
1684 | pr_err("L2C: device tree omits to specify cache-level\n"); | ||
1685 | |||
1686 | if (cache_level != 2) | ||
1687 | pr_err("L2C: device tree specifies invalid cache level\n"); | ||
1688 | |||
1683 | /* Read back current (default) hardware configuration */ | 1689 | /* Read back current (default) hardware configuration */ |
1684 | if (data->save) | 1690 | if (data->save) |
1685 | data->save(l2x0_base); | 1691 | data->save(l2x0_base); |
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index b966656d2c2d..a134d8a13d00 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -36,10 +36,10 @@ ENTRY(v7_invalidate_l1) | |||
36 | mcr p15, 2, r0, c0, c0, 0 | 36 | mcr p15, 2, r0, c0, c0, 0 |
37 | mrc p15, 1, r0, c0, c0, 0 | 37 | mrc p15, 1, r0, c0, c0, 0 |
38 | 38 | ||
39 | ldr r1, =0x7fff | 39 | movw r1, #0x7fff |
40 | and r2, r1, r0, lsr #13 | 40 | and r2, r1, r0, lsr #13 |
41 | 41 | ||
42 | ldr r1, =0x3ff | 42 | movw r1, #0x3ff |
43 | 43 | ||
44 | and r3, r1, r0, lsr #3 @ NumWays - 1 | 44 | and r3, r1, r0, lsr #3 @ NumWays - 1 |
45 | add r2, r2, #1 @ NumSets | 45 | add r2, r2, #1 @ NumSets |
@@ -90,21 +90,20 @@ ENDPROC(v7_flush_icache_all) | |||
90 | ENTRY(v7_flush_dcache_louis) | 90 | ENTRY(v7_flush_dcache_louis) |
91 | dmb @ ensure ordering with previous memory accesses | 91 | dmb @ ensure ordering with previous memory accesses |
92 | mrc p15, 1, r0, c0, c0, 1 @ read clidr, r0 = clidr | 92 | mrc p15, 1, r0, c0, c0, 1 @ read clidr, r0 = clidr |
93 | ALT_SMP(ands r3, r0, #(7 << 21)) @ extract LoUIS from clidr | 93 | ALT_SMP(mov r3, r0, lsr #20) @ move LoUIS into position |
94 | ALT_UP(ands r3, r0, #(7 << 27)) @ extract LoUU from clidr | 94 | ALT_UP( mov r3, r0, lsr #26) @ move LoUU into position |
95 | ands r3, r3, #7 << 1 @ extract LoU*2 field from clidr | ||
96 | bne start_flush_levels @ LoU != 0, start flushing | ||
95 | #ifdef CONFIG_ARM_ERRATA_643719 | 97 | #ifdef CONFIG_ARM_ERRATA_643719 |
96 | ALT_SMP(mrceq p15, 0, r2, c0, c0, 0) @ read main ID register | 98 | ALT_SMP(mrc p15, 0, r2, c0, c0, 0) @ read main ID register |
97 | ALT_UP(reteq lr) @ LoUU is zero, so nothing to do | 99 | ALT_UP( ret lr) @ LoUU is zero, so nothing to do |
98 | ldreq r1, =0x410fc090 @ ID of ARM Cortex A9 r0p? | 100 | movw r1, #:lower16:(0x410fc090 >> 4) @ ID of ARM Cortex A9 r0p? |
99 | biceq r2, r2, #0x0000000f @ clear minor revision number | 101 | movt r1, #:upper16:(0x410fc090 >> 4) |
100 | teqeq r2, r1 @ test for errata affected core and if so... | 102 | teq r1, r2, lsr #4 @ test for errata affected core and if so... |
101 | orreqs r3, #(1 << 21) @ fix LoUIS value (and set flags state to 'ne') | 103 | moveq r3, #1 << 1 @ fix LoUIS value |
104 | beq start_flush_levels @ start flushing cache levels | ||
102 | #endif | 105 | #endif |
103 | ALT_SMP(mov r3, r3, lsr #20) @ r3 = LoUIS * 2 | 106 | ret lr |
104 | ALT_UP(mov r3, r3, lsr #26) @ r3 = LoUU * 2 | ||
105 | reteq lr @ return if level == 0 | ||
106 | mov r10, #0 @ r10 (starting level) = 0 | ||
107 | b flush_levels @ start flushing cache levels | ||
108 | ENDPROC(v7_flush_dcache_louis) | 107 | ENDPROC(v7_flush_dcache_louis) |
109 | 108 | ||
110 | /* | 109 | /* |
@@ -119,9 +118,10 @@ ENDPROC(v7_flush_dcache_louis) | |||
119 | ENTRY(v7_flush_dcache_all) | 118 | ENTRY(v7_flush_dcache_all) |
120 | dmb @ ensure ordering with previous memory accesses | 119 | dmb @ ensure ordering with previous memory accesses |
121 | mrc p15, 1, r0, c0, c0, 1 @ read clidr | 120 | mrc p15, 1, r0, c0, c0, 1 @ read clidr |
122 | ands r3, r0, #0x7000000 @ extract loc from clidr | 121 | mov r3, r0, lsr #23 @ move LoC into position |
123 | mov r3, r3, lsr #23 @ left align loc bit field | 122 | ands r3, r3, #7 << 1 @ extract LoC*2 from clidr |
124 | beq finished @ if loc is 0, then no need to clean | 123 | beq finished @ if loc is 0, then no need to clean |
124 | start_flush_levels: | ||
125 | mov r10, #0 @ start clean at cache level 0 | 125 | mov r10, #0 @ start clean at cache level 0 |
126 | flush_levels: | 126 | flush_levels: |
127 | add r2, r10, r10, lsr #1 @ work out 3x current cache level | 127 | add r2, r10, r10, lsr #1 @ work out 3x current cache level |
@@ -140,10 +140,10 @@ flush_levels: | |||
140 | #endif | 140 | #endif |
141 | and r2, r1, #7 @ extract the length of the cache lines | 141 | and r2, r1, #7 @ extract the length of the cache lines |
142 | add r2, r2, #4 @ add 4 (line length offset) | 142 | add r2, r2, #4 @ add 4 (line length offset) |
143 | ldr r4, =0x3ff | 143 | movw r4, #0x3ff |
144 | ands r4, r4, r1, lsr #3 @ find maximum number on the way size | 144 | ands r4, r4, r1, lsr #3 @ find maximum number on the way size |
145 | clz r5, r4 @ find bit position of way size increment | 145 | clz r5, r4 @ find bit position of way size increment |
146 | ldr r7, =0x7fff | 146 | movw r7, #0x7fff |
147 | ands r7, r7, r1, lsr #13 @ extract max number of the index size | 147 | ands r7, r7, r1, lsr #13 @ extract max number of the index size |
148 | loop1: | 148 | loop1: |
149 | mov r9, r7 @ create working copy of max index | 149 | mov r9, r7 @ create working copy of max index |
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 170a116d1b29..3866f81c70bc 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c | |||
@@ -171,7 +171,7 @@ static int __dma_supported(struct device *dev, u64 mask, bool warn) | |||
171 | */ | 171 | */ |
172 | if (sizeof(mask) != sizeof(dma_addr_t) && | 172 | if (sizeof(mask) != sizeof(dma_addr_t) && |
173 | mask > (dma_addr_t)~0 && | 173 | mask > (dma_addr_t)~0 && |
174 | dma_to_pfn(dev, ~0) < max_pfn) { | 174 | dma_to_pfn(dev, ~0) < max_pfn - 1) { |
175 | if (warn) { | 175 | if (warn) { |
176 | dev_warn(dev, "Coherent DMA mask %#llx is larger than dma_addr_t allows\n", | 176 | dev_warn(dev, "Coherent DMA mask %#llx is larger than dma_addr_t allows\n", |
177 | mask); | 177 | mask); |
@@ -289,11 +289,11 @@ static void __dma_free_buffer(struct page *page, size_t size) | |||
289 | 289 | ||
290 | static void *__alloc_from_contiguous(struct device *dev, size_t size, | 290 | static void *__alloc_from_contiguous(struct device *dev, size_t size, |
291 | pgprot_t prot, struct page **ret_page, | 291 | pgprot_t prot, struct page **ret_page, |
292 | const void *caller); | 292 | const void *caller, bool want_vaddr); |
293 | 293 | ||
294 | static void *__alloc_remap_buffer(struct device *dev, size_t size, gfp_t gfp, | 294 | static void *__alloc_remap_buffer(struct device *dev, size_t size, gfp_t gfp, |
295 | pgprot_t prot, struct page **ret_page, | 295 | pgprot_t prot, struct page **ret_page, |
296 | const void *caller); | 296 | const void *caller, bool want_vaddr); |
297 | 297 | ||
298 | static void * | 298 | static void * |
299 | __dma_alloc_remap(struct page *page, size_t size, gfp_t gfp, pgprot_t prot, | 299 | __dma_alloc_remap(struct page *page, size_t size, gfp_t gfp, pgprot_t prot, |
@@ -357,10 +357,10 @@ static int __init atomic_pool_init(void) | |||
357 | 357 | ||
358 | if (dev_get_cma_area(NULL)) | 358 | if (dev_get_cma_area(NULL)) |
359 | ptr = __alloc_from_contiguous(NULL, atomic_pool_size, prot, | 359 | ptr = __alloc_from_contiguous(NULL, atomic_pool_size, prot, |
360 | &page, atomic_pool_init); | 360 | &page, atomic_pool_init, true); |
361 | else | 361 | else |
362 | ptr = __alloc_remap_buffer(NULL, atomic_pool_size, gfp, prot, | 362 | ptr = __alloc_remap_buffer(NULL, atomic_pool_size, gfp, prot, |
363 | &page, atomic_pool_init); | 363 | &page, atomic_pool_init, true); |
364 | if (ptr) { | 364 | if (ptr) { |
365 | int ret; | 365 | int ret; |
366 | 366 | ||
@@ -467,13 +467,15 @@ static void __dma_remap(struct page *page, size_t size, pgprot_t prot) | |||
467 | 467 | ||
468 | static void *__alloc_remap_buffer(struct device *dev, size_t size, gfp_t gfp, | 468 | static void *__alloc_remap_buffer(struct device *dev, size_t size, gfp_t gfp, |
469 | pgprot_t prot, struct page **ret_page, | 469 | pgprot_t prot, struct page **ret_page, |
470 | const void *caller) | 470 | const void *caller, bool want_vaddr) |
471 | { | 471 | { |
472 | struct page *page; | 472 | struct page *page; |
473 | void *ptr; | 473 | void *ptr = NULL; |
474 | page = __dma_alloc_buffer(dev, size, gfp); | 474 | page = __dma_alloc_buffer(dev, size, gfp); |
475 | if (!page) | 475 | if (!page) |
476 | return NULL; | 476 | return NULL; |
477 | if (!want_vaddr) | ||
478 | goto out; | ||
477 | 479 | ||
478 | ptr = __dma_alloc_remap(page, size, gfp, prot, caller); | 480 | ptr = __dma_alloc_remap(page, size, gfp, prot, caller); |
479 | if (!ptr) { | 481 | if (!ptr) { |
@@ -481,6 +483,7 @@ static void *__alloc_remap_buffer(struct device *dev, size_t size, gfp_t gfp, | |||
481 | return NULL; | 483 | return NULL; |
482 | } | 484 | } |
483 | 485 | ||
486 | out: | ||
484 | *ret_page = page; | 487 | *ret_page = page; |
485 | return ptr; | 488 | return ptr; |
486 | } | 489 | } |
@@ -523,12 +526,12 @@ static int __free_from_pool(void *start, size_t size) | |||
523 | 526 | ||
524 | static void *__alloc_from_contiguous(struct device *dev, size_t size, | 527 | static void *__alloc_from_contiguous(struct device *dev, size_t size, |
525 | pgprot_t prot, struct page **ret_page, | 528 | pgprot_t prot, struct page **ret_page, |
526 | const void *caller) | 529 | const void *caller, bool want_vaddr) |
527 | { | 530 | { |
528 | unsigned long order = get_order(size); | 531 | unsigned long order = get_order(size); |
529 | size_t count = size >> PAGE_SHIFT; | 532 | size_t count = size >> PAGE_SHIFT; |
530 | struct page *page; | 533 | struct page *page; |
531 | void *ptr; | 534 | void *ptr = NULL; |
532 | 535 | ||
533 | page = dma_alloc_from_contiguous(dev, count, order); | 536 | page = dma_alloc_from_contiguous(dev, count, order); |
534 | if (!page) | 537 | if (!page) |
@@ -536,6 +539,9 @@ static void *__alloc_from_contiguous(struct device *dev, size_t size, | |||
536 | 539 | ||
537 | __dma_clear_buffer(page, size); | 540 | __dma_clear_buffer(page, size); |
538 | 541 | ||
542 | if (!want_vaddr) | ||
543 | goto out; | ||
544 | |||
539 | if (PageHighMem(page)) { | 545 | if (PageHighMem(page)) { |
540 | ptr = __dma_alloc_remap(page, size, GFP_KERNEL, prot, caller); | 546 | ptr = __dma_alloc_remap(page, size, GFP_KERNEL, prot, caller); |
541 | if (!ptr) { | 547 | if (!ptr) { |
@@ -546,17 +552,21 @@ static void *__alloc_from_contiguous(struct device *dev, size_t size, | |||
546 | __dma_remap(page, size, prot); | 552 | __dma_remap(page, size, prot); |
547 | ptr = page_address(page); | 553 | ptr = page_address(page); |
548 | } | 554 | } |
555 | |||
556 | out: | ||
549 | *ret_page = page; | 557 | *ret_page = page; |
550 | return ptr; | 558 | return ptr; |
551 | } | 559 | } |
552 | 560 | ||
553 | static void __free_from_contiguous(struct device *dev, struct page *page, | 561 | static void __free_from_contiguous(struct device *dev, struct page *page, |
554 | void *cpu_addr, size_t size) | 562 | void *cpu_addr, size_t size, bool want_vaddr) |
555 | { | 563 | { |
556 | if (PageHighMem(page)) | 564 | if (want_vaddr) { |
557 | __dma_free_remap(cpu_addr, size); | 565 | if (PageHighMem(page)) |
558 | else | 566 | __dma_free_remap(cpu_addr, size); |
559 | __dma_remap(page, size, PAGE_KERNEL); | 567 | else |
568 | __dma_remap(page, size, PAGE_KERNEL); | ||
569 | } | ||
560 | dma_release_from_contiguous(dev, page, size >> PAGE_SHIFT); | 570 | dma_release_from_contiguous(dev, page, size >> PAGE_SHIFT); |
561 | } | 571 | } |
562 | 572 | ||
@@ -574,12 +584,12 @@ static inline pgprot_t __get_dma_pgprot(struct dma_attrs *attrs, pgprot_t prot) | |||
574 | 584 | ||
575 | #define nommu() 1 | 585 | #define nommu() 1 |
576 | 586 | ||
577 | #define __get_dma_pgprot(attrs, prot) __pgprot(0) | 587 | #define __get_dma_pgprot(attrs, prot) __pgprot(0) |
578 | #define __alloc_remap_buffer(dev, size, gfp, prot, ret, c) NULL | 588 | #define __alloc_remap_buffer(dev, size, gfp, prot, ret, c, wv) NULL |
579 | #define __alloc_from_pool(size, ret_page) NULL | 589 | #define __alloc_from_pool(size, ret_page) NULL |
580 | #define __alloc_from_contiguous(dev, size, prot, ret, c) NULL | 590 | #define __alloc_from_contiguous(dev, size, prot, ret, c, wv) NULL |
581 | #define __free_from_pool(cpu_addr, size) 0 | 591 | #define __free_from_pool(cpu_addr, size) 0 |
582 | #define __free_from_contiguous(dev, page, cpu_addr, size) do { } while (0) | 592 | #define __free_from_contiguous(dev, page, cpu_addr, size, wv) do { } while (0) |
583 | #define __dma_free_remap(cpu_addr, size) do { } while (0) | 593 | #define __dma_free_remap(cpu_addr, size) do { } while (0) |
584 | 594 | ||
585 | #endif /* CONFIG_MMU */ | 595 | #endif /* CONFIG_MMU */ |
@@ -599,11 +609,13 @@ static void *__alloc_simple_buffer(struct device *dev, size_t size, gfp_t gfp, | |||
599 | 609 | ||
600 | 610 | ||
601 | static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, | 611 | static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, |
602 | gfp_t gfp, pgprot_t prot, bool is_coherent, const void *caller) | 612 | gfp_t gfp, pgprot_t prot, bool is_coherent, |
613 | struct dma_attrs *attrs, const void *caller) | ||
603 | { | 614 | { |
604 | u64 mask = get_coherent_dma_mask(dev); | 615 | u64 mask = get_coherent_dma_mask(dev); |
605 | struct page *page = NULL; | 616 | struct page *page = NULL; |
606 | void *addr; | 617 | void *addr; |
618 | bool want_vaddr; | ||
607 | 619 | ||
608 | #ifdef CONFIG_DMA_API_DEBUG | 620 | #ifdef CONFIG_DMA_API_DEBUG |
609 | u64 limit = (mask + 1) & ~mask; | 621 | u64 limit = (mask + 1) & ~mask; |
@@ -631,20 +643,21 @@ static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, | |||
631 | 643 | ||
632 | *handle = DMA_ERROR_CODE; | 644 | *handle = DMA_ERROR_CODE; |
633 | size = PAGE_ALIGN(size); | 645 | size = PAGE_ALIGN(size); |
646 | want_vaddr = !dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING, attrs); | ||
634 | 647 | ||
635 | if (is_coherent || nommu()) | 648 | if (is_coherent || nommu()) |
636 | addr = __alloc_simple_buffer(dev, size, gfp, &page); | 649 | addr = __alloc_simple_buffer(dev, size, gfp, &page); |
637 | else if (!(gfp & __GFP_WAIT)) | 650 | else if (!(gfp & __GFP_WAIT)) |
638 | addr = __alloc_from_pool(size, &page); | 651 | addr = __alloc_from_pool(size, &page); |
639 | else if (!dev_get_cma_area(dev)) | 652 | else if (!dev_get_cma_area(dev)) |
640 | addr = __alloc_remap_buffer(dev, size, gfp, prot, &page, caller); | 653 | addr = __alloc_remap_buffer(dev, size, gfp, prot, &page, caller, want_vaddr); |
641 | else | 654 | else |
642 | addr = __alloc_from_contiguous(dev, size, prot, &page, caller); | 655 | addr = __alloc_from_contiguous(dev, size, prot, &page, caller, want_vaddr); |
643 | 656 | ||
644 | if (addr) | 657 | if (page) |
645 | *handle = pfn_to_dma(dev, page_to_pfn(page)); | 658 | *handle = pfn_to_dma(dev, page_to_pfn(page)); |
646 | 659 | ||
647 | return addr; | 660 | return want_vaddr ? addr : page; |
648 | } | 661 | } |
649 | 662 | ||
650 | /* | 663 | /* |
@@ -661,7 +674,7 @@ void *arm_dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, | |||
661 | return memory; | 674 | return memory; |
662 | 675 | ||
663 | return __dma_alloc(dev, size, handle, gfp, prot, false, | 676 | return __dma_alloc(dev, size, handle, gfp, prot, false, |
664 | __builtin_return_address(0)); | 677 | attrs, __builtin_return_address(0)); |
665 | } | 678 | } |
666 | 679 | ||
667 | static void *arm_coherent_dma_alloc(struct device *dev, size_t size, | 680 | static void *arm_coherent_dma_alloc(struct device *dev, size_t size, |
@@ -674,7 +687,7 @@ static void *arm_coherent_dma_alloc(struct device *dev, size_t size, | |||
674 | return memory; | 687 | return memory; |
675 | 688 | ||
676 | return __dma_alloc(dev, size, handle, gfp, prot, true, | 689 | return __dma_alloc(dev, size, handle, gfp, prot, true, |
677 | __builtin_return_address(0)); | 690 | attrs, __builtin_return_address(0)); |
678 | } | 691 | } |
679 | 692 | ||
680 | /* | 693 | /* |
@@ -715,6 +728,7 @@ static void __arm_dma_free(struct device *dev, size_t size, void *cpu_addr, | |||
715 | bool is_coherent) | 728 | bool is_coherent) |
716 | { | 729 | { |
717 | struct page *page = pfn_to_page(dma_to_pfn(dev, handle)); | 730 | struct page *page = pfn_to_page(dma_to_pfn(dev, handle)); |
731 | bool want_vaddr = !dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING, attrs); | ||
718 | 732 | ||
719 | if (dma_release_from_coherent(dev, get_order(size), cpu_addr)) | 733 | if (dma_release_from_coherent(dev, get_order(size), cpu_addr)) |
720 | return; | 734 | return; |
@@ -726,14 +740,15 @@ static void __arm_dma_free(struct device *dev, size_t size, void *cpu_addr, | |||
726 | } else if (__free_from_pool(cpu_addr, size)) { | 740 | } else if (__free_from_pool(cpu_addr, size)) { |
727 | return; | 741 | return; |
728 | } else if (!dev_get_cma_area(dev)) { | 742 | } else if (!dev_get_cma_area(dev)) { |
729 | __dma_free_remap(cpu_addr, size); | 743 | if (want_vaddr) |
744 | __dma_free_remap(cpu_addr, size); | ||
730 | __dma_free_buffer(page, size); | 745 | __dma_free_buffer(page, size); |
731 | } else { | 746 | } else { |
732 | /* | 747 | /* |
733 | * Non-atomic allocations cannot be freed with IRQs disabled | 748 | * Non-atomic allocations cannot be freed with IRQs disabled |
734 | */ | 749 | */ |
735 | WARN_ON(irqs_disabled()); | 750 | WARN_ON(irqs_disabled()); |
736 | __free_from_contiguous(dev, page, cpu_addr, size); | 751 | __free_from_contiguous(dev, page, cpu_addr, size, want_vaddr); |
737 | } | 752 | } |
738 | } | 753 | } |
739 | 754 | ||
@@ -1135,13 +1150,28 @@ static struct page **__iommu_alloc_buffer(struct device *dev, size_t size, | |||
1135 | gfp |= __GFP_NOWARN | __GFP_HIGHMEM; | 1150 | gfp |= __GFP_NOWARN | __GFP_HIGHMEM; |
1136 | 1151 | ||
1137 | while (count) { | 1152 | while (count) { |
1138 | int j, order = __fls(count); | 1153 | int j, order; |
1154 | |||
1155 | for (order = __fls(count); order > 0; --order) { | ||
1156 | /* | ||
1157 | * We do not want OOM killer to be invoked as long | ||
1158 | * as we can fall back to single pages, so we force | ||
1159 | * __GFP_NORETRY for orders higher than zero. | ||
1160 | */ | ||
1161 | pages[i] = alloc_pages(gfp | __GFP_NORETRY, order); | ||
1162 | if (pages[i]) | ||
1163 | break; | ||
1164 | } | ||
1139 | 1165 | ||
1140 | pages[i] = alloc_pages(gfp, order); | 1166 | if (!pages[i]) { |
1141 | while (!pages[i] && order) | 1167 | /* |
1142 | pages[i] = alloc_pages(gfp, --order); | 1168 | * Fall back to single page allocation. |
1143 | if (!pages[i]) | 1169 | * Might invoke OOM killer as last resort. |
1144 | goto error; | 1170 | */ |
1171 | pages[i] = alloc_pages(gfp, 0); | ||
1172 | if (!pages[i]) | ||
1173 | goto error; | ||
1174 | } | ||
1145 | 1175 | ||
1146 | if (order) { | 1176 | if (order) { |
1147 | split_page(pages[i], order); | 1177 | split_page(pages[i], order); |
@@ -1206,7 +1236,7 @@ __iommu_alloc_remap(struct page **pages, size_t size, gfp_t gfp, pgprot_t prot, | |||
1206 | static dma_addr_t | 1236 | static dma_addr_t |
1207 | __iommu_create_mapping(struct device *dev, struct page **pages, size_t size) | 1237 | __iommu_create_mapping(struct device *dev, struct page **pages, size_t size) |
1208 | { | 1238 | { |
1209 | struct dma_iommu_mapping *mapping = dev->archdata.mapping; | 1239 | struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev); |
1210 | unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; | 1240 | unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; |
1211 | dma_addr_t dma_addr, iova; | 1241 | dma_addr_t dma_addr, iova; |
1212 | int i, ret = DMA_ERROR_CODE; | 1242 | int i, ret = DMA_ERROR_CODE; |
@@ -1242,7 +1272,7 @@ fail: | |||
1242 | 1272 | ||
1243 | static int __iommu_remove_mapping(struct device *dev, dma_addr_t iova, size_t size) | 1273 | static int __iommu_remove_mapping(struct device *dev, dma_addr_t iova, size_t size) |
1244 | { | 1274 | { |
1245 | struct dma_iommu_mapping *mapping = dev->archdata.mapping; | 1275 | struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev); |
1246 | 1276 | ||
1247 | /* | 1277 | /* |
1248 | * add optional in-page offset from iova to size and align | 1278 | * add optional in-page offset from iova to size and align |
@@ -1457,7 +1487,7 @@ static int __map_sg_chunk(struct device *dev, struct scatterlist *sg, | |||
1457 | enum dma_data_direction dir, struct dma_attrs *attrs, | 1487 | enum dma_data_direction dir, struct dma_attrs *attrs, |
1458 | bool is_coherent) | 1488 | bool is_coherent) |
1459 | { | 1489 | { |
1460 | struct dma_iommu_mapping *mapping = dev->archdata.mapping; | 1490 | struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev); |
1461 | dma_addr_t iova, iova_base; | 1491 | dma_addr_t iova, iova_base; |
1462 | int ret = 0; | 1492 | int ret = 0; |
1463 | unsigned int count; | 1493 | unsigned int count; |
@@ -1678,7 +1708,7 @@ static dma_addr_t arm_coherent_iommu_map_page(struct device *dev, struct page *p | |||
1678 | unsigned long offset, size_t size, enum dma_data_direction dir, | 1708 | unsigned long offset, size_t size, enum dma_data_direction dir, |
1679 | struct dma_attrs *attrs) | 1709 | struct dma_attrs *attrs) |
1680 | { | 1710 | { |
1681 | struct dma_iommu_mapping *mapping = dev->archdata.mapping; | 1711 | struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev); |
1682 | dma_addr_t dma_addr; | 1712 | dma_addr_t dma_addr; |
1683 | int ret, prot, len = PAGE_ALIGN(size + offset); | 1713 | int ret, prot, len = PAGE_ALIGN(size + offset); |
1684 | 1714 | ||
@@ -1731,7 +1761,7 @@ static void arm_coherent_iommu_unmap_page(struct device *dev, dma_addr_t handle, | |||
1731 | size_t size, enum dma_data_direction dir, | 1761 | size_t size, enum dma_data_direction dir, |
1732 | struct dma_attrs *attrs) | 1762 | struct dma_attrs *attrs) |
1733 | { | 1763 | { |
1734 | struct dma_iommu_mapping *mapping = dev->archdata.mapping; | 1764 | struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev); |
1735 | dma_addr_t iova = handle & PAGE_MASK; | 1765 | dma_addr_t iova = handle & PAGE_MASK; |
1736 | int offset = handle & ~PAGE_MASK; | 1766 | int offset = handle & ~PAGE_MASK; |
1737 | int len = PAGE_ALIGN(size + offset); | 1767 | int len = PAGE_ALIGN(size + offset); |
@@ -1756,7 +1786,7 @@ static void arm_iommu_unmap_page(struct device *dev, dma_addr_t handle, | |||
1756 | size_t size, enum dma_data_direction dir, | 1786 | size_t size, enum dma_data_direction dir, |
1757 | struct dma_attrs *attrs) | 1787 | struct dma_attrs *attrs) |
1758 | { | 1788 | { |
1759 | struct dma_iommu_mapping *mapping = dev->archdata.mapping; | 1789 | struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev); |
1760 | dma_addr_t iova = handle & PAGE_MASK; | 1790 | dma_addr_t iova = handle & PAGE_MASK; |
1761 | struct page *page = phys_to_page(iommu_iova_to_phys(mapping->domain, iova)); | 1791 | struct page *page = phys_to_page(iommu_iova_to_phys(mapping->domain, iova)); |
1762 | int offset = handle & ~PAGE_MASK; | 1792 | int offset = handle & ~PAGE_MASK; |
@@ -1775,7 +1805,7 @@ static void arm_iommu_unmap_page(struct device *dev, dma_addr_t handle, | |||
1775 | static void arm_iommu_sync_single_for_cpu(struct device *dev, | 1805 | static void arm_iommu_sync_single_for_cpu(struct device *dev, |
1776 | dma_addr_t handle, size_t size, enum dma_data_direction dir) | 1806 | dma_addr_t handle, size_t size, enum dma_data_direction dir) |
1777 | { | 1807 | { |
1778 | struct dma_iommu_mapping *mapping = dev->archdata.mapping; | 1808 | struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev); |
1779 | dma_addr_t iova = handle & PAGE_MASK; | 1809 | dma_addr_t iova = handle & PAGE_MASK; |
1780 | struct page *page = phys_to_page(iommu_iova_to_phys(mapping->domain, iova)); | 1810 | struct page *page = phys_to_page(iommu_iova_to_phys(mapping->domain, iova)); |
1781 | unsigned int offset = handle & ~PAGE_MASK; | 1811 | unsigned int offset = handle & ~PAGE_MASK; |
@@ -1789,7 +1819,7 @@ static void arm_iommu_sync_single_for_cpu(struct device *dev, | |||
1789 | static void arm_iommu_sync_single_for_device(struct device *dev, | 1819 | static void arm_iommu_sync_single_for_device(struct device *dev, |
1790 | dma_addr_t handle, size_t size, enum dma_data_direction dir) | 1820 | dma_addr_t handle, size_t size, enum dma_data_direction dir) |
1791 | { | 1821 | { |
1792 | struct dma_iommu_mapping *mapping = dev->archdata.mapping; | 1822 | struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev); |
1793 | dma_addr_t iova = handle & PAGE_MASK; | 1823 | dma_addr_t iova = handle & PAGE_MASK; |
1794 | struct page *page = phys_to_page(iommu_iova_to_phys(mapping->domain, iova)); | 1824 | struct page *page = phys_to_page(iommu_iova_to_phys(mapping->domain, iova)); |
1795 | unsigned int offset = handle & ~PAGE_MASK; | 1825 | unsigned int offset = handle & ~PAGE_MASK; |
@@ -1950,7 +1980,7 @@ static int __arm_iommu_attach_device(struct device *dev, | |||
1950 | return err; | 1980 | return err; |
1951 | 1981 | ||
1952 | kref_get(&mapping->kref); | 1982 | kref_get(&mapping->kref); |
1953 | dev->archdata.mapping = mapping; | 1983 | to_dma_iommu_mapping(dev) = mapping; |
1954 | 1984 | ||
1955 | pr_debug("Attached IOMMU controller to %s device.\n", dev_name(dev)); | 1985 | pr_debug("Attached IOMMU controller to %s device.\n", dev_name(dev)); |
1956 | return 0; | 1986 | return 0; |
@@ -1995,7 +2025,7 @@ static void __arm_iommu_detach_device(struct device *dev) | |||
1995 | 2025 | ||
1996 | iommu_detach_device(mapping->domain, dev); | 2026 | iommu_detach_device(mapping->domain, dev); |
1997 | kref_put(&mapping->kref, release_iommu_mapping); | 2027 | kref_put(&mapping->kref, release_iommu_mapping); |
1998 | dev->archdata.mapping = NULL; | 2028 | to_dma_iommu_mapping(dev) = NULL; |
1999 | 2029 | ||
2000 | pr_debug("Detached IOMMU controller from %s device.\n", dev_name(dev)); | 2030 | pr_debug("Detached IOMMU controller from %s device.\n", dev_name(dev)); |
2001 | } | 2031 | } |
@@ -2046,7 +2076,7 @@ static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 size, | |||
2046 | 2076 | ||
2047 | static void arm_teardown_iommu_dma_ops(struct device *dev) | 2077 | static void arm_teardown_iommu_dma_ops(struct device *dev) |
2048 | { | 2078 | { |
2049 | struct dma_iommu_mapping *mapping = dev->archdata.mapping; | 2079 | struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev); |
2050 | 2080 | ||
2051 | if (!mapping) | 2081 | if (!mapping) |
2052 | return; | 2082 | return; |
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index a982dc3190df..6333d9c17875 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -552,6 +552,7 @@ do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
552 | 552 | ||
553 | pr_alert("Unhandled fault: %s (0x%03x) at 0x%08lx\n", | 553 | pr_alert("Unhandled fault: %s (0x%03x) at 0x%08lx\n", |
554 | inf->name, fsr, addr); | 554 | inf->name, fsr, addr); |
555 | show_pte(current->mm, addr); | ||
555 | 556 | ||
556 | info.si_signo = inf->sig; | 557 | info.si_signo = inf->sig; |
557 | info.si_errno = 0; | 558 | info.si_errno = 0; |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 1609b022a72f..ae369c1066e6 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -86,55 +86,6 @@ static int __init parse_tag_initrd2(const struct tag *tag) | |||
86 | 86 | ||
87 | __tagtable(ATAG_INITRD2, parse_tag_initrd2); | 87 | __tagtable(ATAG_INITRD2, parse_tag_initrd2); |
88 | 88 | ||
89 | /* | ||
90 | * This keeps memory configuration data used by a couple memory | ||
91 | * initialization functions, as well as show_mem() for the skipping | ||
92 | * of holes in the memory map. It is populated by arm_add_memory(). | ||
93 | */ | ||
94 | void show_mem(unsigned int filter) | ||
95 | { | ||
96 | int free = 0, total = 0, reserved = 0; | ||
97 | int shared = 0, cached = 0, slab = 0; | ||
98 | struct memblock_region *reg; | ||
99 | |||
100 | printk("Mem-info:\n"); | ||
101 | show_free_areas(filter); | ||
102 | |||
103 | for_each_memblock (memory, reg) { | ||
104 | unsigned int pfn1, pfn2; | ||
105 | struct page *page, *end; | ||
106 | |||
107 | pfn1 = memblock_region_memory_base_pfn(reg); | ||
108 | pfn2 = memblock_region_memory_end_pfn(reg); | ||
109 | |||
110 | page = pfn_to_page(pfn1); | ||
111 | end = pfn_to_page(pfn2 - 1) + 1; | ||
112 | |||
113 | do { | ||
114 | total++; | ||
115 | if (PageReserved(page)) | ||
116 | reserved++; | ||
117 | else if (PageSwapCache(page)) | ||
118 | cached++; | ||
119 | else if (PageSlab(page)) | ||
120 | slab++; | ||
121 | else if (!page_count(page)) | ||
122 | free++; | ||
123 | else | ||
124 | shared += page_count(page) - 1; | ||
125 | pfn1++; | ||
126 | page = pfn_to_page(pfn1); | ||
127 | } while (pfn1 < pfn2); | ||
128 | } | ||
129 | |||
130 | printk("%d pages of RAM\n", total); | ||
131 | printk("%d free pages\n", free); | ||
132 | printk("%d reserved pages\n", reserved); | ||
133 | printk("%d slab pages\n", slab); | ||
134 | printk("%d pages shared\n", shared); | ||
135 | printk("%d pages swap cached\n", cached); | ||
136 | } | ||
137 | |||
138 | static void __init find_limits(unsigned long *min, unsigned long *max_low, | 89 | static void __init find_limits(unsigned long *min, unsigned long *max_low, |
139 | unsigned long *max_high) | 90 | unsigned long *max_high) |
140 | { | 91 | { |
diff --git a/arch/arm/mm/pageattr.c b/arch/arm/mm/pageattr.c index 004e35cdcfff..cf30daff8932 100644 --- a/arch/arm/mm/pageattr.c +++ b/arch/arm/mm/pageattr.c | |||
@@ -49,7 +49,10 @@ static int change_memory_common(unsigned long addr, int numpages, | |||
49 | WARN_ON_ONCE(1); | 49 | WARN_ON_ONCE(1); |
50 | } | 50 | } |
51 | 51 | ||
52 | if (!is_module_address(start) || !is_module_address(end - 1)) | 52 | if (start < MODULES_VADDR || start >= MODULES_END) |
53 | return -EINVAL; | ||
54 | |||
55 | if (end < MODULES_VADDR || start >= MODULES_END) | ||
53 | return -EINVAL; | 56 | return -EINVAL; |
54 | 57 | ||
55 | data.set_mask = set_mask; | 58 | data.set_mask = set_mask; |
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S index 86ee5d47ce3c..aa0519eed698 100644 --- a/arch/arm/mm/proc-arm1020.S +++ b/arch/arm/mm/proc-arm1020.S | |||
@@ -507,7 +507,7 @@ cpu_arm1020_name: | |||
507 | 507 | ||
508 | .align | 508 | .align |
509 | 509 | ||
510 | .section ".proc.info.init", #alloc, #execinstr | 510 | .section ".proc.info.init", #alloc |
511 | 511 | ||
512 | .type __arm1020_proc_info,#object | 512 | .type __arm1020_proc_info,#object |
513 | __arm1020_proc_info: | 513 | __arm1020_proc_info: |
@@ -519,7 +519,7 @@ __arm1020_proc_info: | |||
519 | .long PMD_TYPE_SECT | \ | 519 | .long PMD_TYPE_SECT | \ |
520 | PMD_SECT_AP_WRITE | \ | 520 | PMD_SECT_AP_WRITE | \ |
521 | PMD_SECT_AP_READ | 521 | PMD_SECT_AP_READ |
522 | b __arm1020_setup | 522 | initfn __arm1020_setup, __arm1020_proc_info |
523 | .long cpu_arch_name | 523 | .long cpu_arch_name |
524 | .long cpu_elf_name | 524 | .long cpu_elf_name |
525 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | 525 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB |
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S index a6331d78601f..bff4c7f70fd6 100644 --- a/arch/arm/mm/proc-arm1020e.S +++ b/arch/arm/mm/proc-arm1020e.S | |||
@@ -465,7 +465,7 @@ arm1020e_crval: | |||
465 | 465 | ||
466 | .align | 466 | .align |
467 | 467 | ||
468 | .section ".proc.info.init", #alloc, #execinstr | 468 | .section ".proc.info.init", #alloc |
469 | 469 | ||
470 | .type __arm1020e_proc_info,#object | 470 | .type __arm1020e_proc_info,#object |
471 | __arm1020e_proc_info: | 471 | __arm1020e_proc_info: |
@@ -479,7 +479,7 @@ __arm1020e_proc_info: | |||
479 | PMD_BIT4 | \ | 479 | PMD_BIT4 | \ |
480 | PMD_SECT_AP_WRITE | \ | 480 | PMD_SECT_AP_WRITE | \ |
481 | PMD_SECT_AP_READ | 481 | PMD_SECT_AP_READ |
482 | b __arm1020e_setup | 482 | initfn __arm1020e_setup, __arm1020e_proc_info |
483 | .long cpu_arch_name | 483 | .long cpu_arch_name |
484 | .long cpu_elf_name | 484 | .long cpu_elf_name |
485 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | HWCAP_EDSP | 485 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | HWCAP_EDSP |
diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S index a126b7a59928..dbb2413fe04d 100644 --- a/arch/arm/mm/proc-arm1022.S +++ b/arch/arm/mm/proc-arm1022.S | |||
@@ -448,7 +448,7 @@ arm1022_crval: | |||
448 | 448 | ||
449 | .align | 449 | .align |
450 | 450 | ||
451 | .section ".proc.info.init", #alloc, #execinstr | 451 | .section ".proc.info.init", #alloc |
452 | 452 | ||
453 | .type __arm1022_proc_info,#object | 453 | .type __arm1022_proc_info,#object |
454 | __arm1022_proc_info: | 454 | __arm1022_proc_info: |
@@ -462,7 +462,7 @@ __arm1022_proc_info: | |||
462 | PMD_BIT4 | \ | 462 | PMD_BIT4 | \ |
463 | PMD_SECT_AP_WRITE | \ | 463 | PMD_SECT_AP_WRITE | \ |
464 | PMD_SECT_AP_READ | 464 | PMD_SECT_AP_READ |
465 | b __arm1022_setup | 465 | initfn __arm1022_setup, __arm1022_proc_info |
466 | .long cpu_arch_name | 466 | .long cpu_arch_name |
467 | .long cpu_elf_name | 467 | .long cpu_elf_name |
468 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | HWCAP_EDSP | 468 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | HWCAP_EDSP |
diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S index fc294067e977..0b37b2cef9d3 100644 --- a/arch/arm/mm/proc-arm1026.S +++ b/arch/arm/mm/proc-arm1026.S | |||
@@ -442,7 +442,7 @@ arm1026_crval: | |||
442 | string cpu_arm1026_name, "ARM1026EJ-S" | 442 | string cpu_arm1026_name, "ARM1026EJ-S" |
443 | .align | 443 | .align |
444 | 444 | ||
445 | .section ".proc.info.init", #alloc, #execinstr | 445 | .section ".proc.info.init", #alloc |
446 | 446 | ||
447 | .type __arm1026_proc_info,#object | 447 | .type __arm1026_proc_info,#object |
448 | __arm1026_proc_info: | 448 | __arm1026_proc_info: |
@@ -456,7 +456,7 @@ __arm1026_proc_info: | |||
456 | PMD_BIT4 | \ | 456 | PMD_BIT4 | \ |
457 | PMD_SECT_AP_WRITE | \ | 457 | PMD_SECT_AP_WRITE | \ |
458 | PMD_SECT_AP_READ | 458 | PMD_SECT_AP_READ |
459 | b __arm1026_setup | 459 | initfn __arm1026_setup, __arm1026_proc_info |
460 | .long cpu_arch_name | 460 | .long cpu_arch_name |
461 | .long cpu_elf_name | 461 | .long cpu_elf_name |
462 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA | 462 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA |
diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S index 2baa66b3ac9b..3651cd70e418 100644 --- a/arch/arm/mm/proc-arm720.S +++ b/arch/arm/mm/proc-arm720.S | |||
@@ -186,7 +186,7 @@ arm720_crval: | |||
186 | * See <asm/procinfo.h> for a definition of this structure. | 186 | * See <asm/procinfo.h> for a definition of this structure. |
187 | */ | 187 | */ |
188 | 188 | ||
189 | .section ".proc.info.init", #alloc, #execinstr | 189 | .section ".proc.info.init", #alloc |
190 | 190 | ||
191 | .macro arm720_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cpu_flush:req | 191 | .macro arm720_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cpu_flush:req |
192 | .type __\name\()_proc_info,#object | 192 | .type __\name\()_proc_info,#object |
@@ -203,7 +203,7 @@ __\name\()_proc_info: | |||
203 | PMD_BIT4 | \ | 203 | PMD_BIT4 | \ |
204 | PMD_SECT_AP_WRITE | \ | 204 | PMD_SECT_AP_WRITE | \ |
205 | PMD_SECT_AP_READ | 205 | PMD_SECT_AP_READ |
206 | b \cpu_flush @ cpu_flush | 206 | initfn \cpu_flush, __\name\()_proc_info @ cpu_flush |
207 | .long cpu_arch_name @ arch_name | 207 | .long cpu_arch_name @ arch_name |
208 | .long cpu_elf_name @ elf_name | 208 | .long cpu_elf_name @ elf_name |
209 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB @ elf_hwcap | 209 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB @ elf_hwcap |
diff --git a/arch/arm/mm/proc-arm740.S b/arch/arm/mm/proc-arm740.S index ac1ea6b3bce4..024fb7732407 100644 --- a/arch/arm/mm/proc-arm740.S +++ b/arch/arm/mm/proc-arm740.S | |||
@@ -132,14 +132,14 @@ __arm740_setup: | |||
132 | 132 | ||
133 | .align | 133 | .align |
134 | 134 | ||
135 | .section ".proc.info.init", #alloc, #execinstr | 135 | .section ".proc.info.init", #alloc |
136 | .type __arm740_proc_info,#object | 136 | .type __arm740_proc_info,#object |
137 | __arm740_proc_info: | 137 | __arm740_proc_info: |
138 | .long 0x41807400 | 138 | .long 0x41807400 |
139 | .long 0xfffffff0 | 139 | .long 0xfffffff0 |
140 | .long 0 | 140 | .long 0 |
141 | .long 0 | 141 | .long 0 |
142 | b __arm740_setup | 142 | initfn __arm740_setup, __arm740_proc_info |
143 | .long cpu_arch_name | 143 | .long cpu_arch_name |
144 | .long cpu_elf_name | 144 | .long cpu_elf_name |
145 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | HWCAP_26BIT | 145 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | HWCAP_26BIT |
diff --git a/arch/arm/mm/proc-arm7tdmi.S b/arch/arm/mm/proc-arm7tdmi.S index bf6ba4bc30ff..25472d94426d 100644 --- a/arch/arm/mm/proc-arm7tdmi.S +++ b/arch/arm/mm/proc-arm7tdmi.S | |||
@@ -76,7 +76,7 @@ __arm7tdmi_setup: | |||
76 | 76 | ||
77 | .align | 77 | .align |
78 | 78 | ||
79 | .section ".proc.info.init", #alloc, #execinstr | 79 | .section ".proc.info.init", #alloc |
80 | 80 | ||
81 | .macro arm7tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, \ | 81 | .macro arm7tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, \ |
82 | extra_hwcaps=0 | 82 | extra_hwcaps=0 |
@@ -86,7 +86,7 @@ __\name\()_proc_info: | |||
86 | .long \cpu_mask | 86 | .long \cpu_mask |
87 | .long 0 | 87 | .long 0 |
88 | .long 0 | 88 | .long 0 |
89 | b __arm7tdmi_setup | 89 | initfn __arm7tdmi_setup, __\name\()_proc_info |
90 | .long cpu_arch_name | 90 | .long cpu_arch_name |
91 | .long cpu_elf_name | 91 | .long cpu_elf_name |
92 | .long HWCAP_SWP | HWCAP_26BIT | ( \extra_hwcaps ) | 92 | .long HWCAP_SWP | HWCAP_26BIT | ( \extra_hwcaps ) |
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S index 22bf8dde4f84..7a14bd4414c9 100644 --- a/arch/arm/mm/proc-arm920.S +++ b/arch/arm/mm/proc-arm920.S | |||
@@ -448,7 +448,7 @@ arm920_crval: | |||
448 | 448 | ||
449 | .align | 449 | .align |
450 | 450 | ||
451 | .section ".proc.info.init", #alloc, #execinstr | 451 | .section ".proc.info.init", #alloc |
452 | 452 | ||
453 | .type __arm920_proc_info,#object | 453 | .type __arm920_proc_info,#object |
454 | __arm920_proc_info: | 454 | __arm920_proc_info: |
@@ -464,7 +464,7 @@ __arm920_proc_info: | |||
464 | PMD_BIT4 | \ | 464 | PMD_BIT4 | \ |
465 | PMD_SECT_AP_WRITE | \ | 465 | PMD_SECT_AP_WRITE | \ |
466 | PMD_SECT_AP_READ | 466 | PMD_SECT_AP_READ |
467 | b __arm920_setup | 467 | initfn __arm920_setup, __arm920_proc_info |
468 | .long cpu_arch_name | 468 | .long cpu_arch_name |
469 | .long cpu_elf_name | 469 | .long cpu_elf_name |
470 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | 470 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB |
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S index 0c6d5ac5a6d4..edccfcdcd551 100644 --- a/arch/arm/mm/proc-arm922.S +++ b/arch/arm/mm/proc-arm922.S | |||
@@ -426,7 +426,7 @@ arm922_crval: | |||
426 | 426 | ||
427 | .align | 427 | .align |
428 | 428 | ||
429 | .section ".proc.info.init", #alloc, #execinstr | 429 | .section ".proc.info.init", #alloc |
430 | 430 | ||
431 | .type __arm922_proc_info,#object | 431 | .type __arm922_proc_info,#object |
432 | __arm922_proc_info: | 432 | __arm922_proc_info: |
@@ -442,7 +442,7 @@ __arm922_proc_info: | |||
442 | PMD_BIT4 | \ | 442 | PMD_BIT4 | \ |
443 | PMD_SECT_AP_WRITE | \ | 443 | PMD_SECT_AP_WRITE | \ |
444 | PMD_SECT_AP_READ | 444 | PMD_SECT_AP_READ |
445 | b __arm922_setup | 445 | initfn __arm922_setup, __arm922_proc_info |
446 | .long cpu_arch_name | 446 | .long cpu_arch_name |
447 | .long cpu_elf_name | 447 | .long cpu_elf_name |
448 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | 448 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB |
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S index c32d073282ea..ede8c54ab4aa 100644 --- a/arch/arm/mm/proc-arm925.S +++ b/arch/arm/mm/proc-arm925.S | |||
@@ -494,7 +494,7 @@ arm925_crval: | |||
494 | 494 | ||
495 | .align | 495 | .align |
496 | 496 | ||
497 | .section ".proc.info.init", #alloc, #execinstr | 497 | .section ".proc.info.init", #alloc |
498 | 498 | ||
499 | .macro arm925_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache | 499 | .macro arm925_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache |
500 | .type __\name\()_proc_info,#object | 500 | .type __\name\()_proc_info,#object |
@@ -510,7 +510,7 @@ __\name\()_proc_info: | |||
510 | PMD_BIT4 | \ | 510 | PMD_BIT4 | \ |
511 | PMD_SECT_AP_WRITE | \ | 511 | PMD_SECT_AP_WRITE | \ |
512 | PMD_SECT_AP_READ | 512 | PMD_SECT_AP_READ |
513 | b __arm925_setup | 513 | initfn __arm925_setup, __\name\()_proc_info |
514 | .long cpu_arch_name | 514 | .long cpu_arch_name |
515 | .long cpu_elf_name | 515 | .long cpu_elf_name |
516 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | 516 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB |
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index 252b2503038d..fb827c633693 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S | |||
@@ -474,7 +474,7 @@ arm926_crval: | |||
474 | 474 | ||
475 | .align | 475 | .align |
476 | 476 | ||
477 | .section ".proc.info.init", #alloc, #execinstr | 477 | .section ".proc.info.init", #alloc |
478 | 478 | ||
479 | .type __arm926_proc_info,#object | 479 | .type __arm926_proc_info,#object |
480 | __arm926_proc_info: | 480 | __arm926_proc_info: |
@@ -490,7 +490,7 @@ __arm926_proc_info: | |||
490 | PMD_BIT4 | \ | 490 | PMD_BIT4 | \ |
491 | PMD_SECT_AP_WRITE | \ | 491 | PMD_SECT_AP_WRITE | \ |
492 | PMD_SECT_AP_READ | 492 | PMD_SECT_AP_READ |
493 | b __arm926_setup | 493 | initfn __arm926_setup, __arm926_proc_info |
494 | .long cpu_arch_name | 494 | .long cpu_arch_name |
495 | .long cpu_elf_name | 495 | .long cpu_elf_name |
496 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA | 496 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP|HWCAP_JAVA |
diff --git a/arch/arm/mm/proc-arm940.S b/arch/arm/mm/proc-arm940.S index e5212d489377..ee5b66f847c4 100644 --- a/arch/arm/mm/proc-arm940.S +++ b/arch/arm/mm/proc-arm940.S | |||
@@ -297,26 +297,16 @@ __arm940_setup: | |||
297 | mcr p15, 0, r0, c6, c0, 1 | 297 | mcr p15, 0, r0, c6, c0, 1 |
298 | 298 | ||
299 | ldr r0, =(CONFIG_DRAM_BASE & 0xFFFFF000) @ base[31:12] of RAM | 299 | ldr r0, =(CONFIG_DRAM_BASE & 0xFFFFF000) @ base[31:12] of RAM |
300 | ldr r1, =(CONFIG_DRAM_SIZE >> 12) @ size of RAM (must be >= 4KB) | 300 | ldr r7, =CONFIG_DRAM_SIZE >> 12 @ size of RAM (must be >= 4KB) |
301 | mov r2, #10 @ 11 is the minimum (4KB) | 301 | pr_val r3, r0, r7, #1 |
302 | 1: add r2, r2, #1 @ area size *= 2 | 302 | mcr p15, 0, r3, c6, c1, 0 @ set area 1, RAM |
303 | mov r1, r1, lsr #1 | 303 | mcr p15, 0, r3, c6, c1, 1 |
304 | bne 1b @ count not zero r-shift | ||
305 | orr r0, r0, r2, lsl #1 @ the area register value | ||
306 | orr r0, r0, #1 @ set enable bit | ||
307 | mcr p15, 0, r0, c6, c1, 0 @ set area 1, RAM | ||
308 | mcr p15, 0, r0, c6, c1, 1 | ||
309 | 304 | ||
310 | ldr r0, =(CONFIG_FLASH_MEM_BASE & 0xFFFFF000) @ base[31:12] of FLASH | 305 | ldr r0, =(CONFIG_FLASH_MEM_BASE & 0xFFFFF000) @ base[31:12] of FLASH |
311 | ldr r1, =(CONFIG_FLASH_SIZE >> 12) @ size of FLASH (must be >= 4KB) | 306 | ldr r7, =CONFIG_FLASH_SIZE @ size of FLASH (must be >= 4KB) |
312 | mov r2, #10 @ 11 is the minimum (4KB) | 307 | pr_val r3, r0, r6, #1 |
313 | 1: add r2, r2, #1 @ area size *= 2 | 308 | mcr p15, 0, r3, c6, c2, 0 @ set area 2, ROM/FLASH |
314 | mov r1, r1, lsr #1 | 309 | mcr p15, 0, r3, c6, c2, 1 |
315 | bne 1b @ count not zero r-shift | ||
316 | orr r0, r0, r2, lsl #1 @ the area register value | ||
317 | orr r0, r0, #1 @ set enable bit | ||
318 | mcr p15, 0, r0, c6, c2, 0 @ set area 2, ROM/FLASH | ||
319 | mcr p15, 0, r0, c6, c2, 1 | ||
320 | 310 | ||
321 | mov r0, #0x06 | 311 | mov r0, #0x06 |
322 | mcr p15, 0, r0, c2, c0, 0 @ Region 1&2 cacheable | 312 | mcr p15, 0, r0, c2, c0, 0 @ Region 1&2 cacheable |
@@ -354,14 +344,14 @@ __arm940_setup: | |||
354 | 344 | ||
355 | .align | 345 | .align |
356 | 346 | ||
357 | .section ".proc.info.init", #alloc, #execinstr | 347 | .section ".proc.info.init", #alloc |
358 | 348 | ||
359 | .type __arm940_proc_info,#object | 349 | .type __arm940_proc_info,#object |
360 | __arm940_proc_info: | 350 | __arm940_proc_info: |
361 | .long 0x41009400 | 351 | .long 0x41009400 |
362 | .long 0xff00fff0 | 352 | .long 0xff00fff0 |
363 | .long 0 | 353 | .long 0 |
364 | b __arm940_setup | 354 | initfn __arm940_setup, __arm940_proc_info |
365 | .long cpu_arch_name | 355 | .long cpu_arch_name |
366 | .long cpu_elf_name | 356 | .long cpu_elf_name |
367 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | 357 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB |
diff --git a/arch/arm/mm/proc-arm946.S b/arch/arm/mm/proc-arm946.S index b3dd9b2d0b8e..7361837edc31 100644 --- a/arch/arm/mm/proc-arm946.S +++ b/arch/arm/mm/proc-arm946.S | |||
@@ -343,24 +343,14 @@ __arm946_setup: | |||
343 | mcr p15, 0, r0, c6, c0, 0 @ set region 0, default | 343 | mcr p15, 0, r0, c6, c0, 0 @ set region 0, default |
344 | 344 | ||
345 | ldr r0, =(CONFIG_DRAM_BASE & 0xFFFFF000) @ base[31:12] of RAM | 345 | ldr r0, =(CONFIG_DRAM_BASE & 0xFFFFF000) @ base[31:12] of RAM |
346 | ldr r1, =(CONFIG_DRAM_SIZE >> 12) @ size of RAM (must be >= 4KB) | 346 | ldr r7, =CONFIG_DRAM_SIZE @ size of RAM (must be >= 4KB) |
347 | mov r2, #10 @ 11 is the minimum (4KB) | 347 | pr_val r3, r0, r7, #1 |
348 | 1: add r2, r2, #1 @ area size *= 2 | 348 | mcr p15, 0, r3, c6, c1, 0 |
349 | mov r1, r1, lsr #1 | ||
350 | bne 1b @ count not zero r-shift | ||
351 | orr r0, r0, r2, lsl #1 @ the region register value | ||
352 | orr r0, r0, #1 @ set enable bit | ||
353 | mcr p15, 0, r0, c6, c1, 0 @ set region 1, RAM | ||
354 | 349 | ||
355 | ldr r0, =(CONFIG_FLASH_MEM_BASE & 0xFFFFF000) @ base[31:12] of FLASH | 350 | ldr r0, =(CONFIG_FLASH_MEM_BASE & 0xFFFFF000) @ base[31:12] of FLASH |
356 | ldr r1, =(CONFIG_FLASH_SIZE >> 12) @ size of FLASH (must be >= 4KB) | 351 | ldr r7, =CONFIG_FLASH_SIZE @ size of FLASH (must be >= 4KB) |
357 | mov r2, #10 @ 11 is the minimum (4KB) | 352 | pr_val r3, r0, r7, #1 |
358 | 1: add r2, r2, #1 @ area size *= 2 | 353 | mcr p15, 0, r3, c6, c2, 0 |
359 | mov r1, r1, lsr #1 | ||
360 | bne 1b @ count not zero r-shift | ||
361 | orr r0, r0, r2, lsl #1 @ the region register value | ||
362 | orr r0, r0, #1 @ set enable bit | ||
363 | mcr p15, 0, r0, c6, c2, 0 @ set region 2, ROM/FLASH | ||
364 | 354 | ||
365 | mov r0, #0x06 | 355 | mov r0, #0x06 |
366 | mcr p15, 0, r0, c2, c0, 0 @ region 1,2 d-cacheable | 356 | mcr p15, 0, r0, c2, c0, 0 @ region 1,2 d-cacheable |
@@ -409,14 +399,14 @@ __arm946_setup: | |||
409 | 399 | ||
410 | .align | 400 | .align |
411 | 401 | ||
412 | .section ".proc.info.init", #alloc, #execinstr | 402 | .section ".proc.info.init", #alloc |
413 | .type __arm946_proc_info,#object | 403 | .type __arm946_proc_info,#object |
414 | __arm946_proc_info: | 404 | __arm946_proc_info: |
415 | .long 0x41009460 | 405 | .long 0x41009460 |
416 | .long 0xff00fff0 | 406 | .long 0xff00fff0 |
417 | .long 0 | 407 | .long 0 |
418 | .long 0 | 408 | .long 0 |
419 | b __arm946_setup | 409 | initfn __arm946_setup, __arm946_proc_info |
420 | .long cpu_arch_name | 410 | .long cpu_arch_name |
421 | .long cpu_elf_name | 411 | .long cpu_elf_name |
422 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | 412 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB |
diff --git a/arch/arm/mm/proc-arm9tdmi.S b/arch/arm/mm/proc-arm9tdmi.S index 8227322bbb8f..7fac8c612134 100644 --- a/arch/arm/mm/proc-arm9tdmi.S +++ b/arch/arm/mm/proc-arm9tdmi.S | |||
@@ -70,7 +70,7 @@ __arm9tdmi_setup: | |||
70 | 70 | ||
71 | .align | 71 | .align |
72 | 72 | ||
73 | .section ".proc.info.init", #alloc, #execinstr | 73 | .section ".proc.info.init", #alloc |
74 | 74 | ||
75 | .macro arm9tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req | 75 | .macro arm9tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req |
76 | .type __\name\()_proc_info, #object | 76 | .type __\name\()_proc_info, #object |
@@ -79,7 +79,7 @@ __\name\()_proc_info: | |||
79 | .long \cpu_mask | 79 | .long \cpu_mask |
80 | .long 0 | 80 | .long 0 |
81 | .long 0 | 81 | .long 0 |
82 | b __arm9tdmi_setup | 82 | initfn __arm9tdmi_setup, __\name\()_proc_info |
83 | .long cpu_arch_name | 83 | .long cpu_arch_name |
84 | .long cpu_elf_name | 84 | .long cpu_elf_name |
85 | .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT | 85 | .long HWCAP_SWP | HWCAP_THUMB | HWCAP_26BIT |
diff --git a/arch/arm/mm/proc-fa526.S b/arch/arm/mm/proc-fa526.S index c494886892ba..4001b73af4ee 100644 --- a/arch/arm/mm/proc-fa526.S +++ b/arch/arm/mm/proc-fa526.S | |||
@@ -190,7 +190,7 @@ fa526_cr1_set: | |||
190 | 190 | ||
191 | .align | 191 | .align |
192 | 192 | ||
193 | .section ".proc.info.init", #alloc, #execinstr | 193 | .section ".proc.info.init", #alloc |
194 | 194 | ||
195 | .type __fa526_proc_info,#object | 195 | .type __fa526_proc_info,#object |
196 | __fa526_proc_info: | 196 | __fa526_proc_info: |
@@ -206,7 +206,7 @@ __fa526_proc_info: | |||
206 | PMD_BIT4 | \ | 206 | PMD_BIT4 | \ |
207 | PMD_SECT_AP_WRITE | \ | 207 | PMD_SECT_AP_WRITE | \ |
208 | PMD_SECT_AP_READ | 208 | PMD_SECT_AP_READ |
209 | b __fa526_setup | 209 | initfn __fa526_setup, __fa526_proc_info |
210 | .long cpu_arch_name | 210 | .long cpu_arch_name |
211 | .long cpu_elf_name | 211 | .long cpu_elf_name |
212 | .long HWCAP_SWP | HWCAP_HALF | 212 | .long HWCAP_SWP | HWCAP_HALF |
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S index 03a1b75f2e16..e494d6d6acbe 100644 --- a/arch/arm/mm/proc-feroceon.S +++ b/arch/arm/mm/proc-feroceon.S | |||
@@ -584,7 +584,7 @@ feroceon_crval: | |||
584 | 584 | ||
585 | .align | 585 | .align |
586 | 586 | ||
587 | .section ".proc.info.init", #alloc, #execinstr | 587 | .section ".proc.info.init", #alloc |
588 | 588 | ||
589 | .macro feroceon_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache:req | 589 | .macro feroceon_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache:req |
590 | .type __\name\()_proc_info,#object | 590 | .type __\name\()_proc_info,#object |
@@ -601,7 +601,8 @@ __\name\()_proc_info: | |||
601 | PMD_BIT4 | \ | 601 | PMD_BIT4 | \ |
602 | PMD_SECT_AP_WRITE | \ | 602 | PMD_SECT_AP_WRITE | \ |
603 | PMD_SECT_AP_READ | 603 | PMD_SECT_AP_READ |
604 | b __feroceon_setup | 604 | initfn __feroceon_setup, __\name\()_proc_info |
605 | .long __feroceon_setup | ||
605 | .long cpu_arch_name | 606 | .long cpu_arch_name |
606 | .long cpu_elf_name | 607 | .long cpu_elf_name |
607 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP | 608 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP |
diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index 082b9f2f7e90..c671f345266a 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S | |||
@@ -331,3 +331,31 @@ ENTRY(\name\()_tlb_fns) | |||
331 | .globl \x | 331 | .globl \x |
332 | .equ \x, \y | 332 | .equ \x, \y |
333 | .endm | 333 | .endm |
334 | |||
335 | .macro initfn, func, base | ||
336 | .long \func - \base | ||
337 | .endm | ||
338 | |||
339 | /* | ||
340 | * Macro to calculate the log2 size for the protection region | ||
341 | * registers. This calculates rd = log2(size) - 1. tmp must | ||
342 | * not be the same register as rd. | ||
343 | */ | ||
344 | .macro pr_sz, rd, size, tmp | ||
345 | mov \tmp, \size, lsr #12 | ||
346 | mov \rd, #11 | ||
347 | 1: movs \tmp, \tmp, lsr #1 | ||
348 | addne \rd, \rd, #1 | ||
349 | bne 1b | ||
350 | .endm | ||
351 | |||
352 | /* | ||
353 | * Macro to generate a protection region register value | ||
354 | * given a pre-masked address, size, and enable bit. | ||
355 | * Corrupts size. | ||
356 | */ | ||
357 | .macro pr_val, dest, addr, size, enable | ||
358 | pr_sz \dest, \size, \size @ calculate log2(size) - 1 | ||
359 | orr \dest, \addr, \dest, lsl #1 @ mask in the region size | ||
360 | orr \dest, \dest, \enable | ||
361 | .endm | ||
diff --git a/arch/arm/mm/proc-mohawk.S b/arch/arm/mm/proc-mohawk.S index 53d393455f13..d65edf717bf7 100644 --- a/arch/arm/mm/proc-mohawk.S +++ b/arch/arm/mm/proc-mohawk.S | |||
@@ -427,7 +427,7 @@ mohawk_crval: | |||
427 | 427 | ||
428 | .align | 428 | .align |
429 | 429 | ||
430 | .section ".proc.info.init", #alloc, #execinstr | 430 | .section ".proc.info.init", #alloc |
431 | 431 | ||
432 | .type __88sv331x_proc_info,#object | 432 | .type __88sv331x_proc_info,#object |
433 | __88sv331x_proc_info: | 433 | __88sv331x_proc_info: |
@@ -443,7 +443,7 @@ __88sv331x_proc_info: | |||
443 | PMD_BIT4 | \ | 443 | PMD_BIT4 | \ |
444 | PMD_SECT_AP_WRITE | \ | 444 | PMD_SECT_AP_WRITE | \ |
445 | PMD_SECT_AP_READ | 445 | PMD_SECT_AP_READ |
446 | b __mohawk_setup | 446 | initfn __mohawk_setup, __88sv331x_proc_info |
447 | .long cpu_arch_name | 447 | .long cpu_arch_name |
448 | .long cpu_elf_name | 448 | .long cpu_elf_name |
449 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP | 449 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP |
diff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S index 8008a0461cf5..ee2ce496239f 100644 --- a/arch/arm/mm/proc-sa110.S +++ b/arch/arm/mm/proc-sa110.S | |||
@@ -199,7 +199,7 @@ sa110_crval: | |||
199 | 199 | ||
200 | .align | 200 | .align |
201 | 201 | ||
202 | .section ".proc.info.init", #alloc, #execinstr | 202 | .section ".proc.info.init", #alloc |
203 | 203 | ||
204 | .type __sa110_proc_info,#object | 204 | .type __sa110_proc_info,#object |
205 | __sa110_proc_info: | 205 | __sa110_proc_info: |
@@ -213,7 +213,7 @@ __sa110_proc_info: | |||
213 | .long PMD_TYPE_SECT | \ | 213 | .long PMD_TYPE_SECT | \ |
214 | PMD_SECT_AP_WRITE | \ | 214 | PMD_SECT_AP_WRITE | \ |
215 | PMD_SECT_AP_READ | 215 | PMD_SECT_AP_READ |
216 | b __sa110_setup | 216 | initfn __sa110_setup, __sa110_proc_info |
217 | .long cpu_arch_name | 217 | .long cpu_arch_name |
218 | .long cpu_elf_name | 218 | .long cpu_elf_name |
219 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_26BIT | HWCAP_FAST_MULT | 219 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_26BIT | HWCAP_FAST_MULT |
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S index 89f97ac648a9..222d5836f666 100644 --- a/arch/arm/mm/proc-sa1100.S +++ b/arch/arm/mm/proc-sa1100.S | |||
@@ -242,7 +242,7 @@ sa1100_crval: | |||
242 | 242 | ||
243 | .align | 243 | .align |
244 | 244 | ||
245 | .section ".proc.info.init", #alloc, #execinstr | 245 | .section ".proc.info.init", #alloc |
246 | 246 | ||
247 | .macro sa1100_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req | 247 | .macro sa1100_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req |
248 | .type __\name\()_proc_info,#object | 248 | .type __\name\()_proc_info,#object |
@@ -257,7 +257,7 @@ __\name\()_proc_info: | |||
257 | .long PMD_TYPE_SECT | \ | 257 | .long PMD_TYPE_SECT | \ |
258 | PMD_SECT_AP_WRITE | \ | 258 | PMD_SECT_AP_WRITE | \ |
259 | PMD_SECT_AP_READ | 259 | PMD_SECT_AP_READ |
260 | b __sa1100_setup | 260 | initfn __sa1100_setup, __\name\()_proc_info |
261 | .long cpu_arch_name | 261 | .long cpu_arch_name |
262 | .long cpu_elf_name | 262 | .long cpu_elf_name |
263 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_26BIT | HWCAP_FAST_MULT | 263 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_26BIT | HWCAP_FAST_MULT |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index d0390f4b3f18..06d890a2342b 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -264,7 +264,7 @@ v6_crval: | |||
264 | string cpu_elf_name, "v6" | 264 | string cpu_elf_name, "v6" |
265 | .align | 265 | .align |
266 | 266 | ||
267 | .section ".proc.info.init", #alloc, #execinstr | 267 | .section ".proc.info.init", #alloc |
268 | 268 | ||
269 | /* | 269 | /* |
270 | * Match any ARMv6 processor core. | 270 | * Match any ARMv6 processor core. |
@@ -287,7 +287,7 @@ __v6_proc_info: | |||
287 | PMD_SECT_XN | \ | 287 | PMD_SECT_XN | \ |
288 | PMD_SECT_AP_WRITE | \ | 288 | PMD_SECT_AP_WRITE | \ |
289 | PMD_SECT_AP_READ | 289 | PMD_SECT_AP_READ |
290 | b __v6_setup | 290 | initfn __v6_setup, __v6_proc_info |
291 | .long cpu_arch_name | 291 | .long cpu_arch_name |
292 | .long cpu_elf_name | 292 | .long cpu_elf_name |
293 | /* See also feat_v6_fixup() for HWCAP_TLS */ | 293 | /* See also feat_v6_fixup() for HWCAP_TLS */ |
diff --git a/arch/arm/mm/proc-v7-2level.S b/arch/arm/mm/proc-v7-2level.S index ed448d8a596b..10405b8d31af 100644 --- a/arch/arm/mm/proc-v7-2level.S +++ b/arch/arm/mm/proc-v7-2level.S | |||
@@ -37,15 +37,18 @@ | |||
37 | * It is assumed that: | 37 | * It is assumed that: |
38 | * - we are not using split page tables | 38 | * - we are not using split page tables |
39 | */ | 39 | */ |
40 | ENTRY(cpu_v7_switch_mm) | 40 | ENTRY(cpu_ca8_switch_mm) |
41 | #ifdef CONFIG_MMU | 41 | #ifdef CONFIG_MMU |
42 | mov r2, #0 | 42 | mov r2, #0 |
43 | mmid r1, r1 @ get mm->context.id | ||
44 | ALT_SMP(orr r0, r0, #TTB_FLAGS_SMP) | ||
45 | ALT_UP(orr r0, r0, #TTB_FLAGS_UP) | ||
46 | #ifdef CONFIG_ARM_ERRATA_430973 | 43 | #ifdef CONFIG_ARM_ERRATA_430973 |
47 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB | 44 | mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB |
48 | #endif | 45 | #endif |
46 | #endif | ||
47 | ENTRY(cpu_v7_switch_mm) | ||
48 | #ifdef CONFIG_MMU | ||
49 | mmid r1, r1 @ get mm->context.id | ||
50 | ALT_SMP(orr r0, r0, #TTB_FLAGS_SMP) | ||
51 | ALT_UP(orr r0, r0, #TTB_FLAGS_UP) | ||
49 | #ifdef CONFIG_PID_IN_CONTEXTIDR | 52 | #ifdef CONFIG_PID_IN_CONTEXTIDR |
50 | mrc p15, 0, r2, c13, c0, 1 @ read current context ID | 53 | mrc p15, 0, r2, c13, c0, 1 @ read current context ID |
51 | lsr r2, r2, #8 @ extract the PID | 54 | lsr r2, r2, #8 @ extract the PID |
@@ -61,6 +64,7 @@ ENTRY(cpu_v7_switch_mm) | |||
61 | #endif | 64 | #endif |
62 | bx lr | 65 | bx lr |
63 | ENDPROC(cpu_v7_switch_mm) | 66 | ENDPROC(cpu_v7_switch_mm) |
67 | ENDPROC(cpu_ca8_switch_mm) | ||
64 | 68 | ||
65 | /* | 69 | /* |
66 | * cpu_v7_set_pte_ext(ptep, pte) | 70 | * cpu_v7_set_pte_ext(ptep, pte) |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 8b4ee5e81c14..3d1054f11a8a 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -153,6 +153,21 @@ ENDPROC(cpu_v7_do_resume) | |||
153 | #endif | 153 | #endif |
154 | 154 | ||
155 | /* | 155 | /* |
156 | * Cortex-A8 | ||
157 | */ | ||
158 | globl_equ cpu_ca8_proc_init, cpu_v7_proc_init | ||
159 | globl_equ cpu_ca8_proc_fin, cpu_v7_proc_fin | ||
160 | globl_equ cpu_ca8_reset, cpu_v7_reset | ||
161 | globl_equ cpu_ca8_do_idle, cpu_v7_do_idle | ||
162 | globl_equ cpu_ca8_dcache_clean_area, cpu_v7_dcache_clean_area | ||
163 | globl_equ cpu_ca8_set_pte_ext, cpu_v7_set_pte_ext | ||
164 | globl_equ cpu_ca8_suspend_size, cpu_v7_suspend_size | ||
165 | #ifdef CONFIG_ARM_CPU_SUSPEND | ||
166 | globl_equ cpu_ca8_do_suspend, cpu_v7_do_suspend | ||
167 | globl_equ cpu_ca8_do_resume, cpu_v7_do_resume | ||
168 | #endif | ||
169 | |||
170 | /* | ||
156 | * Cortex-A9 processor functions | 171 | * Cortex-A9 processor functions |
157 | */ | 172 | */ |
158 | globl_equ cpu_ca9mp_proc_init, cpu_v7_proc_init | 173 | globl_equ cpu_ca9mp_proc_init, cpu_v7_proc_init |
@@ -451,7 +466,10 @@ __v7_setup_stack: | |||
451 | 466 | ||
452 | @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) | 467 | @ define struct processor (see <asm/proc-fns.h> and proc-macros.S) |
453 | define_processor_functions v7, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 | 468 | define_processor_functions v7, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 |
469 | #ifndef CONFIG_ARM_LPAE | ||
470 | define_processor_functions ca8, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 | ||
454 | define_processor_functions ca9mp, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 | 471 | define_processor_functions ca9mp, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 |
472 | #endif | ||
455 | #ifdef CONFIG_CPU_PJ4B | 473 | #ifdef CONFIG_CPU_PJ4B |
456 | define_processor_functions pj4b, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 | 474 | define_processor_functions pj4b, dabort=v7_early_abort, pabort=v7_pabort, suspend=1 |
457 | #endif | 475 | #endif |
@@ -462,19 +480,19 @@ __v7_setup_stack: | |||
462 | string cpu_elf_name, "v7" | 480 | string cpu_elf_name, "v7" |
463 | .align | 481 | .align |
464 | 482 | ||
465 | .section ".proc.info.init", #alloc, #execinstr | 483 | .section ".proc.info.init", #alloc |
466 | 484 | ||
467 | /* | 485 | /* |
468 | * Standard v7 proc info content | 486 | * Standard v7 proc info content |
469 | */ | 487 | */ |
470 | .macro __v7_proc initfunc, mm_mmuflags = 0, io_mmuflags = 0, hwcaps = 0, proc_fns = v7_processor_functions | 488 | .macro __v7_proc name, initfunc, mm_mmuflags = 0, io_mmuflags = 0, hwcaps = 0, proc_fns = v7_processor_functions |
471 | ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | \ | 489 | ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | \ |
472 | PMD_SECT_AF | PMD_FLAGS_SMP | \mm_mmuflags) | 490 | PMD_SECT_AF | PMD_FLAGS_SMP | \mm_mmuflags) |
473 | ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | \ | 491 | ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | \ |
474 | PMD_SECT_AF | PMD_FLAGS_UP | \mm_mmuflags) | 492 | PMD_SECT_AF | PMD_FLAGS_UP | \mm_mmuflags) |
475 | .long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | \ | 493 | .long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | \ |
476 | PMD_SECT_AP_READ | PMD_SECT_AF | \io_mmuflags | 494 | PMD_SECT_AP_READ | PMD_SECT_AF | \io_mmuflags |
477 | W(b) \initfunc | 495 | initfn \initfunc, \name |
478 | .long cpu_arch_name | 496 | .long cpu_arch_name |
479 | .long cpu_elf_name | 497 | .long cpu_elf_name |
480 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | HWCAP_FAST_MULT | \ | 498 | .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | HWCAP_FAST_MULT | \ |
@@ -494,7 +512,7 @@ __v7_setup_stack: | |||
494 | __v7_ca5mp_proc_info: | 512 | __v7_ca5mp_proc_info: |
495 | .long 0x410fc050 | 513 | .long 0x410fc050 |
496 | .long 0xff0ffff0 | 514 | .long 0xff0ffff0 |
497 | __v7_proc __v7_ca5mp_setup | 515 | __v7_proc __v7_ca5mp_proc_info, __v7_ca5mp_setup |
498 | .size __v7_ca5mp_proc_info, . - __v7_ca5mp_proc_info | 516 | .size __v7_ca5mp_proc_info, . - __v7_ca5mp_proc_info |
499 | 517 | ||
500 | /* | 518 | /* |
@@ -504,9 +522,19 @@ __v7_ca5mp_proc_info: | |||
504 | __v7_ca9mp_proc_info: | 522 | __v7_ca9mp_proc_info: |
505 | .long 0x410fc090 | 523 | .long 0x410fc090 |
506 | .long 0xff0ffff0 | 524 | .long 0xff0ffff0 |
507 | __v7_proc __v7_ca9mp_setup, proc_fns = ca9mp_processor_functions | 525 | __v7_proc __v7_ca9mp_proc_info, __v7_ca9mp_setup, proc_fns = ca9mp_processor_functions |
508 | .size __v7_ca9mp_proc_info, . - __v7_ca9mp_proc_info | 526 | .size __v7_ca9mp_proc_info, . - __v7_ca9mp_proc_info |
509 | 527 | ||
528 | /* | ||
529 | * ARM Ltd. Cortex A8 processor. | ||
530 | */ | ||
531 | .type __v7_ca8_proc_info, #object | ||
532 | __v7_ca8_proc_info: | ||
533 | .long 0x410fc080 | ||
534 | .long 0xff0ffff0 | ||
535 | __v7_proc __v7_ca8_proc_info, __v7_setup, proc_fns = ca8_processor_functions | ||
536 | .size __v7_ca8_proc_info, . - __v7_ca8_proc_info | ||
537 | |||
510 | #endif /* CONFIG_ARM_LPAE */ | 538 | #endif /* CONFIG_ARM_LPAE */ |
511 | 539 | ||
512 | /* | 540 | /* |
@@ -517,7 +545,7 @@ __v7_ca9mp_proc_info: | |||
517 | __v7_pj4b_proc_info: | 545 | __v7_pj4b_proc_info: |
518 | .long 0x560f5800 | 546 | .long 0x560f5800 |
519 | .long 0xff0fff00 | 547 | .long 0xff0fff00 |
520 | __v7_proc __v7_pj4b_setup, proc_fns = pj4b_processor_functions | 548 | __v7_proc __v7_pj4b_proc_info, __v7_pj4b_setup, proc_fns = pj4b_processor_functions |
521 | .size __v7_pj4b_proc_info, . - __v7_pj4b_proc_info | 549 | .size __v7_pj4b_proc_info, . - __v7_pj4b_proc_info |
522 | #endif | 550 | #endif |
523 | 551 | ||
@@ -528,7 +556,7 @@ __v7_pj4b_proc_info: | |||
528 | __v7_cr7mp_proc_info: | 556 | __v7_cr7mp_proc_info: |
529 | .long 0x410fc170 | 557 | .long 0x410fc170 |
530 | .long 0xff0ffff0 | 558 | .long 0xff0ffff0 |
531 | __v7_proc __v7_cr7mp_setup | 559 | __v7_proc __v7_cr7mp_proc_info, __v7_cr7mp_setup |
532 | .size __v7_cr7mp_proc_info, . - __v7_cr7mp_proc_info | 560 | .size __v7_cr7mp_proc_info, . - __v7_cr7mp_proc_info |
533 | 561 | ||
534 | /* | 562 | /* |
@@ -538,7 +566,7 @@ __v7_cr7mp_proc_info: | |||
538 | __v7_ca7mp_proc_info: | 566 | __v7_ca7mp_proc_info: |
539 | .long 0x410fc070 | 567 | .long 0x410fc070 |
540 | .long 0xff0ffff0 | 568 | .long 0xff0ffff0 |
541 | __v7_proc __v7_ca7mp_setup | 569 | __v7_proc __v7_ca7mp_proc_info, __v7_ca7mp_setup |
542 | .size __v7_ca7mp_proc_info, . - __v7_ca7mp_proc_info | 570 | .size __v7_ca7mp_proc_info, . - __v7_ca7mp_proc_info |
543 | 571 | ||
544 | /* | 572 | /* |
@@ -548,7 +576,7 @@ __v7_ca7mp_proc_info: | |||
548 | __v7_ca12mp_proc_info: | 576 | __v7_ca12mp_proc_info: |
549 | .long 0x410fc0d0 | 577 | .long 0x410fc0d0 |
550 | .long 0xff0ffff0 | 578 | .long 0xff0ffff0 |
551 | __v7_proc __v7_ca12mp_setup | 579 | __v7_proc __v7_ca12mp_proc_info, __v7_ca12mp_setup |
552 | .size __v7_ca12mp_proc_info, . - __v7_ca12mp_proc_info | 580 | .size __v7_ca12mp_proc_info, . - __v7_ca12mp_proc_info |
553 | 581 | ||
554 | /* | 582 | /* |
@@ -558,7 +586,7 @@ __v7_ca12mp_proc_info: | |||
558 | __v7_ca15mp_proc_info: | 586 | __v7_ca15mp_proc_info: |
559 | .long 0x410fc0f0 | 587 | .long 0x410fc0f0 |
560 | .long 0xff0ffff0 | 588 | .long 0xff0ffff0 |
561 | __v7_proc __v7_ca15mp_setup | 589 | __v7_proc __v7_ca15mp_proc_info, __v7_ca15mp_setup |
562 | .size __v7_ca15mp_proc_info, . - __v7_ca15mp_proc_info | 590 | .size __v7_ca15mp_proc_info, . - __v7_ca15mp_proc_info |
563 | 591 | ||
564 | /* | 592 | /* |
@@ -568,7 +596,7 @@ __v7_ca15mp_proc_info: | |||
568 | __v7_b15mp_proc_info: | 596 | __v7_b15mp_proc_info: |
569 | .long 0x420f00f0 | 597 | .long 0x420f00f0 |
570 | .long 0xff0ffff0 | 598 | .long 0xff0ffff0 |
571 | __v7_proc __v7_b15mp_setup | 599 | __v7_proc __v7_b15mp_proc_info, __v7_b15mp_setup |
572 | .size __v7_b15mp_proc_info, . - __v7_b15mp_proc_info | 600 | .size __v7_b15mp_proc_info, . - __v7_b15mp_proc_info |
573 | 601 | ||
574 | /* | 602 | /* |
@@ -578,7 +606,7 @@ __v7_b15mp_proc_info: | |||
578 | __v7_ca17mp_proc_info: | 606 | __v7_ca17mp_proc_info: |
579 | .long 0x410fc0e0 | 607 | .long 0x410fc0e0 |
580 | .long 0xff0ffff0 | 608 | .long 0xff0ffff0 |
581 | __v7_proc __v7_ca17mp_setup | 609 | __v7_proc __v7_ca17mp_proc_info, __v7_ca17mp_setup |
582 | .size __v7_ca17mp_proc_info, . - __v7_ca17mp_proc_info | 610 | .size __v7_ca17mp_proc_info, . - __v7_ca17mp_proc_info |
583 | 611 | ||
584 | /* | 612 | /* |
@@ -594,7 +622,7 @@ __krait_proc_info: | |||
594 | * do support them. They also don't indicate support for fused multiply | 622 | * do support them. They also don't indicate support for fused multiply |
595 | * instructions even though they actually do support them. | 623 | * instructions even though they actually do support them. |
596 | */ | 624 | */ |
597 | __v7_proc __v7_setup, hwcaps = HWCAP_IDIV | HWCAP_VFPv4 | 625 | __v7_proc __krait_proc_info, __v7_setup, hwcaps = HWCAP_IDIV | HWCAP_VFPv4 |
598 | .size __krait_proc_info, . - __krait_proc_info | 626 | .size __krait_proc_info, . - __krait_proc_info |
599 | 627 | ||
600 | /* | 628 | /* |
@@ -604,5 +632,5 @@ __krait_proc_info: | |||
604 | __v7_proc_info: | 632 | __v7_proc_info: |
605 | .long 0x000f0000 @ Required ID value | 633 | .long 0x000f0000 @ Required ID value |
606 | .long 0x000f0000 @ Mask for ID | 634 | .long 0x000f0000 @ Mask for ID |
607 | __v7_proc __v7_setup | 635 | __v7_proc __v7_proc_info, __v7_setup |
608 | .size __v7_proc_info, . - __v7_proc_info | 636 | .size __v7_proc_info, . - __v7_proc_info |
diff --git a/arch/arm/mm/proc-v7m.S b/arch/arm/mm/proc-v7m.S index d1e68b553d3b..e08e1f2bab76 100644 --- a/arch/arm/mm/proc-v7m.S +++ b/arch/arm/mm/proc-v7m.S | |||
@@ -135,7 +135,7 @@ __v7m_setup_stack_top: | |||
135 | string cpu_elf_name "v7m" | 135 | string cpu_elf_name "v7m" |
136 | string cpu_v7m_name "ARMv7-M" | 136 | string cpu_v7m_name "ARMv7-M" |
137 | 137 | ||
138 | .section ".proc.info.init", #alloc, #execinstr | 138 | .section ".proc.info.init", #alloc |
139 | 139 | ||
140 | /* | 140 | /* |
141 | * Match any ARMv7-M processor core. | 141 | * Match any ARMv7-M processor core. |
@@ -146,7 +146,7 @@ __v7m_proc_info: | |||
146 | .long 0x000f0000 @ Mask for ID | 146 | .long 0x000f0000 @ Mask for ID |
147 | .long 0 @ proc_info_list.__cpu_mm_mmu_flags | 147 | .long 0 @ proc_info_list.__cpu_mm_mmu_flags |
148 | .long 0 @ proc_info_list.__cpu_io_mmu_flags | 148 | .long 0 @ proc_info_list.__cpu_io_mmu_flags |
149 | b __v7m_setup @ proc_info_list.__cpu_flush | 149 | initfn __v7m_setup, __v7m_proc_info @ proc_info_list.__cpu_flush |
150 | .long cpu_arch_name | 150 | .long cpu_arch_name |
151 | .long cpu_elf_name | 151 | .long cpu_elf_name |
152 | .long HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT | 152 | .long HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index f8acdfece036..293dcc2c441f 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
@@ -499,7 +499,7 @@ xsc3_crval: | |||
499 | 499 | ||
500 | .align | 500 | .align |
501 | 501 | ||
502 | .section ".proc.info.init", #alloc, #execinstr | 502 | .section ".proc.info.init", #alloc |
503 | 503 | ||
504 | .macro xsc3_proc_info name:req, cpu_val:req, cpu_mask:req | 504 | .macro xsc3_proc_info name:req, cpu_val:req, cpu_mask:req |
505 | .type __\name\()_proc_info,#object | 505 | .type __\name\()_proc_info,#object |
@@ -514,7 +514,7 @@ __\name\()_proc_info: | |||
514 | .long PMD_TYPE_SECT | \ | 514 | .long PMD_TYPE_SECT | \ |
515 | PMD_SECT_AP_WRITE | \ | 515 | PMD_SECT_AP_WRITE | \ |
516 | PMD_SECT_AP_READ | 516 | PMD_SECT_AP_READ |
517 | b __xsc3_setup | 517 | initfn __xsc3_setup, __\name\()_proc_info |
518 | .long cpu_arch_name | 518 | .long cpu_arch_name |
519 | .long cpu_elf_name | 519 | .long cpu_elf_name |
520 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP | 520 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP |
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index afa2b3c4df4a..b6bbfdb6dfdc 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S | |||
@@ -612,7 +612,7 @@ xscale_crval: | |||
612 | 612 | ||
613 | .align | 613 | .align |
614 | 614 | ||
615 | .section ".proc.info.init", #alloc, #execinstr | 615 | .section ".proc.info.init", #alloc |
616 | 616 | ||
617 | .macro xscale_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache | 617 | .macro xscale_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache |
618 | .type __\name\()_proc_info,#object | 618 | .type __\name\()_proc_info,#object |
@@ -627,7 +627,7 @@ __\name\()_proc_info: | |||
627 | .long PMD_TYPE_SECT | \ | 627 | .long PMD_TYPE_SECT | \ |
628 | PMD_SECT_AP_WRITE | \ | 628 | PMD_SECT_AP_WRITE | \ |
629 | PMD_SECT_AP_READ | 629 | PMD_SECT_AP_READ |
630 | b __xscale_setup | 630 | initfn __xscale_setup, __\name\()_proc_info |
631 | .long cpu_arch_name | 631 | .long cpu_arch_name |
632 | .long cpu_elf_name | 632 | .long cpu_elf_name |
633 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP | 633 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP |
diff --git a/arch/arm/nwfpe/entry.S b/arch/arm/nwfpe/entry.S index 5d65be1f1e8a..71df43547659 100644 --- a/arch/arm/nwfpe/entry.S +++ b/arch/arm/nwfpe/entry.S | |||
@@ -113,7 +113,7 @@ next: | |||
113 | @ to fault. Emit the appropriate exception gunk to fix things up. | 113 | @ to fault. Emit the appropriate exception gunk to fix things up. |
114 | @ ??? For some reason, faults can happen at .Lx2 even with a | 114 | @ ??? For some reason, faults can happen at .Lx2 even with a |
115 | @ plain LDR instruction. Weird, but it seems harmless. | 115 | @ plain LDR instruction. Weird, but it seems harmless. |
116 | .pushsection .fixup,"ax" | 116 | .pushsection .text.fixup,"ax" |
117 | .align 2 | 117 | .align 2 |
118 | .Lfix: ret r9 @ let the user eat segfaults | 118 | .Lfix: ret r9 @ let the user eat segfaults |
119 | .popsection | 119 | .popsection |