diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-11 02:49:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-11 02:49:45 -0500 |
commit | aac59e3efce3dca787b11e34726001603ce3d161 (patch) | |
tree | 855d3f967b102877a179e23382be3c2c7fc8d66c /arch/arm/mach-highbank | |
parent | 21604cdcdcf9ea8c16b1656f78e2eff097244d66 (diff) | |
parent | 005ff5fb077ebf93882bd643932f932a9b402529 (diff) |
Merge tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC platform changes from Olof Johansson:
"New and updated SoC support. Among the things new for this release
are:
- More support for the AM33xx platforms from TI
- Tegra 124 support, and some updates to older tegra families as well
- imx cleanups and updates across the board
- A rename of Broadcom's Mobile platforms which were introduced as
ARCH_BCM, and turned out to be too broad a name. New name is
ARCH_BCM_MOBILE.
- A whole bunch of updates and fixes for integrator, making the
platform code more modern and switches over to DT-only booting.
- Support for two new Renesas shmobile chipsets. Next up for them is
more work on consolidation instead of introduction of new
non-multiplatform SoCs, we're all looking forward to that!
- Misc cleanups for older Samsung platforms, some Allwinner updates,
etc"
* tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (159 commits)
ARM: bcm281xx: Add ARCH_BCM_MOBILE to bcm config
ARM: bcm_defconfig: Run "make savedefconfig"
ARM: bcm281xx: Add ARCH Timers to config
rename ARCH_BCM to ARCH_BCM_MOBILE (mach-bcm)
ARM: vexpress: Enable platform-specific options in defconfig
ARM: vexpress: Make defconfig work again
ARM: sunxi: remove .init_time hooks
ARM: imx: enable suspend for imx6sl
ARM: imx: ensure dsm_request signal is not asserted when setting LPM
ARM: imx6q: call WB and RBC configuration from imx6q_pm_enter()
ARM: imx6q: move low-power code out of clock driver
ARM: imx: drop extern with function prototypes in common.h
ARM: imx: reset core along with enable/disable operation
ARM: imx: do not return from imx_cpu_die() call
ARM: imx_v6_v7_defconfig: Select CONFIG_PROVE_LOCKING
ARM: imx_v6_v7_defconfig: Enable LEDS_GPIO related options
ARM: mxs_defconfig: Turn off CONFIG_DEBUG_GPIO
ARM: imx: replace imx6q_restart() with mxc_restart()
ARM: mach-imx: mm-imx5: Retrieve iomuxc base address from dt
ARM: mach-imx: mm-imx5: Retrieve tzic base address from dt
...
Diffstat (limited to 'arch/arm/mach-highbank')
-rw-r--r-- | arch/arm/mach-highbank/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-highbank/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-highbank/core.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-highbank/highbank.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-highbank/hotplug.c | 37 | ||||
-rw-r--r-- | arch/arm/mach-highbank/platsmp.c | 68 | ||||
-rw-r--r-- | arch/arm/mach-highbank/pm.c | 27 |
7 files changed, 19 insertions, 144 deletions
diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig index 616408d76be5..fe98df44579c 100644 --- a/arch/arm/mach-highbank/Kconfig +++ b/arch/arm/mach-highbank/Kconfig | |||
@@ -10,6 +10,7 @@ config ARCH_HIGHBANK | |||
10 | select ARM_ERRATA_775420 | 10 | select ARM_ERRATA_775420 |
11 | select ARM_ERRATA_798181 | 11 | select ARM_ERRATA_798181 |
12 | select ARM_GIC | 12 | select ARM_GIC |
13 | select ARM_PSCI | ||
13 | select ARM_TIMER_SP804 | 14 | select ARM_TIMER_SP804 |
14 | select CACHE_L2X0 | 15 | select CACHE_L2X0 |
15 | select COMMON_CLK | 16 | select COMMON_CLK |
diff --git a/arch/arm/mach-highbank/Makefile b/arch/arm/mach-highbank/Makefile index 8a1ef576d79f..55840f414d3e 100644 --- a/arch/arm/mach-highbank/Makefile +++ b/arch/arm/mach-highbank/Makefile | |||
@@ -3,6 +3,4 @@ obj-y := highbank.o system.o smc.o | |||
3 | plus_sec := $(call as-instr,.arch_extension sec,+sec) | 3 | plus_sec := $(call as-instr,.arch_extension sec,+sec) |
4 | AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec) | 4 | AFLAGS_smc.o :=-Wa,-march=armv7-a$(plus_sec) |
5 | 5 | ||
6 | obj-$(CONFIG_SMP) += platsmp.o | ||
7 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | ||
8 | obj-$(CONFIG_PM_SLEEP) += pm.o | 6 | obj-$(CONFIG_PM_SLEEP) += pm.o |
diff --git a/arch/arm/mach-highbank/core.h b/arch/arm/mach-highbank/core.h index aea1ec5ab6f8..7ec5edcd1336 100644 --- a/arch/arm/mach-highbank/core.h +++ b/arch/arm/mach-highbank/core.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/reboot.h> | 4 | #include <linux/reboot.h> |
5 | 5 | ||
6 | extern void highbank_set_cpu_jump(int cpu, void *jump_addr); | ||
7 | extern void highbank_restart(enum reboot_mode, const char *); | 6 | extern void highbank_restart(enum reboot_mode, const char *); |
8 | extern void __iomem *scu_base_addr; | 7 | extern void __iomem *scu_base_addr; |
9 | 8 | ||
@@ -14,8 +13,5 @@ static inline void highbank_pm_init(void) {} | |||
14 | #endif | 13 | #endif |
15 | 14 | ||
16 | extern void highbank_smc1(int fn, int arg); | 15 | extern void highbank_smc1(int fn, int arg); |
17 | extern void highbank_cpu_die(unsigned int cpu); | ||
18 | |||
19 | extern struct smp_operations highbank_smp_ops; | ||
20 | 16 | ||
21 | #endif | 17 | #endif |
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c index e6d6eacea9d0..b3d7e5634b83 100644 --- a/arch/arm/mach-highbank/highbank.c +++ b/arch/arm/mach-highbank/highbank.c | |||
@@ -24,10 +24,9 @@ | |||
24 | #include <linux/of_platform.h> | 24 | #include <linux/of_platform.h> |
25 | #include <linux/of_address.h> | 25 | #include <linux/of_address.h> |
26 | #include <linux/amba/bus.h> | 26 | #include <linux/amba/bus.h> |
27 | #include <linux/platform_device.h> | ||
27 | 28 | ||
28 | #include <asm/cacheflush.h> | 29 | #include <asm/psci.h> |
29 | #include <asm/cputype.h> | ||
30 | #include <asm/smp_plat.h> | ||
31 | #include <asm/hardware/cache-l2x0.h> | 30 | #include <asm/hardware/cache-l2x0.h> |
32 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
33 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
@@ -48,17 +47,6 @@ static void __init highbank_scu_map_io(void) | |||
48 | scu_base_addr = ioremap(base, SZ_4K); | 47 | scu_base_addr = ioremap(base, SZ_4K); |
49 | } | 48 | } |
50 | 49 | ||
51 | #define HB_JUMP_TABLE_PHYS(cpu) (0x40 + (0x10 * (cpu))) | ||
52 | #define HB_JUMP_TABLE_VIRT(cpu) phys_to_virt(HB_JUMP_TABLE_PHYS(cpu)) | ||
53 | |||
54 | void highbank_set_cpu_jump(int cpu, void *jump_addr) | ||
55 | { | ||
56 | cpu = MPIDR_AFFINITY_LEVEL(cpu_logical_map(cpu), 0); | ||
57 | writel(virt_to_phys(jump_addr), HB_JUMP_TABLE_VIRT(cpu)); | ||
58 | __cpuc_flush_dcache_area(HB_JUMP_TABLE_VIRT(cpu), 16); | ||
59 | outer_clean_range(HB_JUMP_TABLE_PHYS(cpu), | ||
60 | HB_JUMP_TABLE_PHYS(cpu) + 15); | ||
61 | } | ||
62 | 50 | ||
63 | static void highbank_l2x0_disable(void) | 51 | static void highbank_l2x0_disable(void) |
64 | { | 52 | { |
@@ -138,6 +126,10 @@ static struct notifier_block highbank_platform_nb = { | |||
138 | .notifier_call = highbank_platform_notifier, | 126 | .notifier_call = highbank_platform_notifier, |
139 | }; | 127 | }; |
140 | 128 | ||
129 | static struct platform_device highbank_cpuidle_device = { | ||
130 | .name = "cpuidle-calxeda", | ||
131 | }; | ||
132 | |||
141 | static void __init highbank_init(void) | 133 | static void __init highbank_init(void) |
142 | { | 134 | { |
143 | struct device_node *np; | 135 | struct device_node *np; |
@@ -154,6 +146,9 @@ static void __init highbank_init(void) | |||
154 | bus_register_notifier(&amba_bustype, &highbank_amba_nb); | 146 | bus_register_notifier(&amba_bustype, &highbank_amba_nb); |
155 | 147 | ||
156 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 148 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
149 | |||
150 | if (psci_ops.cpu_suspend) | ||
151 | platform_device_register(&highbank_cpuidle_device); | ||
157 | } | 152 | } |
158 | 153 | ||
159 | static const char *highbank_match[] __initconst = { | 154 | static const char *highbank_match[] __initconst = { |
@@ -166,7 +161,6 @@ DT_MACHINE_START(HIGHBANK, "Highbank") | |||
166 | #if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE) | 161 | #if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE) |
167 | .dma_zone_size = (4ULL * SZ_1G), | 162 | .dma_zone_size = (4ULL * SZ_1G), |
168 | #endif | 163 | #endif |
169 | .smp = smp_ops(highbank_smp_ops), | ||
170 | .init_irq = highbank_init_irq, | 164 | .init_irq = highbank_init_irq, |
171 | .init_machine = highbank_init, | 165 | .init_machine = highbank_init, |
172 | .dt_compat = highbank_match, | 166 | .dt_compat = highbank_match, |
diff --git a/arch/arm/mach-highbank/hotplug.c b/arch/arm/mach-highbank/hotplug.c deleted file mode 100644 index a019e4e86e51..000000000000 --- a/arch/arm/mach-highbank/hotplug.c +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Calxeda, Inc. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #include <linux/kernel.h> | ||
17 | #include <asm/cacheflush.h> | ||
18 | |||
19 | #include "core.h" | ||
20 | #include "sysregs.h" | ||
21 | |||
22 | extern void secondary_startup(void); | ||
23 | |||
24 | /* | ||
25 | * platform-specific code to shutdown a CPU | ||
26 | * | ||
27 | */ | ||
28 | void __ref highbank_cpu_die(unsigned int cpu) | ||
29 | { | ||
30 | highbank_set_cpu_jump(cpu, phys_to_virt(0)); | ||
31 | |||
32 | flush_cache_louis(); | ||
33 | highbank_set_core_pwr(); | ||
34 | |||
35 | while (1) | ||
36 | cpu_do_idle(); | ||
37 | } | ||
diff --git a/arch/arm/mach-highbank/platsmp.c b/arch/arm/mach-highbank/platsmp.c deleted file mode 100644 index 32d75cf55cbc..000000000000 --- a/arch/arm/mach-highbank/platsmp.c +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2010-2011 Calxeda, Inc. | ||
3 | * Based on platsmp.c, Copyright (C) 2002 ARM Ltd. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/smp.h> | ||
19 | #include <linux/io.h> | ||
20 | |||
21 | #include <asm/smp_scu.h> | ||
22 | |||
23 | #include "core.h" | ||
24 | |||
25 | extern void secondary_startup(void); | ||
26 | |||
27 | static int highbank_boot_secondary(unsigned int cpu, struct task_struct *idle) | ||
28 | { | ||
29 | highbank_set_cpu_jump(cpu, secondary_startup); | ||
30 | arch_send_wakeup_ipi_mask(cpumask_of(cpu)); | ||
31 | return 0; | ||
32 | } | ||
33 | |||
34 | /* | ||
35 | * Initialise the CPU possible map early - this describes the CPUs | ||
36 | * which may be present or become present in the system. | ||
37 | */ | ||
38 | static void __init highbank_smp_init_cpus(void) | ||
39 | { | ||
40 | unsigned int i, ncores = 4; | ||
41 | |||
42 | /* sanity check */ | ||
43 | if (ncores > NR_CPUS) { | ||
44 | printk(KERN_WARNING | ||
45 | "highbank: no. of cores (%d) greater than configured " | ||
46 | "maximum of %d - clipping\n", | ||
47 | ncores, NR_CPUS); | ||
48 | ncores = NR_CPUS; | ||
49 | } | ||
50 | |||
51 | for (i = 0; i < ncores; i++) | ||
52 | set_cpu_possible(i, true); | ||
53 | } | ||
54 | |||
55 | static void __init highbank_smp_prepare_cpus(unsigned int max_cpus) | ||
56 | { | ||
57 | if (scu_base_addr) | ||
58 | scu_enable(scu_base_addr); | ||
59 | } | ||
60 | |||
61 | struct smp_operations highbank_smp_ops __initdata = { | ||
62 | .smp_init_cpus = highbank_smp_init_cpus, | ||
63 | .smp_prepare_cpus = highbank_smp_prepare_cpus, | ||
64 | .smp_boot_secondary = highbank_boot_secondary, | ||
65 | #ifdef CONFIG_HOTPLUG_CPU | ||
66 | .cpu_die = highbank_cpu_die, | ||
67 | #endif | ||
68 | }; | ||
diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c index 04eddb4f4380..7f2bd85eb935 100644 --- a/arch/arm/mach-highbank/pm.c +++ b/arch/arm/mach-highbank/pm.c | |||
@@ -16,27 +16,19 @@ | |||
16 | 16 | ||
17 | #include <linux/cpu_pm.h> | 17 | #include <linux/cpu_pm.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/io.h> | ||
20 | #include <linux/suspend.h> | 19 | #include <linux/suspend.h> |
21 | 20 | ||
22 | #include <asm/cacheflush.h> | ||
23 | #include <asm/proc-fns.h> | ||
24 | #include <asm/suspend.h> | 21 | #include <asm/suspend.h> |
25 | 22 | #include <asm/psci.h> | |
26 | #include "core.h" | ||
27 | #include "sysregs.h" | ||
28 | 23 | ||
29 | static int highbank_suspend_finish(unsigned long val) | 24 | static int highbank_suspend_finish(unsigned long val) |
30 | { | 25 | { |
31 | outer_flush_all(); | 26 | const struct psci_power_state ps = { |
32 | outer_disable(); | 27 | .type = PSCI_POWER_STATE_TYPE_POWER_DOWN, |
33 | 28 | .affinity_level = 1, | |
34 | highbank_set_pwr_suspend(); | 29 | }; |
35 | |||
36 | cpu_do_idle(); | ||
37 | 30 | ||
38 | highbank_clear_pwr_request(); | 31 | return psci_ops.cpu_suspend(ps, __pa(cpu_resume)); |
39 | return 0; | ||
40 | } | 32 | } |
41 | 33 | ||
42 | static int highbank_pm_enter(suspend_state_t state) | 34 | static int highbank_pm_enter(suspend_state_t state) |
@@ -44,15 +36,11 @@ static int highbank_pm_enter(suspend_state_t state) | |||
44 | cpu_pm_enter(); | 36 | cpu_pm_enter(); |
45 | cpu_cluster_pm_enter(); | 37 | cpu_cluster_pm_enter(); |
46 | 38 | ||
47 | highbank_set_cpu_jump(0, cpu_resume); | ||
48 | cpu_suspend(0, highbank_suspend_finish); | 39 | cpu_suspend(0, highbank_suspend_finish); |
49 | 40 | ||
50 | cpu_cluster_pm_exit(); | 41 | cpu_cluster_pm_exit(); |
51 | cpu_pm_exit(); | 42 | cpu_pm_exit(); |
52 | 43 | ||
53 | highbank_smc1(0x102, 0x1); | ||
54 | if (scu_base_addr) | ||
55 | scu_enable(scu_base_addr); | ||
56 | return 0; | 44 | return 0; |
57 | } | 45 | } |
58 | 46 | ||
@@ -63,5 +51,8 @@ static const struct platform_suspend_ops highbank_pm_ops = { | |||
63 | 51 | ||
64 | void __init highbank_pm_init(void) | 52 | void __init highbank_pm_init(void) |
65 | { | 53 | { |
54 | if (!psci_ops.cpu_suspend) | ||
55 | return; | ||
56 | |||
66 | suspend_set_ops(&highbank_pm_ops); | 57 | suspend_set_ops(&highbank_pm_ops); |
67 | } | 58 | } |