aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-01-06 05:02:29 -0500
committerIngo Molnar <mingo@kernel.org>2016-01-06 05:02:29 -0500
commit567bee2803cb46caeb6011de5b738fde33dc3896 (patch)
tree05bab01377bffa356bfbe06c4b6193b23b7c24ca /arch/arm
parentaa0b7ae06387d40a988ce16a189082dee6e570bc (diff)
parent093e5840ae76f1082633503964d035f40ed0216d (diff)
Merge branch 'sched/urgent' into sched/core, to pick up fixes before merging new patches
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig4
-rw-r--r--arch/arm/boot/dts/am4372.dtsi4
-rw-r--r--arch/arm/boot/dts/am43xx-clocks.dtsi8
-rw-r--r--arch/arm/boot/dts/am57xx-beagle-x15.dts1
-rw-r--r--arch/arm/boot/dts/animeo_ip.dts6
-rw-r--r--arch/arm/boot/dts/armada-38x.dtsi1
-rw-r--r--arch/arm/boot/dts/at91-foxg20.dts2
-rw-r--r--arch/arm/boot/dts/at91-kizbox.dts13
-rw-r--r--arch/arm/boot/dts/at91-kizbox2.dts6
-rw-r--r--arch/arm/boot/dts/at91-kizboxmini.dts4
-rw-r--r--arch/arm/boot/dts/at91-qil_a9260.dts2
-rw-r--r--arch/arm/boot/dts/at91-sama5d2_xplained.dts116
-rw-r--r--arch/arm/boot/dts/at91-sama5d3_xplained.dts2
-rw-r--r--arch/arm/boot/dts/at91-sama5d4_xplained.dts12
-rw-r--r--arch/arm/boot/dts/at91-sama5d4ek.dts12
-rw-r--r--arch/arm/boot/dts/at91rm9200ek.dts9
-rw-r--r--arch/arm/boot/dts/at91sam9261ek.dts19
-rw-r--r--arch/arm/boot/dts/at91sam9263ek.dts13
-rw-r--r--arch/arm/boot/dts/at91sam9g20ek_common.dtsi13
-rw-r--r--arch/arm/boot/dts/at91sam9m10g45ek.dts13
-rw-r--r--arch/arm/boot/dts/at91sam9n12ek.dts11
-rw-r--r--arch/arm/boot/dts/at91sam9rlek.dts13
-rw-r--r--arch/arm/boot/dts/at91sam9x5cm.dtsi11
-rw-r--r--arch/arm/boot/dts/berlin2q.dtsi8
-rw-r--r--arch/arm/boot/dts/dm816x.dtsi8
-rw-r--r--arch/arm/boot/dts/dra7.dtsi4
-rw-r--r--arch/arm/boot/dts/imx6q-gw5400-a.dts2
-rw-r--r--arch/arm/boot/dts/imx6qdl-gw51xx.dtsi2
-rw-r--r--arch/arm/boot/dts/imx6qdl-gw52xx.dtsi2
-rw-r--r--arch/arm/boot/dts/imx6qdl-gw53xx.dtsi2
-rw-r--r--arch/arm/boot/dts/imx6qdl-gw54xx.dtsi2
-rw-r--r--arch/arm/boot/dts/imx6qdl-sabreauto.dtsi6
-rw-r--r--arch/arm/boot/dts/k2l-netcp.dtsi2
-rw-r--r--arch/arm/boot/dts/kirkwood-ts219.dtsi2
-rw-r--r--arch/arm/boot/dts/omap4-duovero-parlor.dts4
-rw-r--r--arch/arm/boot/dts/rk3288-veyron-minnie.dts4
-rw-r--r--arch/arm/boot/dts/rk3288.dtsi10
-rw-r--r--arch/arm/boot/dts/sama5d35ek.dts2
-rw-r--r--arch/arm/boot/dts/sama5d4.dtsi2
-rw-r--r--arch/arm/boot/dts/sun6i-a31s-primo81.dts1
-rw-r--r--arch/arm/boot/dts/tegra124-nyan.dtsi2
-rw-r--r--arch/arm/boot/dts/usb_a9260_common.dtsi2
-rw-r--r--arch/arm/boot/dts/usb_a9263.dts2
-rw-r--r--arch/arm/boot/dts/vf610-colibri.dtsi5
-rw-r--r--arch/arm/boot/dts/vf610.dtsi2
-rw-r--r--arch/arm/boot/dts/vfxxx.dtsi14
-rw-r--r--arch/arm/configs/at91_dt_defconfig1
-rw-r--r--arch/arm/configs/sama5_defconfig1
-rw-r--r--arch/arm/include/asm/arch_gicv3.h1
-rw-r--r--arch/arm/include/asm/irq.h5
-rw-r--r--arch/arm/include/asm/kvm_emulate.h12
-rw-r--r--arch/arm/include/asm/uaccess.h4
-rw-r--r--arch/arm/include/uapi/asm/unistd.h1
-rw-r--r--arch/arm/kernel/bios32.c19
-rw-r--r--arch/arm/kernel/calls.S1
-rw-r--r--arch/arm/kernel/process.c33
-rw-r--r--arch/arm/kernel/swp_emulate.c6
-rw-r--r--arch/arm/kernel/sys_oabi-compat.c73
-rw-r--r--arch/arm/kvm/arm.c7
-rw-r--r--arch/arm/kvm/mmio.c5
-rw-r--r--arch/arm/kvm/mmu.c15
-rw-r--r--arch/arm/kvm/psci.c20
-rw-r--r--arch/arm/lib/uaccess_with_memcpy.c29
-rw-r--r--arch/arm/mach-at91/Kconfig6
-rw-r--r--arch/arm/mach-at91/pm.c7
-rw-r--r--arch/arm/mach-dove/include/mach/entry-macro.S4
-rw-r--r--arch/arm/mach-exynos/pmu.c6
-rw-r--r--arch/arm/mach-imx/gpc.c1
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/io.h12
-rw-r--r--arch/arm/mach-omap2/Kconfig4
-rw-r--r--arch/arm/mach-omap2/omap-smp.c6
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c66
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.h3
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_7xx_data.c56
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_81xx_data.c3
-rw-r--r--arch/arm/mach-omap2/pdata-quirks.c29
-rw-r--r--arch/arm/mach-omap2/pm34xx.c4
-rw-r--r--arch/arm/mach-omap2/timer.c6
-rw-r--r--arch/arm/mach-orion5x/include/mach/entry-macro.S2
-rw-r--r--arch/arm/mach-pxa/ezx.c5
-rw-r--r--arch/arm/mach-pxa/palm27x.c2
-rw-r--r--arch/arm/mach-pxa/palmtc.c2
-rw-r--r--arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c2
-rw-r--r--arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c2
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7793.c2
-rw-r--r--arch/arm/mach-zx/Kconfig2
-rw-r--r--arch/arm/mm/context.c38
-rw-r--r--arch/arm/mm/dma-mapping.c2
-rw-r--r--arch/arm/mm/init.c92
-rw-r--r--arch/arm/mm/proc-v7.S4
90 files changed, 581 insertions, 405 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 0365cbbc9179..34e1569a11ee 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -76,6 +76,8 @@ config ARM
76 select IRQ_FORCED_THREADING 76 select IRQ_FORCED_THREADING
77 select MODULES_USE_ELF_REL 77 select MODULES_USE_ELF_REL
78 select NO_BOOTMEM 78 select NO_BOOTMEM
79 select OF_EARLY_FLATTREE if OF
80 select OF_RESERVED_MEM if OF
79 select OLD_SIGACTION 81 select OLD_SIGACTION
80 select OLD_SIGSUSPEND3 82 select OLD_SIGSUSPEND3
81 select PERF_USE_VMALLOC 83 select PERF_USE_VMALLOC
@@ -1822,8 +1824,6 @@ config USE_OF
1822 bool "Flattened Device Tree support" 1824 bool "Flattened Device Tree support"
1823 select IRQ_DOMAIN 1825 select IRQ_DOMAIN
1824 select OF 1826 select OF
1825 select OF_EARLY_FLATTREE
1826 select OF_RESERVED_MEM
1827 help 1827 help
1828 Include support for flattened device tree machine descriptions. 1828 Include support for flattened device tree machine descriptions.
1829 1829
diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index d83ff9c9701e..de8791a4d131 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -74,7 +74,7 @@
74 reg = <0x48240200 0x100>; 74 reg = <0x48240200 0x100>;
75 interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>; 75 interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
76 interrupt-parent = <&gic>; 76 interrupt-parent = <&gic>;
77 clocks = <&dpll_mpu_m2_ck>; 77 clocks = <&mpu_periphclk>;
78 }; 78 };
79 79
80 local_timer: timer@48240600 { 80 local_timer: timer@48240600 {
@@ -82,7 +82,7 @@
82 reg = <0x48240600 0x100>; 82 reg = <0x48240600 0x100>;
83 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>; 83 interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
84 interrupt-parent = <&gic>; 84 interrupt-parent = <&gic>;
85 clocks = <&dpll_mpu_m2_ck>; 85 clocks = <&mpu_periphclk>;
86 }; 86 };
87 87
88 l2-cache-controller@48242000 { 88 l2-cache-controller@48242000 {
diff --git a/arch/arm/boot/dts/am43xx-clocks.dtsi b/arch/arm/boot/dts/am43xx-clocks.dtsi
index cc88728d751d..a38af2bfbfcf 100644
--- a/arch/arm/boot/dts/am43xx-clocks.dtsi
+++ b/arch/arm/boot/dts/am43xx-clocks.dtsi
@@ -259,6 +259,14 @@
259 ti,invert-autoidle-bit; 259 ti,invert-autoidle-bit;
260 }; 260 };
261 261
262 mpu_periphclk: mpu_periphclk {
263 #clock-cells = <0>;
264 compatible = "fixed-factor-clock";
265 clocks = <&dpll_mpu_m2_ck>;
266 clock-mult = <1>;
267 clock-div = <2>;
268 };
269
262 dpll_ddr_ck: dpll_ddr_ck { 270 dpll_ddr_ck: dpll_ddr_ck {
263 #clock-cells = <0>; 271 #clock-cells = <0>;
264 compatible = "ti,am3-dpll-clock"; 272 compatible = "ti,am3-dpll-clock";
diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts
index d9ba6b879fc1..00352e761b8c 100644
--- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
+++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
@@ -604,6 +604,7 @@
604 reg = <0x6f>; 604 reg = <0x6f>;
605 interrupts-extended = <&crossbar_mpu GIC_SPI 2 IRQ_TYPE_EDGE_RISING>, 605 interrupts-extended = <&crossbar_mpu GIC_SPI 2 IRQ_TYPE_EDGE_RISING>,
606 <&dra7_pmx_core 0x424>; 606 <&dra7_pmx_core 0x424>;
607 interrupt-names = "irq", "wakeup";
607 608
608 pinctrl-names = "default"; 609 pinctrl-names = "default";
609 pinctrl-0 = <&mcp79410_pins_default>; 610 pinctrl-0 = <&mcp79410_pins_default>;
diff --git a/arch/arm/boot/dts/animeo_ip.dts b/arch/arm/boot/dts/animeo_ip.dts
index 4e0ad3b82796..0962f2fa3f6e 100644
--- a/arch/arm/boot/dts/animeo_ip.dts
+++ b/arch/arm/boot/dts/animeo_ip.dts
@@ -155,21 +155,21 @@
155 label = "keyswitch_in"; 155 label = "keyswitch_in";
156 gpios = <&pioB 1 GPIO_ACTIVE_HIGH>; 156 gpios = <&pioB 1 GPIO_ACTIVE_HIGH>;
157 linux,code = <28>; 157 linux,code = <28>;
158 gpio-key,wakeup; 158 wakeup-source;
159 }; 159 };
160 160
161 error_in { 161 error_in {
162 label = "error_in"; 162 label = "error_in";
163 gpios = <&pioB 2 GPIO_ACTIVE_HIGH>; 163 gpios = <&pioB 2 GPIO_ACTIVE_HIGH>;
164 linux,code = <29>; 164 linux,code = <29>;
165 gpio-key,wakeup; 165 wakeup-source;
166 }; 166 };
167 167
168 btn { 168 btn {
169 label = "btn"; 169 label = "btn";
170 gpios = <&pioC 23 GPIO_ACTIVE_HIGH>; 170 gpios = <&pioC 23 GPIO_ACTIVE_HIGH>;
171 linux,code = <31>; 171 linux,code = <31>;
172 gpio-key,wakeup; 172 wakeup-source;
173 }; 173 };
174 }; 174 };
175}; 175};
diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
index c6a0e9d7f1a9..e8b7f6726772 100644
--- a/arch/arm/boot/dts/armada-38x.dtsi
+++ b/arch/arm/boot/dts/armada-38x.dtsi
@@ -498,6 +498,7 @@
498 reg = <0x70000 0x4000>; 498 reg = <0x70000 0x4000>;
499 interrupts-extended = <&mpic 8>; 499 interrupts-extended = <&mpic 8>;
500 clocks = <&gateclk 4>; 500 clocks = <&gateclk 4>;
501 tx-csum-limit = <9800>;
501 status = "disabled"; 502 status = "disabled";
502 }; 503 };
503 504
diff --git a/arch/arm/boot/dts/at91-foxg20.dts b/arch/arm/boot/dts/at91-foxg20.dts
index f89598af4c2b..6bf873e7d96c 100644
--- a/arch/arm/boot/dts/at91-foxg20.dts
+++ b/arch/arm/boot/dts/at91-foxg20.dts
@@ -159,7 +159,7 @@
159 label = "Button"; 159 label = "Button";
160 gpios = <&pioC 4 GPIO_ACTIVE_LOW>; 160 gpios = <&pioC 4 GPIO_ACTIVE_LOW>;
161 linux,code = <0x103>; 161 linux,code = <0x103>;
162 gpio-key,wakeup; 162 wakeup-source;
163 }; 163 };
164 }; 164 };
165}; 165};
diff --git a/arch/arm/boot/dts/at91-kizbox.dts b/arch/arm/boot/dts/at91-kizbox.dts
index bf18ece0c027..229e989eb60d 100644
--- a/arch/arm/boot/dts/at91-kizbox.dts
+++ b/arch/arm/boot/dts/at91-kizbox.dts
@@ -24,15 +24,6 @@
24 }; 24 };
25 25
26 clocks { 26 clocks {
27 #address-cells = <1>;
28 #size-cells = <1>;
29 ranges;
30
31 main_clock: clock@0 {
32 compatible = "atmel,osc", "fixed-clock";
33 clock-frequency = <18432000>;
34 };
35
36 main_xtal { 27 main_xtal {
37 clock-frequency = <18432000>; 28 clock-frequency = <18432000>;
38 }; 29 };
@@ -94,14 +85,14 @@
94 label = "PB_RST"; 85 label = "PB_RST";
95 gpios = <&pioB 30 GPIO_ACTIVE_HIGH>; 86 gpios = <&pioB 30 GPIO_ACTIVE_HIGH>;
96 linux,code = <0x100>; 87 linux,code = <0x100>;
97 gpio-key,wakeup; 88 wakeup-source;
98 }; 89 };
99 90
100 user { 91 user {
101 label = "PB_USER"; 92 label = "PB_USER";
102 gpios = <&pioB 31 GPIO_ACTIVE_HIGH>; 93 gpios = <&pioB 31 GPIO_ACTIVE_HIGH>;
103 linux,code = <0x101>; 94 linux,code = <0x101>;
104 gpio-key,wakeup; 95 wakeup-source;
105 }; 96 };
106 }; 97 };
107 98
diff --git a/arch/arm/boot/dts/at91-kizbox2.dts b/arch/arm/boot/dts/at91-kizbox2.dts
index f0b1563cb3f1..50a14568f094 100644
--- a/arch/arm/boot/dts/at91-kizbox2.dts
+++ b/arch/arm/boot/dts/at91-kizbox2.dts
@@ -171,21 +171,21 @@
171 label = "PB_PROG"; 171 label = "PB_PROG";
172 gpios = <&pioE 27 GPIO_ACTIVE_LOW>; 172 gpios = <&pioE 27 GPIO_ACTIVE_LOW>;
173 linux,code = <0x102>; 173 linux,code = <0x102>;
174 gpio-key,wakeup; 174 wakeup-source;
175 }; 175 };
176 176
177 reset { 177 reset {
178 label = "PB_RST"; 178 label = "PB_RST";
179 gpios = <&pioE 29 GPIO_ACTIVE_LOW>; 179 gpios = <&pioE 29 GPIO_ACTIVE_LOW>;
180 linux,code = <0x100>; 180 linux,code = <0x100>;
181 gpio-key,wakeup; 181 wakeup-source;
182 }; 182 };
183 183
184 user { 184 user {
185 label = "PB_USER"; 185 label = "PB_USER";
186 gpios = <&pioE 31 GPIO_ACTIVE_HIGH>; 186 gpios = <&pioE 31 GPIO_ACTIVE_HIGH>;
187 linux,code = <0x101>; 187 linux,code = <0x101>;
188 gpio-key,wakeup; 188 wakeup-source;
189 }; 189 };
190 }; 190 };
191 191
diff --git a/arch/arm/boot/dts/at91-kizboxmini.dts b/arch/arm/boot/dts/at91-kizboxmini.dts
index 9f72b4932634..9682d105d4d8 100644
--- a/arch/arm/boot/dts/at91-kizboxmini.dts
+++ b/arch/arm/boot/dts/at91-kizboxmini.dts
@@ -98,14 +98,14 @@
98 label = "PB_PROG"; 98 label = "PB_PROG";
99 gpios = <&pioC 17 GPIO_ACTIVE_LOW>; 99 gpios = <&pioC 17 GPIO_ACTIVE_LOW>;
100 linux,code = <0x102>; 100 linux,code = <0x102>;
101 gpio-key,wakeup; 101 wakeup-source;
102 }; 102 };
103 103
104 reset { 104 reset {
105 label = "PB_RST"; 105 label = "PB_RST";
106 gpios = <&pioC 16 GPIO_ACTIVE_LOW>; 106 gpios = <&pioC 16 GPIO_ACTIVE_LOW>;
107 linux,code = <0x100>; 107 linux,code = <0x100>;
108 gpio-key,wakeup; 108 wakeup-source;
109 }; 109 };
110 }; 110 };
111 111
diff --git a/arch/arm/boot/dts/at91-qil_a9260.dts b/arch/arm/boot/dts/at91-qil_a9260.dts
index a9aef53ab764..4f2eebf4a560 100644
--- a/arch/arm/boot/dts/at91-qil_a9260.dts
+++ b/arch/arm/boot/dts/at91-qil_a9260.dts
@@ -183,7 +183,7 @@
183 label = "user_pb"; 183 label = "user_pb";
184 gpios = <&pioB 10 GPIO_ACTIVE_LOW>; 184 gpios = <&pioB 10 GPIO_ACTIVE_LOW>;
185 linux,code = <28>; 185 linux,code = <28>;
186 gpio-key,wakeup; 186 wakeup-source;
187 }; 187 };
188 }; 188 };
189 189
diff --git a/arch/arm/boot/dts/at91-sama5d2_xplained.dts b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
index e07c2b206beb..e74df327cdd3 100644
--- a/arch/arm/boot/dts/at91-sama5d2_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d2_xplained.dts
@@ -45,6 +45,7 @@
45/dts-v1/; 45/dts-v1/;
46#include "sama5d2.dtsi" 46#include "sama5d2.dtsi"
47#include "sama5d2-pinfunc.h" 47#include "sama5d2-pinfunc.h"
48#include <dt-bindings/mfd/atmel-flexcom.h>
48 49
49/ { 50/ {
50 model = "Atmel SAMA5D2 Xplained"; 51 model = "Atmel SAMA5D2 Xplained";
@@ -59,15 +60,6 @@
59 }; 60 };
60 61
61 clocks { 62 clocks {
62 #address-cells = <1>;
63 #size-cells = <1>;
64 ranges;
65
66 main_clock: clock@0 {
67 compatible = "atmel,osc", "fixed-clock";
68 clock-frequency = <12000000>;
69 };
70
71 slow_xtal { 63 slow_xtal {
72 clock-frequency = <32768>; 64 clock-frequency = <32768>;
73 }; 65 };
@@ -91,6 +83,22 @@
91 status = "okay"; 83 status = "okay";
92 }; 84 };
93 85
86 sdmmc0: sdio-host@a0000000 {
87 bus-width = <8>;
88 pinctrl-names = "default";
89 pinctrl-0 = <&pinctrl_sdmmc0_default>;
90 non-removable;
91 mmc-ddr-1_8v;
92 status = "okay";
93 };
94
95 sdmmc1: sdio-host@b0000000 {
96 bus-width = <4>;
97 pinctrl-names = "default";
98 pinctrl-0 = <&pinctrl_sdmmc1_default>;
99 status = "okay"; /* conflict with qspi0 */
100 };
101
94 apb { 102 apb {
95 spi0: spi@f8000000 { 103 spi0: spi@f8000000 {
96 pinctrl-names = "default"; 104 pinctrl-names = "default";
@@ -176,17 +184,55 @@
176 regulator-name = "VDD_SDHC_1V8"; 184 regulator-name = "VDD_SDHC_1V8";
177 regulator-min-microvolt = <1800000>; 185 regulator-min-microvolt = <1800000>;
178 regulator-max-microvolt = <1800000>; 186 regulator-max-microvolt = <1800000>;
187 regulator-always-on;
179 }; 188 };
180 }; 189 };
181 }; 190 };
182 }; 191 };
183 192
193 flx0: flexcom@f8034000 {
194 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
195 status = "disabled"; /* conflict with ISC_D2 & ISC_D3 data pins */
196
197 uart5: serial@200 {
198 compatible = "atmel,at91sam9260-usart";
199 reg = <0x200 0x200>;
200 interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>;
201 clocks = <&flx0_clk>;
202 clock-names = "usart";
203 pinctrl-names = "default";
204 pinctrl-0 = <&pinctrl_flx0_default>;
205 atmel,fifo-size = <32>;
206 status = "okay";
207 };
208 };
209
184 uart3: serial@fc008000 { 210 uart3: serial@fc008000 {
185 pinctrl-names = "default"; 211 pinctrl-names = "default";
186 pinctrl-0 = <&pinctrl_uart3_default>; 212 pinctrl-0 = <&pinctrl_uart3_default>;
187 status = "okay"; 213 status = "okay";
188 }; 214 };
189 215
216 flx4: flexcom@fc018000 {
217 atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
218 status = "okay";
219
220 i2c2: i2c@600 {
221 compatible = "atmel,sama5d2-i2c";
222 reg = <0x600 0x200>;
223 interrupts = <23 IRQ_TYPE_LEVEL_HIGH 7>;
224 dmas = <0>, <0>;
225 dma-names = "tx", "rx";
226 #address-cells = <1>;
227 #size-cells = <0>;
228 clocks = <&flx4_clk>;
229 pinctrl-names = "default";
230 pinctrl-0 = <&pinctrl_flx4_default>;
231 atmel,fifo-size = <16>;
232 status = "okay";
233 };
234 };
235
190 i2c1: i2c@fc028000 { 236 i2c1: i2c@fc028000 {
191 dmas = <0>, <0>; 237 dmas = <0>, <0>;
192 pinctrl-names = "default"; 238 pinctrl-names = "default";
@@ -201,6 +247,18 @@
201 }; 247 };
202 248
203 pinctrl@fc038000 { 249 pinctrl@fc038000 {
250 pinctrl_flx0_default: flx0_default {
251 pinmux = <PIN_PB28__FLEXCOM0_IO0>,
252 <PIN_PB29__FLEXCOM0_IO1>;
253 bias-disable;
254 };
255
256 pinctrl_flx4_default: flx4_default {
257 pinmux = <PIN_PD12__FLEXCOM4_IO0>,
258 <PIN_PD13__FLEXCOM4_IO1>;
259 bias-disable;
260 };
261
204 pinctrl_i2c0_default: i2c0_default { 262 pinctrl_i2c0_default: i2c0_default {
205 pinmux = <PIN_PD21__TWD0>, 263 pinmux = <PIN_PD21__TWD0>,
206 <PIN_PD22__TWCK0>; 264 <PIN_PD22__TWCK0>;
@@ -227,6 +285,46 @@
227 bias-disable; 285 bias-disable;
228 }; 286 };
229 287
288 pinctrl_sdmmc0_default: sdmmc0_default {
289 cmd_data {
290 pinmux = <PIN_PA1__SDMMC0_CMD>,
291 <PIN_PA2__SDMMC0_DAT0>,
292 <PIN_PA3__SDMMC0_DAT1>,
293 <PIN_PA4__SDMMC0_DAT2>,
294 <PIN_PA5__SDMMC0_DAT3>,
295 <PIN_PA6__SDMMC0_DAT4>,
296 <PIN_PA7__SDMMC0_DAT5>,
297 <PIN_PA8__SDMMC0_DAT6>,
298 <PIN_PA9__SDMMC0_DAT7>;
299 bias-pull-up;
300 };
301
302 ck_cd_rstn_vddsel {
303 pinmux = <PIN_PA0__SDMMC0_CK>,
304 <PIN_PA10__SDMMC0_RSTN>,
305 <PIN_PA11__SDMMC0_VDDSEL>,
306 <PIN_PA13__SDMMC0_CD>;
307 bias-disable;
308 };
309 };
310
311 pinctrl_sdmmc1_default: sdmmc1_default {
312 cmd_data {
313 pinmux = <PIN_PA28__SDMMC1_CMD>,
314 <PIN_PA18__SDMMC1_DAT0>,
315 <PIN_PA19__SDMMC1_DAT1>,
316 <PIN_PA20__SDMMC1_DAT2>,
317 <PIN_PA21__SDMMC1_DAT3>;
318 bias-pull-up;
319 };
320
321 conf-ck_cd {
322 pinmux = <PIN_PA22__SDMMC1_CK>,
323 <PIN_PA30__SDMMC1_CD>;
324 bias-disable;
325 };
326 };
327
230 pinctrl_spi0_default: spi0_default { 328 pinctrl_spi0_default: spi0_default {
231 pinmux = <PIN_PA14__SPI0_SPCK>, 329 pinmux = <PIN_PA14__SPI0_SPCK>,
232 <PIN_PA15__SPI0_MOSI>, 330 <PIN_PA15__SPI0_MOSI>,
diff --git a/arch/arm/boot/dts/at91-sama5d3_xplained.dts b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
index 8488ac53d22d..ff888d21c786 100644
--- a/arch/arm/boot/dts/at91-sama5d3_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d3_xplained.dts
@@ -315,7 +315,7 @@
315 label = "PB_USER"; 315 label = "PB_USER";
316 gpios = <&pioE 29 GPIO_ACTIVE_LOW>; 316 gpios = <&pioE 29 GPIO_ACTIVE_LOW>;
317 linux,code = <0x104>; 317 linux,code = <0x104>;
318 gpio-key,wakeup; 318 wakeup-source;
319 }; 319 };
320 }; 320 };
321 321
diff --git a/arch/arm/boot/dts/at91-sama5d4_xplained.dts b/arch/arm/boot/dts/at91-sama5d4_xplained.dts
index 45371a1b61b3..131614f28e75 100644
--- a/arch/arm/boot/dts/at91-sama5d4_xplained.dts
+++ b/arch/arm/boot/dts/at91-sama5d4_xplained.dts
@@ -50,7 +50,6 @@
50 compatible = "atmel,sama5d4-xplained", "atmel,sama5d4", "atmel,sama5"; 50 compatible = "atmel,sama5d4-xplained", "atmel,sama5d4", "atmel,sama5";
51 51
52 chosen { 52 chosen {
53 bootargs = "ignore_loglevel earlyprintk";
54 stdout-path = "serial0:115200n8"; 53 stdout-path = "serial0:115200n8";
55 }; 54 };
56 55
@@ -59,15 +58,6 @@
59 }; 58 };
60 59
61 clocks { 60 clocks {
62 #address-cells = <1>;
63 #size-cells = <1>;
64 ranges;
65
66 main_clock: clock@0 {
67 compatible = "atmel,osc", "fixed-clock";
68 clock-frequency = <12000000>;
69 };
70
71 slow_xtal { 61 slow_xtal {
72 clock-frequency = <32768>; 62 clock-frequency = <32768>;
73 }; 63 };
@@ -235,7 +225,7 @@
235 label = "pb_user1"; 225 label = "pb_user1";
236 gpios = <&pioE 8 GPIO_ACTIVE_HIGH>; 226 gpios = <&pioE 8 GPIO_ACTIVE_HIGH>;
237 linux,code = <0x100>; 227 linux,code = <0x100>;
238 gpio-key,wakeup; 228 wakeup-source;
239 }; 229 };
240 }; 230 };
241 231
diff --git a/arch/arm/boot/dts/at91-sama5d4ek.dts b/arch/arm/boot/dts/at91-sama5d4ek.dts
index 6d272c0125e3..2d4a33100af6 100644
--- a/arch/arm/boot/dts/at91-sama5d4ek.dts
+++ b/arch/arm/boot/dts/at91-sama5d4ek.dts
@@ -50,7 +50,6 @@
50 compatible = "atmel,sama5d4ek", "atmel,sama5d4", "atmel,sama5"; 50 compatible = "atmel,sama5d4ek", "atmel,sama5d4", "atmel,sama5";
51 51
52 chosen { 52 chosen {
53 bootargs = "ignore_loglevel earlyprintk";
54 stdout-path = "serial0:115200n8"; 53 stdout-path = "serial0:115200n8";
55 }; 54 };
56 55
@@ -59,15 +58,6 @@
59 }; 58 };
60 59
61 clocks { 60 clocks {
62 #address-cells = <1>;
63 #size-cells = <1>;
64 ranges;
65
66 main_clock: clock@0 {
67 compatible = "atmel,osc", "fixed-clock";
68 clock-frequency = <12000000>;
69 };
70
71 slow_xtal { 61 slow_xtal {
72 clock-frequency = <32768>; 62 clock-frequency = <32768>;
73 }; 63 };
@@ -304,7 +294,7 @@
304 label = "pb_user1"; 294 label = "pb_user1";
305 gpios = <&pioE 13 GPIO_ACTIVE_HIGH>; 295 gpios = <&pioE 13 GPIO_ACTIVE_HIGH>;
306 linux,code = <0x100>; 296 linux,code = <0x100>;
307 gpio-key,wakeup; 297 wakeup-source;
308 }; 298 };
309 }; 299 };
310 300
diff --git a/arch/arm/boot/dts/at91rm9200ek.dts b/arch/arm/boot/dts/at91rm9200ek.dts
index 8dab4b75ca97..f90e1c2d3caa 100644
--- a/arch/arm/boot/dts/at91rm9200ek.dts
+++ b/arch/arm/boot/dts/at91rm9200ek.dts
@@ -21,15 +21,6 @@
21 }; 21 };
22 22
23 clocks { 23 clocks {
24 #address-cells = <1>;
25 #size-cells = <1>;
26 ranges;
27
28 main_clock: clock@0 {
29 compatible = "atmel,osc", "fixed-clock";
30 clock-frequency = <18432000>;
31 };
32
33 slow_xtal { 24 slow_xtal {
34 clock-frequency = <32768>; 25 clock-frequency = <32768>;
35 }; 26 };
diff --git a/arch/arm/boot/dts/at91sam9261ek.dts b/arch/arm/boot/dts/at91sam9261ek.dts
index 2e92ac020f23..55bd51f07fa6 100644
--- a/arch/arm/boot/dts/at91sam9261ek.dts
+++ b/arch/arm/boot/dts/at91sam9261ek.dts
@@ -22,15 +22,6 @@
22 }; 22 };
23 23
24 clocks { 24 clocks {
25 #address-cells = <1>;
26 #size-cells = <1>;
27 ranges;
28
29 main_clock: clock@0 {
30 compatible = "atmel,osc", "fixed-clock";
31 clock-frequency = <18432000>;
32 };
33
34 slow_xtal { 25 slow_xtal {
35 clock-frequency = <32768>; 26 clock-frequency = <32768>;
36 }; 27 };
@@ -149,7 +140,7 @@
149 ti,debounce-tol = /bits/ 16 <65535>; 140 ti,debounce-tol = /bits/ 16 <65535>;
150 ti,debounce-max = /bits/ 16 <1>; 141 ti,debounce-max = /bits/ 16 <1>;
151 142
152 linux,wakeup; 143 wakeup-source;
153 }; 144 };
154 }; 145 };
155 146
@@ -193,28 +184,28 @@
193 label = "button_0"; 184 label = "button_0";
194 gpios = <&pioA 27 GPIO_ACTIVE_LOW>; 185 gpios = <&pioA 27 GPIO_ACTIVE_LOW>;
195 linux,code = <256>; 186 linux,code = <256>;
196 gpio-key,wakeup; 187 wakeup-source;
197 }; 188 };
198 189
199 button_1 { 190 button_1 {
200 label = "button_1"; 191 label = "button_1";
201 gpios = <&pioA 26 GPIO_ACTIVE_LOW>; 192 gpios = <&pioA 26 GPIO_ACTIVE_LOW>;
202 linux,code = <257>; 193 linux,code = <257>;
203 gpio-key,wakeup; 194 wakeup-source;
204 }; 195 };
205 196
206 button_2 { 197 button_2 {
207 label = "button_2"; 198 label = "button_2";
208 gpios = <&pioA 25 GPIO_ACTIVE_LOW>; 199 gpios = <&pioA 25 GPIO_ACTIVE_LOW>;
209 linux,code = <258>; 200 linux,code = <258>;
210 gpio-key,wakeup; 201 wakeup-source;
211 }; 202 };
212 203
213 button_3 { 204 button_3 {
214 label = "button_3"; 205 label = "button_3";
215 gpios = <&pioA 24 GPIO_ACTIVE_LOW>; 206 gpios = <&pioA 24 GPIO_ACTIVE_LOW>;
216 linux,code = <259>; 207 linux,code = <259>;
217 gpio-key,wakeup; 208 wakeup-source;
218 }; 209 };
219 }; 210 };
220}; 211};
diff --git a/arch/arm/boot/dts/at91sam9263ek.dts b/arch/arm/boot/dts/at91sam9263ek.dts
index 23381276ffb8..59df9d73d276 100644
--- a/arch/arm/boot/dts/at91sam9263ek.dts
+++ b/arch/arm/boot/dts/at91sam9263ek.dts
@@ -22,15 +22,6 @@
22 }; 22 };
23 23
24 clocks { 24 clocks {
25 #address-cells = <1>;
26 #size-cells = <1>;
27 ranges;
28
29 main_clock: clock@0 {
30 compatible = "atmel,osc", "fixed-clock";
31 clock-frequency = <16367660>;
32 };
33
34 slow_xtal { 25 slow_xtal {
35 clock-frequency = <32768>; 26 clock-frequency = <32768>;
36 }; 27 };
@@ -213,14 +204,14 @@
213 label = "left_click"; 204 label = "left_click";
214 gpios = <&pioC 5 GPIO_ACTIVE_LOW>; 205 gpios = <&pioC 5 GPIO_ACTIVE_LOW>;
215 linux,code = <272>; 206 linux,code = <272>;
216 gpio-key,wakeup; 207 wakeup-source;
217 }; 208 };
218 209
219 right_click { 210 right_click {
220 label = "right_click"; 211 label = "right_click";
221 gpios = <&pioC 4 GPIO_ACTIVE_LOW>; 212 gpios = <&pioC 4 GPIO_ACTIVE_LOW>;
222 linux,code = <273>; 213 linux,code = <273>;
223 gpio-key,wakeup; 214 wakeup-source;
224 }; 215 };
225 }; 216 };
226 217
diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
index 57548a2c5a1e..e9cc99b6353a 100644
--- a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
+++ b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
@@ -19,15 +19,6 @@
19 }; 19 };
20 20
21 clocks { 21 clocks {
22 #address-cells = <1>;
23 #size-cells = <1>;
24 ranges;
25
26 main_clock: clock@0 {
27 compatible = "atmel,osc", "fixed-clock";
28 clock-frequency = <18432000>;
29 };
30
31 slow_xtal { 22 slow_xtal {
32 clock-frequency = <32768>; 23 clock-frequency = <32768>;
33 }; 24 };
@@ -206,14 +197,14 @@
206 label = "Button 3"; 197 label = "Button 3";
207 gpios = <&pioA 30 GPIO_ACTIVE_LOW>; 198 gpios = <&pioA 30 GPIO_ACTIVE_LOW>;
208 linux,code = <0x103>; 199 linux,code = <0x103>;
209 gpio-key,wakeup; 200 wakeup-source;
210 }; 201 };
211 202
212 btn4 { 203 btn4 {
213 label = "Button 4"; 204 label = "Button 4";
214 gpios = <&pioA 31 GPIO_ACTIVE_LOW>; 205 gpios = <&pioA 31 GPIO_ACTIVE_LOW>;
215 linux,code = <0x104>; 206 linux,code = <0x104>;
216 gpio-key,wakeup; 207 wakeup-source;
217 }; 208 };
218 }; 209 };
219 210
diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
index 9d16ef8453c5..2400c99134f7 100644
--- a/arch/arm/boot/dts/at91sam9m10g45ek.dts
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -24,15 +24,6 @@
24 }; 24 };
25 25
26 clocks { 26 clocks {
27 #address-cells = <1>;
28 #size-cells = <1>;
29 ranges;
30
31 main_clock: clock@0 {
32 compatible = "atmel,osc", "fixed-clock";
33 clock-frequency = <12000000>;
34 };
35
36 slow_xtal { 27 slow_xtal {
37 clock-frequency = <32768>; 28 clock-frequency = <32768>;
38 }; 29 };
@@ -323,14 +314,14 @@
323 label = "left_click"; 314 label = "left_click";
324 gpios = <&pioB 6 GPIO_ACTIVE_LOW>; 315 gpios = <&pioB 6 GPIO_ACTIVE_LOW>;
325 linux,code = <272>; 316 linux,code = <272>;
326 gpio-key,wakeup; 317 wakeup-source;
327 }; 318 };
328 319
329 right_click { 320 right_click {
330 label = "right_click"; 321 label = "right_click";
331 gpios = <&pioB 7 GPIO_ACTIVE_LOW>; 322 gpios = <&pioB 7 GPIO_ACTIVE_LOW>;
332 linux,code = <273>; 323 linux,code = <273>;
333 gpio-key,wakeup; 324 wakeup-source;
334 }; 325 };
335 326
336 left { 327 left {
diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
index acf3451a332d..ca4ddf86817a 100644
--- a/arch/arm/boot/dts/at91sam9n12ek.dts
+++ b/arch/arm/boot/dts/at91sam9n12ek.dts
@@ -23,15 +23,6 @@
23 }; 23 };
24 24
25 clocks { 25 clocks {
26 #address-cells = <1>;
27 #size-cells = <1>;
28 ranges;
29
30 main_clock: clock@0 {
31 compatible = "atmel,osc", "fixed-clock";
32 clock-frequency = <16000000>;
33 };
34
35 slow_xtal { 26 slow_xtal {
36 clock-frequency = <32768>; 27 clock-frequency = <32768>;
37 }; 28 };
@@ -219,7 +210,7 @@
219 label = "Enter"; 210 label = "Enter";
220 gpios = <&pioB 3 GPIO_ACTIVE_LOW>; 211 gpios = <&pioB 3 GPIO_ACTIVE_LOW>;
221 linux,code = <28>; 212 linux,code = <28>;
222 gpio-key,wakeup; 213 wakeup-source;
223 }; 214 };
224 }; 215 };
225 216
diff --git a/arch/arm/boot/dts/at91sam9rlek.dts b/arch/arm/boot/dts/at91sam9rlek.dts
index 558c9f220bed..f10566f759cd 100644
--- a/arch/arm/boot/dts/at91sam9rlek.dts
+++ b/arch/arm/boot/dts/at91sam9rlek.dts
@@ -22,15 +22,6 @@
22 }; 22 };
23 23
24 clocks { 24 clocks {
25 #address-cells = <1>;
26 #size-cells = <1>;
27 ranges;
28
29 main_clock: clock {
30 compatible = "atmel,osc", "fixed-clock";
31 clock-frequency = <12000000>;
32 };
33
34 slow_xtal { 25 slow_xtal {
35 clock-frequency = <32768>; 26 clock-frequency = <32768>;
36 }; 27 };
@@ -225,14 +216,14 @@
225 label = "right_click"; 216 label = "right_click";
226 gpios = <&pioB 0 GPIO_ACTIVE_LOW>; 217 gpios = <&pioB 0 GPIO_ACTIVE_LOW>;
227 linux,code = <273>; 218 linux,code = <273>;
228 gpio-key,wakeup; 219 wakeup-source;
229 }; 220 };
230 221
231 left_click { 222 left_click {
232 label = "left_click"; 223 label = "left_click";
233 gpios = <&pioB 1 GPIO_ACTIVE_LOW>; 224 gpios = <&pioB 1 GPIO_ACTIVE_LOW>;
234 linux,code = <272>; 225 linux,code = <272>;
235 gpio-key,wakeup; 226 wakeup-source;
236 }; 227 };
237 }; 228 };
238 229
diff --git a/arch/arm/boot/dts/at91sam9x5cm.dtsi b/arch/arm/boot/dts/at91sam9x5cm.dtsi
index 26112ebd15fc..b098ad8cd93a 100644
--- a/arch/arm/boot/dts/at91sam9x5cm.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5cm.dtsi
@@ -13,17 +13,6 @@
13 }; 13 };
14 14
15 clocks { 15 clocks {
16 #address-cells = <1>;
17 #size-cells = <1>;
18 ranges;
19
20 main_clock: clock@0 {
21 compatible = "atmel,osc", "fixed-clock";
22 clock-frequency = <12000000>;
23 };
24 };
25
26 clocks {
27 slow_xtal { 16 slow_xtal {
28 clock-frequency = <32768>; 17 clock-frequency = <32768>;
29 }; 18 };
diff --git a/arch/arm/boot/dts/berlin2q.dtsi b/arch/arm/boot/dts/berlin2q.dtsi
index 8ea177f375dd..fb1da99996ea 100644
--- a/arch/arm/boot/dts/berlin2q.dtsi
+++ b/arch/arm/boot/dts/berlin2q.dtsi
@@ -118,7 +118,8 @@
118 sdhci0: sdhci@ab0000 { 118 sdhci0: sdhci@ab0000 {
119 compatible = "mrvl,pxav3-mmc"; 119 compatible = "mrvl,pxav3-mmc";
120 reg = <0xab0000 0x200>; 120 reg = <0xab0000 0x200>;
121 clocks = <&chip_clk CLKID_SDIO1XIN>; 121 clocks = <&chip_clk CLKID_SDIO1XIN>, <&chip_clk CLKID_SDIO>;
122 clock-names = "io", "core";
122 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; 123 interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
123 status = "disabled"; 124 status = "disabled";
124 }; 125 };
@@ -126,7 +127,8 @@
126 sdhci1: sdhci@ab0800 { 127 sdhci1: sdhci@ab0800 {
127 compatible = "mrvl,pxav3-mmc"; 128 compatible = "mrvl,pxav3-mmc";
128 reg = <0xab0800 0x200>; 129 reg = <0xab0800 0x200>;
129 clocks = <&chip_clk CLKID_SDIO1XIN>; 130 clocks = <&chip_clk CLKID_SDIO1XIN>, <&chip_clk CLKID_SDIO>;
131 clock-names = "io", "core";
130 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; 132 interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
131 status = "disabled"; 133 status = "disabled";
132 }; 134 };
@@ -135,7 +137,7 @@
135 compatible = "mrvl,pxav3-mmc"; 137 compatible = "mrvl,pxav3-mmc";
136 reg = <0xab1000 0x200>; 138 reg = <0xab1000 0x200>;
137 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; 139 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
138 clocks = <&chip_clk CLKID_NFC_ECC>, <&chip_clk CLKID_NFC>; 140 clocks = <&chip_clk CLKID_NFC_ECC>, <&chip_clk CLKID_SDIO>;
139 clock-names = "io", "core"; 141 clock-names = "io", "core";
140 status = "disabled"; 142 status = "disabled";
141 }; 143 };
diff --git a/arch/arm/boot/dts/dm816x.dtsi b/arch/arm/boot/dts/dm816x.dtsi
index 3c99cfa1a876..eee636de4cd8 100644
--- a/arch/arm/boot/dts/dm816x.dtsi
+++ b/arch/arm/boot/dts/dm816x.dtsi
@@ -218,6 +218,7 @@
218 reg = <0x480c8000 0x2000>; 218 reg = <0x480c8000 0x2000>;
219 interrupts = <77>; 219 interrupts = <77>;
220 ti,hwmods = "mailbox"; 220 ti,hwmods = "mailbox";
221 #mbox-cells = <1>;
221 ti,mbox-num-users = <4>; 222 ti,mbox-num-users = <4>;
222 ti,mbox-num-fifos = <12>; 223 ti,mbox-num-fifos = <12>;
223 mbox_dsp: mbox_dsp { 224 mbox_dsp: mbox_dsp {
@@ -279,8 +280,11 @@
279 ti,spi-num-cs = <4>; 280 ti,spi-num-cs = <4>;
280 ti,hwmods = "mcspi1"; 281 ti,hwmods = "mcspi1";
281 dmas = <&edma 16 &edma 17 282 dmas = <&edma 16 &edma 17
282 &edma 18 &edma 19>; 283 &edma 18 &edma 19
283 dma-names = "tx0", "rx0", "tx1", "rx1"; 284 &edma 20 &edma 21
285 &edma 22 &edma 23>;
286 dma-names = "tx0", "rx0", "tx1", "rx1",
287 "tx2", "rx2", "tx3", "rx3";
284 }; 288 };
285 289
286 mmc1: mmc@48060000 { 290 mmc1: mmc@48060000 {
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index bc672fb91466..fe99231cbde5 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -1459,8 +1459,8 @@
1459 interrupt-names = "tx", "rx"; 1459 interrupt-names = "tx", "rx";
1460 dmas = <&sdma_xbar 133>, <&sdma_xbar 132>; 1460 dmas = <&sdma_xbar 133>, <&sdma_xbar 132>;
1461 dma-names = "tx", "rx"; 1461 dma-names = "tx", "rx";
1462 clocks = <&mcasp3_ahclkx_mux>; 1462 clocks = <&mcasp3_aux_gfclk_mux>, <&mcasp3_ahclkx_mux>;
1463 clock-names = "fck"; 1463 clock-names = "fck", "ahclkx";
1464 status = "disabled"; 1464 status = "disabled";
1465 }; 1465 };
1466 1466
diff --git a/arch/arm/boot/dts/imx6q-gw5400-a.dts b/arch/arm/boot/dts/imx6q-gw5400-a.dts
index 58adf176425a..a51834e1dd27 100644
--- a/arch/arm/boot/dts/imx6q-gw5400-a.dts
+++ b/arch/arm/boot/dts/imx6q-gw5400-a.dts
@@ -154,7 +154,7 @@
154&fec { 154&fec {
155 pinctrl-names = "default"; 155 pinctrl-names = "default";
156 pinctrl-0 = <&pinctrl_enet>; 156 pinctrl-0 = <&pinctrl_enet>;
157 phy-mode = "rgmii"; 157 phy-mode = "rgmii-id";
158 phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; 158 phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
159 status = "okay"; 159 status = "okay";
160}; 160};
diff --git a/arch/arm/boot/dts/imx6qdl-gw51xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw51xx.dtsi
index 7b31fdb79ced..dc0cebfe22d7 100644
--- a/arch/arm/boot/dts/imx6qdl-gw51xx.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw51xx.dtsi
@@ -94,7 +94,7 @@
94&fec { 94&fec {
95 pinctrl-names = "default"; 95 pinctrl-names = "default";
96 pinctrl-0 = <&pinctrl_enet>; 96 pinctrl-0 = <&pinctrl_enet>;
97 phy-mode = "rgmii"; 97 phy-mode = "rgmii-id";
98 phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; 98 phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
99 status = "okay"; 99 status = "okay";
100}; 100};
diff --git a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
index 1b66328a8498..18cd4114a23e 100644
--- a/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw52xx.dtsi
@@ -154,7 +154,7 @@
154&fec { 154&fec {
155 pinctrl-names = "default"; 155 pinctrl-names = "default";
156 pinctrl-0 = <&pinctrl_enet>; 156 pinctrl-0 = <&pinctrl_enet>;
157 phy-mode = "rgmii"; 157 phy-mode = "rgmii-id";
158 phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; 158 phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
159 status = "okay"; 159 status = "okay";
160}; 160};
diff --git a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
index 7c51839ff934..eea90f37bbb8 100644
--- a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi
@@ -155,7 +155,7 @@
155&fec { 155&fec {
156 pinctrl-names = "default"; 156 pinctrl-names = "default";
157 pinctrl-0 = <&pinctrl_enet>; 157 pinctrl-0 = <&pinctrl_enet>;
158 phy-mode = "rgmii"; 158 phy-mode = "rgmii-id";
159 phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; 159 phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
160 status = "okay"; 160 status = "okay";
161}; 161};
diff --git a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
index 929e0b37bd9e..6c11a2ae35ef 100644
--- a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi
@@ -145,7 +145,7 @@
145&fec { 145&fec {
146 pinctrl-names = "default"; 146 pinctrl-names = "default";
147 pinctrl-0 = <&pinctrl_enet>; 147 pinctrl-0 = <&pinctrl_enet>;
148 phy-mode = "rgmii"; 148 phy-mode = "rgmii-id";
149 phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; 149 phy-reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
150 status = "okay"; 150 status = "okay";
151}; 151};
diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
index 8263fc18a7d9..d354d406954d 100644
--- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
@@ -113,14 +113,14 @@
113&clks { 113&clks {
114 assigned-clocks = <&clks IMX6QDL_PLL4_BYPASS_SRC>, 114 assigned-clocks = <&clks IMX6QDL_PLL4_BYPASS_SRC>,
115 <&clks IMX6QDL_PLL4_BYPASS>, 115 <&clks IMX6QDL_PLL4_BYPASS>,
116 <&clks IMX6QDL_CLK_PLL4_POST_DIV>,
117 <&clks IMX6QDL_CLK_LDB_DI0_SEL>, 116 <&clks IMX6QDL_CLK_LDB_DI0_SEL>,
118 <&clks IMX6QDL_CLK_LDB_DI1_SEL>; 117 <&clks IMX6QDL_CLK_LDB_DI1_SEL>,
118 <&clks IMX6QDL_CLK_PLL4_POST_DIV>;
119 assigned-clock-parents = <&clks IMX6QDL_CLK_LVDS2_IN>, 119 assigned-clock-parents = <&clks IMX6QDL_CLK_LVDS2_IN>,
120 <&clks IMX6QDL_PLL4_BYPASS_SRC>, 120 <&clks IMX6QDL_PLL4_BYPASS_SRC>,
121 <&clks IMX6QDL_CLK_PLL3_USB_OTG>, 121 <&clks IMX6QDL_CLK_PLL3_USB_OTG>,
122 <&clks IMX6QDL_CLK_PLL3_USB_OTG>; 122 <&clks IMX6QDL_CLK_PLL3_USB_OTG>;
123 assigned-clock-rates = <0>, <0>, <24576000>; 123 assigned-clock-rates = <0>, <0>, <0>, <0>, <24576000>;
124}; 124};
125 125
126&ecspi1 { 126&ecspi1 {
diff --git a/arch/arm/boot/dts/k2l-netcp.dtsi b/arch/arm/boot/dts/k2l-netcp.dtsi
index 01aef230773d..5acbd0dcc2ab 100644
--- a/arch/arm/boot/dts/k2l-netcp.dtsi
+++ b/arch/arm/boot/dts/k2l-netcp.dtsi
@@ -137,7 +137,7 @@ netcp: netcp@26000000 {
137 /* NetCP address range */ 137 /* NetCP address range */
138 ranges = <0 0x26000000 0x1000000>; 138 ranges = <0 0x26000000 0x1000000>;
139 139
140 clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>; 140 clocks = <&clkosr>, <&papllclk>, <&clkcpgmac>, <&chipclk12>;
141 dma-coherent; 141 dma-coherent;
142 142
143 ti,navigator-dmas = <&dma_gbe 0>, 143 ti,navigator-dmas = <&dma_gbe 0>,
diff --git a/arch/arm/boot/dts/kirkwood-ts219.dtsi b/arch/arm/boot/dts/kirkwood-ts219.dtsi
index c56ab6bbfe3c..0e46560551f4 100644
--- a/arch/arm/boot/dts/kirkwood-ts219.dtsi
+++ b/arch/arm/boot/dts/kirkwood-ts219.dtsi
@@ -40,7 +40,7 @@
40 }; 40 };
41 poweroff@12100 { 41 poweroff@12100 {
42 compatible = "qnap,power-off"; 42 compatible = "qnap,power-off";
43 reg = <0x12000 0x100>; 43 reg = <0x12100 0x100>;
44 clocks = <&gate_clk 7>; 44 clocks = <&gate_clk 7>;
45 }; 45 };
46 spi@10600 { 46 spi@10600 {
diff --git a/arch/arm/boot/dts/omap4-duovero-parlor.dts b/arch/arm/boot/dts/omap4-duovero-parlor.dts
index 1a78f013f37a..b75f7b2b7c4a 100644
--- a/arch/arm/boot/dts/omap4-duovero-parlor.dts
+++ b/arch/arm/boot/dts/omap4-duovero-parlor.dts
@@ -189,3 +189,7 @@
189 }; 189 };
190}; 190};
191 191
192&uart3 {
193 interrupts-extended = <&wakeupgen GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH
194 &omap4_pmx_core OMAP4_UART3_RX>;
195};
diff --git a/arch/arm/boot/dts/rk3288-veyron-minnie.dts b/arch/arm/boot/dts/rk3288-veyron-minnie.dts
index 8fd8ef2c72da..85f0373df498 100644
--- a/arch/arm/boot/dts/rk3288-veyron-minnie.dts
+++ b/arch/arm/boot/dts/rk3288-veyron-minnie.dts
@@ -86,6 +86,10 @@
86 }; 86 };
87}; 87};
88 88
89&emmc {
90 /delete-property/mmc-hs200-1_8v;
91};
92
89&gpio_keys { 93&gpio_keys {
90 pinctrl-0 = <&pwr_key_l &ap_lid_int_l &volum_down_l &volum_up_l>; 94 pinctrl-0 = <&pwr_key_l &ap_lid_int_l &volum_down_l &volum_up_l>;
91 95
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 6a79c9c526b8..04ea209f1737 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -452,8 +452,10 @@
452 clock-names = "tsadc", "apb_pclk"; 452 clock-names = "tsadc", "apb_pclk";
453 resets = <&cru SRST_TSADC>; 453 resets = <&cru SRST_TSADC>;
454 reset-names = "tsadc-apb"; 454 reset-names = "tsadc-apb";
455 pinctrl-names = "default"; 455 pinctrl-names = "init", "default", "sleep";
456 pinctrl-0 = <&otp_out>; 456 pinctrl-0 = <&otp_gpio>;
457 pinctrl-1 = <&otp_out>;
458 pinctrl-2 = <&otp_gpio>;
457 #thermal-sensor-cells = <1>; 459 #thermal-sensor-cells = <1>;
458 rockchip,hw-tshut-temp = <95000>; 460 rockchip,hw-tshut-temp = <95000>;
459 status = "disabled"; 461 status = "disabled";
@@ -1395,6 +1397,10 @@
1395 }; 1397 };
1396 1398
1397 tsadc { 1399 tsadc {
1400 otp_gpio: otp-gpio {
1401 rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
1402 };
1403
1398 otp_out: otp-out { 1404 otp_out: otp-out {
1399 rockchip,pins = <0 10 RK_FUNC_1 &pcfg_pull_none>; 1405 rockchip,pins = <0 10 RK_FUNC_1 &pcfg_pull_none>;
1400 }; 1406 };
diff --git a/arch/arm/boot/dts/sama5d35ek.dts b/arch/arm/boot/dts/sama5d35ek.dts
index d9a9aca1ccfd..e812f5c1bf70 100644
--- a/arch/arm/boot/dts/sama5d35ek.dts
+++ b/arch/arm/boot/dts/sama5d35ek.dts
@@ -49,7 +49,7 @@
49 label = "pb_user1"; 49 label = "pb_user1";
50 gpios = <&pioE 27 GPIO_ACTIVE_HIGH>; 50 gpios = <&pioE 27 GPIO_ACTIVE_HIGH>;
51 linux,code = <0x100>; 51 linux,code = <0x100>;
52 gpio-key,wakeup; 52 wakeup-source;
53 }; 53 };
54 }; 54 };
55}; 55};
diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi
index 15bbaf690047..2193637b9cd2 100644
--- a/arch/arm/boot/dts/sama5d4.dtsi
+++ b/arch/arm/boot/dts/sama5d4.dtsi
@@ -1300,7 +1300,7 @@
1300 }; 1300 };
1301 1301
1302 watchdog@fc068640 { 1302 watchdog@fc068640 {
1303 compatible = "atmel,at91sam9260-wdt"; 1303 compatible = "atmel,sama5d4-wdt";
1304 reg = <0xfc068640 0x10>; 1304 reg = <0xfc068640 0x10>;
1305 clocks = <&clk32k>; 1305 clocks = <&clk32k>;
1306 status = "disabled"; 1306 status = "disabled";
diff --git a/arch/arm/boot/dts/sun6i-a31s-primo81.dts b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
index 2d4250b1faf8..68b479b8772c 100644
--- a/arch/arm/boot/dts/sun6i-a31s-primo81.dts
+++ b/arch/arm/boot/dts/sun6i-a31s-primo81.dts
@@ -83,6 +83,7 @@
83 reg = <0x5d>; 83 reg = <0x5d>;
84 interrupt-parent = <&pio>; 84 interrupt-parent = <&pio>;
85 interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */ 85 interrupts = <0 3 IRQ_TYPE_LEVEL_HIGH>; /* PA3 */
86 touchscreen-swapped-x-y;
86 }; 87 };
87}; 88};
88 89
diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi b/arch/arm/boot/dts/tegra124-nyan.dtsi
index 40c23a0b7cfc..ec1aa64ded68 100644
--- a/arch/arm/boot/dts/tegra124-nyan.dtsi
+++ b/arch/arm/boot/dts/tegra124-nyan.dtsi
@@ -399,7 +399,7 @@
399 399
400 /* CPU DFLL clock */ 400 /* CPU DFLL clock */
401 clock@0,70110000 { 401 clock@0,70110000 {
402 status = "okay"; 402 status = "disabled";
403 vdd-cpu-supply = <&vdd_cpu>; 403 vdd-cpu-supply = <&vdd_cpu>;
404 nvidia,i2c-fs-rate = <400000>; 404 nvidia,i2c-fs-rate = <400000>;
405 }; 405 };
diff --git a/arch/arm/boot/dts/usb_a9260_common.dtsi b/arch/arm/boot/dts/usb_a9260_common.dtsi
index 12edafefd44a..9beea8976584 100644
--- a/arch/arm/boot/dts/usb_a9260_common.dtsi
+++ b/arch/arm/boot/dts/usb_a9260_common.dtsi
@@ -115,7 +115,7 @@
115 label = "user_pb"; 115 label = "user_pb";
116 gpios = <&pioB 10 GPIO_ACTIVE_LOW>; 116 gpios = <&pioB 10 GPIO_ACTIVE_LOW>;
117 linux,code = <28>; 117 linux,code = <28>;
118 gpio-key,wakeup; 118 wakeup-source;
119 }; 119 };
120 }; 120 };
121 121
diff --git a/arch/arm/boot/dts/usb_a9263.dts b/arch/arm/boot/dts/usb_a9263.dts
index 68c0de36c339..8cc6edb29694 100644
--- a/arch/arm/boot/dts/usb_a9263.dts
+++ b/arch/arm/boot/dts/usb_a9263.dts
@@ -143,7 +143,7 @@
143 label = "user_pb"; 143 label = "user_pb";
144 gpios = <&pioB 10 GPIO_ACTIVE_LOW>; 144 gpios = <&pioB 10 GPIO_ACTIVE_LOW>;
145 linux,code = <28>; 145 linux,code = <28>;
146 gpio-key,wakeup; 146 wakeup-source;
147 }; 147 };
148 }; 148 };
149 149
diff --git a/arch/arm/boot/dts/vf610-colibri.dtsi b/arch/arm/boot/dts/vf610-colibri.dtsi
index 19fe045b8334..2d7eab755210 100644
--- a/arch/arm/boot/dts/vf610-colibri.dtsi
+++ b/arch/arm/boot/dts/vf610-colibri.dtsi
@@ -18,8 +18,3 @@
18 reg = <0x80000000 0x10000000>; 18 reg = <0x80000000 0x10000000>;
19 }; 19 };
20}; 20};
21
22&L2 {
23 arm,data-latency = <2 1 2>;
24 arm,tag-latency = <3 2 3>;
25};
diff --git a/arch/arm/boot/dts/vf610.dtsi b/arch/arm/boot/dts/vf610.dtsi
index 5f8eb1bd782b..58bc6e448be5 100644
--- a/arch/arm/boot/dts/vf610.dtsi
+++ b/arch/arm/boot/dts/vf610.dtsi
@@ -19,7 +19,7 @@
19 reg = <0x40006000 0x1000>; 19 reg = <0x40006000 0x1000>;
20 cache-unified; 20 cache-unified;
21 cache-level = <2>; 21 cache-level = <2>;
22 arm,data-latency = <1 1 1>; 22 arm,data-latency = <3 3 3>;
23 arm,tag-latency = <2 2 2>; 23 arm,tag-latency = <2 2 2>;
24 }; 24 };
25}; 25};
diff --git a/arch/arm/boot/dts/vfxxx.dtsi b/arch/arm/boot/dts/vfxxx.dtsi
index 6736bae43a5b..3cd1b27f2697 100644
--- a/arch/arm/boot/dts/vfxxx.dtsi
+++ b/arch/arm/boot/dts/vfxxx.dtsi
@@ -158,7 +158,7 @@
158 interrupts = <67 IRQ_TYPE_LEVEL_HIGH>; 158 interrupts = <67 IRQ_TYPE_LEVEL_HIGH>;
159 clocks = <&clks VF610_CLK_DSPI0>; 159 clocks = <&clks VF610_CLK_DSPI0>;
160 clock-names = "dspi"; 160 clock-names = "dspi";
161 spi-num-chipselects = <5>; 161 spi-num-chipselects = <6>;
162 status = "disabled"; 162 status = "disabled";
163 }; 163 };
164 164
@@ -170,7 +170,7 @@
170 interrupts = <68 IRQ_TYPE_LEVEL_HIGH>; 170 interrupts = <68 IRQ_TYPE_LEVEL_HIGH>;
171 clocks = <&clks VF610_CLK_DSPI1>; 171 clocks = <&clks VF610_CLK_DSPI1>;
172 clock-names = "dspi"; 172 clock-names = "dspi";
173 spi-num-chipselects = <5>; 173 spi-num-chipselects = <4>;
174 status = "disabled"; 174 status = "disabled";
175 }; 175 };
176 176
@@ -178,8 +178,10 @@
178 compatible = "fsl,vf610-sai"; 178 compatible = "fsl,vf610-sai";
179 reg = <0x40031000 0x1000>; 179 reg = <0x40031000 0x1000>;
180 interrupts = <86 IRQ_TYPE_LEVEL_HIGH>; 180 interrupts = <86 IRQ_TYPE_LEVEL_HIGH>;
181 clocks = <&clks VF610_CLK_SAI2>; 181 clocks = <&clks VF610_CLK_SAI2>,
182 clock-names = "sai"; 182 <&clks VF610_CLK_SAI2_DIV>,
183 <&clks 0>, <&clks 0>;
184 clock-names = "bus", "mclk1", "mclk2", "mclk3";
183 dma-names = "tx", "rx"; 185 dma-names = "tx", "rx";
184 dmas = <&edma0 0 21>, 186 dmas = <&edma0 0 21>,
185 <&edma0 0 20>; 187 <&edma0 0 20>;
@@ -461,6 +463,8 @@
461 clock-names = "adc"; 463 clock-names = "adc";
462 #io-channel-cells = <1>; 464 #io-channel-cells = <1>;
463 status = "disabled"; 465 status = "disabled";
466 fsl,adck-max-frequency = <30000000>, <40000000>,
467 <20000000>;
464 }; 468 };
465 469
466 esdhc0: esdhc@400b1000 { 470 esdhc0: esdhc@400b1000 {
@@ -472,8 +476,6 @@
472 <&clks VF610_CLK_ESDHC0>; 476 <&clks VF610_CLK_ESDHC0>;
473 clock-names = "ipg", "ahb", "per"; 477 clock-names = "ipg", "ahb", "per";
474 status = "disabled"; 478 status = "disabled";
475 fsl,adck-max-frequency = <30000000>, <40000000>,
476 <20000000>;
477 }; 479 };
478 480
479 esdhc1: esdhc@400b2000 { 481 esdhc1: esdhc@400b2000 {
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig
index 1b1e5acd76e2..e4b1be66b3f5 100644
--- a/arch/arm/configs/at91_dt_defconfig
+++ b/arch/arm/configs/at91_dt_defconfig
@@ -125,7 +125,6 @@ CONFIG_POWER_RESET=y
125# CONFIG_HWMON is not set 125# CONFIG_HWMON is not set
126CONFIG_WATCHDOG=y 126CONFIG_WATCHDOG=y
127CONFIG_AT91SAM9X_WATCHDOG=y 127CONFIG_AT91SAM9X_WATCHDOG=y
128CONFIG_SSB=m
129CONFIG_MFD_ATMEL_HLCDC=y 128CONFIG_MFD_ATMEL_HLCDC=y
130CONFIG_REGULATOR=y 129CONFIG_REGULATOR=y
131CONFIG_REGULATOR_FIXED_VOLTAGE=y 130CONFIG_REGULATOR_FIXED_VOLTAGE=y
diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig
index a0c57ac88b27..63f7e6ce649a 100644
--- a/arch/arm/configs/sama5_defconfig
+++ b/arch/arm/configs/sama5_defconfig
@@ -129,7 +129,6 @@ CONFIG_GPIO_SYSFS=y
129CONFIG_POWER_SUPPLY=y 129CONFIG_POWER_SUPPLY=y
130CONFIG_POWER_RESET=y 130CONFIG_POWER_RESET=y
131# CONFIG_HWMON is not set 131# CONFIG_HWMON is not set
132CONFIG_SSB=m
133CONFIG_MFD_ATMEL_FLEXCOM=y 132CONFIG_MFD_ATMEL_FLEXCOM=y
134CONFIG_REGULATOR=y 133CONFIG_REGULATOR=y
135CONFIG_REGULATOR_FIXED_VOLTAGE=y 134CONFIG_REGULATOR_FIXED_VOLTAGE=y
diff --git a/arch/arm/include/asm/arch_gicv3.h b/arch/arm/include/asm/arch_gicv3.h
index 6607d976e07d..7da5503c0591 100644
--- a/arch/arm/include/asm/arch_gicv3.h
+++ b/arch/arm/include/asm/arch_gicv3.h
@@ -21,6 +21,7 @@
21#ifndef __ASSEMBLY__ 21#ifndef __ASSEMBLY__
22 22
23#include <linux/io.h> 23#include <linux/io.h>
24#include <asm/barrier.h>
24 25
25#define __ACCESS_CP15(CRn, Op1, CRm, Op2) p15, Op1, %0, CRn, CRm, Op2 26#define __ACCESS_CP15(CRn, Op1, CRm, Op2) p15, Op1, %0, CRn, CRm, Op2
26#define __ACCESS_CP15_64(Op1, CRm) p15, Op1, %Q0, %R0, CRm 27#define __ACCESS_CP15_64(Op1, CRm) p15, Op1, %Q0, %R0, CRm
diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h
index be1d07d59ee9..1bd9510de1b9 100644
--- a/arch/arm/include/asm/irq.h
+++ b/arch/arm/include/asm/irq.h
@@ -40,6 +40,11 @@ extern void arch_trigger_all_cpu_backtrace(bool);
40#define arch_trigger_all_cpu_backtrace(x) arch_trigger_all_cpu_backtrace(x) 40#define arch_trigger_all_cpu_backtrace(x) arch_trigger_all_cpu_backtrace(x)
41#endif 41#endif
42 42
43static inline int nr_legacy_irqs(void)
44{
45 return NR_IRQS_LEGACY;
46}
47
43#endif 48#endif
44 49
45#endif 50#endif
diff --git a/arch/arm/include/asm/kvm_emulate.h b/arch/arm/include/asm/kvm_emulate.h
index a9c80a2ea1a7..3095df091ff8 100644
--- a/arch/arm/include/asm/kvm_emulate.h
+++ b/arch/arm/include/asm/kvm_emulate.h
@@ -28,6 +28,18 @@
28unsigned long *vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num); 28unsigned long *vcpu_reg(struct kvm_vcpu *vcpu, u8 reg_num);
29unsigned long *vcpu_spsr(struct kvm_vcpu *vcpu); 29unsigned long *vcpu_spsr(struct kvm_vcpu *vcpu);
30 30
31static inline unsigned long vcpu_get_reg(struct kvm_vcpu *vcpu,
32 u8 reg_num)
33{
34 return *vcpu_reg(vcpu, reg_num);
35}
36
37static inline void vcpu_set_reg(struct kvm_vcpu *vcpu, u8 reg_num,
38 unsigned long val)
39{
40 *vcpu_reg(vcpu, reg_num) = val;
41}
42
31bool kvm_condition_valid(struct kvm_vcpu *vcpu); 43bool kvm_condition_valid(struct kvm_vcpu *vcpu);
32void kvm_skip_instr(struct kvm_vcpu *vcpu, bool is_wide_instr); 44void kvm_skip_instr(struct kvm_vcpu *vcpu, bool is_wide_instr);
33void kvm_inject_undefined(struct kvm_vcpu *vcpu); 45void kvm_inject_undefined(struct kvm_vcpu *vcpu);
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
index 8cc85a4ebec2..35c9db857ebe 100644
--- a/arch/arm/include/asm/uaccess.h
+++ b/arch/arm/include/asm/uaccess.h
@@ -510,10 +510,14 @@ __copy_to_user_std(void __user *to, const void *from, unsigned long n);
510static inline unsigned long __must_check 510static inline unsigned long __must_check
511__copy_to_user(void __user *to, const void *from, unsigned long n) 511__copy_to_user(void __user *to, const void *from, unsigned long n)
512{ 512{
513#ifndef CONFIG_UACCESS_WITH_MEMCPY
513 unsigned int __ua_flags = uaccess_save_and_enable(); 514 unsigned int __ua_flags = uaccess_save_and_enable();
514 n = arm_copy_to_user(to, from, n); 515 n = arm_copy_to_user(to, from, n);
515 uaccess_restore(__ua_flags); 516 uaccess_restore(__ua_flags);
516 return n; 517 return n;
518#else
519 return arm_copy_to_user(to, from, n);
520#endif
517} 521}
518 522
519extern unsigned long __must_check 523extern unsigned long __must_check
diff --git a/arch/arm/include/uapi/asm/unistd.h b/arch/arm/include/uapi/asm/unistd.h
index 7a2a32a1d5a8..ede692ffa32e 100644
--- a/arch/arm/include/uapi/asm/unistd.h
+++ b/arch/arm/include/uapi/asm/unistd.h
@@ -416,6 +416,7 @@
416#define __NR_execveat (__NR_SYSCALL_BASE+387) 416#define __NR_execveat (__NR_SYSCALL_BASE+387)
417#define __NR_userfaultfd (__NR_SYSCALL_BASE+388) 417#define __NR_userfaultfd (__NR_SYSCALL_BASE+388)
418#define __NR_membarrier (__NR_SYSCALL_BASE+389) 418#define __NR_membarrier (__NR_SYSCALL_BASE+389)
419#define __NR_mlock2 (__NR_SYSCALL_BASE+390)
419 420
420/* 421/*
421 * The following SWIs are ARM private. 422 * The following SWIs are ARM private.
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 6551d28c27e6..066f7f9ba411 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -17,11 +17,6 @@
17#include <asm/mach/pci.h> 17#include <asm/mach/pci.h>
18 18
19static int debug_pci; 19static int debug_pci;
20static resource_size_t (*align_resource)(struct pci_dev *dev,
21 const struct resource *res,
22 resource_size_t start,
23 resource_size_t size,
24 resource_size_t align) = NULL;
25 20
26/* 21/*
27 * We can't use pci_get_device() here since we are 22 * We can't use pci_get_device() here since we are
@@ -461,7 +456,6 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
461 sys->busnr = busnr; 456 sys->busnr = busnr;
462 sys->swizzle = hw->swizzle; 457 sys->swizzle = hw->swizzle;
463 sys->map_irq = hw->map_irq; 458 sys->map_irq = hw->map_irq;
464 align_resource = hw->align_resource;
465 INIT_LIST_HEAD(&sys->resources); 459 INIT_LIST_HEAD(&sys->resources);
466 460
467 if (hw->private_data) 461 if (hw->private_data)
@@ -470,6 +464,8 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
470 ret = hw->setup(nr, sys); 464 ret = hw->setup(nr, sys);
471 465
472 if (ret > 0) { 466 if (ret > 0) {
467 struct pci_host_bridge *host_bridge;
468
473 ret = pcibios_init_resources(nr, sys); 469 ret = pcibios_init_resources(nr, sys);
474 if (ret) { 470 if (ret) {
475 kfree(sys); 471 kfree(sys);
@@ -491,6 +487,9 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,
491 busnr = sys->bus->busn_res.end + 1; 487 busnr = sys->bus->busn_res.end + 1;
492 488
493 list_add(&sys->node, head); 489 list_add(&sys->node, head);
490
491 host_bridge = pci_find_host_bridge(sys->bus);
492 host_bridge->align_resource = hw->align_resource;
494 } else { 493 } else {
495 kfree(sys); 494 kfree(sys);
496 if (ret < 0) 495 if (ret < 0)
@@ -578,14 +577,18 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
578{ 577{
579 struct pci_dev *dev = data; 578 struct pci_dev *dev = data;
580 resource_size_t start = res->start; 579 resource_size_t start = res->start;
580 struct pci_host_bridge *host_bridge;
581 581
582 if (res->flags & IORESOURCE_IO && start & 0x300) 582 if (res->flags & IORESOURCE_IO && start & 0x300)
583 start = (start + 0x3ff) & ~0x3ff; 583 start = (start + 0x3ff) & ~0x3ff;
584 584
585 start = (start + align - 1) & ~(align - 1); 585 start = (start + align - 1) & ~(align - 1);
586 586
587 if (align_resource) 587 host_bridge = pci_find_host_bridge(dev->bus);
588 return align_resource(dev, res, start, size, align); 588
589 if (host_bridge->align_resource)
590 return host_bridge->align_resource(dev, res,
591 start, size, align);
589 592
590 return start; 593 return start;
591} 594}
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index fde6c88d560c..ac368bb068d1 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -399,6 +399,7 @@
399 CALL(sys_execveat) 399 CALL(sys_execveat)
400 CALL(sys_userfaultfd) 400 CALL(sys_userfaultfd)
401 CALL(sys_membarrier) 401 CALL(sys_membarrier)
402 CALL(sys_mlock2)
402#ifndef syscalls_counted 403#ifndef syscalls_counted
403.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls 404.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
404#define syscalls_counted 405#define syscalls_counted
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 7a7c4cea5523..4adfb46e3ee9 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -95,6 +95,22 @@ void __show_regs(struct pt_regs *regs)
95{ 95{
96 unsigned long flags; 96 unsigned long flags;
97 char buf[64]; 97 char buf[64];
98#ifndef CONFIG_CPU_V7M
99 unsigned int domain;
100#ifdef CONFIG_CPU_SW_DOMAIN_PAN
101 /*
102 * Get the domain register for the parent context. In user
103 * mode, we don't save the DACR, so lets use what it should
104 * be. For other modes, we place it after the pt_regs struct.
105 */
106 if (user_mode(regs))
107 domain = DACR_UACCESS_ENABLE;
108 else
109 domain = *(unsigned int *)(regs + 1);
110#else
111 domain = get_domain();
112#endif
113#endif
98 114
99 show_regs_print_info(KERN_DEFAULT); 115 show_regs_print_info(KERN_DEFAULT);
100 116
@@ -123,21 +139,8 @@ void __show_regs(struct pt_regs *regs)
123 139
124#ifndef CONFIG_CPU_V7M 140#ifndef CONFIG_CPU_V7M
125 { 141 {
126 unsigned int domain = get_domain();
127 const char *segment; 142 const char *segment;
128 143
129#ifdef CONFIG_CPU_SW_DOMAIN_PAN
130 /*
131 * Get the domain register for the parent context. In user
132 * mode, we don't save the DACR, so lets use what it should
133 * be. For other modes, we place it after the pt_regs struct.
134 */
135 if (user_mode(regs))
136 domain = DACR_UACCESS_ENABLE;
137 else
138 domain = *(unsigned int *)(regs + 1);
139#endif
140
141 if ((domain & domain_mask(DOMAIN_USER)) == 144 if ((domain & domain_mask(DOMAIN_USER)) ==
142 domain_val(DOMAIN_USER, DOMAIN_NOACCESS)) 145 domain_val(DOMAIN_USER, DOMAIN_NOACCESS))
143 segment = "none"; 146 segment = "none";
@@ -163,11 +166,11 @@ void __show_regs(struct pt_regs *regs)
163 buf[0] = '\0'; 166 buf[0] = '\0';
164#ifdef CONFIG_CPU_CP15_MMU 167#ifdef CONFIG_CPU_CP15_MMU
165 { 168 {
166 unsigned int transbase, dac = get_domain(); 169 unsigned int transbase;
167 asm("mrc p15, 0, %0, c2, c0\n\t" 170 asm("mrc p15, 0, %0, c2, c0\n\t"
168 : "=r" (transbase)); 171 : "=r" (transbase));
169 snprintf(buf, sizeof(buf), " Table: %08x DAC: %08x", 172 snprintf(buf, sizeof(buf), " Table: %08x DAC: %08x",
170 transbase, dac); 173 transbase, domain);
171 } 174 }
172#endif 175#endif
173 asm("mrc p15, 0, %0, c1, c0\n" : "=r" (ctrl)); 176 asm("mrc p15, 0, %0, c1, c0\n" : "=r" (ctrl));
diff --git a/arch/arm/kernel/swp_emulate.c b/arch/arm/kernel/swp_emulate.c
index 5b26e7efa9ea..c3fe769d7558 100644
--- a/arch/arm/kernel/swp_emulate.c
+++ b/arch/arm/kernel/swp_emulate.c
@@ -36,10 +36,10 @@
36 */ 36 */
37#define __user_swpX_asm(data, addr, res, temp, B) \ 37#define __user_swpX_asm(data, addr, res, temp, B) \
38 __asm__ __volatile__( \ 38 __asm__ __volatile__( \
39 " mov %2, %1\n" \ 39 "0: ldrex"B" %2, [%3]\n" \
40 "0: ldrex"B" %1, [%3]\n" \ 40 "1: strex"B" %0, %1, [%3]\n" \
41 "1: strex"B" %0, %2, [%3]\n" \
42 " cmp %0, #0\n" \ 41 " cmp %0, #0\n" \
42 " moveq %1, %2\n" \
43 " movne %0, %4\n" \ 43 " movne %0, %4\n" \
44 "2:\n" \ 44 "2:\n" \
45 " .section .text.fixup,\"ax\"\n" \ 45 " .section .text.fixup,\"ax\"\n" \
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c
index b83f3b7737fb..087acb569b63 100644
--- a/arch/arm/kernel/sys_oabi-compat.c
+++ b/arch/arm/kernel/sys_oabi-compat.c
@@ -193,15 +193,44 @@ struct oabi_flock64 {
193 pid_t l_pid; 193 pid_t l_pid;
194} __attribute__ ((packed,aligned(4))); 194} __attribute__ ((packed,aligned(4)));
195 195
196asmlinkage long sys_oabi_fcntl64(unsigned int fd, unsigned int cmd, 196static long do_locks(unsigned int fd, unsigned int cmd,
197 unsigned long arg) 197 unsigned long arg)
198{ 198{
199 struct oabi_flock64 user;
200 struct flock64 kernel; 199 struct flock64 kernel;
201 mm_segment_t fs = USER_DS; /* initialized to kill a warning */ 200 struct oabi_flock64 user;
202 unsigned long local_arg = arg; 201 mm_segment_t fs;
203 int ret; 202 long ret;
203
204 if (copy_from_user(&user, (struct oabi_flock64 __user *)arg,
205 sizeof(user)))
206 return -EFAULT;
207 kernel.l_type = user.l_type;
208 kernel.l_whence = user.l_whence;
209 kernel.l_start = user.l_start;
210 kernel.l_len = user.l_len;
211 kernel.l_pid = user.l_pid;
212
213 fs = get_fs();
214 set_fs(KERNEL_DS);
215 ret = sys_fcntl64(fd, cmd, (unsigned long)&kernel);
216 set_fs(fs);
217
218 if (!ret && (cmd == F_GETLK64 || cmd == F_OFD_GETLK)) {
219 user.l_type = kernel.l_type;
220 user.l_whence = kernel.l_whence;
221 user.l_start = kernel.l_start;
222 user.l_len = kernel.l_len;
223 user.l_pid = kernel.l_pid;
224 if (copy_to_user((struct oabi_flock64 __user *)arg,
225 &user, sizeof(user)))
226 ret = -EFAULT;
227 }
228 return ret;
229}
204 230
231asmlinkage long sys_oabi_fcntl64(unsigned int fd, unsigned int cmd,
232 unsigned long arg)
233{
205 switch (cmd) { 234 switch (cmd) {
206 case F_OFD_GETLK: 235 case F_OFD_GETLK:
207 case F_OFD_SETLK: 236 case F_OFD_SETLK:
@@ -209,39 +238,11 @@ asmlinkage long sys_oabi_fcntl64(unsigned int fd, unsigned int cmd,
209 case F_GETLK64: 238 case F_GETLK64:
210 case F_SETLK64: 239 case F_SETLK64:
211 case F_SETLKW64: 240 case F_SETLKW64:
212 if (copy_from_user(&user, (struct oabi_flock64 __user *)arg, 241 return do_locks(fd, cmd, arg);
213 sizeof(user)))
214 return -EFAULT;
215 kernel.l_type = user.l_type;
216 kernel.l_whence = user.l_whence;
217 kernel.l_start = user.l_start;
218 kernel.l_len = user.l_len;
219 kernel.l_pid = user.l_pid;
220 local_arg = (unsigned long)&kernel;
221 fs = get_fs();
222 set_fs(KERNEL_DS);
223 }
224
225 ret = sys_fcntl64(fd, cmd, local_arg);
226 242
227 switch (cmd) { 243 default:
228 case F_GETLK64: 244 return sys_fcntl64(fd, cmd, arg);
229 if (!ret) {
230 user.l_type = kernel.l_type;
231 user.l_whence = kernel.l_whence;
232 user.l_start = kernel.l_start;
233 user.l_len = kernel.l_len;
234 user.l_pid = kernel.l_pid;
235 if (copy_to_user((struct oabi_flock64 __user *)arg,
236 &user, sizeof(user)))
237 ret = -EFAULT;
238 }
239 case F_SETLK64:
240 case F_SETLKW64:
241 set_fs(fs);
242 } 245 }
243
244 return ret;
245} 246}
246 247
247struct oabi_epoll_event { 248struct oabi_epoll_event {
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index eab83b2435b8..e06fd299de08 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -564,17 +564,12 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
564 vcpu_sleep(vcpu); 564 vcpu_sleep(vcpu);
565 565
566 /* 566 /*
567 * Disarming the background timer must be done in a
568 * preemptible context, as this call may sleep.
569 */
570 kvm_timer_flush_hwstate(vcpu);
571
572 /*
573 * Preparing the interrupts to be injected also 567 * Preparing the interrupts to be injected also
574 * involves poking the GIC, which must be done in a 568 * involves poking the GIC, which must be done in a
575 * non-preemptible context. 569 * non-preemptible context.
576 */ 570 */
577 preempt_disable(); 571 preempt_disable();
572 kvm_timer_flush_hwstate(vcpu);
578 kvm_vgic_flush_hwstate(vcpu); 573 kvm_vgic_flush_hwstate(vcpu);
579 574
580 local_irq_disable(); 575 local_irq_disable();
diff --git a/arch/arm/kvm/mmio.c b/arch/arm/kvm/mmio.c
index 974b1c606d04..3a10c9f1d0a4 100644
--- a/arch/arm/kvm/mmio.c
+++ b/arch/arm/kvm/mmio.c
@@ -115,7 +115,7 @@ int kvm_handle_mmio_return(struct kvm_vcpu *vcpu, struct kvm_run *run)
115 trace_kvm_mmio(KVM_TRACE_MMIO_READ, len, run->mmio.phys_addr, 115 trace_kvm_mmio(KVM_TRACE_MMIO_READ, len, run->mmio.phys_addr,
116 data); 116 data);
117 data = vcpu_data_host_to_guest(vcpu, data, len); 117 data = vcpu_data_host_to_guest(vcpu, data, len);
118 *vcpu_reg(vcpu, vcpu->arch.mmio_decode.rt) = data; 118 vcpu_set_reg(vcpu, vcpu->arch.mmio_decode.rt, data);
119 } 119 }
120 120
121 return 0; 121 return 0;
@@ -186,7 +186,8 @@ int io_mem_abort(struct kvm_vcpu *vcpu, struct kvm_run *run,
186 rt = vcpu->arch.mmio_decode.rt; 186 rt = vcpu->arch.mmio_decode.rt;
187 187
188 if (is_write) { 188 if (is_write) {
189 data = vcpu_data_guest_to_host(vcpu, *vcpu_reg(vcpu, rt), len); 189 data = vcpu_data_guest_to_host(vcpu, vcpu_get_reg(vcpu, rt),
190 len);
190 191
191 trace_kvm_mmio(KVM_TRACE_MMIO_WRITE, len, fault_ipa, data); 192 trace_kvm_mmio(KVM_TRACE_MMIO_WRITE, len, fault_ipa, data);
192 mmio_write_buf(data_buf, len, data); 193 mmio_write_buf(data_buf, len, data);
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
index 6984342da13d..61d96a645ff3 100644
--- a/arch/arm/kvm/mmu.c
+++ b/arch/arm/kvm/mmu.c
@@ -98,6 +98,11 @@ static void kvm_flush_dcache_pud(pud_t pud)
98 __kvm_flush_dcache_pud(pud); 98 __kvm_flush_dcache_pud(pud);
99} 99}
100 100
101static bool kvm_is_device_pfn(unsigned long pfn)
102{
103 return !pfn_valid(pfn);
104}
105
101/** 106/**
102 * stage2_dissolve_pmd() - clear and flush huge PMD entry 107 * stage2_dissolve_pmd() - clear and flush huge PMD entry
103 * @kvm: pointer to kvm structure. 108 * @kvm: pointer to kvm structure.
@@ -213,7 +218,7 @@ static void unmap_ptes(struct kvm *kvm, pmd_t *pmd,
213 kvm_tlb_flush_vmid_ipa(kvm, addr); 218 kvm_tlb_flush_vmid_ipa(kvm, addr);
214 219
215 /* No need to invalidate the cache for device mappings */ 220 /* No need to invalidate the cache for device mappings */
216 if ((pte_val(old_pte) & PAGE_S2_DEVICE) != PAGE_S2_DEVICE) 221 if (!kvm_is_device_pfn(pte_pfn(old_pte)))
217 kvm_flush_dcache_pte(old_pte); 222 kvm_flush_dcache_pte(old_pte);
218 223
219 put_page(virt_to_page(pte)); 224 put_page(virt_to_page(pte));
@@ -305,8 +310,7 @@ static void stage2_flush_ptes(struct kvm *kvm, pmd_t *pmd,
305 310
306 pte = pte_offset_kernel(pmd, addr); 311 pte = pte_offset_kernel(pmd, addr);
307 do { 312 do {
308 if (!pte_none(*pte) && 313 if (!pte_none(*pte) && !kvm_is_device_pfn(pte_pfn(*pte)))
309 (pte_val(*pte) & PAGE_S2_DEVICE) != PAGE_S2_DEVICE)
310 kvm_flush_dcache_pte(*pte); 314 kvm_flush_dcache_pte(*pte);
311 } while (pte++, addr += PAGE_SIZE, addr != end); 315 } while (pte++, addr += PAGE_SIZE, addr != end);
312} 316}
@@ -1037,11 +1041,6 @@ static bool kvm_is_write_fault(struct kvm_vcpu *vcpu)
1037 return kvm_vcpu_dabt_iswrite(vcpu); 1041 return kvm_vcpu_dabt_iswrite(vcpu);
1038} 1042}
1039 1043
1040static bool kvm_is_device_pfn(unsigned long pfn)
1041{
1042 return !pfn_valid(pfn);
1043}
1044
1045/** 1044/**
1046 * stage2_wp_ptes - write protect PMD range 1045 * stage2_wp_ptes - write protect PMD range
1047 * @pmd: pointer to pmd entry 1046 * @pmd: pointer to pmd entry
diff --git a/arch/arm/kvm/psci.c b/arch/arm/kvm/psci.c
index 0b556968a6da..a9b3b905e661 100644
--- a/arch/arm/kvm/psci.c
+++ b/arch/arm/kvm/psci.c
@@ -75,7 +75,7 @@ static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu)
75 unsigned long context_id; 75 unsigned long context_id;
76 phys_addr_t target_pc; 76 phys_addr_t target_pc;
77 77
78 cpu_id = *vcpu_reg(source_vcpu, 1) & MPIDR_HWID_BITMASK; 78 cpu_id = vcpu_get_reg(source_vcpu, 1) & MPIDR_HWID_BITMASK;
79 if (vcpu_mode_is_32bit(source_vcpu)) 79 if (vcpu_mode_is_32bit(source_vcpu))
80 cpu_id &= ~((u32) 0); 80 cpu_id &= ~((u32) 0);
81 81
@@ -94,8 +94,8 @@ static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu)
94 return PSCI_RET_INVALID_PARAMS; 94 return PSCI_RET_INVALID_PARAMS;
95 } 95 }
96 96
97 target_pc = *vcpu_reg(source_vcpu, 2); 97 target_pc = vcpu_get_reg(source_vcpu, 2);
98 context_id = *vcpu_reg(source_vcpu, 3); 98 context_id = vcpu_get_reg(source_vcpu, 3);
99 99
100 kvm_reset_vcpu(vcpu); 100 kvm_reset_vcpu(vcpu);
101 101
@@ -114,7 +114,7 @@ static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu)
114 * NOTE: We always update r0 (or x0) because for PSCI v0.1 114 * NOTE: We always update r0 (or x0) because for PSCI v0.1
115 * the general puspose registers are undefined upon CPU_ON. 115 * the general puspose registers are undefined upon CPU_ON.
116 */ 116 */
117 *vcpu_reg(vcpu, 0) = context_id; 117 vcpu_set_reg(vcpu, 0, context_id);
118 vcpu->arch.power_off = false; 118 vcpu->arch.power_off = false;
119 smp_mb(); /* Make sure the above is visible */ 119 smp_mb(); /* Make sure the above is visible */
120 120
@@ -134,8 +134,8 @@ static unsigned long kvm_psci_vcpu_affinity_info(struct kvm_vcpu *vcpu)
134 struct kvm *kvm = vcpu->kvm; 134 struct kvm *kvm = vcpu->kvm;
135 struct kvm_vcpu *tmp; 135 struct kvm_vcpu *tmp;
136 136
137 target_affinity = *vcpu_reg(vcpu, 1); 137 target_affinity = vcpu_get_reg(vcpu, 1);
138 lowest_affinity_level = *vcpu_reg(vcpu, 2); 138 lowest_affinity_level = vcpu_get_reg(vcpu, 2);
139 139
140 /* Determine target affinity mask */ 140 /* Determine target affinity mask */
141 target_affinity_mask = psci_affinity_mask(lowest_affinity_level); 141 target_affinity_mask = psci_affinity_mask(lowest_affinity_level);
@@ -209,7 +209,7 @@ int kvm_psci_version(struct kvm_vcpu *vcpu)
209static int kvm_psci_0_2_call(struct kvm_vcpu *vcpu) 209static int kvm_psci_0_2_call(struct kvm_vcpu *vcpu)
210{ 210{
211 int ret = 1; 211 int ret = 1;
212 unsigned long psci_fn = *vcpu_reg(vcpu, 0) & ~((u32) 0); 212 unsigned long psci_fn = vcpu_get_reg(vcpu, 0) & ~((u32) 0);
213 unsigned long val; 213 unsigned long val;
214 214
215 switch (psci_fn) { 215 switch (psci_fn) {
@@ -273,13 +273,13 @@ static int kvm_psci_0_2_call(struct kvm_vcpu *vcpu)
273 break; 273 break;
274 } 274 }
275 275
276 *vcpu_reg(vcpu, 0) = val; 276 vcpu_set_reg(vcpu, 0, val);
277 return ret; 277 return ret;
278} 278}
279 279
280static int kvm_psci_0_1_call(struct kvm_vcpu *vcpu) 280static int kvm_psci_0_1_call(struct kvm_vcpu *vcpu)
281{ 281{
282 unsigned long psci_fn = *vcpu_reg(vcpu, 0) & ~((u32) 0); 282 unsigned long psci_fn = vcpu_get_reg(vcpu, 0) & ~((u32) 0);
283 unsigned long val; 283 unsigned long val;
284 284
285 switch (psci_fn) { 285 switch (psci_fn) {
@@ -295,7 +295,7 @@ static int kvm_psci_0_1_call(struct kvm_vcpu *vcpu)
295 break; 295 break;
296 } 296 }
297 297
298 *vcpu_reg(vcpu, 0) = val; 298 vcpu_set_reg(vcpu, 0, val);
299 return 1; 299 return 1;
300} 300}
301 301
diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c
index d72b90905132..588bbc288396 100644
--- a/arch/arm/lib/uaccess_with_memcpy.c
+++ b/arch/arm/lib/uaccess_with_memcpy.c
@@ -88,6 +88,7 @@ pin_page_for_write(const void __user *_addr, pte_t **ptep, spinlock_t **ptlp)
88static unsigned long noinline 88static unsigned long noinline
89__copy_to_user_memcpy(void __user *to, const void *from, unsigned long n) 89__copy_to_user_memcpy(void __user *to, const void *from, unsigned long n)
90{ 90{
91 unsigned long ua_flags;
91 int atomic; 92 int atomic;
92 93
93 if (unlikely(segment_eq(get_fs(), KERNEL_DS))) { 94 if (unlikely(segment_eq(get_fs(), KERNEL_DS))) {
@@ -118,7 +119,9 @@ __copy_to_user_memcpy(void __user *to, const void *from, unsigned long n)
118 if (tocopy > n) 119 if (tocopy > n)
119 tocopy = n; 120 tocopy = n;
120 121
122 ua_flags = uaccess_save_and_enable();
121 memcpy((void *)to, from, tocopy); 123 memcpy((void *)to, from, tocopy);
124 uaccess_restore(ua_flags);
122 to += tocopy; 125 to += tocopy;
123 from += tocopy; 126 from += tocopy;
124 n -= tocopy; 127 n -= tocopy;
@@ -145,14 +148,21 @@ arm_copy_to_user(void __user *to, const void *from, unsigned long n)
145 * With frame pointer disabled, tail call optimization kicks in 148 * With frame pointer disabled, tail call optimization kicks in
146 * as well making this test almost invisible. 149 * as well making this test almost invisible.
147 */ 150 */
148 if (n < 64) 151 if (n < 64) {
149 return __copy_to_user_std(to, from, n); 152 unsigned long ua_flags = uaccess_save_and_enable();
150 return __copy_to_user_memcpy(to, from, n); 153 n = __copy_to_user_std(to, from, n);
154 uaccess_restore(ua_flags);
155 } else {
156 n = __copy_to_user_memcpy(to, from, n);
157 }
158 return n;
151} 159}
152 160
153static unsigned long noinline 161static unsigned long noinline
154__clear_user_memset(void __user *addr, unsigned long n) 162__clear_user_memset(void __user *addr, unsigned long n)
155{ 163{
164 unsigned long ua_flags;
165
156 if (unlikely(segment_eq(get_fs(), KERNEL_DS))) { 166 if (unlikely(segment_eq(get_fs(), KERNEL_DS))) {
157 memset((void *)addr, 0, n); 167 memset((void *)addr, 0, n);
158 return 0; 168 return 0;
@@ -175,7 +185,9 @@ __clear_user_memset(void __user *addr, unsigned long n)
175 if (tocopy > n) 185 if (tocopy > n)
176 tocopy = n; 186 tocopy = n;
177 187
188 ua_flags = uaccess_save_and_enable();
178 memset((void *)addr, 0, tocopy); 189 memset((void *)addr, 0, tocopy);
190 uaccess_restore(ua_flags);
179 addr += tocopy; 191 addr += tocopy;
180 n -= tocopy; 192 n -= tocopy;
181 193
@@ -193,9 +205,14 @@ out:
193unsigned long arm_clear_user(void __user *addr, unsigned long n) 205unsigned long arm_clear_user(void __user *addr, unsigned long n)
194{ 206{
195 /* See rational for this in __copy_to_user() above. */ 207 /* See rational for this in __copy_to_user() above. */
196 if (n < 64) 208 if (n < 64) {
197 return __clear_user_std(addr, n); 209 unsigned long ua_flags = uaccess_save_and_enable();
198 return __clear_user_memset(addr, n); 210 n = __clear_user_std(addr, n);
211 uaccess_restore(ua_flags);
212 } else {
213 n = __clear_user_memset(addr, n);
214 }
215 return n;
199} 216}
200 217
201#if 0 218#if 0
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 92673006e55c..28656c2b54a0 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -4,7 +4,6 @@ menuconfig ARCH_AT91
4 select ARCH_REQUIRE_GPIOLIB 4 select ARCH_REQUIRE_GPIOLIB
5 select COMMON_CLK_AT91 5 select COMMON_CLK_AT91
6 select PINCTRL 6 select PINCTRL
7 select PINCTRL_AT91
8 select SOC_BUS 7 select SOC_BUS
9 8
10if ARCH_AT91 9if ARCH_AT91
@@ -17,6 +16,7 @@ config SOC_SAMA5D2
17 select HAVE_AT91_USB_CLK 16 select HAVE_AT91_USB_CLK
18 select HAVE_AT91_H32MX 17 select HAVE_AT91_H32MX
19 select HAVE_AT91_GENERATED_CLK 18 select HAVE_AT91_GENERATED_CLK
19 select PINCTRL_AT91PIO4
20 help 20 help
21 Select this if ou are using one of Atmel's SAMA5D2 family SoC. 21 Select this if ou are using one of Atmel's SAMA5D2 family SoC.
22 22
@@ -27,6 +27,7 @@ config SOC_SAMA5D3
27 select HAVE_AT91_UTMI 27 select HAVE_AT91_UTMI
28 select HAVE_AT91_SMD 28 select HAVE_AT91_SMD
29 select HAVE_AT91_USB_CLK 29 select HAVE_AT91_USB_CLK
30 select PINCTRL_AT91
30 help 31 help
31 Select this if you are using one of Atmel's SAMA5D3 family SoC. 32 Select this if you are using one of Atmel's SAMA5D3 family SoC.
32 This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36. 33 This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36.
@@ -40,6 +41,7 @@ config SOC_SAMA5D4
40 select HAVE_AT91_SMD 41 select HAVE_AT91_SMD
41 select HAVE_AT91_USB_CLK 42 select HAVE_AT91_USB_CLK
42 select HAVE_AT91_H32MX 43 select HAVE_AT91_H32MX
44 select PINCTRL_AT91
43 help 45 help
44 Select this if you are using one of Atmel's SAMA5D4 family SoC. 46 Select this if you are using one of Atmel's SAMA5D4 family SoC.
45 47
@@ -50,6 +52,7 @@ config SOC_AT91RM9200
50 select CPU_ARM920T 52 select CPU_ARM920T
51 select HAVE_AT91_USB_CLK 53 select HAVE_AT91_USB_CLK
52 select MIGHT_HAVE_PCI 54 select MIGHT_HAVE_PCI
55 select PINCTRL_AT91
53 select SOC_SAM_V4_V5 56 select SOC_SAM_V4_V5
54 select SRAM if PM 57 select SRAM if PM
55 help 58 help
@@ -65,6 +68,7 @@ config SOC_AT91SAM9
65 select HAVE_AT91_UTMI 68 select HAVE_AT91_UTMI
66 select HAVE_FB_ATMEL 69 select HAVE_FB_ATMEL
67 select MEMORY 70 select MEMORY
71 select PINCTRL_AT91
68 select SOC_SAM_V4_V5 72 select SOC_SAM_V4_V5
69 select SRAM if PM 73 select SRAM if PM
70 help 74 help
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 80e277cfcc8b..23726fb31741 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -41,8 +41,10 @@
41 * implementation should be moved down into the pinctrl driver and get 41 * implementation should be moved down into the pinctrl driver and get
42 * called as part of the generic suspend/resume path. 42 * called as part of the generic suspend/resume path.
43 */ 43 */
44#ifdef CONFIG_PINCTRL_AT91
44extern void at91_pinctrl_gpio_suspend(void); 45extern void at91_pinctrl_gpio_suspend(void);
45extern void at91_pinctrl_gpio_resume(void); 46extern void at91_pinctrl_gpio_resume(void);
47#endif
46 48
47static struct { 49static struct {
48 unsigned long uhp_udp_mask; 50 unsigned long uhp_udp_mask;
@@ -151,8 +153,9 @@ static void at91_pm_suspend(suspend_state_t state)
151 153
152static int at91_pm_enter(suspend_state_t state) 154static int at91_pm_enter(suspend_state_t state)
153{ 155{
156#ifdef CONFIG_PINCTRL_AT91
154 at91_pinctrl_gpio_suspend(); 157 at91_pinctrl_gpio_suspend();
155 158#endif
156 switch (state) { 159 switch (state) {
157 /* 160 /*
158 * Suspend-to-RAM is like STANDBY plus slow clock mode, so 161 * Suspend-to-RAM is like STANDBY plus slow clock mode, so
@@ -192,7 +195,9 @@ static int at91_pm_enter(suspend_state_t state)
192error: 195error:
193 target_state = PM_SUSPEND_ON; 196 target_state = PM_SUSPEND_ON;
194 197
198#ifdef CONFIG_PINCTRL_AT91
195 at91_pinctrl_gpio_resume(); 199 at91_pinctrl_gpio_resume();
200#endif
196 return 0; 201 return 0;
197} 202}
198 203
diff --git a/arch/arm/mach-dove/include/mach/entry-macro.S b/arch/arm/mach-dove/include/mach/entry-macro.S
index 72d622baaad3..df1d44bdc375 100644
--- a/arch/arm/mach-dove/include/mach/entry-macro.S
+++ b/arch/arm/mach-dove/include/mach/entry-macro.S
@@ -18,13 +18,13 @@
18 @ check low interrupts 18 @ check low interrupts
19 ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF] 19 ldr \irqstat, [\base, #IRQ_CAUSE_LOW_OFF]
20 ldr \tmp, [\base, #IRQ_MASK_LOW_OFF] 20 ldr \tmp, [\base, #IRQ_MASK_LOW_OFF]
21 mov \irqnr, #31 21 mov \irqnr, #32
22 ands \irqstat, \irqstat, \tmp 22 ands \irqstat, \irqstat, \tmp
23 23
24 @ if no low interrupts set, check high interrupts 24 @ if no low interrupts set, check high interrupts
25 ldreq \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF] 25 ldreq \irqstat, [\base, #IRQ_CAUSE_HIGH_OFF]
26 ldreq \tmp, [\base, #IRQ_MASK_HIGH_OFF] 26 ldreq \tmp, [\base, #IRQ_MASK_HIGH_OFF]
27 moveq \irqnr, #63 27 moveq \irqnr, #64
28 andeqs \irqstat, \irqstat, \tmp 28 andeqs \irqstat, \irqstat, \tmp
29 29
30 @ find first active interrupt source 30 @ find first active interrupt source
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c
index de68938ee6aa..c21e41dad19c 100644
--- a/arch/arm/mach-exynos/pmu.c
+++ b/arch/arm/mach-exynos/pmu.c
@@ -748,8 +748,12 @@ static void exynos5_powerdown_conf(enum sys_powerdown mode)
748void exynos_sys_powerdown_conf(enum sys_powerdown mode) 748void exynos_sys_powerdown_conf(enum sys_powerdown mode)
749{ 749{
750 unsigned int i; 750 unsigned int i;
751 const struct exynos_pmu_data *pmu_data;
752
753 if (!pmu_context)
754 return;
751 755
752 const struct exynos_pmu_data *pmu_data = pmu_context->pmu_data; 756 pmu_data = pmu_context->pmu_data;
753 757
754 if (pmu_data->powerdown_conf) 758 if (pmu_data->powerdown_conf)
755 pmu_data->powerdown_conf(mode); 759 pmu_data->powerdown_conf(mode);
diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c
index 8e7976a4c3e7..cfc696b972f3 100644
--- a/arch/arm/mach-imx/gpc.c
+++ b/arch/arm/mach-imx/gpc.c
@@ -177,6 +177,7 @@ static struct irq_chip imx_gpc_chip = {
177 .irq_unmask = imx_gpc_irq_unmask, 177 .irq_unmask = imx_gpc_irq_unmask,
178 .irq_retrigger = irq_chip_retrigger_hierarchy, 178 .irq_retrigger = irq_chip_retrigger_hierarchy,
179 .irq_set_wake = imx_gpc_irq_set_wake, 179 .irq_set_wake = imx_gpc_irq_set_wake,
180 .irq_set_type = irq_chip_set_type_parent,
180#ifdef CONFIG_SMP 181#ifdef CONFIG_SMP
181 .irq_set_affinity = irq_chip_set_affinity_parent, 182 .irq_set_affinity = irq_chip_set_affinity_parent,
182#endif 183#endif
diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h
index b02439019963..7a0c13bf4269 100644
--- a/arch/arm/mach-ixp4xx/include/mach/io.h
+++ b/arch/arm/mach-ixp4xx/include/mach/io.h
@@ -143,7 +143,7 @@ static inline void __indirect_writesl(volatile void __iomem *bus_addr,
143 writel(*vaddr++, bus_addr); 143 writel(*vaddr++, bus_addr);
144} 144}
145 145
146static inline unsigned char __indirect_readb(const volatile void __iomem *p) 146static inline u8 __indirect_readb(const volatile void __iomem *p)
147{ 147{
148 u32 addr = (u32)p; 148 u32 addr = (u32)p;
149 u32 n, byte_enables, data; 149 u32 n, byte_enables, data;
@@ -166,7 +166,7 @@ static inline void __indirect_readsb(const volatile void __iomem *bus_addr,
166 *vaddr++ = readb(bus_addr); 166 *vaddr++ = readb(bus_addr);
167} 167}
168 168
169static inline unsigned short __indirect_readw(const volatile void __iomem *p) 169static inline u16 __indirect_readw(const volatile void __iomem *p)
170{ 170{
171 u32 addr = (u32)p; 171 u32 addr = (u32)p;
172 u32 n, byte_enables, data; 172 u32 n, byte_enables, data;
@@ -189,7 +189,7 @@ static inline void __indirect_readsw(const volatile void __iomem *bus_addr,
189 *vaddr++ = readw(bus_addr); 189 *vaddr++ = readw(bus_addr);
190} 190}
191 191
192static inline unsigned long __indirect_readl(const volatile void __iomem *p) 192static inline u32 __indirect_readl(const volatile void __iomem *p)
193{ 193{
194 u32 addr = (__force u32)p; 194 u32 addr = (__force u32)p;
195 u32 data; 195 u32 data;
@@ -350,7 +350,7 @@ static inline void insl(u32 io_addr, void *p, u32 count)
350 ((unsigned long)p <= (PIO_MASK + PIO_OFFSET))) 350 ((unsigned long)p <= (PIO_MASK + PIO_OFFSET)))
351 351
352#define ioread8(p) ioread8(p) 352#define ioread8(p) ioread8(p)
353static inline unsigned int ioread8(const void __iomem *addr) 353static inline u8 ioread8(const void __iomem *addr)
354{ 354{
355 unsigned long port = (unsigned long __force)addr; 355 unsigned long port = (unsigned long __force)addr;
356 if (__is_io_address(port)) 356 if (__is_io_address(port))
@@ -378,7 +378,7 @@ static inline void ioread8_rep(const void __iomem *addr, void *vaddr, u32 count)
378} 378}
379 379
380#define ioread16(p) ioread16(p) 380#define ioread16(p) ioread16(p)
381static inline unsigned int ioread16(const void __iomem *addr) 381static inline u16 ioread16(const void __iomem *addr)
382{ 382{
383 unsigned long port = (unsigned long __force)addr; 383 unsigned long port = (unsigned long __force)addr;
384 if (__is_io_address(port)) 384 if (__is_io_address(port))
@@ -407,7 +407,7 @@ static inline void ioread16_rep(const void __iomem *addr, void *vaddr,
407} 407}
408 408
409#define ioread32(p) ioread32(p) 409#define ioread32(p) ioread32(p)
410static inline unsigned int ioread32(const void __iomem *addr) 410static inline u32 ioread32(const void __iomem *addr)
411{ 411{
412 unsigned long port = (unsigned long __force)addr; 412 unsigned long port = (unsigned long __force)addr;
413 if (__is_io_address(port)) 413 if (__is_io_address(port))
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 5076d3f334d2..0517f0c1581a 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -65,6 +65,8 @@ config SOC_AM43XX
65 select MACH_OMAP_GENERIC 65 select MACH_OMAP_GENERIC
66 select MIGHT_HAVE_CACHE_L2X0 66 select MIGHT_HAVE_CACHE_L2X0
67 select HAVE_ARM_SCU 67 select HAVE_ARM_SCU
68 select GENERIC_CLOCKEVENTS_BROADCAST
69 select HAVE_ARM_TWD
68 70
69config SOC_DRA7XX 71config SOC_DRA7XX
70 bool "TI DRA7XX" 72 bool "TI DRA7XX"
@@ -121,6 +123,7 @@ config ARCH_OMAP2PLUS_TYPICAL
121 select NEON if CPU_V7 123 select NEON if CPU_V7
122 select PM 124 select PM
123 select REGULATOR 125 select REGULATOR
126 select REGULATOR_FIXED_VOLTAGE
124 select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4 127 select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4
125 select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4 128 select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4
126 select VFP 129 select VFP
@@ -201,7 +204,6 @@ config MACH_OMAP3_PANDORA
201 depends on ARCH_OMAP3 204 depends on ARCH_OMAP3
202 default y 205 default y
203 select OMAP_PACKAGE_CBB 206 select OMAP_PACKAGE_CBB
204 select REGULATOR_FIXED_VOLTAGE if REGULATOR
205 207
206config MACH_NOKIA_N810 208config MACH_NOKIA_N810
207 bool 209 bool
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 5305ec7341ec..79e1f876d1c9 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -143,9 +143,9 @@ static int omap4_boot_secondary(unsigned int cpu, struct task_struct *idle)
143 * Ensure that CPU power state is set to ON to avoid CPU 143 * Ensure that CPU power state is set to ON to avoid CPU
144 * powerdomain transition on wfi 144 * powerdomain transition on wfi
145 */ 145 */
146 clkdm_wakeup(cpu1_clkdm); 146 clkdm_wakeup_nolock(cpu1_clkdm);
147 omap_set_pwrdm_state(cpu1_pwrdm, PWRDM_POWER_ON); 147 pwrdm_set_next_pwrst(cpu1_pwrdm, PWRDM_POWER_ON);
148 clkdm_allow_idle(cpu1_clkdm); 148 clkdm_allow_idle_nolock(cpu1_clkdm);
149 149
150 if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD)) { 150 if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD)) {
151 while (gic_dist_disabled()) { 151 while (gic_dist_disabled()) {
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index cc8a987149e2..48495ad82aba 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -890,6 +890,36 @@ static int _init_opt_clks(struct omap_hwmod *oh)
890 return ret; 890 return ret;
891} 891}
892 892
893static void _enable_optional_clocks(struct omap_hwmod *oh)
894{
895 struct omap_hwmod_opt_clk *oc;
896 int i;
897
898 pr_debug("omap_hwmod: %s: enabling optional clocks\n", oh->name);
899
900 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
901 if (oc->_clk) {
902 pr_debug("omap_hwmod: enable %s:%s\n", oc->role,
903 __clk_get_name(oc->_clk));
904 clk_enable(oc->_clk);
905 }
906}
907
908static void _disable_optional_clocks(struct omap_hwmod *oh)
909{
910 struct omap_hwmod_opt_clk *oc;
911 int i;
912
913 pr_debug("omap_hwmod: %s: disabling optional clocks\n", oh->name);
914
915 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
916 if (oc->_clk) {
917 pr_debug("omap_hwmod: disable %s:%s\n", oc->role,
918 __clk_get_name(oc->_clk));
919 clk_disable(oc->_clk);
920 }
921}
922
893/** 923/**
894 * _enable_clocks - enable hwmod main clock and interface clocks 924 * _enable_clocks - enable hwmod main clock and interface clocks
895 * @oh: struct omap_hwmod * 925 * @oh: struct omap_hwmod *
@@ -917,6 +947,9 @@ static int _enable_clocks(struct omap_hwmod *oh)
917 clk_enable(os->_clk); 947 clk_enable(os->_clk);
918 } 948 }
919 949
950 if (oh->flags & HWMOD_OPT_CLKS_NEEDED)
951 _enable_optional_clocks(oh);
952
920 /* The opt clocks are controlled by the device driver. */ 953 /* The opt clocks are controlled by the device driver. */
921 954
922 return 0; 955 return 0;
@@ -948,41 +981,14 @@ static int _disable_clocks(struct omap_hwmod *oh)
948 clk_disable(os->_clk); 981 clk_disable(os->_clk);
949 } 982 }
950 983
984 if (oh->flags & HWMOD_OPT_CLKS_NEEDED)
985 _disable_optional_clocks(oh);
986
951 /* The opt clocks are controlled by the device driver. */ 987 /* The opt clocks are controlled by the device driver. */
952 988
953 return 0; 989 return 0;
954} 990}
955 991
956static void _enable_optional_clocks(struct omap_hwmod *oh)
957{
958 struct omap_hwmod_opt_clk *oc;
959 int i;
960
961 pr_debug("omap_hwmod: %s: enabling optional clocks\n", oh->name);
962
963 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
964 if (oc->_clk) {
965 pr_debug("omap_hwmod: enable %s:%s\n", oc->role,
966 __clk_get_name(oc->_clk));
967 clk_enable(oc->_clk);
968 }
969}
970
971static void _disable_optional_clocks(struct omap_hwmod *oh)
972{
973 struct omap_hwmod_opt_clk *oc;
974 int i;
975
976 pr_debug("omap_hwmod: %s: disabling optional clocks\n", oh->name);
977
978 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
979 if (oc->_clk) {
980 pr_debug("omap_hwmod: disable %s:%s\n", oc->role,
981 __clk_get_name(oc->_clk));
982 clk_disable(oc->_clk);
983 }
984}
985
986/** 992/**
987 * _omap4_enable_module - enable CLKCTRL modulemode on OMAP4 993 * _omap4_enable_module - enable CLKCTRL modulemode on OMAP4
988 * @oh: struct omap_hwmod * 994 * @oh: struct omap_hwmod *
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index ca6df1a73475..76bce11c85a4 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -523,6 +523,8 @@ struct omap_hwmod_omap4_prcm {
523 * HWMOD_RECONFIG_IO_CHAIN: omap_hwmod code needs to reconfigure wake-up 523 * HWMOD_RECONFIG_IO_CHAIN: omap_hwmod code needs to reconfigure wake-up
524 * events by calling _reconfigure_io_chain() when a device is enabled 524 * events by calling _reconfigure_io_chain() when a device is enabled
525 * or idled. 525 * or idled.
526 * HWMOD_OPT_CLKS_NEEDED: The optional clocks are needed for the module to
527 * operate and they need to be handled at the same time as the main_clk.
526 */ 528 */
527#define HWMOD_SWSUP_SIDLE (1 << 0) 529#define HWMOD_SWSUP_SIDLE (1 << 0)
528#define HWMOD_SWSUP_MSTANDBY (1 << 1) 530#define HWMOD_SWSUP_MSTANDBY (1 << 1)
@@ -538,6 +540,7 @@ struct omap_hwmod_omap4_prcm {
538#define HWMOD_FORCE_MSTANDBY (1 << 11) 540#define HWMOD_FORCE_MSTANDBY (1 << 11)
539#define HWMOD_SWSUP_SIDLE_ACT (1 << 12) 541#define HWMOD_SWSUP_SIDLE_ACT (1 << 12)
540#define HWMOD_RECONFIG_IO_CHAIN (1 << 13) 542#define HWMOD_RECONFIG_IO_CHAIN (1 << 13)
543#define HWMOD_OPT_CLKS_NEEDED (1 << 14)
541 544
542/* 545/*
543 * omap_hwmod._int_flags definitions 546 * omap_hwmod._int_flags definitions
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index 51d1ecb384bd..ee4e04434a94 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -1298,6 +1298,44 @@ static struct omap_hwmod dra7xx_mcspi4_hwmod = {
1298}; 1298};
1299 1299
1300/* 1300/*
1301 * 'mcasp' class
1302 *
1303 */
1304static struct omap_hwmod_class_sysconfig dra7xx_mcasp_sysc = {
1305 .sysc_offs = 0x0004,
1306 .sysc_flags = SYSC_HAS_SIDLEMODE,
1307 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1308 .sysc_fields = &omap_hwmod_sysc_type3,
1309};
1310
1311static struct omap_hwmod_class dra7xx_mcasp_hwmod_class = {
1312 .name = "mcasp",
1313 .sysc = &dra7xx_mcasp_sysc,
1314};
1315
1316/* mcasp3 */
1317static struct omap_hwmod_opt_clk mcasp3_opt_clks[] = {
1318 { .role = "ahclkx", .clk = "mcasp3_ahclkx_mux" },
1319};
1320
1321static struct omap_hwmod dra7xx_mcasp3_hwmod = {
1322 .name = "mcasp3",
1323 .class = &dra7xx_mcasp_hwmod_class,
1324 .clkdm_name = "l4per2_clkdm",
1325 .main_clk = "mcasp3_aux_gfclk_mux",
1326 .flags = HWMOD_OPT_CLKS_NEEDED,
1327 .prcm = {
1328 .omap4 = {
1329 .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP3_CLKCTRL_OFFSET,
1330 .context_offs = DRA7XX_RM_L4PER2_MCASP3_CONTEXT_OFFSET,
1331 .modulemode = MODULEMODE_SWCTRL,
1332 },
1333 },
1334 .opt_clks = mcasp3_opt_clks,
1335 .opt_clks_cnt = ARRAY_SIZE(mcasp3_opt_clks),
1336};
1337
1338/*
1301 * 'mmc' class 1339 * 'mmc' class
1302 * 1340 *
1303 */ 1341 */
@@ -2566,6 +2604,22 @@ static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = {
2566 .user = OCP_USER_MPU | OCP_USER_SDMA, 2604 .user = OCP_USER_MPU | OCP_USER_SDMA,
2567}; 2605};
2568 2606
2607/* l4_per2 -> mcasp3 */
2608static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp3 = {
2609 .master = &dra7xx_l4_per2_hwmod,
2610 .slave = &dra7xx_mcasp3_hwmod,
2611 .clk = "l4_root_clk_div",
2612 .user = OCP_USER_MPU | OCP_USER_SDMA,
2613};
2614
2615/* l3_main_1 -> mcasp3 */
2616static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mcasp3 = {
2617 .master = &dra7xx_l3_main_1_hwmod,
2618 .slave = &dra7xx_mcasp3_hwmod,
2619 .clk = "l3_iclk_div",
2620 .user = OCP_USER_MPU | OCP_USER_SDMA,
2621};
2622
2569/* l4_per1 -> elm */ 2623/* l4_per1 -> elm */
2570static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = { 2624static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = {
2571 .master = &dra7xx_l4_per1_hwmod, 2625 .master = &dra7xx_l4_per1_hwmod,
@@ -3308,6 +3362,8 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
3308 &dra7xx_l4_wkup__dcan1, 3362 &dra7xx_l4_wkup__dcan1,
3309 &dra7xx_l4_per2__dcan2, 3363 &dra7xx_l4_per2__dcan2,
3310 &dra7xx_l4_per2__cpgmac0, 3364 &dra7xx_l4_per2__cpgmac0,
3365 &dra7xx_l4_per2__mcasp3,
3366 &dra7xx_l3_main_1__mcasp3,
3311 &dra7xx_gmac__mdio, 3367 &dra7xx_gmac__mdio,
3312 &dra7xx_l4_cfg__dma_system, 3368 &dra7xx_l4_cfg__dma_system,
3313 &dra7xx_l3_main_1__dss, 3369 &dra7xx_l3_main_1__dss,
diff --git a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
index b1288f56d509..6256052893ec 100644
--- a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
@@ -144,6 +144,7 @@ static struct omap_hwmod dm81xx_l4_ls_hwmod = {
144 .name = "l4_ls", 144 .name = "l4_ls",
145 .clkdm_name = "alwon_l3s_clkdm", 145 .clkdm_name = "alwon_l3s_clkdm",
146 .class = &l4_hwmod_class, 146 .class = &l4_hwmod_class,
147 .flags = HWMOD_NO_IDLEST,
147}; 148};
148 149
149/* 150/*
@@ -155,6 +156,7 @@ static struct omap_hwmod dm81xx_l4_hs_hwmod = {
155 .name = "l4_hs", 156 .name = "l4_hs",
156 .clkdm_name = "alwon_l3_med_clkdm", 157 .clkdm_name = "alwon_l3_med_clkdm",
157 .class = &l4_hwmod_class, 158 .class = &l4_hwmod_class,
159 .flags = HWMOD_NO_IDLEST,
158}; 160};
159 161
160/* L3 slow -> L4 ls peripheral interface running at 125MHz */ 162/* L3 slow -> L4 ls peripheral interface running at 125MHz */
@@ -850,6 +852,7 @@ static struct omap_hwmod dm816x_emac0_hwmod = {
850 .name = "emac0", 852 .name = "emac0",
851 .clkdm_name = "alwon_ethernet_clkdm", 853 .clkdm_name = "alwon_ethernet_clkdm",
852 .class = &dm816x_emac_hwmod_class, 854 .class = &dm816x_emac_hwmod_class,
855 .flags = HWMOD_NO_IDLEST,
853}; 856};
854 857
855static struct omap_hwmod_ocp_if dm81xx_l4_hs__emac0 = { 858static struct omap_hwmod_ocp_if dm81xx_l4_hs__emac0 = {
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index 1dfe34654c43..58144779dec4 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -24,9 +24,6 @@
24#include <linux/platform_data/iommu-omap.h> 24#include <linux/platform_data/iommu-omap.h>
25#include <linux/platform_data/wkup_m3.h> 25#include <linux/platform_data/wkup_m3.h>
26 26
27#include <asm/siginfo.h>
28#include <asm/signal.h>
29
30#include "common.h" 27#include "common.h"
31#include "common-board-devices.h" 28#include "common-board-devices.h"
32#include "dss-common.h" 29#include "dss-common.h"
@@ -385,29 +382,6 @@ static void __init omap3_pandora_legacy_init(void)
385} 382}
386#endif /* CONFIG_ARCH_OMAP3 */ 383#endif /* CONFIG_ARCH_OMAP3 */
387 384
388#ifdef CONFIG_SOC_TI81XX
389static int fault_fixed_up;
390
391static int t410_abort_handler(unsigned long addr, unsigned int fsr,
392 struct pt_regs *regs)
393{
394 if ((fsr == 0x406 || fsr == 0xc06) && !fault_fixed_up) {
395 pr_warn("External imprecise Data abort at addr=%#lx, fsr=%#x ignored.\n",
396 addr, fsr);
397 fault_fixed_up = 1;
398 return 0;
399 }
400
401 return 1;
402}
403
404static void __init t410_abort_init(void)
405{
406 hook_fault_code(16 + 6, t410_abort_handler, SIGBUS, BUS_OBJERR,
407 "imprecise external abort");
408}
409#endif
410
411#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) 385#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
412static struct iommu_platform_data omap4_iommu_pdata = { 386static struct iommu_platform_data omap4_iommu_pdata = {
413 .reset_name = "mmu_cache", 387 .reset_name = "mmu_cache",
@@ -536,9 +510,6 @@ static struct pdata_init pdata_quirks[] __initdata = {
536 { "openpandora,omap3-pandora-600mhz", omap3_pandora_legacy_init, }, 510 { "openpandora,omap3-pandora-600mhz", omap3_pandora_legacy_init, },
537 { "openpandora,omap3-pandora-1ghz", omap3_pandora_legacy_init, }, 511 { "openpandora,omap3-pandora-1ghz", omap3_pandora_legacy_init, },
538#endif 512#endif
539#ifdef CONFIG_SOC_TI81XX
540 { "hp,t410", t410_abort_init, },
541#endif
542#ifdef CONFIG_SOC_OMAP5 513#ifdef CONFIG_SOC_OMAP5
543 { "ti,omap5-uevm", omap5_uevm_legacy_init, }, 514 { "ti,omap5-uevm", omap5_uevm_legacy_init, },
544#endif 515#endif
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 87b98bf92366..2dbd3785ee6f 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -301,11 +301,11 @@ static void omap3_pm_idle(void)
301 if (omap_irq_pending()) 301 if (omap_irq_pending())
302 return; 302 return;
303 303
304 trace_cpu_idle(1, smp_processor_id()); 304 trace_cpu_idle_rcuidle(1, smp_processor_id());
305 305
306 omap_sram_idle(); 306 omap_sram_idle();
307 307
308 trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); 308 trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());
309} 309}
310 310
311#ifdef CONFIG_SUSPEND 311#ifdef CONFIG_SUSPEND
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index b18ebbefae09..f86692dbcfd5 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -320,6 +320,12 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
320 return r; 320 return r;
321} 321}
322 322
323#if !defined(CONFIG_SMP) && defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST)
324void tick_broadcast(const struct cpumask *mask)
325{
326}
327#endif
328
323static void __init omap2_gp_clockevent_init(int gptimer_id, 329static void __init omap2_gp_clockevent_init(int gptimer_id,
324 const char *fck_source, 330 const char *fck_source,
325 const char *property) 331 const char *property)
diff --git a/arch/arm/mach-orion5x/include/mach/entry-macro.S b/arch/arm/mach-orion5x/include/mach/entry-macro.S
index 79eb502a1e64..73919a36b577 100644
--- a/arch/arm/mach-orion5x/include/mach/entry-macro.S
+++ b/arch/arm/mach-orion5x/include/mach/entry-macro.S
@@ -21,5 +21,5 @@
21 @ find cause bits that are unmasked 21 @ find cause bits that are unmasked
22 ands \irqstat, \irqstat, \tmp @ clear Z flag if any 22 ands \irqstat, \irqstat, \tmp @ clear Z flag if any
23 clzne \irqnr, \irqstat @ calc irqnr 23 clzne \irqnr, \irqstat @ calc irqnr
24 rsbne \irqnr, \irqnr, #31 24 rsbne \irqnr, \irqnr, #32
25 .endm 25 .endm
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c
index 9a9c15bfcd34..7c0d5618be5e 100644
--- a/arch/arm/mach-pxa/ezx.c
+++ b/arch/arm/mach-pxa/ezx.c
@@ -889,6 +889,7 @@ static void __init e680_init(void)
889 889
890 pxa_set_keypad_info(&e680_keypad_platform_data); 890 pxa_set_keypad_info(&e680_keypad_platform_data);
891 891
892 pwm_add_table(ezx_pwm_lookup, ARRAY_SIZE(ezx_pwm_lookup));
892 platform_add_devices(ARRAY_AND_SIZE(ezx_devices)); 893 platform_add_devices(ARRAY_AND_SIZE(ezx_devices));
893 platform_add_devices(ARRAY_AND_SIZE(e680_devices)); 894 platform_add_devices(ARRAY_AND_SIZE(e680_devices));
894} 895}
@@ -956,6 +957,7 @@ static void __init a1200_init(void)
956 957
957 pxa_set_keypad_info(&a1200_keypad_platform_data); 958 pxa_set_keypad_info(&a1200_keypad_platform_data);
958 959
960 pwm_add_table(ezx_pwm_lookup, ARRAY_SIZE(ezx_pwm_lookup));
959 platform_add_devices(ARRAY_AND_SIZE(ezx_devices)); 961 platform_add_devices(ARRAY_AND_SIZE(ezx_devices));
960 platform_add_devices(ARRAY_AND_SIZE(a1200_devices)); 962 platform_add_devices(ARRAY_AND_SIZE(a1200_devices));
961} 963}
@@ -1148,6 +1150,7 @@ static void __init a910_init(void)
1148 platform_device_register(&a910_camera); 1150 platform_device_register(&a910_camera);
1149 } 1151 }
1150 1152
1153 pwm_add_table(ezx_pwm_lookup, ARRAY_SIZE(ezx_pwm_lookup));
1151 platform_add_devices(ARRAY_AND_SIZE(ezx_devices)); 1154 platform_add_devices(ARRAY_AND_SIZE(ezx_devices));
1152 platform_add_devices(ARRAY_AND_SIZE(a910_devices)); 1155 platform_add_devices(ARRAY_AND_SIZE(a910_devices));
1153} 1156}
@@ -1215,6 +1218,7 @@ static void __init e6_init(void)
1215 1218
1216 pxa_set_keypad_info(&e6_keypad_platform_data); 1219 pxa_set_keypad_info(&e6_keypad_platform_data);
1217 1220
1221 pwm_add_table(ezx_pwm_lookup, ARRAY_SIZE(ezx_pwm_lookup));
1218 platform_add_devices(ARRAY_AND_SIZE(ezx_devices)); 1222 platform_add_devices(ARRAY_AND_SIZE(ezx_devices));
1219 platform_add_devices(ARRAY_AND_SIZE(e6_devices)); 1223 platform_add_devices(ARRAY_AND_SIZE(e6_devices));
1220} 1224}
@@ -1256,6 +1260,7 @@ static void __init e2_init(void)
1256 1260
1257 pxa_set_keypad_info(&e2_keypad_platform_data); 1261 pxa_set_keypad_info(&e2_keypad_platform_data);
1258 1262
1263 pwm_add_table(ezx_pwm_lookup, ARRAY_SIZE(ezx_pwm_lookup));
1259 platform_add_devices(ARRAY_AND_SIZE(ezx_devices)); 1264 platform_add_devices(ARRAY_AND_SIZE(ezx_devices));
1260 platform_add_devices(ARRAY_AND_SIZE(e2_devices)); 1265 platform_add_devices(ARRAY_AND_SIZE(e2_devices));
1261} 1266}
diff --git a/arch/arm/mach-pxa/palm27x.c b/arch/arm/mach-pxa/palm27x.c
index 13eba2b26e0a..8fbfb10047ec 100644
--- a/arch/arm/mach-pxa/palm27x.c
+++ b/arch/arm/mach-pxa/palm27x.c
@@ -344,7 +344,7 @@ void __init palm27x_pwm_init(int bl, int lcd)
344{ 344{
345 palm_bl_power = bl; 345 palm_bl_power = bl;
346 palm_lcd_power = lcd; 346 palm_lcd_power = lcd;
347 pwm_add_lookup(palm27x_pwm_lookup, ARRAY_SIZE(palm27x_pwm_lookup)); 347 pwm_add_table(palm27x_pwm_lookup, ARRAY_SIZE(palm27x_pwm_lookup));
348 platform_device_register(&palm27x_backlight); 348 platform_device_register(&palm27x_backlight);
349} 349}
350#endif 350#endif
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
index aebf6de62468..0b5c3876720c 100644
--- a/arch/arm/mach-pxa/palmtc.c
+++ b/arch/arm/mach-pxa/palmtc.c
@@ -169,7 +169,7 @@ static inline void palmtc_keys_init(void) {}
169#if defined(CONFIG_BACKLIGHT_PWM) || defined(CONFIG_BACKLIGHT_PWM_MODULE) 169#if defined(CONFIG_BACKLIGHT_PWM) || defined(CONFIG_BACKLIGHT_PWM_MODULE)
170static struct pwm_lookup palmtc_pwm_lookup[] = { 170static struct pwm_lookup palmtc_pwm_lookup[] = {
171 PWM_LOOKUP("pxa25x-pwm.1", 0, "pwm-backlight.0", NULL, PALMTC_PERIOD_NS, 171 PWM_LOOKUP("pxa25x-pwm.1", 0, "pwm-backlight.0", NULL, PALMTC_PERIOD_NS,
172 PWM_PERIOD_NORMAL), 172 PWM_POLARITY_NORMAL),
173}; 173};
174 174
175static struct platform_pwm_backlight_data palmtc_backlight_data = { 175static struct platform_pwm_backlight_data palmtc_backlight_data = {
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
index a19460e6e7b0..b355fca6cc2e 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2440-12000000.c
@@ -20,7 +20,7 @@
20#include <plat/cpu.h> 20#include <plat/cpu.h>
21#include <plat/cpu-freq-core.h> 21#include <plat/cpu-freq-core.h>
22 22
23static struct cpufreq_frequency_table s3c2440_plls_12[] __initdata = { 23static struct cpufreq_frequency_table s3c2440_plls_12[] = {
24 { .frequency = 75000000, .driver_data = PLLVAL(0x75, 3, 3), }, /* FVco 600.000000 */ 24 { .frequency = 75000000, .driver_data = PLLVAL(0x75, 3, 3), }, /* FVco 600.000000 */
25 { .frequency = 80000000, .driver_data = PLLVAL(0x98, 4, 3), }, /* FVco 640.000000 */ 25 { .frequency = 80000000, .driver_data = PLLVAL(0x98, 4, 3), }, /* FVco 640.000000 */
26 { .frequency = 90000000, .driver_data = PLLVAL(0x70, 2, 3), }, /* FVco 720.000000 */ 26 { .frequency = 90000000, .driver_data = PLLVAL(0x70, 2, 3), }, /* FVco 720.000000 */
diff --git a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
index 1191b2905625..be9a248b5ce9 100644
--- a/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
+++ b/arch/arm/mach-s3c24xx/pll-s3c2440-16934400.c
@@ -20,7 +20,7 @@
20#include <plat/cpu.h> 20#include <plat/cpu.h>
21#include <plat/cpu-freq-core.h> 21#include <plat/cpu-freq-core.h>
22 22
23static struct cpufreq_frequency_table s3c2440_plls_169344[] __initdata = { 23static struct cpufreq_frequency_table s3c2440_plls_169344[] = {
24 { .frequency = 78019200, .driver_data = PLLVAL(121, 5, 3), }, /* FVco 624.153600 */ 24 { .frequency = 78019200, .driver_data = PLLVAL(121, 5, 3), }, /* FVco 624.153600 */
25 { .frequency = 84067200, .driver_data = PLLVAL(131, 5, 3), }, /* FVco 672.537600 */ 25 { .frequency = 84067200, .driver_data = PLLVAL(131, 5, 3), }, /* FVco 672.537600 */
26 { .frequency = 90115200, .driver_data = PLLVAL(141, 5, 3), }, /* FVco 720.921600 */ 26 { .frequency = 90115200, .driver_data = PLLVAL(141, 5, 3), }, /* FVco 720.921600 */
diff --git a/arch/arm/mach-shmobile/setup-r8a7793.c b/arch/arm/mach-shmobile/setup-r8a7793.c
index 1d2825cb7a65..5fce87f7f254 100644
--- a/arch/arm/mach-shmobile/setup-r8a7793.c
+++ b/arch/arm/mach-shmobile/setup-r8a7793.c
@@ -19,7 +19,7 @@
19#include "common.h" 19#include "common.h"
20#include "rcar-gen2.h" 20#include "rcar-gen2.h"
21 21
22static const char *r8a7793_boards_compat_dt[] __initconst = { 22static const char * const r8a7793_boards_compat_dt[] __initconst = {
23 "renesas,r8a7793", 23 "renesas,r8a7793",
24 NULL, 24 NULL,
25}; 25};
diff --git a/arch/arm/mach-zx/Kconfig b/arch/arm/mach-zx/Kconfig
index 7fdc5bf24f9b..446334a25cf5 100644
--- a/arch/arm/mach-zx/Kconfig
+++ b/arch/arm/mach-zx/Kconfig
@@ -13,7 +13,7 @@ config SOC_ZX296702
13 select ARM_GLOBAL_TIMER 13 select ARM_GLOBAL_TIMER
14 select HAVE_ARM_SCU if SMP 14 select HAVE_ARM_SCU if SMP
15 select HAVE_ARM_TWD if SMP 15 select HAVE_ARM_TWD if SMP
16 select PM_GENERIC_DOMAINS 16 select PM_GENERIC_DOMAINS if PM
17 help 17 help
18 Support for ZTE ZX296702 SoC which is a dual core CortexA9MP 18 Support for ZTE ZX296702 SoC which is a dual core CortexA9MP
19endif 19endif
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c
index 845769e41332..c8c8b9ed02e0 100644
--- a/arch/arm/mm/context.c
+++ b/arch/arm/mm/context.c
@@ -165,13 +165,28 @@ static void flush_context(unsigned int cpu)
165 __flush_icache_all(); 165 __flush_icache_all();
166} 166}
167 167
168static int is_reserved_asid(u64 asid) 168static bool check_update_reserved_asid(u64 asid, u64 newasid)
169{ 169{
170 int cpu; 170 int cpu;
171 for_each_possible_cpu(cpu) 171 bool hit = false;
172 if (per_cpu(reserved_asids, cpu) == asid) 172
173 return 1; 173 /*
174 return 0; 174 * Iterate over the set of reserved ASIDs looking for a match.
175 * If we find one, then we can update our mm to use newasid
176 * (i.e. the same ASID in the current generation) but we can't
177 * exit the loop early, since we need to ensure that all copies
178 * of the old ASID are updated to reflect the mm. Failure to do
179 * so could result in us missing the reserved ASID in a future
180 * generation.
181 */
182 for_each_possible_cpu(cpu) {
183 if (per_cpu(reserved_asids, cpu) == asid) {
184 hit = true;
185 per_cpu(reserved_asids, cpu) = newasid;
186 }
187 }
188
189 return hit;
175} 190}
176 191
177static u64 new_context(struct mm_struct *mm, unsigned int cpu) 192static u64 new_context(struct mm_struct *mm, unsigned int cpu)
@@ -181,12 +196,14 @@ static u64 new_context(struct mm_struct *mm, unsigned int cpu)
181 u64 generation = atomic64_read(&asid_generation); 196 u64 generation = atomic64_read(&asid_generation);
182 197
183 if (asid != 0) { 198 if (asid != 0) {
199 u64 newasid = generation | (asid & ~ASID_MASK);
200
184 /* 201 /*
185 * If our current ASID was active during a rollover, we 202 * If our current ASID was active during a rollover, we
186 * can continue to use it and this was just a false alarm. 203 * can continue to use it and this was just a false alarm.
187 */ 204 */
188 if (is_reserved_asid(asid)) 205 if (check_update_reserved_asid(asid, newasid))
189 return generation | (asid & ~ASID_MASK); 206 return newasid;
190 207
191 /* 208 /*
192 * We had a valid ASID in a previous life, so try to re-use 209 * We had a valid ASID in a previous life, so try to re-use
@@ -194,7 +211,7 @@ static u64 new_context(struct mm_struct *mm, unsigned int cpu)
194 */ 211 */
195 asid &= ~ASID_MASK; 212 asid &= ~ASID_MASK;
196 if (!__test_and_set_bit(asid, asid_map)) 213 if (!__test_and_set_bit(asid, asid_map))
197 goto bump_gen; 214 return newasid;
198 } 215 }
199 216
200 /* 217 /*
@@ -216,11 +233,8 @@ static u64 new_context(struct mm_struct *mm, unsigned int cpu)
216 233
217 __set_bit(asid, asid_map); 234 __set_bit(asid, asid_map);
218 cur_idx = asid; 235 cur_idx = asid;
219
220bump_gen:
221 asid |= generation;
222 cpumask_clear(mm_cpumask(mm)); 236 cpumask_clear(mm_cpumask(mm));
223 return asid; 237 return asid | generation;
224} 238}
225 239
226void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk) 240void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk)
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index e62400e5fb99..534a60ae282e 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -1521,7 +1521,7 @@ static int __map_sg_chunk(struct device *dev, struct scatterlist *sg,
1521 return -ENOMEM; 1521 return -ENOMEM;
1522 1522
1523 for (count = 0, s = sg; count < (size >> PAGE_SHIFT); s = sg_next(s)) { 1523 for (count = 0, s = sg; count < (size >> PAGE_SHIFT); s = sg_next(s)) {
1524 phys_addr_t phys = sg_phys(s) & PAGE_MASK; 1524 phys_addr_t phys = page_to_phys(sg_page(s));
1525 unsigned int len = PAGE_ALIGN(s->offset + s->length); 1525 unsigned int len = PAGE_ALIGN(s->offset + s->length);
1526 1526
1527 if (!is_coherent && 1527 if (!is_coherent &&
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 8a63b4cdc0f2..7f8cd1b3557f 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -22,6 +22,7 @@
22#include <linux/memblock.h> 22#include <linux/memblock.h>
23#include <linux/dma-contiguous.h> 23#include <linux/dma-contiguous.h>
24#include <linux/sizes.h> 24#include <linux/sizes.h>
25#include <linux/stop_machine.h>
25 26
26#include <asm/cp15.h> 27#include <asm/cp15.h>
27#include <asm/mach-types.h> 28#include <asm/mach-types.h>
@@ -627,12 +628,10 @@ static struct section_perm ro_perms[] = {
627 * safe to be called with preemption disabled, as under stop_machine(). 628 * safe to be called with preemption disabled, as under stop_machine().
628 */ 629 */
629static inline void section_update(unsigned long addr, pmdval_t mask, 630static inline void section_update(unsigned long addr, pmdval_t mask,
630 pmdval_t prot) 631 pmdval_t prot, struct mm_struct *mm)
631{ 632{
632 struct mm_struct *mm;
633 pmd_t *pmd; 633 pmd_t *pmd;
634 634
635 mm = current->active_mm;
636 pmd = pmd_offset(pud_offset(pgd_offset(mm, addr), addr), addr); 635 pmd = pmd_offset(pud_offset(pgd_offset(mm, addr), addr), addr);
637 636
638#ifdef CONFIG_ARM_LPAE 637#ifdef CONFIG_ARM_LPAE
@@ -656,49 +655,82 @@ static inline bool arch_has_strict_perms(void)
656 return !!(get_cr() & CR_XP); 655 return !!(get_cr() & CR_XP);
657} 656}
658 657
659#define set_section_perms(perms, field) { \ 658void set_section_perms(struct section_perm *perms, int n, bool set,
660 size_t i; \ 659 struct mm_struct *mm)
661 unsigned long addr; \ 660{
662 \ 661 size_t i;
663 if (!arch_has_strict_perms()) \ 662 unsigned long addr;
664 return; \ 663
665 \ 664 if (!arch_has_strict_perms())
666 for (i = 0; i < ARRAY_SIZE(perms); i++) { \ 665 return;
667 if (!IS_ALIGNED(perms[i].start, SECTION_SIZE) || \ 666
668 !IS_ALIGNED(perms[i].end, SECTION_SIZE)) { \ 667 for (i = 0; i < n; i++) {
669 pr_err("BUG: section %lx-%lx not aligned to %lx\n", \ 668 if (!IS_ALIGNED(perms[i].start, SECTION_SIZE) ||
670 perms[i].start, perms[i].end, \ 669 !IS_ALIGNED(perms[i].end, SECTION_SIZE)) {
671 SECTION_SIZE); \ 670 pr_err("BUG: section %lx-%lx not aligned to %lx\n",
672 continue; \ 671 perms[i].start, perms[i].end,
673 } \ 672 SECTION_SIZE);
674 \ 673 continue;
675 for (addr = perms[i].start; \ 674 }
676 addr < perms[i].end; \ 675
677 addr += SECTION_SIZE) \ 676 for (addr = perms[i].start;
678 section_update(addr, perms[i].mask, \ 677 addr < perms[i].end;
679 perms[i].field); \ 678 addr += SECTION_SIZE)
680 } \ 679 section_update(addr, perms[i].mask,
680 set ? perms[i].prot : perms[i].clear, mm);
681 }
682
681} 683}
682 684
683static inline void fix_kernmem_perms(void) 685static void update_sections_early(struct section_perm perms[], int n)
684{ 686{
685 set_section_perms(nx_perms, prot); 687 struct task_struct *t, *s;
688
689 read_lock(&tasklist_lock);
690 for_each_process(t) {
691 if (t->flags & PF_KTHREAD)
692 continue;
693 for_each_thread(t, s)
694 set_section_perms(perms, n, true, s->mm);
695 }
696 read_unlock(&tasklist_lock);
697 set_section_perms(perms, n, true, current->active_mm);
698 set_section_perms(perms, n, true, &init_mm);
699}
700
701int __fix_kernmem_perms(void *unused)
702{
703 update_sections_early(nx_perms, ARRAY_SIZE(nx_perms));
704 return 0;
705}
706
707void fix_kernmem_perms(void)
708{
709 stop_machine(__fix_kernmem_perms, NULL, NULL);
686} 710}
687 711
688#ifdef CONFIG_DEBUG_RODATA 712#ifdef CONFIG_DEBUG_RODATA
713int __mark_rodata_ro(void *unused)
714{
715 update_sections_early(ro_perms, ARRAY_SIZE(ro_perms));
716 return 0;
717}
718
689void mark_rodata_ro(void) 719void mark_rodata_ro(void)
690{ 720{
691 set_section_perms(ro_perms, prot); 721 stop_machine(__mark_rodata_ro, NULL, NULL);
692} 722}
693 723
694void set_kernel_text_rw(void) 724void set_kernel_text_rw(void)
695{ 725{
696 set_section_perms(ro_perms, clear); 726 set_section_perms(ro_perms, ARRAY_SIZE(ro_perms), false,
727 current->active_mm);
697} 728}
698 729
699void set_kernel_text_ro(void) 730void set_kernel_text_ro(void)
700{ 731{
701 set_section_perms(ro_perms, prot); 732 set_section_perms(ro_perms, ARRAY_SIZE(ro_perms), true,
733 current->active_mm);
702} 734}
703#endif /* CONFIG_DEBUG_RODATA */ 735#endif /* CONFIG_DEBUG_RODATA */
704 736
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index de2b246fed38..8e1ea433c3f1 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -95,7 +95,7 @@ ENDPROC(cpu_v7_dcache_clean_area)
95.equ cpu_v7_suspend_size, 4 * 9 95.equ cpu_v7_suspend_size, 4 * 9
96#ifdef CONFIG_ARM_CPU_SUSPEND 96#ifdef CONFIG_ARM_CPU_SUSPEND
97ENTRY(cpu_v7_do_suspend) 97ENTRY(cpu_v7_do_suspend)
98 stmfd sp!, {r4 - r10, lr} 98 stmfd sp!, {r4 - r11, lr}
99 mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID 99 mrc p15, 0, r4, c13, c0, 0 @ FCSE/PID
100 mrc p15, 0, r5, c13, c0, 3 @ User r/o thread ID 100 mrc p15, 0, r5, c13, c0, 3 @ User r/o thread ID
101 stmia r0!, {r4 - r5} 101 stmia r0!, {r4 - r5}
@@ -112,7 +112,7 @@ ENTRY(cpu_v7_do_suspend)
112 mrc p15, 0, r9, c1, c0, 1 @ Auxiliary control register 112 mrc p15, 0, r9, c1, c0, 1 @ Auxiliary control register
113 mrc p15, 0, r10, c1, c0, 2 @ Co-processor access control 113 mrc p15, 0, r10, c1, c0, 2 @ Co-processor access control
114 stmia r0, {r5 - r11} 114 stmia r0, {r5 - r11}
115 ldmfd sp!, {r4 - r10, pc} 115 ldmfd sp!, {r4 - r11, pc}
116ENDPROC(cpu_v7_do_suspend) 116ENDPROC(cpu_v7_do_suspend)
117 117
118ENTRY(cpu_v7_do_resume) 118ENTRY(cpu_v7_do_resume)