aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/boot/compressed/Makefile2
-rw-r--r--arch/arm/boot/compressed/debug.S28
-rw-r--r--arch/arm/boot/compressed/head-sa1100.S1
-rw-r--r--arch/arm/boot/compressed/head-shark.S1
-rw-r--r--arch/arm/boot/compressed/head.S5
-rw-r--r--arch/arm/boot/dts/am33xx.dtsi4
-rw-r--r--arch/arm/boot/dts/armada-xp-gp.dts5
-rw-r--r--arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts5
-rw-r--r--arch/arm/boot/dts/bcm2835.dtsi1
-rw-r--r--arch/arm/boot/dts/exynos5250.dtsi15
-rw-r--r--arch/arm/boot/dts/imx25.dtsi12
-rw-r--r--arch/arm/boot/dts/imx27.dtsi6
-rw-r--r--arch/arm/boot/dts/imx51.dtsi2
-rw-r--r--arch/arm/boot/dts/imx53.dtsi2
-rw-r--r--arch/arm/boot/dts/omap4-panda-common.dtsi20
-rw-r--r--arch/arm/boot/dts/omap4-sdp.dts20
-rw-r--r--arch/arm/boot/dts/omap5.dtsi3
-rw-r--r--arch/arm/configs/exynos_defconfig54
-rw-r--r--arch/arm/configs/omap2plus_defconfig2
-rw-r--r--arch/arm/include/asm/percpu.h11
-rw-r--r--arch/arm/include/asm/tlb.h27
-rw-r--r--arch/arm/kernel/topology.c2
-rw-r--r--arch/arm/kvm/arm.c15
-rw-r--r--arch/arm/kvm/mmu.c41
-rw-r--r--arch/arm/mach-exynos/Kconfig3
-rw-r--r--arch/arm/mach-exynos/common.c41
-rw-r--r--arch/arm/mach-exynos/common.h2
-rw-r--r--arch/arm/mach-exynos/include/mach/pm-core.h14
-rw-r--r--arch/arm/mach-exynos/mach-universal_c210.c5
-rw-r--r--arch/arm/mach-imx/clk-imx6q.c4
-rw-r--r--arch/arm/mach-kirkwood/board-ts219.c10
-rw-r--r--arch/arm/mach-kirkwood/mpp.c5
-rw-r--r--arch/arm/mach-mvebu/coherency_ll.S16
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c10
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c4
-rw-r--r--arch/arm/mach-omap2/board-overo.c3
-rw-r--r--arch/arm/mach-omap2/clock36xx.c18
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_33xx_data.c9
-rw-r--r--arch/arm/mach-omap2/pm34xx.c6
-rw-r--r--arch/arm/mach-prima2/pm.c6
-rw-r--r--arch/arm/mach-prima2/rstc.c6
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c3
-rw-r--r--arch/arm/mach-ux500/cpuidle.c4
-rw-r--r--arch/arm/plat-samsung/devs.c6
-rw-r--r--arch/arm/plat-samsung/include/plat/uncompress.h10
-rw-r--r--arch/arm/plat-samsung/pm.c18
46 files changed, 365 insertions, 122 deletions
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 3580d57ea218..79e9bdbfc491 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -124,7 +124,7 @@ KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
124endif 124endif
125 125
126ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj) 126ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj)
127asflags-y := -Wa,-march=all -DZIMAGE 127asflags-y := -DZIMAGE
128 128
129# Supply kernel BSS size to the decompressor via a linker symbol. 129# Supply kernel BSS size to the decompressor via a linker symbol.
130KBSS_SZ = $(shell $(CROSS_COMPILE)size $(obj)/../../../../vmlinux | \ 130KBSS_SZ = $(shell $(CROSS_COMPILE)size $(obj)/../../../../vmlinux | \
diff --git a/arch/arm/boot/compressed/debug.S b/arch/arm/boot/compressed/debug.S
index 6e8382d5b7a4..5392ee63338f 100644
--- a/arch/arm/boot/compressed/debug.S
+++ b/arch/arm/boot/compressed/debug.S
@@ -1,6 +1,8 @@
1#include <linux/linkage.h> 1#include <linux/linkage.h>
2#include <asm/assembler.h> 2#include <asm/assembler.h>
3 3
4#ifndef CONFIG_DEBUG_SEMIHOSTING
5
4#include CONFIG_DEBUG_LL_INCLUDE 6#include CONFIG_DEBUG_LL_INCLUDE
5 7
6ENTRY(putc) 8ENTRY(putc)
@@ -10,3 +12,29 @@ ENTRY(putc)
10 busyuart r3, r1 12 busyuart r3, r1
11 mov pc, lr 13 mov pc, lr
12ENDPROC(putc) 14ENDPROC(putc)
15
16#else
17
18ENTRY(putc)
19 adr r1, 1f
20 ldmia r1, {r2, r3}
21 add r2, r2, r1
22 ldr r1, [r2, r3]
23 strb r0, [r1]
24 mov r0, #0x03 @ SYS_WRITEC
25 ARM( svc #0x123456 )
26 THUMB( svc #0xab )
27 mov pc, lr
28 .align 2
291: .word _GLOBAL_OFFSET_TABLE_ - .
30 .word semi_writec_buf(GOT)
31ENDPROC(putc)
32
33 .bss
34 .global semi_writec_buf
35 .type semi_writec_buf, %object
36semi_writec_buf:
37 .space 4
38 .size semi_writec_buf, 4
39
40#endif
diff --git a/arch/arm/boot/compressed/head-sa1100.S b/arch/arm/boot/compressed/head-sa1100.S
index 6179d94dd5c6..3115e313d9f6 100644
--- a/arch/arm/boot/compressed/head-sa1100.S
+++ b/arch/arm/boot/compressed/head-sa1100.S
@@ -11,6 +11,7 @@
11#include <asm/mach-types.h> 11#include <asm/mach-types.h>
12 12
13 .section ".start", "ax" 13 .section ".start", "ax"
14 .arch armv4
14 15
15__SA1100_start: 16__SA1100_start:
16 17
diff --git a/arch/arm/boot/compressed/head-shark.S b/arch/arm/boot/compressed/head-shark.S
index 089c560e07f1..92b56897ed64 100644
--- a/arch/arm/boot/compressed/head-shark.S
+++ b/arch/arm/boot/compressed/head-shark.S
@@ -18,6 +18,7 @@
18 18
19 .section ".start", "ax" 19 .section ".start", "ax"
20 20
21 .arch armv4
21 b __beginning 22 b __beginning
22 23
23__ofw_data: .long 0 @ the number of memory blocks 24__ofw_data: .long 0 @ the number of memory blocks
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index fe4d9c3ad761..032a8d987148 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -11,6 +11,7 @@
11#include <linux/linkage.h> 11#include <linux/linkage.h>
12#include <asm/assembler.h> 12#include <asm/assembler.h>
13 13
14 .arch armv7-a
14/* 15/*
15 * Debugging stuff 16 * Debugging stuff
16 * 17 *
@@ -805,8 +806,8 @@ call_cache_fn: adr r12, proc_types
805 .align 2 806 .align 2
806 .type proc_types,#object 807 .type proc_types,#object
807proc_types: 808proc_types:
808 .word 0x00000000 @ old ARM ID 809 .word 0x41000000 @ old ARM ID
809 .word 0x0000f000 810 .word 0xff00f000
810 mov pc, lr 811 mov pc, lr
811 THUMB( nop ) 812 THUMB( nop )
812 mov pc, lr 813 mov pc, lr
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
index 1460d9b88adf..8e1248f01fab 100644
--- a/arch/arm/boot/dts/am33xx.dtsi
+++ b/arch/arm/boot/dts/am33xx.dtsi
@@ -409,8 +409,8 @@
409 ti,hwmods = "gpmc"; 409 ti,hwmods = "gpmc";
410 reg = <0x50000000 0x2000>; 410 reg = <0x50000000 0x2000>;
411 interrupts = <100>; 411 interrupts = <100>;
412 num-cs = <7>; 412 gpmc,num-cs = <7>;
413 num-waitpins = <2>; 413 gpmc,num-waitpins = <2>;
414 #address-cells = <2>; 414 #address-cells = <2>;
415 #size-cells = <1>; 415 #size-cells = <1>;
416 status = "disabled"; 416 status = "disabled";
diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts
index 3ee63d128e27..76db557adbe7 100644
--- a/arch/arm/boot/dts/armada-xp-gp.dts
+++ b/arch/arm/boot/dts/armada-xp-gp.dts
@@ -39,8 +39,9 @@
39 }; 39 };
40 40
41 soc { 41 soc {
42 ranges = <0 0 0xd0000000 0x100000 42 ranges = <0 0 0xd0000000 0x100000 /* Internal registers 1MiB */
43 0xf0000000 0 0xf0000000 0x1000000>; 43 0xe0000000 0 0xe0000000 0x8100000 /* PCIe */
44 0xf0000000 0 0xf0000000 0x1000000 /* Device Bus, NOR 16MiB */>;
44 45
45 internal-regs { 46 internal-regs {
46 serial@12000 { 47 serial@12000 {
diff --git a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
index 46b785064dd8..fdea75c73411 100644
--- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
+++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
@@ -27,8 +27,9 @@
27 }; 27 };
28 28
29 soc { 29 soc {
30 ranges = <0 0 0xd0000000 0x100000 30 ranges = <0 0 0xd0000000 0x100000 /* Internal registers 1MiB */
31 0xf0000000 0 0xf0000000 0x8000000>; 31 0xe0000000 0 0xe0000000 0x8100000 /* PCIe */
32 0xf0000000 0 0xf0000000 0x8000000 /* Device Bus, NOR 128MiB */>;
32 33
33 internal-regs { 34 internal-regs {
34 serial@12000 { 35 serial@12000 {
diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi
index f0052dccf9a8..1e12aeff403b 100644
--- a/arch/arm/boot/dts/bcm2835.dtsi
+++ b/arch/arm/boot/dts/bcm2835.dtsi
@@ -44,6 +44,7 @@
44 reg = <0x7e201000 0x1000>; 44 reg = <0x7e201000 0x1000>;
45 interrupts = <2 25>; 45 interrupts = <2 25>;
46 clock-frequency = <3000000>; 46 clock-frequency = <3000000>;
47 arm,primecell-periphid = <0x00241011>;
47 }; 48 };
48 49
49 gpio: gpio { 50 gpio: gpio {
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 98dfc3ea5c0b..0673524238a6 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -497,6 +497,21 @@
497 clock-names = "usbhost"; 497 clock-names = "usbhost";
498 }; 498 };
499 499
500 usbphy@12130000 {
501 compatible = "samsung,exynos5250-usb2phy";
502 reg = <0x12130000 0x100>;
503 clocks = <&clock 1>, <&clock 285>;
504 clock-names = "ext_xtal", "usbhost";
505 #address-cells = <1>;
506 #size-cells = <1>;
507 ranges;
508
509 usbphy-sys {
510 reg = <0x10040704 0x8>,
511 <0x10050230 0x4>;
512 };
513 };
514
500 amba { 515 amba {
501 #address-cells = <1>; 516 #address-cells = <1>;
502 #size-cells = <1>; 517 #size-cells = <1>;
diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
index d2550e0bca24..701153992c69 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -141,8 +141,8 @@
141 #size-cells = <0>; 141 #size-cells = <0>;
142 compatible = "fsl,imx25-cspi", "fsl,imx35-cspi"; 142 compatible = "fsl,imx25-cspi", "fsl,imx35-cspi";
143 reg = <0x43fa4000 0x4000>; 143 reg = <0x43fa4000 0x4000>;
144 clocks = <&clks 62>; 144 clocks = <&clks 62>, <&clks 62>;
145 clock-names = "ipg"; 145 clock-names = "ipg", "per";
146 interrupts = <14>; 146 interrupts = <14>;
147 status = "disabled"; 147 status = "disabled";
148 }; 148 };
@@ -182,8 +182,8 @@
182 compatible = "fsl,imx25-cspi", "fsl,imx35-cspi"; 182 compatible = "fsl,imx25-cspi", "fsl,imx35-cspi";
183 reg = <0x50004000 0x4000>; 183 reg = <0x50004000 0x4000>;
184 interrupts = <0>; 184 interrupts = <0>;
185 clocks = <&clks 80>; 185 clocks = <&clks 80>, <&clks 80>;
186 clock-names = "ipg"; 186 clock-names = "ipg", "per";
187 status = "disabled"; 187 status = "disabled";
188 }; 188 };
189 189
@@ -210,8 +210,8 @@
210 #size-cells = <0>; 210 #size-cells = <0>;
211 compatible = "fsl,imx25-cspi", "fsl,imx35-cspi"; 211 compatible = "fsl,imx25-cspi", "fsl,imx35-cspi";
212 reg = <0x50010000 0x4000>; 212 reg = <0x50010000 0x4000>;
213 clocks = <&clks 79>; 213 clocks = <&clks 79>, <&clks 79>;
214 clock-names = "ipg"; 214 clock-names = "ipg", "per";
215 interrupts = <13>; 215 interrupts = <13>;
216 status = "disabled"; 216 status = "disabled";
217 }; 217 };
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
index ff4bd4873edf..75bd11386516 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -131,7 +131,7 @@
131 compatible = "fsl,imx27-cspi"; 131 compatible = "fsl,imx27-cspi";
132 reg = <0x1000e000 0x1000>; 132 reg = <0x1000e000 0x1000>;
133 interrupts = <16>; 133 interrupts = <16>;
134 clocks = <&clks 53>, <&clks 0>; 134 clocks = <&clks 53>, <&clks 53>;
135 clock-names = "ipg", "per"; 135 clock-names = "ipg", "per";
136 status = "disabled"; 136 status = "disabled";
137 }; 137 };
@@ -142,7 +142,7 @@
142 compatible = "fsl,imx27-cspi"; 142 compatible = "fsl,imx27-cspi";
143 reg = <0x1000f000 0x1000>; 143 reg = <0x1000f000 0x1000>;
144 interrupts = <15>; 144 interrupts = <15>;
145 clocks = <&clks 52>, <&clks 0>; 145 clocks = <&clks 52>, <&clks 52>;
146 clock-names = "ipg", "per"; 146 clock-names = "ipg", "per";
147 status = "disabled"; 147 status = "disabled";
148 }; 148 };
@@ -223,7 +223,7 @@
223 compatible = "fsl,imx27-cspi"; 223 compatible = "fsl,imx27-cspi";
224 reg = <0x10017000 0x1000>; 224 reg = <0x10017000 0x1000>;
225 interrupts = <6>; 225 interrupts = <6>;
226 clocks = <&clks 51>, <&clks 0>; 226 clocks = <&clks 51>, <&clks 51>;
227 clock-names = "ipg", "per"; 227 clock-names = "ipg", "per";
228 status = "disabled"; 228 status = "disabled";
229 }; 229 };
diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
index 21bb786c5b31..53fdde69bbf4 100644
--- a/arch/arm/boot/dts/imx51.dtsi
+++ b/arch/arm/boot/dts/imx51.dtsi
@@ -631,7 +631,7 @@
631 compatible = "fsl,imx51-cspi", "fsl,imx35-cspi"; 631 compatible = "fsl,imx51-cspi", "fsl,imx35-cspi";
632 reg = <0x83fc0000 0x4000>; 632 reg = <0x83fc0000 0x4000>;
633 interrupts = <38>; 633 interrupts = <38>;
634 clocks = <&clks 55>, <&clks 0>; 634 clocks = <&clks 55>, <&clks 55>;
635 clock-names = "ipg", "per"; 635 clock-names = "ipg", "per";
636 status = "disabled"; 636 status = "disabled";
637 }; 637 };
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 845982eaac22..eb83aa039b8b 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -714,7 +714,7 @@
714 compatible = "fsl,imx53-cspi", "fsl,imx35-cspi"; 714 compatible = "fsl,imx53-cspi", "fsl,imx35-cspi";
715 reg = <0x63fc0000 0x4000>; 715 reg = <0x63fc0000 0x4000>;
716 interrupts = <38>; 716 interrupts = <38>;
717 clocks = <&clks 55>, <&clks 0>; 717 clocks = <&clks 55>, <&clks 55>;
718 clock-names = "ipg", "per"; 718 clock-names = "ipg", "per";
719 status = "disabled"; 719 status = "disabled";
720 }; 720 };
diff --git a/arch/arm/boot/dts/omap4-panda-common.dtsi b/arch/arm/boot/dts/omap4-panda-common.dtsi
index 03bd60deb52b..eeb734e25709 100644
--- a/arch/arm/boot/dts/omap4-panda-common.dtsi
+++ b/arch/arm/boot/dts/omap4-panda-common.dtsi
@@ -56,9 +56,23 @@
56 }; 56 };
57}; 57};
58 58
59&omap4_pmx_wkup {
60 pinctrl-names = "default";
61 pinctrl-0 = <
62 &twl6030_wkup_pins
63 >;
64
65 twl6030_wkup_pins: pinmux_twl6030_wkup_pins {
66 pinctrl-single,pins = <
67 0x14 0x2 /* fref_clk0_out.sys_drm_msecure OUTPUT | MODE2 */
68 >;
69 };
70};
71
59&omap4_pmx_core { 72&omap4_pmx_core {
60 pinctrl-names = "default"; 73 pinctrl-names = "default";
61 pinctrl-0 = < 74 pinctrl-0 = <
75 &twl6030_pins
62 &twl6040_pins 76 &twl6040_pins
63 &mcpdm_pins 77 &mcpdm_pins
64 &mcbsp1_pins 78 &mcbsp1_pins
@@ -66,6 +80,12 @@
66 &tpd12s015_pins 80 &tpd12s015_pins
67 >; 81 >;
68 82
83 twl6030_pins: pinmux_twl6030_pins {
84 pinctrl-single,pins = <
85 0x15e 0x4118 /* sys_nirq1.sys_nirq1 OMAP_WAKEUP_EN | INPUT_PULLUP | MODE0 */
86 >;
87 };
88
69 twl6040_pins: pinmux_twl6040_pins { 89 twl6040_pins: pinmux_twl6040_pins {
70 pinctrl-single,pins = < 90 pinctrl-single,pins = <
71 0xe0 0x3 /* hdq_sio.gpio_127 OUTPUT | MODE3 */ 91 0xe0 0x3 /* hdq_sio.gpio_127 OUTPUT | MODE3 */
diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
index a35d9cd58063..98505a2ef162 100644
--- a/arch/arm/boot/dts/omap4-sdp.dts
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -142,9 +142,23 @@
142 }; 142 };
143}; 143};
144 144
145&omap4_pmx_wkup {
146 pinctrl-names = "default";
147 pinctrl-0 = <
148 &twl6030_wkup_pins
149 >;
150
151 twl6030_wkup_pins: pinmux_twl6030_wkup_pins {
152 pinctrl-single,pins = <
153 0x14 0x2 /* fref_clk0_out.sys_drm_msecure OUTPUT | MODE2 */
154 >;
155 };
156};
157
145&omap4_pmx_core { 158&omap4_pmx_core {
146 pinctrl-names = "default"; 159 pinctrl-names = "default";
147 pinctrl-0 = < 160 pinctrl-0 = <
161 &twl6030_pins
148 &twl6040_pins 162 &twl6040_pins
149 &mcpdm_pins 163 &mcpdm_pins
150 &dmic_pins 164 &dmic_pins
@@ -179,6 +193,12 @@
179 >; 193 >;
180 }; 194 };
181 195
196 twl6030_pins: pinmux_twl6030_pins {
197 pinctrl-single,pins = <
198 0x15e 0x4118 /* sys_nirq1.sys_nirq1 OMAP_WAKEUP_EN | INPUT_PULLUP | MODE0 */
199 >;
200 };
201
182 twl6040_pins: pinmux_twl6040_pins { 202 twl6040_pins: pinmux_twl6040_pins {
183 pinctrl-single,pins = < 203 pinctrl-single,pins = <
184 0xe0 0x3 /* hdq_sio.gpio_127 OUTPUT | MODE3 */ 204 0xe0 0x3 /* hdq_sio.gpio_127 OUTPUT | MODE3 */
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 3dd7ff825828..635cae283011 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -538,6 +538,7 @@
538 interrupts = <0 41 0x4>; 538 interrupts = <0 41 0x4>;
539 ti,hwmods = "timer5"; 539 ti,hwmods = "timer5";
540 ti,timer-dsp; 540 ti,timer-dsp;
541 ti,timer-pwm;
541 }; 542 };
542 543
543 timer6: timer@4013a000 { 544 timer6: timer@4013a000 {
@@ -574,6 +575,7 @@
574 reg = <0x4803e000 0x80>; 575 reg = <0x4803e000 0x80>;
575 interrupts = <0 45 0x4>; 576 interrupts = <0 45 0x4>;
576 ti,hwmods = "timer9"; 577 ti,hwmods = "timer9";
578 ti,timer-pwm;
577 }; 579 };
578 580
579 timer10: timer@48086000 { 581 timer10: timer@48086000 {
@@ -581,6 +583,7 @@
581 reg = <0x48086000 0x80>; 583 reg = <0x48086000 0x80>;
582 interrupts = <0 46 0x4>; 584 interrupts = <0 46 0x4>;
583 ti,hwmods = "timer10"; 585 ti,hwmods = "timer10";
586 ti,timer-pwm;
584 }; 587 };
585 588
586 timer11: timer@48088000 { 589 timer11: timer@48088000 {
diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
index e40b435d204e..227abf9cc601 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -1,4 +1,4 @@
1CONFIG_EXPERIMENTAL=y 1CONFIG_SYSVIPC=y
2CONFIG_NO_HZ=y 2CONFIG_NO_HZ=y
3CONFIG_HIGH_RES_TIMERS=y 3CONFIG_HIGH_RES_TIMERS=y
4CONFIG_BLK_DEV_INITRD=y 4CONFIG_BLK_DEV_INITRD=y
@@ -7,17 +7,18 @@ CONFIG_MODULES=y
7CONFIG_MODULE_UNLOAD=y 7CONFIG_MODULE_UNLOAD=y
8# CONFIG_BLK_DEV_BSG is not set 8# CONFIG_BLK_DEV_BSG is not set
9CONFIG_PARTITION_ADVANCED=y 9CONFIG_PARTITION_ADVANCED=y
10CONFIG_EFI_PARTITION=y
11CONFIG_ARCH_EXYNOS=y 10CONFIG_ARCH_EXYNOS=y
12CONFIG_S3C_LOWLEVEL_UART_PORT=1 11CONFIG_S3C_LOWLEVEL_UART_PORT=3
13CONFIG_S3C24XX_PWM=y 12CONFIG_S3C24XX_PWM=y
14CONFIG_ARCH_EXYNOS5=y 13CONFIG_ARCH_EXYNOS5=y
15CONFIG_MACH_EXYNOS4_DT=y 14CONFIG_MACH_EXYNOS4_DT=y
16CONFIG_MACH_EXYNOS5_DT=y
17CONFIG_SMP=y 15CONFIG_SMP=y
18CONFIG_NR_CPUS=2 16CONFIG_NR_CPUS=2
19CONFIG_PREEMPT=y 17CONFIG_PREEMPT=y
20CONFIG_AEABI=y 18CONFIG_AEABI=y
19CONFIG_HIGHMEM=y
20CONFIG_ZBOOT_ROM_TEXT=0x0
21CONFIG_ZBOOT_ROM_BSS=0x0
21CONFIG_ARM_APPENDED_DTB=y 22CONFIG_ARM_APPENDED_DTB=y
22CONFIG_ARM_ATAG_DTB_COMPAT=y 23CONFIG_ARM_ATAG_DTB_COMPAT=y
23CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc mem=256M" 24CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc mem=256M"
@@ -30,35 +31,58 @@ CONFIG_NET_KEY=y
30CONFIG_INET=y 31CONFIG_INET=y
31CONFIG_RFKILL_REGULATOR=y 32CONFIG_RFKILL_REGULATOR=y
32CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 33CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
34CONFIG_DEVTMPFS=y
35CONFIG_DEVTMPFS_MOUNT=y
33CONFIG_PROC_DEVICETREE=y 36CONFIG_PROC_DEVICETREE=y
34CONFIG_BLK_DEV_LOOP=y 37CONFIG_BLK_DEV_LOOP=y
38CONFIG_BLK_DEV_CRYPTOLOOP=y
35CONFIG_BLK_DEV_RAM=y 39CONFIG_BLK_DEV_RAM=y
36CONFIG_BLK_DEV_RAM_SIZE=8192 40CONFIG_BLK_DEV_RAM_SIZE=8192
37CONFIG_SCSI=y 41CONFIG_SCSI=y
38CONFIG_BLK_DEV_SD=y 42CONFIG_BLK_DEV_SD=y
39CONFIG_CHR_DEV_SG=y 43CONFIG_CHR_DEV_SG=y
44CONFIG_MD=y
45CONFIG_BLK_DEV_DM=y
46CONFIG_DM_CRYPT=m
40CONFIG_NETDEVICES=y 47CONFIG_NETDEVICES=y
41CONFIG_SMSC911X=y 48CONFIG_SMSC911X=y
42CONFIG_USB_USBNET=y 49CONFIG_USB_USBNET=y
43CONFIG_USB_NET_SMSC75XX=y 50CONFIG_USB_NET_SMSC75XX=y
44CONFIG_USB_NET_SMSC95XX=y 51CONFIG_USB_NET_SMSC95XX=y
45CONFIG_INPUT_EVDEV=y 52CONFIG_INPUT_EVDEV=y
46# CONFIG_INPUT_KEYBOARD is not set 53CONFIG_KEYBOARD_CROS_EC=y
47# CONFIG_INPUT_MOUSE is not set 54# CONFIG_MOUSE_PS2 is not set
55CONFIG_MOUSE_CYAPA=y
48CONFIG_INPUT_TOUCHSCREEN=y 56CONFIG_INPUT_TOUCHSCREEN=y
49CONFIG_SERIAL_8250=y 57CONFIG_SERIAL_8250=y
50CONFIG_SERIAL_SAMSUNG=y 58CONFIG_SERIAL_SAMSUNG=y
51CONFIG_SERIAL_SAMSUNG_CONSOLE=y 59CONFIG_SERIAL_SAMSUNG_CONSOLE=y
52CONFIG_SERIAL_OF_PLATFORM=y 60CONFIG_SERIAL_OF_PLATFORM=y
53CONFIG_HW_RANDOM=y 61CONFIG_HW_RANDOM=y
62CONFIG_TCG_TPM=y
63CONFIG_TCG_TIS_I2C_INFINEON=y
54CONFIG_I2C=y 64CONFIG_I2C=y
65CONFIG_I2C_MUX=y
66CONFIG_I2C_ARB_GPIO_CHALLENGE=y
67CONFIG_I2C_S3C2410=y
68CONFIG_DEBUG_GPIO=y
55# CONFIG_HWMON is not set 69# CONFIG_HWMON is not set
70CONFIG_MFD_CROS_EC=y
71CONFIG_MFD_CROS_EC_I2C=y
72CONFIG_MFD_MAX77686=y
73CONFIG_MFD_MAX8997=y
74CONFIG_MFD_SEC_CORE=y
56CONFIG_MFD_TPS65090=y 75CONFIG_MFD_TPS65090=y
57CONFIG_REGULATOR=y 76CONFIG_REGULATOR=y
58CONFIG_REGULATOR_FIXED_VOLTAGE=y 77CONFIG_REGULATOR_FIXED_VOLTAGE=y
59CONFIG_REGULATOR_GPIO=y 78CONFIG_REGULATOR_GPIO=y
79CONFIG_REGULATOR_MAX8997=y
80CONFIG_REGULATOR_MAX77686=y
81CONFIG_REGULATOR_S5M8767=y
60CONFIG_REGULATOR_TPS65090=y 82CONFIG_REGULATOR_TPS65090=y
61CONFIG_FB=y 83CONFIG_FB=y
84CONFIG_FB_MODE_HELPERS=y
85CONFIG_FB_SIMPLE=y
62CONFIG_EXYNOS_VIDEO=y 86CONFIG_EXYNOS_VIDEO=y
63CONFIG_EXYNOS_MIPI_DSI=y 87CONFIG_EXYNOS_MIPI_DSI=y
64CONFIG_EXYNOS_DP=y 88CONFIG_EXYNOS_DP=y
@@ -67,6 +91,20 @@ CONFIG_FONTS=y
67CONFIG_FONT_7x14=y 91CONFIG_FONT_7x14=y
68CONFIG_LOGO=y 92CONFIG_LOGO=y
69CONFIG_USB=y 93CONFIG_USB=y
94CONFIG_USB_EHCI_HCD=y
95CONFIG_USB_EHCI_S5P=y
96CONFIG_USB_STORAGE=y
97CONFIG_USB_DWC3=y
98CONFIG_USB_PHY=y
99CONFIG_SAMSUNG_USB2PHY=y
100CONFIG_SAMSUNG_USB3PHY=y
101CONFIG_MMC=y
102CONFIG_MMC_SDHCI=y
103CONFIG_MMC_SDHCI_S3C=y
104CONFIG_MMC_DW=y
105CONFIG_MMC_DW_IDMAC=y
106CONFIG_MMC_DW_EXYNOS=y
107CONFIG_COMMON_CLK_MAX77686=y
70CONFIG_EXT2_FS=y 108CONFIG_EXT2_FS=y
71CONFIG_EXT3_FS=y 109CONFIG_EXT3_FS=y
72CONFIG_EXT4_FS=y 110CONFIG_EXT4_FS=y
@@ -79,6 +117,7 @@ CONFIG_ROMFS_FS=y
79CONFIG_NLS_CODEPAGE_437=y 117CONFIG_NLS_CODEPAGE_437=y
80CONFIG_NLS_ASCII=y 118CONFIG_NLS_ASCII=y
81CONFIG_NLS_ISO8859_1=y 119CONFIG_NLS_ISO8859_1=y
120CONFIG_PRINTK_TIME=y
82CONFIG_MAGIC_SYSRQ=y 121CONFIG_MAGIC_SYSRQ=y
83CONFIG_DEBUG_KERNEL=y 122CONFIG_DEBUG_KERNEL=y
84CONFIG_DETECT_HUNG_TASK=y 123CONFIG_DETECT_HUNG_TASK=y
@@ -87,6 +126,5 @@ CONFIG_DEBUG_SPINLOCK=y
87CONFIG_DEBUG_MUTEXES=y 126CONFIG_DEBUG_MUTEXES=y
88CONFIG_DEBUG_INFO=y 127CONFIG_DEBUG_INFO=y
89CONFIG_DEBUG_USER=y 128CONFIG_DEBUG_USER=y
90CONFIG_DEBUG_LL=y 129CONFIG_CRYPTO_SHA256=y
91CONFIG_EARLY_PRINTK=y
92CONFIG_CRC_CCITT=y 130CONFIG_CRC_CCITT=y
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index abbe31937c65..2ac0ffb12f03 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -210,6 +210,8 @@ CONFIG_USB_WDM=y
210CONFIG_USB_STORAGE=y 210CONFIG_USB_STORAGE=y
211CONFIG_USB_LIBUSUAL=y 211CONFIG_USB_LIBUSUAL=y
212CONFIG_USB_TEST=y 212CONFIG_USB_TEST=y
213CONFIG_USB_PHY=y
214CONFIG_NOP_USB_XCEIV=y
213CONFIG_USB_GADGET=y 215CONFIG_USB_GADGET=y
214CONFIG_USB_GADGET_DEBUG=y 216CONFIG_USB_GADGET_DEBUG=y
215CONFIG_USB_GADGET_DEBUG_FILES=y 217CONFIG_USB_GADGET_DEBUG_FILES=y
diff --git a/arch/arm/include/asm/percpu.h b/arch/arm/include/asm/percpu.h
index 968c0a14e0a3..209e6504922e 100644
--- a/arch/arm/include/asm/percpu.h
+++ b/arch/arm/include/asm/percpu.h
@@ -30,8 +30,15 @@ static inline void set_my_cpu_offset(unsigned long off)
30static inline unsigned long __my_cpu_offset(void) 30static inline unsigned long __my_cpu_offset(void)
31{ 31{
32 unsigned long off; 32 unsigned long off;
33 /* Read TPIDRPRW */ 33 register unsigned long *sp asm ("sp");
34 asm("mrc p15, 0, %0, c13, c0, 4" : "=r" (off) : : "memory"); 34
35 /*
36 * Read TPIDRPRW.
37 * We want to allow caching the value, so avoid using volatile and
38 * instead use a fake stack read to hazard against barrier().
39 */
40 asm("mrc p15, 0, %0, c13, c0, 4" : "=r" (off) : "Q" (*sp));
41
35 return off; 42 return off;
36} 43}
37#define __my_cpu_offset __my_cpu_offset() 44#define __my_cpu_offset __my_cpu_offset()
diff --git a/arch/arm/include/asm/tlb.h b/arch/arm/include/asm/tlb.h
index 99a19512ee26..bdf2b8458ec1 100644
--- a/arch/arm/include/asm/tlb.h
+++ b/arch/arm/include/asm/tlb.h
@@ -33,18 +33,6 @@
33#include <asm/pgalloc.h> 33#include <asm/pgalloc.h>
34#include <asm/tlbflush.h> 34#include <asm/tlbflush.h>
35 35
36/*
37 * We need to delay page freeing for SMP as other CPUs can access pages
38 * which have been removed but not yet had their TLB entries invalidated.
39 * Also, as ARMv7 speculative prefetch can drag new entries into the TLB,
40 * we need to apply this same delaying tactic to ensure correct operation.
41 */
42#if defined(CONFIG_SMP) || defined(CONFIG_CPU_32v7)
43#define tlb_fast_mode(tlb) 0
44#else
45#define tlb_fast_mode(tlb) 1
46#endif
47
48#define MMU_GATHER_BUNDLE 8 36#define MMU_GATHER_BUNDLE 8
49 37
50/* 38/*
@@ -112,12 +100,10 @@ static inline void __tlb_alloc_page(struct mmu_gather *tlb)
112static inline void tlb_flush_mmu(struct mmu_gather *tlb) 100static inline void tlb_flush_mmu(struct mmu_gather *tlb)
113{ 101{
114 tlb_flush(tlb); 102 tlb_flush(tlb);
115 if (!tlb_fast_mode(tlb)) { 103 free_pages_and_swap_cache(tlb->pages, tlb->nr);
116 free_pages_and_swap_cache(tlb->pages, tlb->nr); 104 tlb->nr = 0;
117 tlb->nr = 0; 105 if (tlb->pages == tlb->local)
118 if (tlb->pages == tlb->local) 106 __tlb_alloc_page(tlb);
119 __tlb_alloc_page(tlb);
120 }
121} 107}
122 108
123static inline void 109static inline void
@@ -178,11 +164,6 @@ tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vma)
178 164
179static inline int __tlb_remove_page(struct mmu_gather *tlb, struct page *page) 165static inline int __tlb_remove_page(struct mmu_gather *tlb, struct page *page)
180{ 166{
181 if (tlb_fast_mode(tlb)) {
182 free_page_and_swap_cache(page);
183 return 1; /* avoid calling tlb_flush_mmu */
184 }
185
186 tlb->pages[tlb->nr++] = page; 167 tlb->pages[tlb->nr++] = page;
187 VM_BUG_ON(tlb->nr > tlb->max); 168 VM_BUG_ON(tlb->nr > tlb->max);
188 return tlb->max - tlb->nr; 169 return tlb->max - tlb->nr;
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
index f10316b4ecdc..c5a59546a256 100644
--- a/arch/arm/kernel/topology.c
+++ b/arch/arm/kernel/topology.c
@@ -13,6 +13,7 @@
13 13
14#include <linux/cpu.h> 14#include <linux/cpu.h>
15#include <linux/cpumask.h> 15#include <linux/cpumask.h>
16#include <linux/export.h>
16#include <linux/init.h> 17#include <linux/init.h>
17#include <linux/percpu.h> 18#include <linux/percpu.h>
18#include <linux/node.h> 19#include <linux/node.h>
@@ -200,6 +201,7 @@ static inline void update_cpu_power(unsigned int cpuid, unsigned int mpidr) {}
200 * cpu topology table 201 * cpu topology table
201 */ 202 */
202struct cputopo_arm cpu_topology[NR_CPUS]; 203struct cputopo_arm cpu_topology[NR_CPUS];
204EXPORT_SYMBOL_GPL(cpu_topology);
203 205
204const struct cpumask *cpu_coregroup_mask(int cpu) 206const struct cpumask *cpu_coregroup_mask(int cpu)
205{ 207{
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index 37d216d814cd..ef1703b9587b 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -492,6 +492,11 @@ static void vcpu_pause(struct kvm_vcpu *vcpu)
492 wait_event_interruptible(*wq, !vcpu->arch.pause); 492 wait_event_interruptible(*wq, !vcpu->arch.pause);
493} 493}
494 494
495static int kvm_vcpu_initialized(struct kvm_vcpu *vcpu)
496{
497 return vcpu->arch.target >= 0;
498}
499
495/** 500/**
496 * kvm_arch_vcpu_ioctl_run - the main VCPU run function to execute guest code 501 * kvm_arch_vcpu_ioctl_run - the main VCPU run function to execute guest code
497 * @vcpu: The VCPU pointer 502 * @vcpu: The VCPU pointer
@@ -508,8 +513,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
508 int ret; 513 int ret;
509 sigset_t sigsaved; 514 sigset_t sigsaved;
510 515
511 /* Make sure they initialize the vcpu with KVM_ARM_VCPU_INIT */ 516 if (unlikely(!kvm_vcpu_initialized(vcpu)))
512 if (unlikely(vcpu->arch.target < 0))
513 return -ENOEXEC; 517 return -ENOEXEC;
514 518
515 ret = kvm_vcpu_first_run_init(vcpu); 519 ret = kvm_vcpu_first_run_init(vcpu);
@@ -710,6 +714,10 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
710 case KVM_SET_ONE_REG: 714 case KVM_SET_ONE_REG:
711 case KVM_GET_ONE_REG: { 715 case KVM_GET_ONE_REG: {
712 struct kvm_one_reg reg; 716 struct kvm_one_reg reg;
717
718 if (unlikely(!kvm_vcpu_initialized(vcpu)))
719 return -ENOEXEC;
720
713 if (copy_from_user(&reg, argp, sizeof(reg))) 721 if (copy_from_user(&reg, argp, sizeof(reg)))
714 return -EFAULT; 722 return -EFAULT;
715 if (ioctl == KVM_SET_ONE_REG) 723 if (ioctl == KVM_SET_ONE_REG)
@@ -722,6 +730,9 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
722 struct kvm_reg_list reg_list; 730 struct kvm_reg_list reg_list;
723 unsigned n; 731 unsigned n;
724 732
733 if (unlikely(!kvm_vcpu_initialized(vcpu)))
734 return -ENOEXEC;
735
725 if (copy_from_user(&reg_list, user_list, sizeof(reg_list))) 736 if (copy_from_user(&reg_list, user_list, sizeof(reg_list)))
726 return -EFAULT; 737 return -EFAULT;
727 n = reg_list.n; 738 n = reg_list.n;
diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
index 965706578f13..84ba67b982c0 100644
--- a/arch/arm/kvm/mmu.c
+++ b/arch/arm/kvm/mmu.c
@@ -43,7 +43,14 @@ static phys_addr_t hyp_idmap_vector;
43 43
44static void kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa) 44static void kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
45{ 45{
46 kvm_call_hyp(__kvm_tlb_flush_vmid_ipa, kvm, ipa); 46 /*
47 * This function also gets called when dealing with HYP page
48 * tables. As HYP doesn't have an associated struct kvm (and
49 * the HYP page tables are fairly static), we don't do
50 * anything there.
51 */
52 if (kvm)
53 kvm_call_hyp(__kvm_tlb_flush_vmid_ipa, kvm, ipa);
47} 54}
48 55
49static int mmu_topup_memory_cache(struct kvm_mmu_memory_cache *cache, 56static int mmu_topup_memory_cache(struct kvm_mmu_memory_cache *cache,
@@ -78,18 +85,20 @@ static void *mmu_memory_cache_alloc(struct kvm_mmu_memory_cache *mc)
78 return p; 85 return p;
79} 86}
80 87
81static void clear_pud_entry(pud_t *pud) 88static void clear_pud_entry(struct kvm *kvm, pud_t *pud, phys_addr_t addr)
82{ 89{
83 pmd_t *pmd_table = pmd_offset(pud, 0); 90 pmd_t *pmd_table = pmd_offset(pud, 0);
84 pud_clear(pud); 91 pud_clear(pud);
92 kvm_tlb_flush_vmid_ipa(kvm, addr);
85 pmd_free(NULL, pmd_table); 93 pmd_free(NULL, pmd_table);
86 put_page(virt_to_page(pud)); 94 put_page(virt_to_page(pud));
87} 95}
88 96
89static void clear_pmd_entry(pmd_t *pmd) 97static void clear_pmd_entry(struct kvm *kvm, pmd_t *pmd, phys_addr_t addr)
90{ 98{
91 pte_t *pte_table = pte_offset_kernel(pmd, 0); 99 pte_t *pte_table = pte_offset_kernel(pmd, 0);
92 pmd_clear(pmd); 100 pmd_clear(pmd);
101 kvm_tlb_flush_vmid_ipa(kvm, addr);
93 pte_free_kernel(NULL, pte_table); 102 pte_free_kernel(NULL, pte_table);
94 put_page(virt_to_page(pmd)); 103 put_page(virt_to_page(pmd));
95} 104}
@@ -100,11 +109,12 @@ static bool pmd_empty(pmd_t *pmd)
100 return page_count(pmd_page) == 1; 109 return page_count(pmd_page) == 1;
101} 110}
102 111
103static void clear_pte_entry(pte_t *pte) 112static void clear_pte_entry(struct kvm *kvm, pte_t *pte, phys_addr_t addr)
104{ 113{
105 if (pte_present(*pte)) { 114 if (pte_present(*pte)) {
106 kvm_set_pte(pte, __pte(0)); 115 kvm_set_pte(pte, __pte(0));
107 put_page(virt_to_page(pte)); 116 put_page(virt_to_page(pte));
117 kvm_tlb_flush_vmid_ipa(kvm, addr);
108 } 118 }
109} 119}
110 120
@@ -114,7 +124,8 @@ static bool pte_empty(pte_t *pte)
114 return page_count(pte_page) == 1; 124 return page_count(pte_page) == 1;
115} 125}
116 126
117static void unmap_range(pgd_t *pgdp, unsigned long long start, u64 size) 127static void unmap_range(struct kvm *kvm, pgd_t *pgdp,
128 unsigned long long start, u64 size)
118{ 129{
119 pgd_t *pgd; 130 pgd_t *pgd;
120 pud_t *pud; 131 pud_t *pud;
@@ -138,15 +149,15 @@ static void unmap_range(pgd_t *pgdp, unsigned long long start, u64 size)
138 } 149 }
139 150
140 pte = pte_offset_kernel(pmd, addr); 151 pte = pte_offset_kernel(pmd, addr);
141 clear_pte_entry(pte); 152 clear_pte_entry(kvm, pte, addr);
142 range = PAGE_SIZE; 153 range = PAGE_SIZE;
143 154
144 /* If we emptied the pte, walk back up the ladder */ 155 /* If we emptied the pte, walk back up the ladder */
145 if (pte_empty(pte)) { 156 if (pte_empty(pte)) {
146 clear_pmd_entry(pmd); 157 clear_pmd_entry(kvm, pmd, addr);
147 range = PMD_SIZE; 158 range = PMD_SIZE;
148 if (pmd_empty(pmd)) { 159 if (pmd_empty(pmd)) {
149 clear_pud_entry(pud); 160 clear_pud_entry(kvm, pud, addr);
150 range = PUD_SIZE; 161 range = PUD_SIZE;
151 } 162 }
152 } 163 }
@@ -165,14 +176,14 @@ void free_boot_hyp_pgd(void)
165 mutex_lock(&kvm_hyp_pgd_mutex); 176 mutex_lock(&kvm_hyp_pgd_mutex);
166 177
167 if (boot_hyp_pgd) { 178 if (boot_hyp_pgd) {
168 unmap_range(boot_hyp_pgd, hyp_idmap_start, PAGE_SIZE); 179 unmap_range(NULL, boot_hyp_pgd, hyp_idmap_start, PAGE_SIZE);
169 unmap_range(boot_hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE); 180 unmap_range(NULL, boot_hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
170 kfree(boot_hyp_pgd); 181 kfree(boot_hyp_pgd);
171 boot_hyp_pgd = NULL; 182 boot_hyp_pgd = NULL;
172 } 183 }
173 184
174 if (hyp_pgd) 185 if (hyp_pgd)
175 unmap_range(hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE); 186 unmap_range(NULL, hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
176 187
177 kfree(init_bounce_page); 188 kfree(init_bounce_page);
178 init_bounce_page = NULL; 189 init_bounce_page = NULL;
@@ -200,9 +211,10 @@ void free_hyp_pgds(void)
200 211
201 if (hyp_pgd) { 212 if (hyp_pgd) {
202 for (addr = PAGE_OFFSET; virt_addr_valid(addr); addr += PGDIR_SIZE) 213 for (addr = PAGE_OFFSET; virt_addr_valid(addr); addr += PGDIR_SIZE)
203 unmap_range(hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE); 214 unmap_range(NULL, hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE);
204 for (addr = VMALLOC_START; is_vmalloc_addr((void*)addr); addr += PGDIR_SIZE) 215 for (addr = VMALLOC_START; is_vmalloc_addr((void*)addr); addr += PGDIR_SIZE)
205 unmap_range(hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE); 216 unmap_range(NULL, hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE);
217
206 kfree(hyp_pgd); 218 kfree(hyp_pgd);
207 hyp_pgd = NULL; 219 hyp_pgd = NULL;
208 } 220 }
@@ -393,7 +405,7 @@ int kvm_alloc_stage2_pgd(struct kvm *kvm)
393 */ 405 */
394static void unmap_stage2_range(struct kvm *kvm, phys_addr_t start, u64 size) 406static void unmap_stage2_range(struct kvm *kvm, phys_addr_t start, u64 size)
395{ 407{
396 unmap_range(kvm->arch.pgd, start, size); 408 unmap_range(kvm, kvm->arch.pgd, start, size);
397} 409}
398 410
399/** 411/**
@@ -675,7 +687,6 @@ static void handle_hva_to_gpa(struct kvm *kvm,
675static void kvm_unmap_hva_handler(struct kvm *kvm, gpa_t gpa, void *data) 687static void kvm_unmap_hva_handler(struct kvm *kvm, gpa_t gpa, void *data)
676{ 688{
677 unmap_stage2_range(kvm, gpa, PAGE_SIZE); 689 unmap_stage2_range(kvm, gpa, PAGE_SIZE);
678 kvm_tlb_flush_vmid_ipa(kvm, gpa);
679} 690}
680 691
681int kvm_unmap_hva(struct kvm *kvm, unsigned long hva) 692int kvm_unmap_hva(struct kvm *kvm, unsigned long hva)
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index d19edff0ea6e..ff18fc2ea46f 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -250,6 +250,7 @@ config MACH_ARMLEX4210
250config MACH_UNIVERSAL_C210 250config MACH_UNIVERSAL_C210
251 bool "Mobile UNIVERSAL_C210 Board" 251 bool "Mobile UNIVERSAL_C210 Board"
252 select CLKSRC_MMIO 252 select CLKSRC_MMIO
253 select CLKSRC_SAMSUNG_PWM
253 select CPU_EXYNOS4210 254 select CPU_EXYNOS4210
254 select EXYNOS4_SETUP_FIMC 255 select EXYNOS4_SETUP_FIMC
255 select EXYNOS4_SETUP_FIMD0 256 select EXYNOS4_SETUP_FIMD0
@@ -281,7 +282,6 @@ config MACH_UNIVERSAL_C210
281 select S5P_DEV_TV 282 select S5P_DEV_TV
282 select S5P_GPIO_INT 283 select S5P_GPIO_INT
283 select S5P_SETUP_MIPIPHY 284 select S5P_SETUP_MIPIPHY
284 select SAMSUNG_HRT
285 help 285 help
286 Machine support for Samsung Mobile Universal S5PC210 Reference 286 Machine support for Samsung Mobile Universal S5PC210 Reference
287 Board. 287 Board.
@@ -410,6 +410,7 @@ config MACH_EXYNOS4_DT
410 depends on ARCH_EXYNOS4 410 depends on ARCH_EXYNOS4
411 select ARM_AMBA 411 select ARM_AMBA
412 select CLKSRC_OF 412 select CLKSRC_OF
413 select CLKSRC_SAMSUNG_PWM if CPU_EXYNOS4210
413 select CPU_EXYNOS4210 414 select CPU_EXYNOS4210
414 select KEYBOARD_SAMSUNG if INPUT_KEYBOARD 415 select KEYBOARD_SAMSUNG if INPUT_KEYBOARD
415 select PINCTRL 416 select PINCTRL
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index 745e304ad0de..f7e504b7874d 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -10,12 +10,14 @@
10 */ 10 */
11 11
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/bitops.h>
13#include <linux/interrupt.h> 14#include <linux/interrupt.h>
14#include <linux/irq.h> 15#include <linux/irq.h>
15#include <linux/irqchip.h> 16#include <linux/irqchip.h>
16#include <linux/io.h> 17#include <linux/io.h>
17#include <linux/device.h> 18#include <linux/device.h>
18#include <linux/gpio.h> 19#include <linux/gpio.h>
20#include <clocksource/samsung_pwm.h>
19#include <linux/sched.h> 21#include <linux/sched.h>
20#include <linux/serial_core.h> 22#include <linux/serial_core.h>
21#include <linux/of.h> 23#include <linux/of.h>
@@ -302,6 +304,13 @@ static struct map_desc exynos5440_iodesc0[] __initdata = {
302 }, 304 },
303}; 305};
304 306
307static struct samsung_pwm_variant exynos4_pwm_variant = {
308 .bits = 32,
309 .div_base = 0,
310 .has_tint_cstat = true,
311 .tclk_mask = 0,
312};
313
305void exynos4_restart(char mode, const char *cmd) 314void exynos4_restart(char mode, const char *cmd)
306{ 315{
307 __raw_writel(0x1, S5P_SWRESET); 316 __raw_writel(0x1, S5P_SWRESET);
@@ -317,9 +326,16 @@ void exynos5_restart(char mode, const char *cmd)
317 val = 0x1; 326 val = 0x1;
318 addr = EXYNOS_SWRESET; 327 addr = EXYNOS_SWRESET;
319 } else if (of_machine_is_compatible("samsung,exynos5440")) { 328 } else if (of_machine_is_compatible("samsung,exynos5440")) {
329 u32 status;
320 np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-clock"); 330 np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-clock");
331
332 addr = of_iomap(np, 0) + 0xbc;
333 status = __raw_readl(addr);
334
321 addr = of_iomap(np, 0) + 0xcc; 335 addr = of_iomap(np, 0) + 0xcc;
322 val = (0xfff << 20) | (0x1 << 16); 336 val = __raw_readl(addr);
337
338 val = (val & 0xffff0000) | (status & 0xffff);
323 } else { 339 } else {
324 pr_err("%s: cannot support non-DT\n", __func__); 340 pr_err("%s: cannot support non-DT\n", __func__);
325 return; 341 return;
@@ -370,6 +386,8 @@ int __init exynos_fdt_map_chipid(unsigned long node, const char *uname,
370 386
371void __init exynos_init_io(struct map_desc *mach_desc, int size) 387void __init exynos_init_io(struct map_desc *mach_desc, int size)
372{ 388{
389 debug_ll_io_init();
390
373#ifdef CONFIG_OF 391#ifdef CONFIG_OF
374 if (initial_boot_params) 392 if (initial_boot_params)
375 of_scan_flat_dt(exynos_fdt_map_chipid, NULL); 393 of_scan_flat_dt(exynos_fdt_map_chipid, NULL);
@@ -442,8 +460,20 @@ static void __init exynos5440_map_io(void)
442 iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0)); 460 iotable_init(exynos5440_iodesc0, ARRAY_SIZE(exynos5440_iodesc0));
443} 461}
444 462
463void __init exynos_set_timer_source(u8 channels)
464{
465 exynos4_pwm_variant.output_mask = BIT(SAMSUNG_PWM_NUM) - 1;
466 exynos4_pwm_variant.output_mask &= ~channels;
467}
468
445void __init exynos_init_time(void) 469void __init exynos_init_time(void)
446{ 470{
471 unsigned int timer_irqs[SAMSUNG_PWM_NUM] = {
472 EXYNOS4_IRQ_TIMER0_VIC, EXYNOS4_IRQ_TIMER1_VIC,
473 EXYNOS4_IRQ_TIMER2_VIC, EXYNOS4_IRQ_TIMER3_VIC,
474 EXYNOS4_IRQ_TIMER4_VIC,
475 };
476
447 if (of_have_populated_dt()) { 477 if (of_have_populated_dt()) {
448#ifdef CONFIG_OF 478#ifdef CONFIG_OF
449 of_clk_init(NULL); 479 of_clk_init(NULL);
@@ -455,7 +485,14 @@ void __init exynos_init_time(void)
455 exynos4_clk_init(NULL, !soc_is_exynos4210(), S5P_VA_CMU, readl(S5P_VA_CHIPID + 8) & 1); 485 exynos4_clk_init(NULL, !soc_is_exynos4210(), S5P_VA_CMU, readl(S5P_VA_CHIPID + 8) & 1);
456 exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f); 486 exynos4_clk_register_fixed_ext(xxti_f, xusbxti_f);
457#endif 487#endif
458 mct_init(S5P_VA_SYSTIMER, EXYNOS4_IRQ_MCT_G0, EXYNOS4_IRQ_MCT_L0, EXYNOS4_IRQ_MCT_L1); 488#ifdef CONFIG_CLKSRC_SAMSUNG_PWM
489 if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_0)
490 samsung_pwm_clocksource_init(S3C_VA_TIMER,
491 timer_irqs, &exynos4_pwm_variant);
492 else
493#endif
494 mct_init(S5P_VA_SYSTIMER, EXYNOS4_IRQ_MCT_G0,
495 EXYNOS4_IRQ_MCT_L0, EXYNOS4_IRQ_MCT_L1);
459 } 496 }
460} 497}
461 498
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 60dd35cc01a6..11fc1e29819b 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -32,6 +32,8 @@ void exynos4_clk_register_fixed_ext(unsigned long, unsigned long);
32 32
33void exynos_firmware_init(void); 33void exynos_firmware_init(void);
34 34
35void exynos_set_timer_source(u8 channels);
36
35#ifdef CONFIG_PM_GENERIC_DOMAINS 37#ifdef CONFIG_PM_GENERIC_DOMAINS
36int exynos_pm_late_initcall(void); 38int exynos_pm_late_initcall(void);
37#else 39#else
diff --git a/arch/arm/mach-exynos/include/mach/pm-core.h b/arch/arm/mach-exynos/include/mach/pm-core.h
index 7dbbfec13ea5..296090e7f423 100644
--- a/arch/arm/mach-exynos/include/mach/pm-core.h
+++ b/arch/arm/mach-exynos/include/mach/pm-core.h
@@ -18,8 +18,15 @@
18#ifndef __ASM_ARCH_PM_CORE_H 18#ifndef __ASM_ARCH_PM_CORE_H
19#define __ASM_ARCH_PM_CORE_H __FILE__ 19#define __ASM_ARCH_PM_CORE_H __FILE__
20 20
21#include <linux/of.h>
21#include <mach/regs-pmu.h> 22#include <mach/regs-pmu.h>
22 23
24#ifdef CONFIG_PINCTRL_EXYNOS
25extern u32 exynos_get_eint_wake_mask(void);
26#else
27static inline u32 exynos_get_eint_wake_mask(void) { return 0xffffffff; }
28#endif
29
23static inline void s3c_pm_debug_init_uart(void) 30static inline void s3c_pm_debug_init_uart(void)
24{ 31{
25 /* nothing here yet */ 32 /* nothing here yet */
@@ -27,7 +34,12 @@ static inline void s3c_pm_debug_init_uart(void)
27 34
28static inline void s3c_pm_arch_prepare_irqs(void) 35static inline void s3c_pm_arch_prepare_irqs(void)
29{ 36{
30 __raw_writel(s3c_irqwake_eintmask, S5P_EINT_WAKEUP_MASK); 37 u32 eintmask = s3c_irqwake_eintmask;
38
39 if (of_have_populated_dt())
40 eintmask = exynos_get_eint_wake_mask();
41
42 __raw_writel(eintmask, S5P_EINT_WAKEUP_MASK);
31 __raw_writel(s3c_irqwake_intmask & ~(1 << 31), S5P_WAKEUP_MASK); 43 __raw_writel(s3c_irqwake_intmask & ~(1 << 31), S5P_WAKEUP_MASK);
32} 44}
33 45
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index 327d50d4681d..74ddb2b55614 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -41,7 +41,6 @@
41#include <plat/mfc.h> 41#include <plat/mfc.h>
42#include <plat/sdhci.h> 42#include <plat/sdhci.h>
43#include <plat/fimc-core.h> 43#include <plat/fimc-core.h>
44#include <plat/samsung-time.h>
45#include <plat/camport.h> 44#include <plat/camport.h>
46 45
47#include <mach/map.h> 46#include <mach/map.h>
@@ -1094,7 +1093,7 @@ static void __init universal_map_io(void)
1094{ 1093{
1095 exynos_init_io(NULL, 0); 1094 exynos_init_io(NULL, 0);
1096 s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs)); 1095 s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs));
1097 samsung_set_timer_source(SAMSUNG_PWM2, SAMSUNG_PWM4); 1096 exynos_set_timer_source(BIT(2) | BIT(4));
1098 xxti_f = 0; 1097 xxti_f = 0;
1099 xusbxti_f = 24000000; 1098 xusbxti_f = 24000000;
1100} 1099}
@@ -1154,7 +1153,7 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
1154 .map_io = universal_map_io, 1153 .map_io = universal_map_io,
1155 .init_machine = universal_machine_init, 1154 .init_machine = universal_machine_init,
1156 .init_late = exynos_init_late, 1155 .init_late = exynos_init_late,
1157 .init_time = samsung_timer_init, 1156 .init_time = exynos_init_time,
1158 .reserve = &universal_reserve, 1157 .reserve = &universal_reserve,
1159 .restart = exynos4_restart, 1158 .restart = exynos4_restart,
1160MACHINE_END 1159MACHINE_END
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index dda9a2bd3acb..4e3148ce852d 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -181,14 +181,14 @@ static const char *periph_clk2_sels[] = { "pll3_usb_otg", "osc", "osc", "dummy",
181static const char *periph2_clk2_sels[] = { "pll3_usb_otg", "pll2_bus", }; 181static const char *periph2_clk2_sels[] = { "pll3_usb_otg", "pll2_bus", };
182static const char *periph_sels[] = { "periph_pre", "periph_clk2", }; 182static const char *periph_sels[] = { "periph_pre", "periph_clk2", };
183static const char *periph2_sels[] = { "periph2_pre", "periph2_clk2", }; 183static const char *periph2_sels[] = { "periph2_pre", "periph2_clk2", };
184static const char *axi_sels[] = { "periph", "pll2_pfd2_396m", "pll3_pfd1_540m", }; 184static const char *axi_sels[] = { "periph", "pll2_pfd2_396m", "periph", "pll3_pfd1_540m", };
185static const char *audio_sels[] = { "pll4_post_div", "pll3_pfd2_508m", "pll3_pfd3_454m", "pll3_usb_otg", }; 185static const char *audio_sels[] = { "pll4_post_div", "pll3_pfd2_508m", "pll3_pfd3_454m", "pll3_usb_otg", };
186static const char *gpu_axi_sels[] = { "axi", "ahb", }; 186static const char *gpu_axi_sels[] = { "axi", "ahb", };
187static const char *gpu2d_core_sels[] = { "axi", "pll3_usb_otg", "pll2_pfd0_352m", "pll2_pfd2_396m", }; 187static const char *gpu2d_core_sels[] = { "axi", "pll3_usb_otg", "pll2_pfd0_352m", "pll2_pfd2_396m", };
188static const char *gpu3d_core_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd2_396m", }; 188static const char *gpu3d_core_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd2_396m", };
189static const char *gpu3d_shader_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll3_pfd0_720m", }; 189static const char *gpu3d_shader_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll3_pfd0_720m", };
190static const char *ipu_sels[] = { "mmdc_ch0_axi", "pll2_pfd2_396m", "pll3_120m", "pll3_pfd1_540m", }; 190static const char *ipu_sels[] = { "mmdc_ch0_axi", "pll2_pfd2_396m", "pll3_120m", "pll3_pfd1_540m", };
191static const char *ldb_di_sels[] = { "pll5_video", "pll2_pfd0_352m", "pll2_pfd2_396m", "mmdc_ch1_axi", "pll3_usb_otg", }; 191static const char *ldb_di_sels[] = { "pll5_video_div", "pll2_pfd0_352m", "pll2_pfd2_396m", "mmdc_ch1_axi", "pll3_usb_otg", };
192static const char *ipu_di_pre_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll3_pfd1_540m", }; 192static const char *ipu_di_pre_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll3_pfd1_540m", };
193static const char *ipu1_di0_sels[] = { "ipu1_di0_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; 193static const char *ipu1_di0_sels[] = { "ipu1_di0_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", };
194static const char *ipu1_di1_sels[] = { "ipu1_di1_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; 194static const char *ipu1_di1_sels[] = { "ipu1_di1_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", };
diff --git a/arch/arm/mach-kirkwood/board-ts219.c b/arch/arm/mach-kirkwood/board-ts219.c
index 10fb3974de5a..860f44ab457d 100644
--- a/arch/arm/mach-kirkwood/board-ts219.c
+++ b/arch/arm/mach-kirkwood/board-ts219.c
@@ -38,13 +38,3 @@ void __init qnap_dt_ts219_init(void)
38 38
39 kirkwood_ge00_init(&qnap_ts219_ge00_data); 39 kirkwood_ge00_init(&qnap_ts219_ge00_data);
40} 40}
41
42/* FIXME: Will not work with DT. Maybe use MPP40_GPIO? */
43static int __init ts219_pci_init(void)
44{
45 if (machine_is_ts219())
46 kirkwood_pcie_init(KW_PCIE0);
47
48 return 0;
49}
50subsys_initcall(ts219_pci_init);
diff --git a/arch/arm/mach-kirkwood/mpp.c b/arch/arm/mach-kirkwood/mpp.c
index 827cde42414f..e96fd71abd76 100644
--- a/arch/arm/mach-kirkwood/mpp.c
+++ b/arch/arm/mach-kirkwood/mpp.c
@@ -22,9 +22,10 @@ static unsigned int __init kirkwood_variant(void)
22 22
23 kirkwood_pcie_id(&dev, &rev); 23 kirkwood_pcie_id(&dev, &rev);
24 24
25 if ((dev == MV88F6281_DEV_ID && rev >= MV88F6281_REV_A0) || 25 if (dev == MV88F6281_DEV_ID && rev >= MV88F6281_REV_A0)
26 (dev == MV88F6282_DEV_ID))
27 return MPP_F6281_MASK; 26 return MPP_F6281_MASK;
27 if (dev == MV88F6282_DEV_ID)
28 return MPP_F6282_MASK;
28 if (dev == MV88F6192_DEV_ID && rev >= MV88F6192_REV_A0) 29 if (dev == MV88F6192_DEV_ID && rev >= MV88F6192_REV_A0)
29 return MPP_F6192_MASK; 30 return MPP_F6192_MASK;
30 if (dev == MV88F6180_DEV_ID) 31 if (dev == MV88F6180_DEV_ID)
diff --git a/arch/arm/mach-mvebu/coherency_ll.S b/arch/arm/mach-mvebu/coherency_ll.S
index 53e8391192cd..5476669ba905 100644
--- a/arch/arm/mach-mvebu/coherency_ll.S
+++ b/arch/arm/mach-mvebu/coherency_ll.S
@@ -32,15 +32,21 @@ ENTRY(ll_set_cpu_coherent)
32 32
33 /* Add CPU to SMP group - Atomic */ 33 /* Add CPU to SMP group - Atomic */
34 add r3, r0, #ARMADA_XP_CFB_CTL_REG_OFFSET 34 add r3, r0, #ARMADA_XP_CFB_CTL_REG_OFFSET
35 ldr r2, [r3] 351:
36 ldrex r2, [r3]
36 orr r2, r2, r1 37 orr r2, r2, r1
37 str r2, [r3] 38 strex r0, r2, [r3]
39 cmp r0, #0
40 bne 1b
38 41
39 /* Enable coherency on CPU - Atomic */ 42 /* Enable coherency on CPU - Atomic */
40 add r3, r0, #ARMADA_XP_CFB_CFG_REG_OFFSET 43 add r3, r3, #ARMADA_XP_CFB_CFG_REG_OFFSET
41 ldr r2, [r3] 441:
45 ldrex r2, [r3]
42 orr r2, r2, r1 46 orr r2, r2, r1
43 str r2, [r3] 47 strex r0, r2, [r3]
48 cmp r0, #0
49 bne 1b
44 50
45 dsb 51 dsb
46 52
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 62a15e289c79..91449c5cb70f 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -234,16 +234,26 @@ static struct i2c_board_info nokia770_i2c_board_info_2[] __initdata = {
234 { 234 {
235 I2C_BOARD_INFO("retu-mfd", 0x01), 235 I2C_BOARD_INFO("retu-mfd", 0x01),
236 }, 236 },
237 {
238 I2C_BOARD_INFO("tahvo-mfd", 0x02),
239 },
237}; 240};
238 241
239static void __init nokia770_cbus_init(void) 242static void __init nokia770_cbus_init(void)
240{ 243{
241 const int retu_irq_gpio = 62; 244 const int retu_irq_gpio = 62;
245 const int tahvo_irq_gpio = 40;
242 246
243 if (gpio_request_one(retu_irq_gpio, GPIOF_IN, "Retu IRQ")) 247 if (gpio_request_one(retu_irq_gpio, GPIOF_IN, "Retu IRQ"))
244 return; 248 return;
249 if (gpio_request_one(tahvo_irq_gpio, GPIOF_IN, "Tahvo IRQ")) {
250 gpio_free(retu_irq_gpio);
251 return;
252 }
245 irq_set_irq_type(gpio_to_irq(retu_irq_gpio), IRQ_TYPE_EDGE_RISING); 253 irq_set_irq_type(gpio_to_irq(retu_irq_gpio), IRQ_TYPE_EDGE_RISING);
254 irq_set_irq_type(gpio_to_irq(tahvo_irq_gpio), IRQ_TYPE_EDGE_RISING);
246 nokia770_i2c_board_info_2[0].irq = gpio_to_irq(retu_irq_gpio); 255 nokia770_i2c_board_info_2[0].irq = gpio_to_irq(retu_irq_gpio);
256 nokia770_i2c_board_info_2[1].irq = gpio_to_irq(tahvo_irq_gpio);
247 i2c_register_board_info(2, nokia770_i2c_board_info_2, 257 i2c_register_board_info(2, nokia770_i2c_board_info_2,
248 ARRAY_SIZE(nokia770_i2c_board_info_2)); 258 ARRAY_SIZE(nokia770_i2c_board_info_2));
249 platform_device_register(&nokia770_cbus_device); 259 platform_device_register(&nokia770_cbus_device);
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index f76d0de7b406..8c026269baca 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -174,6 +174,7 @@ static struct panel_sharp_ls037v7dw01_data omap3_evm_lcd_data = {
174 .ud_gpio = OMAP3EVM_LCD_PANEL_UD, 174 .ud_gpio = OMAP3EVM_LCD_PANEL_UD,
175}; 175};
176 176
177#ifdef CONFIG_BROKEN
177static void __init omap3_evm_display_init(void) 178static void __init omap3_evm_display_init(void)
178{ 179{
179 int r; 180 int r;
@@ -193,6 +194,7 @@ static void __init omap3_evm_display_init(void)
193 else 194 else
194 gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1); 195 gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1);
195} 196}
197#endif
196 198
197static struct omap_dss_device omap3_evm_lcd_device = { 199static struct omap_dss_device omap3_evm_lcd_device = {
198 .name = "lcd", 200 .name = "lcd",
@@ -715,7 +717,9 @@ static void __init omap3_evm_init(void)
715 717
716 omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL); 718 omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL);
717 omap3evm_init_smsc911x(); 719 omap3evm_init_smsc911x();
720#ifdef CONFIG_BROKEN
718 omap3_evm_display_init(); 721 omap3_evm_display_init();
722#endif
719 omap3_evm_wl12xx_init(); 723 omap3_evm_wl12xx_init();
720 omap_twl4030_audio_init("omap3evm", NULL); 724 omap_twl4030_audio_init("omap3evm", NULL);
721} 725}
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 4ca6b680aa72..5748b5d06c23 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -68,6 +68,7 @@
68 68
69#define OVERO_SMSC911X_CS 5 69#define OVERO_SMSC911X_CS 5
70#define OVERO_SMSC911X_GPIO 176 70#define OVERO_SMSC911X_GPIO 176
71#define OVERO_SMSC911X_NRESET 64
71#define OVERO_SMSC911X2_CS 4 72#define OVERO_SMSC911X2_CS 4
72#define OVERO_SMSC911X2_GPIO 65 73#define OVERO_SMSC911X2_GPIO 65
73 74
@@ -122,7 +123,7 @@ static struct omap_smsc911x_platform_data smsc911x_cfg = {
122 .id = 0, 123 .id = 0,
123 .cs = OVERO_SMSC911X_CS, 124 .cs = OVERO_SMSC911X_CS,
124 .gpio_irq = OVERO_SMSC911X_GPIO, 125 .gpio_irq = OVERO_SMSC911X_GPIO,
125 .gpio_reset = -EINVAL, 126 .gpio_reset = OVERO_SMSC911X_NRESET,
126 .flags = SMSC911X_USE_32BIT, 127 .flags = SMSC911X_USE_32BIT,
127}; 128};
128 129
diff --git a/arch/arm/mach-omap2/clock36xx.c b/arch/arm/mach-omap2/clock36xx.c
index 8f3bf4e50908..bbd6a3f717e6 100644
--- a/arch/arm/mach-omap2/clock36xx.c
+++ b/arch/arm/mach-omap2/clock36xx.c
@@ -20,11 +20,12 @@
20 20
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/clk-provider.h>
23#include <linux/io.h> 24#include <linux/io.h>
24 25
25#include "clock.h" 26#include "clock.h"
26#include "clock36xx.h" 27#include "clock36xx.h"
27 28#define to_clk_divider(_hw) container_of(_hw, struct clk_divider, hw)
28 29
29/** 30/**
30 * omap36xx_pwrdn_clk_enable_with_hsdiv_restore - enable clocks suffering 31 * omap36xx_pwrdn_clk_enable_with_hsdiv_restore - enable clocks suffering
@@ -39,29 +40,28 @@
39 */ 40 */
40int omap36xx_pwrdn_clk_enable_with_hsdiv_restore(struct clk_hw *clk) 41int omap36xx_pwrdn_clk_enable_with_hsdiv_restore(struct clk_hw *clk)
41{ 42{
42 struct clk_hw_omap *parent; 43 struct clk_divider *parent;
43 struct clk_hw *parent_hw; 44 struct clk_hw *parent_hw;
44 u32 dummy_v, orig_v, clksel_shift; 45 u32 dummy_v, orig_v;
45 int ret; 46 int ret;
46 47
47 /* Clear PWRDN bit of HSDIVIDER */ 48 /* Clear PWRDN bit of HSDIVIDER */
48 ret = omap2_dflt_clk_enable(clk); 49 ret = omap2_dflt_clk_enable(clk);
49 50
50 parent_hw = __clk_get_hw(__clk_get_parent(clk->clk)); 51 parent_hw = __clk_get_hw(__clk_get_parent(clk->clk));
51 parent = to_clk_hw_omap(parent_hw); 52 parent = to_clk_divider(parent_hw);
52 53
53 /* Restore the dividers */ 54 /* Restore the dividers */
54 if (!ret) { 55 if (!ret) {
55 clksel_shift = __ffs(parent->clksel_mask); 56 orig_v = __raw_readl(parent->reg);
56 orig_v = __raw_readl(parent->clksel_reg);
57 dummy_v = orig_v; 57 dummy_v = orig_v;
58 58
59 /* Write any other value different from the Read value */ 59 /* Write any other value different from the Read value */
60 dummy_v ^= (1 << clksel_shift); 60 dummy_v ^= (1 << parent->shift);
61 __raw_writel(dummy_v, parent->clksel_reg); 61 __raw_writel(dummy_v, parent->reg);
62 62
63 /* Write the original divider */ 63 /* Write the original divider */
64 __raw_writel(orig_v, parent->clksel_reg); 64 __raw_writel(orig_v, parent->reg);
65 } 65 }
66 66
67 return ret; 67 return ret;
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index 075f7cc51026..69337af748cc 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -2007,6 +2007,13 @@ static struct omap_hwmod am33xx_uart1_hwmod = {
2007 }, 2007 },
2008}; 2008};
2009 2009
2010/* uart2 */
2011static struct omap_hwmod_dma_info uart2_edma_reqs[] = {
2012 { .name = "tx", .dma_req = 28, },
2013 { .name = "rx", .dma_req = 29, },
2014 { .dma_req = -1 }
2015};
2016
2010static struct omap_hwmod_irq_info am33xx_uart2_irqs[] = { 2017static struct omap_hwmod_irq_info am33xx_uart2_irqs[] = {
2011 { .irq = 73 + OMAP_INTC_START, }, 2018 { .irq = 73 + OMAP_INTC_START, },
2012 { .irq = -1 }, 2019 { .irq = -1 },
@@ -2018,7 +2025,7 @@ static struct omap_hwmod am33xx_uart2_hwmod = {
2018 .clkdm_name = "l4ls_clkdm", 2025 .clkdm_name = "l4ls_clkdm",
2019 .flags = HWMOD_SWSUP_SIDLE_ACT, 2026 .flags = HWMOD_SWSUP_SIDLE_ACT,
2020 .mpu_irqs = am33xx_uart2_irqs, 2027 .mpu_irqs = am33xx_uart2_irqs,
2021 .sdma_reqs = uart1_edma_reqs, 2028 .sdma_reqs = uart2_edma_reqs,
2022 .main_clk = "dpll_per_m2_div4_ck", 2029 .main_clk = "dpll_per_m2_div4_ck",
2023 .prcm = { 2030 .prcm = {
2024 .omap4 = { 2031 .omap4 = {
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index c01859398b54..5a2d8034c8de 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -546,8 +546,10 @@ static void __init prcm_setup_regs(void)
546 /* Clear any pending PRCM interrupts */ 546 /* Clear any pending PRCM interrupts */
547 omap2_prm_write_mod_reg(0, OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET); 547 omap2_prm_write_mod_reg(0, OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
548 548
549 if (omap3_has_iva()) 549 /*
550 omap3_iva_idle(); 550 * We need to idle iva2_pwrdm even on am3703 with no iva2.
551 */
552 omap3_iva_idle();
551 553
552 omap3_d2d_idle(); 554 omap3_d2d_idle();
553} 555}
diff --git a/arch/arm/mach-prima2/pm.c b/arch/arm/mach-prima2/pm.c
index 9936c180bf01..8f595c0cc8d9 100644
--- a/arch/arm/mach-prima2/pm.c
+++ b/arch/arm/mach-prima2/pm.c
@@ -101,8 +101,10 @@ static int __init sirfsoc_of_pwrc_init(void)
101 struct device_node *np; 101 struct device_node *np;
102 102
103 np = of_find_matching_node(NULL, pwrc_ids); 103 np = of_find_matching_node(NULL, pwrc_ids);
104 if (!np) 104 if (!np) {
105 panic("unable to find compatible pwrc node in dtb\n"); 105 pr_err("unable to find compatible sirf pwrc node in dtb\n");
106 return -ENOENT;
107 }
106 108
107 /* 109 /*
108 * pwrc behind rtciobrg is not located in memory space 110 * pwrc behind rtciobrg is not located in memory space
diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c
index 435019ca0a48..d5e0cbc934c0 100644
--- a/arch/arm/mach-prima2/rstc.c
+++ b/arch/arm/mach-prima2/rstc.c
@@ -28,8 +28,10 @@ static int __init sirfsoc_of_rstc_init(void)
28 struct device_node *np; 28 struct device_node *np;
29 29
30 np = of_find_matching_node(NULL, rstc_ids); 30 np = of_find_matching_node(NULL, rstc_ids);
31 if (!np) 31 if (!np) {
32 panic("unable to find compatible rstc node in dtb\n"); 32 pr_err("unable to find compatible sirf rstc node in dtb\n");
33 return -ENOENT;
34 }
33 35
34 sirfsoc_rstc_base = of_iomap(np, 0); 36 sirfsoc_rstc_base = of_iomap(np, 0);
35 if (!sirfsoc_rstc_base) 37 if (!sirfsoc_rstc_base)
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index b34441bf8929..0dc44c683427 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -374,6 +374,7 @@ static struct ab8500_regulator_reg_init ab8500_reg_init[] = {
374static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = { 374static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
375 /* supplies to the display/camera */ 375 /* supplies to the display/camera */
376 [AB8500_LDO_AUX1] = { 376 [AB8500_LDO_AUX1] = {
377 .supply_regulator = "ab8500-ext-supply3",
377 .constraints = { 378 .constraints = {
378 .name = "V-DISPLAY", 379 .name = "V-DISPLAY",
379 .min_uV = 2800000, 380 .min_uV = 2800000,
@@ -387,6 +388,7 @@ static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
387 }, 388 },
388 /* supplies to the on-board eMMC */ 389 /* supplies to the on-board eMMC */
389 [AB8500_LDO_AUX2] = { 390 [AB8500_LDO_AUX2] = {
391 .supply_regulator = "ab8500-ext-supply3",
390 .constraints = { 392 .constraints = {
391 .name = "V-eMMC1", 393 .name = "V-eMMC1",
392 .min_uV = 1100000, 394 .min_uV = 1100000,
@@ -402,6 +404,7 @@ static struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
402 }, 404 },
403 /* supply for VAUX3, supplies to SDcard slots */ 405 /* supply for VAUX3, supplies to SDcard slots */
404 [AB8500_LDO_AUX3] = { 406 [AB8500_LDO_AUX3] = {
407 .supply_regulator = "ab8500-ext-supply3",
405 .constraints = { 408 .constraints = {
406 .name = "V-MMC-SD", 409 .name = "V-MMC-SD",
407 .min_uV = 1100000, 410 .min_uV = 1100000,
diff --git a/arch/arm/mach-ux500/cpuidle.c b/arch/arm/mach-ux500/cpuidle.c
index 317a2be129fb..a45dd09daed9 100644
--- a/arch/arm/mach-ux500/cpuidle.c
+++ b/arch/arm/mach-ux500/cpuidle.c
@@ -21,6 +21,7 @@
21#include <asm/proc-fns.h> 21#include <asm/proc-fns.h>
22 22
23#include "db8500-regs.h" 23#include "db8500-regs.h"
24#include "id.h"
24 25
25static atomic_t master = ATOMIC_INIT(0); 26static atomic_t master = ATOMIC_INIT(0);
26static DEFINE_SPINLOCK(master_lock); 27static DEFINE_SPINLOCK(master_lock);
@@ -114,6 +115,9 @@ static struct cpuidle_driver ux500_idle_driver = {
114 115
115int __init ux500_idle_init(void) 116int __init ux500_idle_init(void)
116{ 117{
118 if (!(cpu_is_u8500_family() || cpu_is_ux540_family()))
119 return -ENODEV;
120
117 /* Configure wake up reasons */ 121 /* Configure wake up reasons */
118 prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) | 122 prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) |
119 PRCMU_WAKEUP(ABB)); 123 PRCMU_WAKEUP(ABB));
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 30c2fe243f76..0f9c3f431a5f 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -311,9 +311,9 @@ struct platform_device s5p_device_jpeg = {
311#ifdef CONFIG_S5P_DEV_FIMD0 311#ifdef CONFIG_S5P_DEV_FIMD0
312static struct resource s5p_fimd0_resource[] = { 312static struct resource s5p_fimd0_resource[] = {
313 [0] = DEFINE_RES_MEM(S5P_PA_FIMD0, SZ_32K), 313 [0] = DEFINE_RES_MEM(S5P_PA_FIMD0, SZ_32K),
314 [1] = DEFINE_RES_IRQ(IRQ_FIMD0_VSYNC), 314 [1] = DEFINE_RES_IRQ_NAMED(IRQ_FIMD0_VSYNC, "vsync"),
315 [2] = DEFINE_RES_IRQ(IRQ_FIMD0_FIFO), 315 [2] = DEFINE_RES_IRQ_NAMED(IRQ_FIMD0_FIFO, "fifo"),
316 [3] = DEFINE_RES_IRQ(IRQ_FIMD0_SYSTEM), 316 [3] = DEFINE_RES_IRQ_NAMED(IRQ_FIMD0_SYSTEM, "lcd_sys"),
317}; 317};
318 318
319struct platform_device s5p_device_fimd0 = { 319struct platform_device s5p_device_fimd0 = {
diff --git a/arch/arm/plat-samsung/include/plat/uncompress.h b/arch/arm/plat-samsung/include/plat/uncompress.h
index 438b24846e7f..02b66d723d1a 100644
--- a/arch/arm/plat-samsung/include/plat/uncompress.h
+++ b/arch/arm/plat-samsung/include/plat/uncompress.h
@@ -66,6 +66,9 @@ uart_rd(unsigned int reg)
66 66
67static void putc(int ch) 67static void putc(int ch)
68{ 68{
69 if (!config_enabled(CONFIG_DEBUG_LL))
70 return;
71
69 if (uart_rd(S3C2410_UFCON) & S3C2410_UFCON_FIFOMODE) { 72 if (uart_rd(S3C2410_UFCON) & S3C2410_UFCON_FIFOMODE) {
70 int level; 73 int level;
71 74
@@ -118,7 +121,12 @@ static void arch_decomp_error(const char *x)
118#ifdef CONFIG_S3C_BOOT_UART_FORCE_FIFO 121#ifdef CONFIG_S3C_BOOT_UART_FORCE_FIFO
119static inline void arch_enable_uart_fifo(void) 122static inline void arch_enable_uart_fifo(void)
120{ 123{
121 u32 fifocon = uart_rd(S3C2410_UFCON); 124 u32 fifocon;
125
126 if (!config_enabled(CONFIG_DEBUG_LL))
127 return;
128
129 fifocon = uart_rd(S3C2410_UFCON);
122 130
123 if (!(fifocon & S3C2410_UFCON_FIFOMODE)) { 131 if (!(fifocon & S3C2410_UFCON_FIFOMODE)) {
124 fifocon |= S3C2410_UFCON_RESETBOTH; 132 fifocon |= S3C2410_UFCON_RESETBOTH;
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
index 53210ec4e8ec..bd7124c87fea 100644
--- a/arch/arm/plat-samsung/pm.c
+++ b/arch/arm/plat-samsung/pm.c
@@ -16,6 +16,7 @@
16#include <linux/suspend.h> 16#include <linux/suspend.h>
17#include <linux/errno.h> 17#include <linux/errno.h>
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/of.h>
19#include <linux/serial_core.h> 20#include <linux/serial_core.h>
20#include <linux/io.h> 21#include <linux/io.h>
21 22
@@ -261,7 +262,8 @@ static int s3c_pm_enter(suspend_state_t state)
261 * require a full power-cycle) 262 * require a full power-cycle)
262 */ 263 */
263 264
264 if (!any_allowed(s3c_irqwake_intmask, s3c_irqwake_intallow) && 265 if (!of_have_populated_dt() &&
266 !any_allowed(s3c_irqwake_intmask, s3c_irqwake_intallow) &&
265 !any_allowed(s3c_irqwake_eintmask, s3c_irqwake_eintallow)) { 267 !any_allowed(s3c_irqwake_eintmask, s3c_irqwake_eintallow)) {
266 printk(KERN_ERR "%s: No wake-up sources!\n", __func__); 268 printk(KERN_ERR "%s: No wake-up sources!\n", __func__);
267 printk(KERN_ERR "%s: Aborting sleep\n", __func__); 269 printk(KERN_ERR "%s: Aborting sleep\n", __func__);
@@ -270,8 +272,11 @@ static int s3c_pm_enter(suspend_state_t state)
270 272
271 /* save all necessary core registers not covered by the drivers */ 273 /* save all necessary core registers not covered by the drivers */
272 274
273 samsung_pm_save_gpios(); 275 if (!of_have_populated_dt()) {
274 samsung_pm_saved_gpios(); 276 samsung_pm_save_gpios();
277 samsung_pm_saved_gpios();
278 }
279
275 s3c_pm_save_uarts(); 280 s3c_pm_save_uarts();
276 s3c_pm_save_core(); 281 s3c_pm_save_core();
277 282
@@ -310,8 +315,11 @@ static int s3c_pm_enter(suspend_state_t state)
310 315
311 s3c_pm_restore_core(); 316 s3c_pm_restore_core();
312 s3c_pm_restore_uarts(); 317 s3c_pm_restore_uarts();
313 samsung_pm_restore_gpios(); 318
314 s3c_pm_restored_gpios(); 319 if (!of_have_populated_dt()) {
320 samsung_pm_restore_gpios();
321 s3c_pm_restored_gpios();
322 }
315 323
316 s3c_pm_debug_init(); 324 s3c_pm_debug_init();
317 325