Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd68eb02 authored by Rob Herring's avatar Rob Herring
Browse files

ARM: highbank: adapt to use ARM PSCI calls



This adapts highbank to use psci for smp_ops and the cpu_suspend function
for suspend/resume.

Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
parent 97fc4de3
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -10,6 +10,7 @@ config ARCH_HIGHBANK
	select ARM_ERRATA_775420
	select ARM_ERRATA_775420
	select ARM_ERRATA_798181
	select ARM_ERRATA_798181
	select ARM_GIC
	select ARM_GIC
	select ARM_PSCI
	select ARM_TIMER_SP804
	select ARM_TIMER_SP804
	select CACHE_L2X0
	select CACHE_L2X0
	select CLKDEV_LOOKUP
	select CLKDEV_LOOKUP
+0 −2
Original line number Original line Diff line number Diff line
@@ -3,6 +3,4 @@ obj-y := highbank.o system.o smc.o
plus_sec := $(call as-instr,.arch_extension sec,+sec)
plus_sec := $(call as-instr,.arch_extension sec,+sec)
AFLAGS_smc.o				:=-Wa,-march=armv7-a$(plus_sec)
AFLAGS_smc.o				:=-Wa,-march=armv7-a$(plus_sec)


obj-$(CONFIG_SMP)			+= platsmp.o
obj-$(CONFIG_HOTPLUG_CPU)		+= hotplug.o
obj-$(CONFIG_PM_SLEEP)			+= pm.o
obj-$(CONFIG_PM_SLEEP)			+= pm.o
+0 −4
Original line number Original line Diff line number Diff line
@@ -3,7 +3,6 @@


#include <linux/reboot.h>
#include <linux/reboot.h>


extern void highbank_set_cpu_jump(int cpu, void *jump_addr);
extern void highbank_restart(enum reboot_mode, const char *);
extern void highbank_restart(enum reboot_mode, const char *);
extern void __iomem *scu_base_addr;
extern void __iomem *scu_base_addr;


@@ -14,8 +13,5 @@ static inline void highbank_pm_init(void) {}
#endif
#endif


extern void highbank_smc1(int fn, int arg);
extern void highbank_smc1(int fn, int arg);
extern void highbank_cpu_die(unsigned int cpu);

extern struct smp_operations highbank_smp_ops;


#endif
#endif
+1 −15
Original line number Original line Diff line number Diff line
@@ -27,9 +27,7 @@
#include <linux/clk-provider.h>
#include <linux/clk-provider.h>
#include <linux/platform_device.h>
#include <linux/platform_device.h>


#include <asm/cacheflush.h>
#include <asm/psci.h>
#include <asm/cputype.h>
#include <asm/smp_plat.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/mach/arch.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/map.h>
@@ -50,17 +48,6 @@ static void __init highbank_scu_map_io(void)
	scu_base_addr = ioremap(base, SZ_4K);
	scu_base_addr = ioremap(base, SZ_4K);
}
}


#define HB_JUMP_TABLE_PHYS(cpu)		(0x40 + (0x10 * (cpu)))
#define HB_JUMP_TABLE_VIRT(cpu)		phys_to_virt(HB_JUMP_TABLE_PHYS(cpu))

void highbank_set_cpu_jump(int cpu, void *jump_addr)
{
	cpu = MPIDR_AFFINITY_LEVEL(cpu_logical_map(cpu), 0);
	writel(virt_to_phys(jump_addr), HB_JUMP_TABLE_VIRT(cpu));
	__cpuc_flush_dcache_area(HB_JUMP_TABLE_VIRT(cpu), 16);
	outer_clean_range(HB_JUMP_TABLE_PHYS(cpu),
			  HB_JUMP_TABLE_PHYS(cpu) + 15);
}


static void highbank_l2x0_disable(void)
static void highbank_l2x0_disable(void)
{
{
@@ -182,7 +169,6 @@ DT_MACHINE_START(HIGHBANK, "Highbank")
#if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE)
#if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ARM_LPAE)
	.dma_zone_size	= (4ULL * SZ_1G),
	.dma_zone_size	= (4ULL * SZ_1G),
#endif
#endif
	.smp		= smp_ops(highbank_smp_ops),
	.init_irq	= highbank_init_irq,
	.init_irq	= highbank_init_irq,
	.init_time	= highbank_timer_init,
	.init_time	= highbank_timer_init,
	.init_machine	= highbank_init,
	.init_machine	= highbank_init,

arch/arm/mach-highbank/hotplug.c

deleted100644 → 0
+0 −37
Original line number Original line Diff line number Diff line
/*
 * Copyright 2011 Calxeda, Inc.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
 * version 2, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#include <linux/kernel.h>
#include <asm/cacheflush.h>

#include "core.h"
#include "sysregs.h"

extern void secondary_startup(void);

/*
 * platform-specific code to shutdown a CPU
 *
 */
void __ref highbank_cpu_die(unsigned int cpu)
{
	highbank_set_cpu_jump(cpu, phys_to_virt(0));

	flush_cache_louis();
	highbank_set_core_pwr();

	while (1)
		cpu_do_idle();
}
Loading