aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MAINTAINERS13
-rw-r--r--arch/arm/boot/dts/armada-375.dtsi2
-rw-r--r--arch/arm/boot/dts/armada-38x.dtsi2
-rw-r--r--arch/arm/boot/dts/armada-39x.dtsi2
-rw-r--r--arch/arm/boot/dts/dove-cubox.dts1
-rw-r--r--arch/arm/boot/dts/exynos5420-peach-pit.dts1
-rw-r--r--arch/arm/boot/dts/exynos5800-peach-pi.dts1
-rw-r--r--arch/arm/boot/dts/tegra124.dtsi8
-rw-r--r--arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts1
-rw-r--r--arch/arm/boot/dts/vexpress-v2p-ca9.dts11
-rw-r--r--arch/arm/mach-exynos/common.h2
-rw-r--r--arch/arm/mach-exynos/exynos.c27
-rw-r--r--arch/arm/mach-exynos/platsmp.c39
-rw-r--r--arch/arm/mach-exynos/pm_domains.c4
-rw-r--r--arch/arm/mach-exynos/suspend.c7
-rw-r--r--arch/arm/mach-gemini/common.h4
-rw-r--r--arch/arm/mach-gemini/reset.c4
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c68
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_43xx_data.c70
-rw-r--r--arch/arm/mach-omap2/prcm43xx.h3
-rw-r--r--arch/arm/mach-omap2/prminst44xx.c20
-rw-r--r--arch/arm/mach-omap2/timer.c13
-rw-r--r--arch/arm/mach-rockchip/pm.c26
-rw-r--r--arch/arm/mach-rockchip/pm.h4
-rw-r--r--arch/arm64/boot/dts/arm/juno-motherboard.dtsi31
25 files changed, 199 insertions, 165 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 64b49f549211..f8e0afb708b4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -974,7 +974,7 @@ S: Maintained
974ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE 974ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE
975M: Hans Ulli Kroll <ulli.kroll@googlemail.com> 975M: Hans Ulli Kroll <ulli.kroll@googlemail.com>
976L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 976L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
977T: git git://git.berlios.de/gemini-board 977T: git git://github.com/ulli-kroll/linux.git
978S: Maintained 978S: Maintained
979F: arch/arm/mach-gemini/ 979F: arch/arm/mach-gemini/
980 980
@@ -1193,7 +1193,7 @@ ARM/MAGICIAN MACHINE SUPPORT
1193M: Philipp Zabel <philipp.zabel@gmail.com> 1193M: Philipp Zabel <philipp.zabel@gmail.com>
1194S: Maintained 1194S: Maintained
1195 1195
1196ARM/Marvell Armada 370 and Armada XP SOC support 1196ARM/Marvell Kirkwood and Armada 370, 375, 38x, XP SOC support
1197M: Jason Cooper <jason@lakedaemon.net> 1197M: Jason Cooper <jason@lakedaemon.net>
1198M: Andrew Lunn <andrew@lunn.ch> 1198M: Andrew Lunn <andrew@lunn.ch>
1199M: Gregory Clement <gregory.clement@free-electrons.com> 1199M: Gregory Clement <gregory.clement@free-electrons.com>
@@ -1202,12 +1202,17 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
1202S: Maintained 1202S: Maintained
1203F: arch/arm/mach-mvebu/ 1203F: arch/arm/mach-mvebu/
1204F: drivers/rtc/rtc-armada38x.c 1204F: drivers/rtc/rtc-armada38x.c
1205F: arch/arm/boot/dts/armada*
1206F: arch/arm/boot/dts/kirkwood*
1207
1205 1208
1206ARM/Marvell Berlin SoC support 1209ARM/Marvell Berlin SoC support
1207M: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> 1210M: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
1208L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 1211L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
1209S: Maintained 1212S: Maintained
1210F: arch/arm/mach-berlin/ 1213F: arch/arm/mach-berlin/
1214F: arch/arm/boot/dts/berlin*
1215
1211 1216
1212ARM/Marvell Dove/MV78xx0/Orion SOC support 1217ARM/Marvell Dove/MV78xx0/Orion SOC support
1213M: Jason Cooper <jason@lakedaemon.net> 1218M: Jason Cooper <jason@lakedaemon.net>
@@ -1220,6 +1225,9 @@ F: arch/arm/mach-dove/
1220F: arch/arm/mach-mv78xx0/ 1225F: arch/arm/mach-mv78xx0/
1221F: arch/arm/mach-orion5x/ 1226F: arch/arm/mach-orion5x/
1222F: arch/arm/plat-orion/ 1227F: arch/arm/plat-orion/
1228F: arch/arm/boot/dts/dove*
1229F: arch/arm/boot/dts/orion5x*
1230
1223 1231
1224ARM/Orion SoC/Technologic Systems TS-78xx platform support 1232ARM/Orion SoC/Technologic Systems TS-78xx platform support
1225M: Alexander Clouter <alex@digriz.org.uk> 1233M: Alexander Clouter <alex@digriz.org.uk>
@@ -1371,6 +1379,7 @@ N: rockchip
1371 1379
1372ARM/SAMSUNG EXYNOS ARM ARCHITECTURES 1380ARM/SAMSUNG EXYNOS ARM ARCHITECTURES
1373M: Kukjin Kim <kgene@kernel.org> 1381M: Kukjin Kim <kgene@kernel.org>
1382M: Krzysztof Kozlowski <k.kozlowski@samsung.com>
1374L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 1383L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
1375L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers) 1384L: linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
1376S: Maintained 1385S: Maintained
diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
index c675257f2377..f076ff856d8b 100644
--- a/arch/arm/boot/dts/armada-375.dtsi
+++ b/arch/arm/boot/dts/armada-375.dtsi
@@ -69,7 +69,7 @@
69 mainpll: mainpll { 69 mainpll: mainpll {
70 compatible = "fixed-clock"; 70 compatible = "fixed-clock";
71 #clock-cells = <0>; 71 #clock-cells = <0>;
72 clock-frequency = <2000000000>; 72 clock-frequency = <1000000000>;
73 }; 73 };
74 /* 25 MHz reference crystal */ 74 /* 25 MHz reference crystal */
75 refclk: oscillator { 75 refclk: oscillator {
diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
index ed2dd8ba4080..218a2acd36e5 100644
--- a/arch/arm/boot/dts/armada-38x.dtsi
+++ b/arch/arm/boot/dts/armada-38x.dtsi
@@ -585,7 +585,7 @@
585 mainpll: mainpll { 585 mainpll: mainpll {
586 compatible = "fixed-clock"; 586 compatible = "fixed-clock";
587 #clock-cells = <0>; 587 #clock-cells = <0>;
588 clock-frequency = <2000000000>; 588 clock-frequency = <1000000000>;
589 }; 589 };
590 590
591 /* 25 MHz reference crystal */ 591 /* 25 MHz reference crystal */
diff --git a/arch/arm/boot/dts/armada-39x.dtsi b/arch/arm/boot/dts/armada-39x.dtsi
index 0e85fc15ceda..ecd1318109ba 100644
--- a/arch/arm/boot/dts/armada-39x.dtsi
+++ b/arch/arm/boot/dts/armada-39x.dtsi
@@ -502,7 +502,7 @@
502 mainpll: mainpll { 502 mainpll: mainpll {
503 compatible = "fixed-clock"; 503 compatible = "fixed-clock";
504 #clock-cells = <0>; 504 #clock-cells = <0>;
505 clock-frequency = <2000000000>; 505 clock-frequency = <1000000000>;
506 }; 506 };
507 }; 507 };
508}; 508};
diff --git a/arch/arm/boot/dts/dove-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts
index aae7efc09b0b..e6fa251e17b9 100644
--- a/arch/arm/boot/dts/dove-cubox.dts
+++ b/arch/arm/boot/dts/dove-cubox.dts
@@ -87,6 +87,7 @@
87 87
88 /* connect xtal input to 25MHz reference */ 88 /* connect xtal input to 25MHz reference */
89 clocks = <&ref25>; 89 clocks = <&ref25>;
90 clock-names = "xtal";
90 91
91 /* connect xtal input as source of pll0 and pll1 */ 92 /* connect xtal input as source of pll0 and pll1 */
92 silabs,pll-source = <0 0>, <1 0>; 93 silabs,pll-source = <0 0>, <1 0>;
diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index 0788d08fb43e..146e71118a72 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -711,6 +711,7 @@
711 num-slots = <1>; 711 num-slots = <1>;
712 broken-cd; 712 broken-cd;
713 cap-sdio-irq; 713 cap-sdio-irq;
714 keep-power-in-suspend;
714 card-detect-delay = <200>; 715 card-detect-delay = <200>;
715 clock-frequency = <400000000>; 716 clock-frequency = <400000000>;
716 samsung,dw-mshc-ciu-div = <1>; 717 samsung,dw-mshc-ciu-div = <1>;
diff --git a/arch/arm/boot/dts/exynos5800-peach-pi.dts b/arch/arm/boot/dts/exynos5800-peach-pi.dts
index 412f41d62686..02eb8b15374f 100644
--- a/arch/arm/boot/dts/exynos5800-peach-pi.dts
+++ b/arch/arm/boot/dts/exynos5800-peach-pi.dts
@@ -674,6 +674,7 @@
674 num-slots = <1>; 674 num-slots = <1>;
675 broken-cd; 675 broken-cd;
676 cap-sdio-irq; 676 cap-sdio-irq;
677 keep-power-in-suspend;
677 card-detect-delay = <200>; 678 card-detect-delay = <200>;
678 clock-frequency = <400000000>; 679 clock-frequency = <400000000>;
679 samsung,dw-mshc-ciu-div = <1>; 680 samsung,dw-mshc-ciu-div = <1>;
diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi
index cf01c818b8ea..13cc7ca5e031 100644
--- a/arch/arm/boot/dts/tegra124.dtsi
+++ b/arch/arm/boot/dts/tegra124.dtsi
@@ -826,7 +826,7 @@
826 <&tegra_car TEGRA124_CLK_PLL_U>, 826 <&tegra_car TEGRA124_CLK_PLL_U>,
827 <&tegra_car TEGRA124_CLK_USBD>; 827 <&tegra_car TEGRA124_CLK_USBD>;
828 clock-names = "reg", "pll_u", "utmi-pads"; 828 clock-names = "reg", "pll_u", "utmi-pads";
829 resets = <&tegra_car 59>, <&tegra_car 22>; 829 resets = <&tegra_car 22>, <&tegra_car 22>;
830 reset-names = "usb", "utmi-pads"; 830 reset-names = "usb", "utmi-pads";
831 nvidia,hssync-start-delay = <0>; 831 nvidia,hssync-start-delay = <0>;
832 nvidia,idle-wait-delay = <17>; 832 nvidia,idle-wait-delay = <17>;
@@ -838,6 +838,7 @@
838 nvidia,hssquelch-level = <2>; 838 nvidia,hssquelch-level = <2>;
839 nvidia,hsdiscon-level = <5>; 839 nvidia,hsdiscon-level = <5>;
840 nvidia,xcvr-hsslew = <12>; 840 nvidia,xcvr-hsslew = <12>;
841 nvidia,has-utmi-pad-registers;
841 status = "disabled"; 842 status = "disabled";
842 }; 843 };
843 844
@@ -862,7 +863,7 @@
862 <&tegra_car TEGRA124_CLK_PLL_U>, 863 <&tegra_car TEGRA124_CLK_PLL_U>,
863 <&tegra_car TEGRA124_CLK_USBD>; 864 <&tegra_car TEGRA124_CLK_USBD>;
864 clock-names = "reg", "pll_u", "utmi-pads"; 865 clock-names = "reg", "pll_u", "utmi-pads";
865 resets = <&tegra_car 22>, <&tegra_car 22>; 866 resets = <&tegra_car 58>, <&tegra_car 22>;
866 reset-names = "usb", "utmi-pads"; 867 reset-names = "usb", "utmi-pads";
867 nvidia,hssync-start-delay = <0>; 868 nvidia,hssync-start-delay = <0>;
868 nvidia,idle-wait-delay = <17>; 869 nvidia,idle-wait-delay = <17>;
@@ -874,7 +875,6 @@
874 nvidia,hssquelch-level = <2>; 875 nvidia,hssquelch-level = <2>;
875 nvidia,hsdiscon-level = <5>; 876 nvidia,hsdiscon-level = <5>;
876 nvidia,xcvr-hsslew = <12>; 877 nvidia,xcvr-hsslew = <12>;
877 nvidia,has-utmi-pad-registers;
878 status = "disabled"; 878 status = "disabled";
879 }; 879 };
880 880
@@ -899,7 +899,7 @@
899 <&tegra_car TEGRA124_CLK_PLL_U>, 899 <&tegra_car TEGRA124_CLK_PLL_U>,
900 <&tegra_car TEGRA124_CLK_USBD>; 900 <&tegra_car TEGRA124_CLK_USBD>;
901 clock-names = "reg", "pll_u", "utmi-pads"; 901 clock-names = "reg", "pll_u", "utmi-pads";
902 resets = <&tegra_car 58>, <&tegra_car 22>; 902 resets = <&tegra_car 59>, <&tegra_car 22>;
903 reset-names = "usb", "utmi-pads"; 903 reset-names = "usb", "utmi-pads";
904 nvidia,hssync-start-delay = <0>; 904 nvidia,hssync-start-delay = <0>;
905 nvidia,idle-wait-delay = <17>; 905 nvidia,idle-wait-delay = <17>;
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
index 7a2aeacd62c0..107395c32d82 100644
--- a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
+++ b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
@@ -191,6 +191,7 @@
191 compatible = "arm,cortex-a15-pmu"; 191 compatible = "arm,cortex-a15-pmu";
192 interrupts = <0 68 4>, 192 interrupts = <0 68 4>,
193 <0 69 4>; 193 <0 69 4>;
194 interrupt-affinity = <&cpu0>, <&cpu1>;
194 }; 195 };
195 196
196 oscclk6a: oscclk6a { 197 oscclk6a: oscclk6a {
diff --git a/arch/arm/boot/dts/vexpress-v2p-ca9.dts b/arch/arm/boot/dts/vexpress-v2p-ca9.dts
index 23662b5a5e9d..d949facba376 100644
--- a/arch/arm/boot/dts/vexpress-v2p-ca9.dts
+++ b/arch/arm/boot/dts/vexpress-v2p-ca9.dts
@@ -33,28 +33,28 @@
33 #address-cells = <1>; 33 #address-cells = <1>;
34 #size-cells = <0>; 34 #size-cells = <0>;
35 35
36 cpu@0 { 36 A9_0: cpu@0 {
37 device_type = "cpu"; 37 device_type = "cpu";
38 compatible = "arm,cortex-a9"; 38 compatible = "arm,cortex-a9";
39 reg = <0>; 39 reg = <0>;
40 next-level-cache = <&L2>; 40 next-level-cache = <&L2>;
41 }; 41 };
42 42
43 cpu@1 { 43 A9_1: cpu@1 {
44 device_type = "cpu"; 44 device_type = "cpu";
45 compatible = "arm,cortex-a9"; 45 compatible = "arm,cortex-a9";
46 reg = <1>; 46 reg = <1>;
47 next-level-cache = <&L2>; 47 next-level-cache = <&L2>;
48 }; 48 };
49 49
50 cpu@2 { 50 A9_2: cpu@2 {
51 device_type = "cpu"; 51 device_type = "cpu";
52 compatible = "arm,cortex-a9"; 52 compatible = "arm,cortex-a9";
53 reg = <2>; 53 reg = <2>;
54 next-level-cache = <&L2>; 54 next-level-cache = <&L2>;
55 }; 55 };
56 56
57 cpu@3 { 57 A9_3: cpu@3 {
58 device_type = "cpu"; 58 device_type = "cpu";
59 compatible = "arm,cortex-a9"; 59 compatible = "arm,cortex-a9";
60 reg = <3>; 60 reg = <3>;
@@ -170,6 +170,7 @@
170 compatible = "arm,pl310-cache"; 170 compatible = "arm,pl310-cache";
171 reg = <0x1e00a000 0x1000>; 171 reg = <0x1e00a000 0x1000>;
172 interrupts = <0 43 4>; 172 interrupts = <0 43 4>;
173 cache-unified;
173 cache-level = <2>; 174 cache-level = <2>;
174 arm,data-latency = <1 1 1>; 175 arm,data-latency = <1 1 1>;
175 arm,tag-latency = <1 1 1>; 176 arm,tag-latency = <1 1 1>;
@@ -181,6 +182,8 @@
181 <0 61 4>, 182 <0 61 4>,
182 <0 62 4>, 183 <0 62 4>,
183 <0 63 4>; 184 <0 63 4>;
185 interrupt-affinity = <&A9_0>, <&A9_1>, <&A9_2>, <&A9_3>;
186
184 }; 187 };
185 188
186 dcc { 189 dcc {
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index acd5b560b728..5f5cd562c593 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -159,6 +159,8 @@ extern void exynos_enter_aftr(void);
159 159
160extern struct cpuidle_exynos_data cpuidle_coupled_exynos_data; 160extern struct cpuidle_exynos_data cpuidle_coupled_exynos_data;
161 161
162extern void exynos_set_delayed_reset_assertion(bool enable);
163
162extern void s5p_init_cpu(void __iomem *cpuid_addr); 164extern void s5p_init_cpu(void __iomem *cpuid_addr);
163extern unsigned int samsung_rev(void); 165extern unsigned int samsung_rev(void);
164extern void __iomem *cpu_boot_reg_base(void); 166extern void __iomem *cpu_boot_reg_base(void);
diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c
index bcde0dd668df..5917a30eee33 100644
--- a/arch/arm/mach-exynos/exynos.c
+++ b/arch/arm/mach-exynos/exynos.c
@@ -167,6 +167,33 @@ static void __init exynos_init_io(void)
167} 167}
168 168
169/* 169/*
170 * Set or clear the USE_DELAYED_RESET_ASSERTION option. Used by smp code
171 * and suspend.
172 *
173 * This is necessary only on Exynos4 SoCs. When system is running
174 * USE_DELAYED_RESET_ASSERTION should be set so the ARM CLK clock down
175 * feature could properly detect global idle state when secondary CPU is
176 * powered down.
177 *
178 * However this should not be set when such system is going into suspend.
179 */
180void exynos_set_delayed_reset_assertion(bool enable)
181{
182 if (of_machine_is_compatible("samsung,exynos4")) {
183 unsigned int tmp, core_id;
184
185 for (core_id = 0; core_id < num_possible_cpus(); core_id++) {
186 tmp = pmu_raw_readl(EXYNOS_ARM_CORE_OPTION(core_id));
187 if (enable)
188 tmp |= S5P_USE_DELAYED_RESET_ASSERTION;
189 else
190 tmp &= ~(S5P_USE_DELAYED_RESET_ASSERTION);
191 pmu_raw_writel(tmp, EXYNOS_ARM_CORE_OPTION(core_id));
192 }
193 }
194}
195
196/*
170 * Apparently, these SoCs are not able to wake-up from suspend using 197 * Apparently, these SoCs are not able to wake-up from suspend using
171 * the PMU. Too bad. Should they suddenly become capable of such a 198 * the PMU. Too bad. Should they suddenly become capable of such a
172 * feat, the matches below should be moved to suspend.c. 199 * feat, the matches below should be moved to suspend.c.
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index ebd135bb0995..a825bca2a2b6 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -34,30 +34,6 @@
34 34
35extern void exynos4_secondary_startup(void); 35extern void exynos4_secondary_startup(void);
36 36
37/*
38 * Set or clear the USE_DELAYED_RESET_ASSERTION option, set on Exynos4 SoCs
39 * during hot-(un)plugging CPUx.
40 *
41 * The feature can be cleared safely during first boot of secondary CPU.
42 *
43 * Exynos4 SoCs require setting USE_DELAYED_RESET_ASSERTION during powering
44 * down a CPU so the CPU idle clock down feature could properly detect global
45 * idle state when CPUx is off.
46 */
47static void exynos_set_delayed_reset_assertion(u32 core_id, bool enable)
48{
49 if (soc_is_exynos4()) {
50 unsigned int tmp;
51
52 tmp = pmu_raw_readl(EXYNOS_ARM_CORE_OPTION(core_id));
53 if (enable)
54 tmp |= S5P_USE_DELAYED_RESET_ASSERTION;
55 else
56 tmp &= ~(S5P_USE_DELAYED_RESET_ASSERTION);
57 pmu_raw_writel(tmp, EXYNOS_ARM_CORE_OPTION(core_id));
58 }
59}
60
61#ifdef CONFIG_HOTPLUG_CPU 37#ifdef CONFIG_HOTPLUG_CPU
62static inline void cpu_leave_lowpower(u32 core_id) 38static inline void cpu_leave_lowpower(u32 core_id)
63{ 39{
@@ -73,8 +49,6 @@ static inline void cpu_leave_lowpower(u32 core_id)
73 : "=&r" (v) 49 : "=&r" (v)
74 : "Ir" (CR_C), "Ir" (0x40) 50 : "Ir" (CR_C), "Ir" (0x40)
75 : "cc"); 51 : "cc");
76
77 exynos_set_delayed_reset_assertion(core_id, false);
78} 52}
79 53
80static inline void platform_do_lowpower(unsigned int cpu, int *spurious) 54static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
@@ -87,14 +61,6 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
87 /* Turn the CPU off on next WFI instruction. */ 61 /* Turn the CPU off on next WFI instruction. */
88 exynos_cpu_power_down(core_id); 62 exynos_cpu_power_down(core_id);
89 63
90 /*
91 * Exynos4 SoCs require setting
92 * USE_DELAYED_RESET_ASSERTION so the CPU idle
93 * clock down feature could properly detect
94 * global idle state when CPUx is off.
95 */
96 exynos_set_delayed_reset_assertion(core_id, true);
97
98 wfi(); 64 wfi();
99 65
100 if (pen_release == core_id) { 66 if (pen_release == core_id) {
@@ -371,9 +337,6 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
371 udelay(10); 337 udelay(10);
372 } 338 }
373 339
374 /* No harm if this is called during first boot of secondary CPU */
375 exynos_set_delayed_reset_assertion(core_id, false);
376
377 /* 340 /*
378 * now the secondary core is starting up let it run its 341 * now the secondary core is starting up let it run its
379 * calibrations, then wait for it to finish 342 * calibrations, then wait for it to finish
@@ -420,6 +383,8 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
420 383
421 exynos_sysram_init(); 384 exynos_sysram_init();
422 385
386 exynos_set_delayed_reset_assertion(true);
387
423 if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) 388 if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
424 scu_enable(scu_base_addr()); 389 scu_enable(scu_base_addr());
425 390
diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c
index cbe56b35aea0..a9686535f9ed 100644
--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -188,7 +188,7 @@ no_clk:
188 args.np = np; 188 args.np = np;
189 args.args_count = 0; 189 args.args_count = 0;
190 child_domain = of_genpd_get_from_provider(&args); 190 child_domain = of_genpd_get_from_provider(&args);
191 if (!child_domain) 191 if (IS_ERR(child_domain))
192 continue; 192 continue;
193 193
194 if (of_parse_phandle_with_args(np, "power-domains", 194 if (of_parse_phandle_with_args(np, "power-domains",
@@ -196,7 +196,7 @@ no_clk:
196 continue; 196 continue;
197 197
198 parent_domain = of_genpd_get_from_provider(&args); 198 parent_domain = of_genpd_get_from_provider(&args);
199 if (!parent_domain) 199 if (IS_ERR(parent_domain))
200 continue; 200 continue;
201 201
202 if (pm_genpd_add_subdomain(parent_domain, child_domain)) 202 if (pm_genpd_add_subdomain(parent_domain, child_domain))
diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c
index 3e6aea7f83af..c0b6dccbf7bd 100644
--- a/arch/arm/mach-exynos/suspend.c
+++ b/arch/arm/mach-exynos/suspend.c
@@ -342,6 +342,8 @@ static void exynos_pm_enter_sleep_mode(void)
342 342
343static void exynos_pm_prepare(void) 343static void exynos_pm_prepare(void)
344{ 344{
345 exynos_set_delayed_reset_assertion(false);
346
345 /* Set wake-up mask registers */ 347 /* Set wake-up mask registers */
346 exynos_pm_set_wakeup_mask(); 348 exynos_pm_set_wakeup_mask();
347 349
@@ -482,6 +484,7 @@ early_wakeup:
482 484
483 /* Clear SLEEP mode set in INFORM1 */ 485 /* Clear SLEEP mode set in INFORM1 */
484 pmu_raw_writel(0x0, S5P_INFORM1); 486 pmu_raw_writel(0x0, S5P_INFORM1);
487 exynos_set_delayed_reset_assertion(true);
485} 488}
486 489
487static void exynos3250_pm_resume(void) 490static void exynos3250_pm_resume(void)
@@ -723,8 +726,10 @@ void __init exynos_pm_init(void)
723 return; 726 return;
724 } 727 }
725 728
726 if (WARN_ON(!of_find_property(np, "interrupt-controller", NULL))) 729 if (WARN_ON(!of_find_property(np, "interrupt-controller", NULL))) {
727 pr_warn("Outdated DT detected, suspend/resume will NOT work\n"); 730 pr_warn("Outdated DT detected, suspend/resume will NOT work\n");
731 return;
732 }
728 733
729 pm_data = (const struct exynos_pm_data *) match->data; 734 pm_data = (const struct exynos_pm_data *) match->data;
730 735
diff --git a/arch/arm/mach-gemini/common.h b/arch/arm/mach-gemini/common.h
index 38a45260a7c8..dd883698ff7e 100644
--- a/arch/arm/mach-gemini/common.h
+++ b/arch/arm/mach-gemini/common.h
@@ -12,6 +12,8 @@
12#ifndef __GEMINI_COMMON_H__ 12#ifndef __GEMINI_COMMON_H__
13#define __GEMINI_COMMON_H__ 13#define __GEMINI_COMMON_H__
14 14
15#include <linux/reboot.h>
16
15struct mtd_partition; 17struct mtd_partition;
16 18
17extern void gemini_map_io(void); 19extern void gemini_map_io(void);
@@ -26,6 +28,6 @@ extern int platform_register_pflash(unsigned int size,
26 struct mtd_partition *parts, 28 struct mtd_partition *parts,
27 unsigned int nr_parts); 29 unsigned int nr_parts);
28 30
29extern void gemini_restart(char mode, const char *cmd); 31extern void gemini_restart(enum reboot_mode mode, const char *cmd);
30 32
31#endif /* __GEMINI_COMMON_H__ */ 33#endif /* __GEMINI_COMMON_H__ */
diff --git a/arch/arm/mach-gemini/reset.c b/arch/arm/mach-gemini/reset.c
index b26659759e27..21a6d6d4f9c4 100644
--- a/arch/arm/mach-gemini/reset.c
+++ b/arch/arm/mach-gemini/reset.c
@@ -14,7 +14,9 @@
14#include <mach/hardware.h> 14#include <mach/hardware.h>
15#include <mach/global_reg.h> 15#include <mach/global_reg.h>
16 16
17void gemini_restart(char mode, const char *cmd) 17#include "common.h"
18
19void gemini_restart(enum reboot_mode mode, const char *cmd)
18{ 20{
19 __raw_writel(RESET_GLOBAL | RESET_CPU1, 21 __raw_writel(RESET_GLOBAL | RESET_CPU1,
20 IO_ADDRESS(GEMINI_GLOBAL_BASE) + GLOBAL_RESET); 22 IO_ADDRESS(GEMINI_GLOBAL_BASE) + GLOBAL_RESET);
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 355b08936871..752969ff9de0 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -171,6 +171,12 @@
171 */ 171 */
172#define LINKS_PER_OCP_IF 2 172#define LINKS_PER_OCP_IF 2
173 173
174/*
175 * Address offset (in bytes) between the reset control and the reset
176 * status registers: 4 bytes on OMAP4
177 */
178#define OMAP4_RST_CTRL_ST_OFFSET 4
179
174/** 180/**
175 * struct omap_hwmod_soc_ops - fn ptrs for some SoC-specific operations 181 * struct omap_hwmod_soc_ops - fn ptrs for some SoC-specific operations
176 * @enable_module: function to enable a module (via MODULEMODE) 182 * @enable_module: function to enable a module (via MODULEMODE)
@@ -3016,10 +3022,12 @@ static int _omap4_deassert_hardreset(struct omap_hwmod *oh,
3016 if (ohri->st_shift) 3022 if (ohri->st_shift)
3017 pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n", 3023 pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n",
3018 oh->name, ohri->name); 3024 oh->name, ohri->name);
3019 return omap_prm_deassert_hardreset(ohri->rst_shift, 0, 3025 return omap_prm_deassert_hardreset(ohri->rst_shift, ohri->rst_shift,
3020 oh->clkdm->pwrdm.ptr->prcm_partition, 3026 oh->clkdm->pwrdm.ptr->prcm_partition,
3021 oh->clkdm->pwrdm.ptr->prcm_offs, 3027 oh->clkdm->pwrdm.ptr->prcm_offs,
3022 oh->prcm.omap4.rstctrl_offs, 0); 3028 oh->prcm.omap4.rstctrl_offs,
3029 oh->prcm.omap4.rstctrl_offs +
3030 OMAP4_RST_CTRL_ST_OFFSET);
3023} 3031}
3024 3032
3025/** 3033/**
@@ -3048,27 +3056,6 @@ static int _omap4_is_hardreset_asserted(struct omap_hwmod *oh,
3048} 3056}
3049 3057
3050/** 3058/**
3051 * _am33xx_assert_hardreset - call AM33XX PRM hardreset fn with hwmod args
3052 * @oh: struct omap_hwmod * to assert hardreset
3053 * @ohri: hardreset line data
3054 *
3055 * Call am33xx_prminst_assert_hardreset() with parameters extracted
3056 * from the hwmod @oh and the hardreset line data @ohri. Only
3057 * intended for use as an soc_ops function pointer. Passes along the
3058 * return value from am33xx_prminst_assert_hardreset(). XXX This
3059 * function is scheduled for removal when the PRM code is moved into
3060 * drivers/.
3061 */
3062static int _am33xx_assert_hardreset(struct omap_hwmod *oh,
3063 struct omap_hwmod_rst_info *ohri)
3064
3065{
3066 return omap_prm_assert_hardreset(ohri->rst_shift, 0,
3067 oh->clkdm->pwrdm.ptr->prcm_offs,
3068 oh->prcm.omap4.rstctrl_offs);
3069}
3070
3071/**
3072 * _am33xx_deassert_hardreset - call AM33XX PRM hardreset fn with hwmod args 3059 * _am33xx_deassert_hardreset - call AM33XX PRM hardreset fn with hwmod args
3073 * @oh: struct omap_hwmod * to deassert hardreset 3060 * @oh: struct omap_hwmod * to deassert hardreset
3074 * @ohri: hardreset line data 3061 * @ohri: hardreset line data
@@ -3083,32 +3070,13 @@ static int _am33xx_assert_hardreset(struct omap_hwmod *oh,
3083static int _am33xx_deassert_hardreset(struct omap_hwmod *oh, 3070static int _am33xx_deassert_hardreset(struct omap_hwmod *oh,
3084 struct omap_hwmod_rst_info *ohri) 3071 struct omap_hwmod_rst_info *ohri)
3085{ 3072{
3086 return omap_prm_deassert_hardreset(ohri->rst_shift, ohri->st_shift, 0, 3073 return omap_prm_deassert_hardreset(ohri->rst_shift, ohri->st_shift,
3074 oh->clkdm->pwrdm.ptr->prcm_partition,
3087 oh->clkdm->pwrdm.ptr->prcm_offs, 3075 oh->clkdm->pwrdm.ptr->prcm_offs,
3088 oh->prcm.omap4.rstctrl_offs, 3076 oh->prcm.omap4.rstctrl_offs,
3089 oh->prcm.omap4.rstst_offs); 3077 oh->prcm.omap4.rstst_offs);
3090} 3078}
3091 3079
3092/**
3093 * _am33xx_is_hardreset_asserted - call AM33XX PRM hardreset fn with hwmod args
3094 * @oh: struct omap_hwmod * to test hardreset
3095 * @ohri: hardreset line data
3096 *
3097 * Call am33xx_prminst_is_hardreset_asserted() with parameters
3098 * extracted from the hwmod @oh and the hardreset line data @ohri.
3099 * Only intended for use as an soc_ops function pointer. Passes along
3100 * the return value from am33xx_prminst_is_hardreset_asserted(). XXX
3101 * This function is scheduled for removal when the PRM code is moved
3102 * into drivers/.
3103 */
3104static int _am33xx_is_hardreset_asserted(struct omap_hwmod *oh,
3105 struct omap_hwmod_rst_info *ohri)
3106{
3107 return omap_prm_is_hardreset_asserted(ohri->rst_shift, 0,
3108 oh->clkdm->pwrdm.ptr->prcm_offs,
3109 oh->prcm.omap4.rstctrl_offs);
3110}
3111
3112/* Public functions */ 3080/* Public functions */
3113 3081
3114u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs) 3082u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs)
@@ -3908,21 +3876,13 @@ void __init omap_hwmod_init(void)
3908 soc_ops.init_clkdm = _init_clkdm; 3876 soc_ops.init_clkdm = _init_clkdm;
3909 soc_ops.update_context_lost = _omap4_update_context_lost; 3877 soc_ops.update_context_lost = _omap4_update_context_lost;
3910 soc_ops.get_context_lost = _omap4_get_context_lost; 3878 soc_ops.get_context_lost = _omap4_get_context_lost;
3911 } else if (soc_is_am43xx()) { 3879 } else if (cpu_is_ti816x() || soc_is_am33xx() || soc_is_am43xx()) {
3912 soc_ops.enable_module = _omap4_enable_module; 3880 soc_ops.enable_module = _omap4_enable_module;
3913 soc_ops.disable_module = _omap4_disable_module; 3881 soc_ops.disable_module = _omap4_disable_module;
3914 soc_ops.wait_target_ready = _omap4_wait_target_ready; 3882 soc_ops.wait_target_ready = _omap4_wait_target_ready;
3915 soc_ops.assert_hardreset = _omap4_assert_hardreset; 3883 soc_ops.assert_hardreset = _omap4_assert_hardreset;
3916 soc_ops.deassert_hardreset = _omap4_deassert_hardreset;
3917 soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted;
3918 soc_ops.init_clkdm = _init_clkdm;
3919 } else if (cpu_is_ti816x() || soc_is_am33xx()) {
3920 soc_ops.enable_module = _omap4_enable_module;
3921 soc_ops.disable_module = _omap4_disable_module;
3922 soc_ops.wait_target_ready = _omap4_wait_target_ready;
3923 soc_ops.assert_hardreset = _am33xx_assert_hardreset;
3924 soc_ops.deassert_hardreset = _am33xx_deassert_hardreset; 3884 soc_ops.deassert_hardreset = _am33xx_deassert_hardreset;
3925 soc_ops.is_hardreset_asserted = _am33xx_is_hardreset_asserted; 3885 soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted;
3926 soc_ops.init_clkdm = _init_clkdm; 3886 soc_ops.init_clkdm = _init_clkdm;
3927 } else { 3887 } else {
3928 WARN(1, "omap_hwmod: unknown SoC type\n"); 3888 WARN(1, "omap_hwmod: unknown SoC type\n");
diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
index e2223148ba4d..17e8004fc20f 100644
--- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
@@ -544,6 +544,44 @@ static struct omap_hwmod am43xx_hdq1w_hwmod = {
544 }, 544 },
545}; 545};
546 546
547static struct omap_hwmod_class_sysconfig am43xx_vpfe_sysc = {
548 .rev_offs = 0x0,
549 .sysc_offs = 0x104,
550 .sysc_flags = SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE,
551 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
552 MSTANDBY_FORCE | MSTANDBY_SMART | MSTANDBY_NO),
553 .sysc_fields = &omap_hwmod_sysc_type2,
554};
555
556static struct omap_hwmod_class am43xx_vpfe_hwmod_class = {
557 .name = "vpfe",
558 .sysc = &am43xx_vpfe_sysc,
559};
560
561static struct omap_hwmod am43xx_vpfe0_hwmod = {
562 .name = "vpfe0",
563 .class = &am43xx_vpfe_hwmod_class,
564 .clkdm_name = "l3s_clkdm",
565 .prcm = {
566 .omap4 = {
567 .modulemode = MODULEMODE_SWCTRL,
568 .clkctrl_offs = AM43XX_CM_PER_VPFE0_CLKCTRL_OFFSET,
569 },
570 },
571};
572
573static struct omap_hwmod am43xx_vpfe1_hwmod = {
574 .name = "vpfe1",
575 .class = &am43xx_vpfe_hwmod_class,
576 .clkdm_name = "l3s_clkdm",
577 .prcm = {
578 .omap4 = {
579 .modulemode = MODULEMODE_SWCTRL,
580 .clkctrl_offs = AM43XX_CM_PER_VPFE1_CLKCTRL_OFFSET,
581 },
582 },
583};
584
547/* Interfaces */ 585/* Interfaces */
548static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = { 586static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = {
549 .master = &am33xx_l3_main_hwmod, 587 .master = &am33xx_l3_main_hwmod,
@@ -825,6 +863,34 @@ static struct omap_hwmod_ocp_if am43xx_l4_ls__hdq1w = {
825 .user = OCP_USER_MPU | OCP_USER_SDMA, 863 .user = OCP_USER_MPU | OCP_USER_SDMA,
826}; 864};
827 865
866static struct omap_hwmod_ocp_if am43xx_l3__vpfe0 = {
867 .master = &am43xx_vpfe0_hwmod,
868 .slave = &am33xx_l3_main_hwmod,
869 .clk = "l3_gclk",
870 .user = OCP_USER_MPU | OCP_USER_SDMA,
871};
872
873static struct omap_hwmod_ocp_if am43xx_l3__vpfe1 = {
874 .master = &am43xx_vpfe1_hwmod,
875 .slave = &am33xx_l3_main_hwmod,
876 .clk = "l3_gclk",
877 .user = OCP_USER_MPU | OCP_USER_SDMA,
878};
879
880static struct omap_hwmod_ocp_if am43xx_l4_ls__vpfe0 = {
881 .master = &am33xx_l4_ls_hwmod,
882 .slave = &am43xx_vpfe0_hwmod,
883 .clk = "l4ls_gclk",
884 .user = OCP_USER_MPU | OCP_USER_SDMA,
885};
886
887static struct omap_hwmod_ocp_if am43xx_l4_ls__vpfe1 = {
888 .master = &am33xx_l4_ls_hwmod,
889 .slave = &am43xx_vpfe1_hwmod,
890 .clk = "l4ls_gclk",
891 .user = OCP_USER_MPU | OCP_USER_SDMA,
892};
893
828static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { 894static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
829 &am33xx_l4_wkup__synctimer, 895 &am33xx_l4_wkup__synctimer,
830 &am43xx_l4_ls__timer8, 896 &am43xx_l4_ls__timer8,
@@ -925,6 +991,10 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
925 &am43xx_l4_ls__dss_dispc, 991 &am43xx_l4_ls__dss_dispc,
926 &am43xx_l4_ls__dss_rfbi, 992 &am43xx_l4_ls__dss_rfbi,
927 &am43xx_l4_ls__hdq1w, 993 &am43xx_l4_ls__hdq1w,
994 &am43xx_l3__vpfe0,
995 &am43xx_l3__vpfe1,
996 &am43xx_l4_ls__vpfe0,
997 &am43xx_l4_ls__vpfe1,
928 NULL, 998 NULL,
929}; 999};
930 1000
diff --git a/arch/arm/mach-omap2/prcm43xx.h b/arch/arm/mach-omap2/prcm43xx.h
index 48df3b55057e..d0261996db6d 100644
--- a/arch/arm/mach-omap2/prcm43xx.h
+++ b/arch/arm/mach-omap2/prcm43xx.h
@@ -144,5 +144,6 @@
144#define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET 0x05C0 144#define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET 0x05C0
145#define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET 0x0a20 145#define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET 0x0a20
146#define AM43XX_CM_PER_HDQ1W_CLKCTRL_OFFSET 0x04a0 146#define AM43XX_CM_PER_HDQ1W_CLKCTRL_OFFSET 0x04a0
147 147#define AM43XX_CM_PER_VPFE0_CLKCTRL_OFFSET 0x0068
148#define AM43XX_CM_PER_VPFE1_CLKCTRL_OFFSET 0x0070
148#endif 149#endif
diff --git a/arch/arm/mach-omap2/prminst44xx.c b/arch/arm/mach-omap2/prminst44xx.c
index c4859c4d3646..d0b15dbafa2e 100644
--- a/arch/arm/mach-omap2/prminst44xx.c
+++ b/arch/arm/mach-omap2/prminst44xx.c
@@ -87,12 +87,6 @@ u32 omap4_prminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, s16 inst,
87 return v; 87 return v;
88} 88}
89 89
90/*
91 * Address offset (in bytes) between the reset control and the reset
92 * status registers: 4 bytes on OMAP4
93 */
94#define OMAP4_RST_CTRL_ST_OFFSET 4
95
96/** 90/**
97 * omap4_prminst_is_hardreset_asserted - read the HW reset line state of 91 * omap4_prminst_is_hardreset_asserted - read the HW reset line state of
98 * submodules contained in the hwmod module 92 * submodules contained in the hwmod module
@@ -141,11 +135,11 @@ int omap4_prminst_assert_hardreset(u8 shift, u8 part, s16 inst,
141 * omap4_prminst_deassert_hardreset - deassert a submodule hardreset line and 135 * omap4_prminst_deassert_hardreset - deassert a submodule hardreset line and
142 * wait 136 * wait
143 * @shift: register bit shift corresponding to the reset line to deassert 137 * @shift: register bit shift corresponding to the reset line to deassert
144 * @st_shift: status bit offset, not used for OMAP4+ 138 * @st_shift: status bit offset corresponding to the reset line
145 * @part: PRM partition 139 * @part: PRM partition
146 * @inst: PRM instance offset 140 * @inst: PRM instance offset
147 * @rstctrl_offs: reset register offset 141 * @rstctrl_offs: reset register offset
148 * @st_offs: reset status register offset, not used for OMAP4+ 142 * @rstst_offs: reset status register offset
149 * 143 *
150 * Some IPs like dsp, ipu or iva contain processors that require an HW 144 * Some IPs like dsp, ipu or iva contain processors that require an HW
151 * reset line to be asserted / deasserted in order to fully enable the 145 * reset line to be asserted / deasserted in order to fully enable the
@@ -157,11 +151,11 @@ int omap4_prminst_assert_hardreset(u8 shift, u8 part, s16 inst,
157 * of reset, or -EBUSY if the submodule did not exit reset promptly. 151 * of reset, or -EBUSY if the submodule did not exit reset promptly.
158 */ 152 */
159int omap4_prminst_deassert_hardreset(u8 shift, u8 st_shift, u8 part, s16 inst, 153int omap4_prminst_deassert_hardreset(u8 shift, u8 st_shift, u8 part, s16 inst,
160 u16 rstctrl_offs, u16 st_offs) 154 u16 rstctrl_offs, u16 rstst_offs)
161{ 155{
162 int c; 156 int c;
163 u32 mask = 1 << shift; 157 u32 mask = 1 << shift;
164 u16 rstst_offs = rstctrl_offs + OMAP4_RST_CTRL_ST_OFFSET; 158 u32 st_mask = 1 << st_shift;
165 159
166 /* Check the current status to avoid de-asserting the line twice */ 160 /* Check the current status to avoid de-asserting the line twice */
167 if (omap4_prminst_is_hardreset_asserted(shift, part, inst, 161 if (omap4_prminst_is_hardreset_asserted(shift, part, inst,
@@ -169,13 +163,13 @@ int omap4_prminst_deassert_hardreset(u8 shift, u8 st_shift, u8 part, s16 inst,
169 return -EEXIST; 163 return -EEXIST;
170 164
171 /* Clear the reset status by writing 1 to the status bit */ 165 /* Clear the reset status by writing 1 to the status bit */
172 omap4_prminst_rmw_inst_reg_bits(0xffffffff, mask, part, inst, 166 omap4_prminst_rmw_inst_reg_bits(0xffffffff, st_mask, part, inst,
173 rstst_offs); 167 rstst_offs);
174 /* de-assert the reset control line */ 168 /* de-assert the reset control line */
175 omap4_prminst_rmw_inst_reg_bits(mask, 0, part, inst, rstctrl_offs); 169 omap4_prminst_rmw_inst_reg_bits(mask, 0, part, inst, rstctrl_offs);
176 /* wait the status to be set */ 170 /* wait the status to be set */
177 omap_test_timeout(omap4_prminst_is_hardreset_asserted(shift, part, inst, 171 omap_test_timeout(omap4_prminst_is_hardreset_asserted(st_shift, part,
178 rstst_offs), 172 inst, rstst_offs),
179 MAX_MODULE_HARDRESET_WAIT, c); 173 MAX_MODULE_HARDRESET_WAIT, c);
180 174
181 return (c == MAX_MODULE_HARDRESET_WAIT) ? -EBUSY : 0; 175 return (c == MAX_MODULE_HARDRESET_WAIT) ? -EBUSY : 0;
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index cef67af9e9b8..cac46d852da1 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -298,14 +298,11 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
298 if (IS_ERR(src)) 298 if (IS_ERR(src))
299 return PTR_ERR(src); 299 return PTR_ERR(src);
300 300
301 if (clk_get_parent(timer->fclk) != src) { 301 r = clk_set_parent(timer->fclk, src);
302 r = clk_set_parent(timer->fclk, src); 302 if (r < 0) {
303 if (r < 0) { 303 pr_warn("%s: %s cannot set source\n", __func__, oh->name);
304 pr_warn("%s: %s cannot set source\n", __func__, 304 clk_put(src);
305 oh->name); 305 return r;
306 clk_put(src);
307 return r;
308 }
309 } 306 }
310 307
311 clk_put(src); 308 clk_put(src);
diff --git a/arch/arm/mach-rockchip/pm.c b/arch/arm/mach-rockchip/pm.c
index 22812fe06460..b0dcbe28f78c 100644
--- a/arch/arm/mach-rockchip/pm.c
+++ b/arch/arm/mach-rockchip/pm.c
@@ -44,11 +44,9 @@ static void __iomem *rk3288_bootram_base;
44static phys_addr_t rk3288_bootram_phy; 44static phys_addr_t rk3288_bootram_phy;
45 45
46static struct regmap *pmu_regmap; 46static struct regmap *pmu_regmap;
47static struct regmap *grf_regmap;
48static struct regmap *sgrf_regmap; 47static struct regmap *sgrf_regmap;
49 48
50static u32 rk3288_pmu_pwr_mode_con; 49static u32 rk3288_pmu_pwr_mode_con;
51static u32 rk3288_grf_soc_con0;
52static u32 rk3288_sgrf_soc_con0; 50static u32 rk3288_sgrf_soc_con0;
53 51
54static inline u32 rk3288_l2_config(void) 52static inline u32 rk3288_l2_config(void)
@@ -72,26 +70,12 @@ static void rk3288_slp_mode_set(int level)
72{ 70{
73 u32 mode_set, mode_set1; 71 u32 mode_set, mode_set1;
74 72
75 regmap_read(grf_regmap, RK3288_GRF_SOC_CON0, &rk3288_grf_soc_con0);
76
77 regmap_read(sgrf_regmap, RK3288_SGRF_SOC_CON0, &rk3288_sgrf_soc_con0); 73 regmap_read(sgrf_regmap, RK3288_SGRF_SOC_CON0, &rk3288_sgrf_soc_con0);
78 74
79 regmap_read(pmu_regmap, RK3288_PMU_PWRMODE_CON, 75 regmap_read(pmu_regmap, RK3288_PMU_PWRMODE_CON,
80 &rk3288_pmu_pwr_mode_con); 76 &rk3288_pmu_pwr_mode_con);
81 77
82 /* 78 /*
83 * We need set this bit GRF_FORCE_JTAG here, for the debug module,
84 * otherwise, it may become inaccessible after resume.
85 * This creates a potential security issue, as the sdmmc pins may
86 * accept jtag data for a short time during resume if no card is
87 * inserted.
88 * But this is of course also true for the regular boot, before we
89 * turn of the jtag/sdmmc autodetect.
90 */
91 regmap_write(grf_regmap, RK3288_GRF_SOC_CON0, GRF_FORCE_JTAG |
92 GRF_FORCE_JTAG_WRITE);
93
94 /*
95 * SGRF_FAST_BOOT_EN - system to boot from FAST_BOOT_ADDR 79 * SGRF_FAST_BOOT_EN - system to boot from FAST_BOOT_ADDR
96 * PCLK_WDT_GATE - disable WDT during suspend. 80 * PCLK_WDT_GATE - disable WDT during suspend.
97 */ 81 */
@@ -151,9 +135,6 @@ static void rk3288_slp_mode_set_resume(void)
151 regmap_write(sgrf_regmap, RK3288_SGRF_SOC_CON0, 135 regmap_write(sgrf_regmap, RK3288_SGRF_SOC_CON0,
152 rk3288_sgrf_soc_con0 | SGRF_PCLK_WDT_GATE_WRITE 136 rk3288_sgrf_soc_con0 | SGRF_PCLK_WDT_GATE_WRITE
153 | SGRF_FAST_BOOT_EN_WRITE); 137 | SGRF_FAST_BOOT_EN_WRITE);
154
155 regmap_write(grf_regmap, RK3288_GRF_SOC_CON0, rk3288_grf_soc_con0 |
156 GRF_FORCE_JTAG_WRITE);
157} 138}
158 139
159static int rockchip_lpmode_enter(unsigned long arg) 140static int rockchip_lpmode_enter(unsigned long arg)
@@ -212,13 +193,6 @@ static int rk3288_suspend_init(struct device_node *np)
212 return PTR_ERR(pmu_regmap); 193 return PTR_ERR(pmu_regmap);
213 } 194 }
214 195
215 grf_regmap = syscon_regmap_lookup_by_compatible(
216 "rockchip,rk3288-grf");
217 if (IS_ERR(grf_regmap)) {
218 pr_err("%s: could not find grf regmap\n", __func__);
219 return PTR_ERR(pmu_regmap);
220 }
221
222 sram_np = of_find_compatible_node(NULL, NULL, 196 sram_np = of_find_compatible_node(NULL, NULL,
223 "rockchip,rk3288-pmu-sram"); 197 "rockchip,rk3288-pmu-sram");
224 if (!sram_np) { 198 if (!sram_np) {
diff --git a/arch/arm/mach-rockchip/pm.h b/arch/arm/mach-rockchip/pm.h
index f8a747bc1437..3e8d39c0c3d5 100644
--- a/arch/arm/mach-rockchip/pm.h
+++ b/arch/arm/mach-rockchip/pm.h
@@ -48,10 +48,6 @@ static inline void rockchip_suspend_init(void)
48#define RK3288_PMU_WAKEUP_RST_CLR_CNT 0x44 48#define RK3288_PMU_WAKEUP_RST_CLR_CNT 0x44
49#define RK3288_PMU_PWRMODE_CON1 0x90 49#define RK3288_PMU_PWRMODE_CON1 0x90
50 50
51#define RK3288_GRF_SOC_CON0 0x244
52#define GRF_FORCE_JTAG BIT(12)
53#define GRF_FORCE_JTAG_WRITE BIT(28)
54
55#define RK3288_SGRF_SOC_CON0 (0x0000) 51#define RK3288_SGRF_SOC_CON0 (0x0000)
56#define RK3288_SGRF_FAST_BOOT_ADDR (0x0120) 52#define RK3288_SGRF_FAST_BOOT_ADDR (0x0120)
57#define SGRF_PCLK_WDT_GATE BIT(6) 53#define SGRF_PCLK_WDT_GATE BIT(6)
diff --git a/arch/arm64/boot/dts/arm/juno-motherboard.dtsi b/arch/arm64/boot/dts/arm/juno-motherboard.dtsi
index c138b95a8356..351c95bda89e 100644
--- a/arch/arm64/boot/dts/arm/juno-motherboard.dtsi
+++ b/arch/arm64/boot/dts/arm/juno-motherboard.dtsi
@@ -21,6 +21,20 @@
21 clock-output-names = "juno_mb:clk25mhz"; 21 clock-output-names = "juno_mb:clk25mhz";
22 }; 22 };
23 23
24 v2m_refclk1mhz: refclk1mhz {
25 compatible = "fixed-clock";
26 #clock-cells = <0>;
27 clock-frequency = <1000000>;
28 clock-output-names = "juno_mb:refclk1mhz";
29 };
30
31 v2m_refclk32khz: refclk32khz {
32 compatible = "fixed-clock";
33 #clock-cells = <0>;
34 clock-frequency = <32768>;
35 clock-output-names = "juno_mb:refclk32khz";
36 };
37
24 motherboard { 38 motherboard {
25 compatible = "arm,vexpress,v2p-p1", "simple-bus"; 39 compatible = "arm,vexpress,v2p-p1", "simple-bus";
26 #address-cells = <2>; /* SMB chipselect number and offset */ 40 #address-cells = <2>; /* SMB chipselect number and offset */
@@ -66,6 +80,15 @@
66 #size-cells = <1>; 80 #size-cells = <1>;
67 ranges = <0 3 0 0x200000>; 81 ranges = <0 3 0 0x200000>;
68 82
83 v2m_sysctl: sysctl@020000 {
84 compatible = "arm,sp810", "arm,primecell";
85 reg = <0x020000 0x1000>;
86 clocks = <&v2m_refclk32khz>, <&v2m_refclk1mhz>, <&mb_clk24mhz>;
87 clock-names = "refclk", "timclk", "apb_pclk";
88 #clock-cells = <1>;
89 clock-output-names = "timerclken0", "timerclken1", "timerclken2", "timerclken3";
90 };
91
69 mmci@050000 { 92 mmci@050000 {
70 compatible = "arm,pl180", "arm,primecell"; 93 compatible = "arm,pl180", "arm,primecell";
71 reg = <0x050000 0x1000>; 94 reg = <0x050000 0x1000>;
@@ -106,16 +129,16 @@
106 compatible = "arm,sp804", "arm,primecell"; 129 compatible = "arm,sp804", "arm,primecell";
107 reg = <0x110000 0x10000>; 130 reg = <0x110000 0x10000>;
108 interrupts = <9>; 131 interrupts = <9>;
109 clocks = <&mb_clk24mhz>, <&soc_smc50mhz>; 132 clocks = <&v2m_sysctl 0>, <&v2m_sysctl 1>, <&mb_clk24mhz>;
110 clock-names = "timclken1", "apb_pclk"; 133 clock-names = "timclken1", "timclken2", "apb_pclk";
111 }; 134 };
112 135
113 v2m_timer23: timer@120000 { 136 v2m_timer23: timer@120000 {
114 compatible = "arm,sp804", "arm,primecell"; 137 compatible = "arm,sp804", "arm,primecell";
115 reg = <0x120000 0x10000>; 138 reg = <0x120000 0x10000>;
116 interrupts = <9>; 139 interrupts = <9>;
117 clocks = <&mb_clk24mhz>, <&soc_smc50mhz>; 140 clocks = <&v2m_sysctl 2>, <&v2m_sysctl 3>, <&mb_clk24mhz>;
118 clock-names = "timclken1", "apb_pclk"; 141 clock-names = "timclken1", "timclken2", "apb_pclk";
119 }; 142 };
120 143
121 rtc@170000 { 144 rtc@170000 {