diff options
author | Olof Johansson <olof@lixom.net> | 2014-07-19 18:03:08 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2014-07-19 18:03:08 -0400 |
commit | f37ac9e5a47d72eab5185b0ddc14dfc943cc9589 (patch) | |
tree | 53577aa529e3bbe718459d0626fc6d45ada3dcdd /arch/arm/mach-mvebu | |
parent | 4338925434e4bf5ff714055713f3fb9b5fae9037 (diff) | |
parent | fc2cac41ebbfb16da8b036cba6ec6714ab780a6d (diff) |
Merge tag 'exynos-cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/soc
Merge "Samsung exynos cpuidle update for v3.17" from Kukjin Kim:
- add callbacks exynos_suspend() and exynos_powered_up()
for support cpuidle through mcpm
- skip exynos_cpuidle for exynos5420 because is uses
cpuidle-big-liggle generic cpuidle driver
- add generic functions to calculate cpu number is used
for pmu and this is required for exynos5420 multi-cluster
- add of_device_id structure for big.LITTLE cpuidle and
add "samsung,exynos5420" compatible string for exynos5420
* tag 'exynos-cpuidle' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
ARM: EXYNOS: populate suspend and powered_up callbacks for mcpm
ARM: EXYNOS: do not allow cpuidle registration for exynos5420
cpuidle: big.LITTLE: init driver for exynos5420
cpuidle: big.LITTLE: Add ARCH_EXYNOS entry in config
ARM: EXYNOS: add generic function to calculate cpu number
cpuidle: big.LITTLE: add of_device_id structure
+ Linux 3.16-rc5
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-mvebu')
-rw-r--r-- | arch/arm/mach-mvebu/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-mvebu/board-v7.c | 29 | ||||
-rw-r--r-- | arch/arm/mach-mvebu/pmsu.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-mvebu/pmsu_ll.S | 25 |
4 files changed, 47 insertions, 18 deletions
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile index 90bcd5327312..bc7689e530a4 100644 --- a/arch/arm/mach-mvebu/Makefile +++ b/arch/arm/mach-mvebu/Makefile | |||
@@ -7,7 +7,7 @@ CFLAGS_pmsu.o := -march=armv7-a | |||
7 | obj-y += system-controller.o mvebu-soc-id.o | 7 | obj-y += system-controller.o mvebu-soc-id.o |
8 | 8 | ||
9 | ifeq ($(CONFIG_MACH_MVEBU_V7),y) | 9 | ifeq ($(CONFIG_MACH_MVEBU_V7),y) |
10 | obj-y += cpu-reset.o board-v7.o coherency.o coherency_ll.o pmsu.o | 10 | obj-y += cpu-reset.o board-v7.o coherency.o coherency_ll.o pmsu.o pmsu_ll.o |
11 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o platsmp-a9.o headsmp-a9.o | 11 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o platsmp-a9.o headsmp-a9.o |
12 | endif | 12 | endif |
13 | 13 | ||
diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c index a04675e2ec99..f244622ffc00 100644 --- a/arch/arm/mach-mvebu/board-v7.c +++ b/arch/arm/mach-mvebu/board-v7.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mbus.h> | 23 | #include <linux/mbus.h> |
24 | #include <linux/signal.h> | 24 | #include <linux/signal.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/irqchip.h> | ||
26 | #include <asm/hardware/cache-l2x0.h> | 27 | #include <asm/hardware/cache-l2x0.h> |
27 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
28 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
@@ -71,17 +72,23 @@ static int armada_375_external_abort_wa(unsigned long addr, unsigned int fsr, | |||
71 | return 1; | 72 | return 1; |
72 | } | 73 | } |
73 | 74 | ||
74 | static void __init mvebu_timer_and_clk_init(void) | 75 | static void __init mvebu_init_irq(void) |
75 | { | 76 | { |
76 | of_clk_init(NULL); | 77 | irqchip_init(); |
77 | clocksource_of_init(); | ||
78 | mvebu_scu_enable(); | 78 | mvebu_scu_enable(); |
79 | coherency_init(); | 79 | coherency_init(); |
80 | BUG_ON(mvebu_mbus_dt_init(coherency_available())); | 80 | BUG_ON(mvebu_mbus_dt_init(coherency_available())); |
81 | } | ||
82 | |||
83 | static void __init external_abort_quirk(void) | ||
84 | { | ||
85 | u32 dev, rev; | ||
81 | 86 | ||
82 | if (of_machine_is_compatible("marvell,armada375")) | 87 | if (mvebu_get_soc_id(&dev, &rev) == 0 && rev > ARMADA_375_Z1_REV) |
83 | hook_fault_code(16 + 6, armada_375_external_abort_wa, SIGBUS, 0, | 88 | return; |
84 | "imprecise external abort"); | 89 | |
90 | hook_fault_code(16 + 6, armada_375_external_abort_wa, SIGBUS, 0, | ||
91 | "imprecise external abort"); | ||
85 | } | 92 | } |
86 | 93 | ||
87 | static void __init i2c_quirk(void) | 94 | static void __init i2c_quirk(void) |
@@ -178,8 +185,10 @@ static void __init mvebu_dt_init(void) | |||
178 | { | 185 | { |
179 | if (of_machine_is_compatible("plathome,openblocks-ax3-4")) | 186 | if (of_machine_is_compatible("plathome,openblocks-ax3-4")) |
180 | i2c_quirk(); | 187 | i2c_quirk(); |
181 | if (of_machine_is_compatible("marvell,a375-db")) | 188 | if (of_machine_is_compatible("marvell,a375-db")) { |
189 | external_abort_quirk(); | ||
182 | thermal_quirk(); | 190 | thermal_quirk(); |
191 | } | ||
183 | 192 | ||
184 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 193 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
185 | } | 194 | } |
@@ -194,7 +203,7 @@ DT_MACHINE_START(ARMADA_370_XP_DT, "Marvell Armada 370/XP (Device Tree)") | |||
194 | .l2c_aux_mask = ~0, | 203 | .l2c_aux_mask = ~0, |
195 | .smp = smp_ops(armada_xp_smp_ops), | 204 | .smp = smp_ops(armada_xp_smp_ops), |
196 | .init_machine = mvebu_dt_init, | 205 | .init_machine = mvebu_dt_init, |
197 | .init_time = mvebu_timer_and_clk_init, | 206 | .init_irq = mvebu_init_irq, |
198 | .restart = mvebu_restart, | 207 | .restart = mvebu_restart, |
199 | .dt_compat = armada_370_xp_dt_compat, | 208 | .dt_compat = armada_370_xp_dt_compat, |
200 | MACHINE_END | 209 | MACHINE_END |
@@ -207,7 +216,7 @@ static const char * const armada_375_dt_compat[] = { | |||
207 | DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)") | 216 | DT_MACHINE_START(ARMADA_375_DT, "Marvell Armada 375 (Device Tree)") |
208 | .l2c_aux_val = 0, | 217 | .l2c_aux_val = 0, |
209 | .l2c_aux_mask = ~0, | 218 | .l2c_aux_mask = ~0, |
210 | .init_time = mvebu_timer_and_clk_init, | 219 | .init_irq = mvebu_init_irq, |
211 | .init_machine = mvebu_dt_init, | 220 | .init_machine = mvebu_dt_init, |
212 | .restart = mvebu_restart, | 221 | .restart = mvebu_restart, |
213 | .dt_compat = armada_375_dt_compat, | 222 | .dt_compat = armada_375_dt_compat, |
@@ -222,7 +231,7 @@ static const char * const armada_38x_dt_compat[] = { | |||
222 | DT_MACHINE_START(ARMADA_38X_DT, "Marvell Armada 380/385 (Device Tree)") | 231 | DT_MACHINE_START(ARMADA_38X_DT, "Marvell Armada 380/385 (Device Tree)") |
223 | .l2c_aux_val = 0, | 232 | .l2c_aux_val = 0, |
224 | .l2c_aux_mask = ~0, | 233 | .l2c_aux_mask = ~0, |
225 | .init_time = mvebu_timer_and_clk_init, | 234 | .init_irq = mvebu_init_irq, |
226 | .restart = mvebu_restart, | 235 | .restart = mvebu_restart, |
227 | .dt_compat = armada_38x_dt_compat, | 236 | .dt_compat = armada_38x_dt_compat, |
228 | MACHINE_END | 237 | MACHINE_END |
diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c index 9c819d65b337..34f173e7267d 100644 --- a/arch/arm/mach-mvebu/pmsu.c +++ b/arch/arm/mach-mvebu/pmsu.c | |||
@@ -66,6 +66,8 @@ static void __iomem *pmsu_mp_base; | |||
66 | extern void ll_disable_coherency(void); | 66 | extern void ll_disable_coherency(void); |
67 | extern void ll_enable_coherency(void); | 67 | extern void ll_enable_coherency(void); |
68 | 68 | ||
69 | extern void armada_370_xp_cpu_resume(void); | ||
70 | |||
69 | static struct platform_device armada_xp_cpuidle_device = { | 71 | static struct platform_device armada_xp_cpuidle_device = { |
70 | .name = "cpuidle-armada-370-xp", | 72 | .name = "cpuidle-armada-370-xp", |
71 | }; | 73 | }; |
@@ -140,13 +142,6 @@ static void armada_370_xp_pmsu_enable_l2_powerdown_onidle(void) | |||
140 | writel(reg, pmsu_mp_base + L2C_NFABRIC_PM_CTL); | 142 | writel(reg, pmsu_mp_base + L2C_NFABRIC_PM_CTL); |
141 | } | 143 | } |
142 | 144 | ||
143 | static void armada_370_xp_cpu_resume(void) | ||
144 | { | ||
145 | asm volatile("bl ll_add_cpu_to_smp_group\n\t" | ||
146 | "bl ll_enable_coherency\n\t" | ||
147 | "b cpu_resume\n\t"); | ||
148 | } | ||
149 | |||
150 | /* No locking is needed because we only access per-CPU registers */ | 145 | /* No locking is needed because we only access per-CPU registers */ |
151 | int armada_370_xp_pmsu_idle_enter(unsigned long deepidle) | 146 | int armada_370_xp_pmsu_idle_enter(unsigned long deepidle) |
152 | { | 147 | { |
diff --git a/arch/arm/mach-mvebu/pmsu_ll.S b/arch/arm/mach-mvebu/pmsu_ll.S new file mode 100644 index 000000000000..fc3de68d8c54 --- /dev/null +++ b/arch/arm/mach-mvebu/pmsu_ll.S | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2014 Marvell | ||
3 | * | ||
4 | * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
5 | * Gregory Clement <gregory.clement@free-electrons.com> | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public | ||
8 | * License version 2. This program is licensed "as is" without any | ||
9 | * warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #include <linux/linkage.h> | ||
13 | #include <asm/assembler.h> | ||
14 | |||
15 | /* | ||
16 | * This is the entry point through which CPUs exiting cpuidle deep | ||
17 | * idle state are going. | ||
18 | */ | ||
19 | ENTRY(armada_370_xp_cpu_resume) | ||
20 | ARM_BE8(setend be ) @ go BE8 if entered LE | ||
21 | bl ll_add_cpu_to_smp_group | ||
22 | bl ll_enable_coherency | ||
23 | b cpu_resume | ||
24 | ENDPROC(armada_370_xp_cpu_resume) | ||
25 | |||