arm: Xilinx Zynq cleanup patches for v3.14
This branch contains these fixes: - SMP cleanups - platform initialization cleanup -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEABECAAYFAlKnFY4ACgkQykllyylKDCFl5QCeLkO5Cbsye59zgq54MaB2W+TE r8wAn2ghJvZvHMdAAg1nfleknY/W7nJx =atEt -----END PGP SIGNATURE----- Merge tag 'zynq-cleanup-for-3.14' of git://git.xilinx.com/linux-xlnx into next/cleanup From Michal Simek: ARM: Xilinx Zynq cleanup patches for v3.14 This branch contains these fixes: - SMP cleanups - platform initialization cleanup * tag 'zynq-cleanup-for-3.14' of git://git.xilinx.com/linux-xlnx: ARM: zynq: remove unnecessary setting of cpu_present_mask arm: zynq: Set proper GIC flags arm: zynq: Use of_platform_populate instead of bus_probe arm: zynq: Add support for zynq_cpu_kill function arm: zynq: Invalidate L1 in secondary boot arm: zynq: platsmp: Remove CPU presence check Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
650286d257
|
@ -25,6 +25,8 @@
|
|||
#include <linux/of_irq.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/irqchip.h>
|
||||
#include <linux/irqchip/arm-gic.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
@ -39,11 +41,6 @@
|
|||
|
||||
void __iomem *zynq_scu_base;
|
||||
|
||||
static struct of_device_id zynq_of_bus_ids[] __initdata = {
|
||||
{ .compatible = "simple-bus", },
|
||||
{}
|
||||
};
|
||||
|
||||
static struct platform_device zynq_cpuidle_device = {
|
||||
.name = "cpuidle-zynq",
|
||||
};
|
||||
|
@ -59,7 +56,7 @@ static void __init zynq_init_machine(void)
|
|||
*/
|
||||
l2x0_of_init(0x02060000, 0xF0F0FFFF);
|
||||
|
||||
of_platform_bus_probe(NULL, zynq_of_bus_ids, NULL);
|
||||
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
||||
|
||||
platform_device_register(&zynq_cpuidle_device);
|
||||
}
|
||||
|
@ -97,6 +94,12 @@ static void __init zynq_map_io(void)
|
|||
zynq_scu_map_io();
|
||||
}
|
||||
|
||||
static void __init zynq_irq_init(void)
|
||||
{
|
||||
gic_arch_extn.flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND;
|
||||
irqchip_init();
|
||||
}
|
||||
|
||||
static void zynq_system_reset(enum reboot_mode mode, const char *cmd)
|
||||
{
|
||||
zynq_slcr_system_reset();
|
||||
|
@ -110,6 +113,7 @@ static const char * const zynq_dt_match[] = {
|
|||
DT_MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform")
|
||||
.smp = smp_ops(zynq_smp_ops),
|
||||
.map_io = zynq_map_io,
|
||||
.init_irq = zynq_irq_init,
|
||||
.init_machine = zynq_init_machine,
|
||||
.init_time = zynq_timer_init,
|
||||
.dt_compat = zynq_dt_match,
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
#ifndef __MACH_ZYNQ_COMMON_H__
|
||||
#define __MACH_ZYNQ_COMMON_H__
|
||||
|
||||
void zynq_secondary_startup(void);
|
||||
|
||||
extern int zynq_slcr_init(void);
|
||||
extern void zynq_slcr_system_reset(void);
|
||||
extern void zynq_slcr_cpu_stop(int cpu);
|
||||
|
|
|
@ -18,5 +18,9 @@ zynq_secondary_trampoline_jump:
|
|||
.word /* cpu 1 */
|
||||
.globl zynq_secondary_trampoline_end
|
||||
zynq_secondary_trampoline_end:
|
||||
|
||||
ENDPROC(zynq_secondary_trampoline)
|
||||
|
||||
ENTRY(zynq_secondary_startup)
|
||||
bl v7_invalidate_l1
|
||||
b secondary_startup
|
||||
ENDPROC(zynq_secondary_startup)
|
||||
|
|
|
@ -39,11 +39,6 @@ int zynq_cpun_start(u32 address, int cpu)
|
|||
u32 trampoline_code_size = &zynq_secondary_trampoline_end -
|
||||
&zynq_secondary_trampoline;
|
||||
|
||||
if (cpu > ncores) {
|
||||
pr_warn("CPU No. is not available in the system\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* MS: Expectation that SLCR are directly map and accessible */
|
||||
/* Not possible to jump to non aligned address */
|
||||
if (!(address & 3) && (!address || (address >= trampoline_code_size))) {
|
||||
|
@ -95,7 +90,7 @@ EXPORT_SYMBOL(zynq_cpun_start);
|
|||
static int zynq_boot_secondary(unsigned int cpu,
|
||||
struct task_struct *idle)
|
||||
{
|
||||
return zynq_cpun_start(virt_to_phys(secondary_startup), cpu);
|
||||
return zynq_cpun_start(virt_to_phys(zynq_secondary_startup), cpu);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -114,23 +109,23 @@ static void __init zynq_smp_init_cpus(void)
|
|||
|
||||
static void __init zynq_smp_prepare_cpus(unsigned int max_cpus)
|
||||
{
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Initialise the present map, which describes the set of CPUs
|
||||
* actually populated at the present time.
|
||||
*/
|
||||
for (i = 0; i < max_cpus; i++)
|
||||
set_cpu_present(i, true);
|
||||
|
||||
scu_enable(zynq_scu_base);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
static int zynq_cpu_kill(unsigned cpu)
|
||||
{
|
||||
zynq_slcr_cpu_stop(cpu);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct smp_operations zynq_smp_ops __initdata = {
|
||||
.smp_init_cpus = zynq_smp_init_cpus,
|
||||
.smp_prepare_cpus = zynq_smp_prepare_cpus,
|
||||
.smp_boot_secondary = zynq_boot_secondary,
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
.cpu_die = zynq_platform_cpu_die,
|
||||
.cpu_kill = zynq_cpu_kill,
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue