SoCFPGA updates for v4.3
- Add smp.ops.cpu_kill() for kexec - Add reboot capability for Arria10 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJVt50rAAoJEBmUBAuBoyj0IRkP/izBracXfmwg511SPRjlpN+y +azWqkykxPXLJ47HM8pNuEeki06U27Lb42rB8tdrDXEaXfqcE5iUmxUdwkNeIXwt gZeUBuV93bhYI/ZNpsxSPE2mN7OartyRy1N522n/fzVWBso88wzNHuiYAhuTY31I 0MEd7n4VoT1jGVE92DrM/K7Fhf/YFk/mcWjq+Jx9LITwEWma/p+ET2GQ3fFH2X/U srRxePJbVjVLyUnjFqJmOemHblAu5BZ3BuwWv8g8x/yAK140mPiJ+X33i1soMcvE 9xOm8ctcaHO3rYBRhdd62K0O2yXU2NcJNSHAq+JtrsdJZx3qp0frSIHfwQokbuMZ 3GhSJ1jytb3jGg9hcm8lELxv+HHq8eaDmfB8yMpNtrMbLw5ldAZ3or926moXK2HV meKBcBQgtz6jf735QZm8+RXk7YJ41RTUOR8zkIPelVFNVov4/ihhZ33588Hh/a+S Oi6pGQH8Oo8iTlE/MIxCpYxSWsrKHZzTT+Bvi33FSlzrskVTlfjirhYdfNwXDQP0 k4XcVbZJ9OzpXC32QIj7A2x7A+9eAYgQG4fd8TeQpqY78zdkQk6l1TYYVDay+A5P TGmHU/hJsaAlb/6m5iH5IWWEnJjYY8yWjxn303P4ZREocPfafSvzr8km8xd46MoA H0lBalxqlm3T43W3i3yz =ZR5T -----END PGP SIGNATURE----- Merge tag 'socfpga_updates_for_v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/soc SoCFPGA updates for v4.3 - Add smp.ops.cpu_kill() for kexec - Add reboot capability for Arria10 * tag 'socfpga_updates_for_v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: socfpga: add reset for the Arria 10 platform ARM: socfpga: add smp_ops.cpu_kill to make kexec/kdump available Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
2eb084eb1f
|
@ -25,6 +25,7 @@
|
|||
#define SOCFPGA_RSTMGR_MODPERRST 0x14
|
||||
#define SOCFPGA_RSTMGR_BRGMODRST 0x1c
|
||||
|
||||
#define SOCFPGA_A10_RSTMGR_CTRL 0xC
|
||||
#define SOCFPGA_A10_RSTMGR_MODMPURST 0x20
|
||||
|
||||
/* System Manager bits */
|
||||
|
|
|
@ -106,11 +106,23 @@ static void socfpga_cpu_die(unsigned int cpu)
|
|||
cpu_do_idle();
|
||||
}
|
||||
|
||||
/*
|
||||
* We need a dummy function so that platform_can_cpu_hotplug() knows
|
||||
* we support CPU hotplug. However, the function does not need to do
|
||||
* anything, because CPUs going offline just do WFI. We could reset
|
||||
* the CPUs but it would increase power consumption.
|
||||
*/
|
||||
static int socfpga_cpu_kill(unsigned int cpu)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static struct smp_operations socfpga_smp_ops __initdata = {
|
||||
.smp_prepare_cpus = socfpga_smp_prepare_cpus,
|
||||
.smp_boot_secondary = socfpga_boot_secondary,
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
.cpu_die = socfpga_cpu_die,
|
||||
.cpu_kill = socfpga_cpu_kill,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -119,6 +131,7 @@ static struct smp_operations socfpga_a10_smp_ops __initdata = {
|
|||
.smp_boot_secondary = socfpga_a10_boot_secondary,
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
.cpu_die = socfpga_cpu_die,
|
||||
.cpu_kill = socfpga_cpu_kill,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -74,6 +74,19 @@ static void socfpga_cyclone5_restart(enum reboot_mode mode, const char *cmd)
|
|||
writel(temp, rst_manager_base_addr + SOCFPGA_RSTMGR_CTRL);
|
||||
}
|
||||
|
||||
static void socfpga_arria10_restart(enum reboot_mode mode, const char *cmd)
|
||||
{
|
||||
u32 temp;
|
||||
|
||||
temp = readl(rst_manager_base_addr + SOCFPGA_A10_RSTMGR_CTRL);
|
||||
|
||||
if (mode == REBOOT_HARD)
|
||||
temp |= RSTMGR_CTRL_SWCOLDRSTREQ;
|
||||
else
|
||||
temp |= RSTMGR_CTRL_SWWARMRSTREQ;
|
||||
writel(temp, rst_manager_base_addr + SOCFPGA_A10_RSTMGR_CTRL);
|
||||
}
|
||||
|
||||
static const char *altera_dt_match[] = {
|
||||
"altr,socfpga",
|
||||
NULL
|
||||
|
@ -86,3 +99,16 @@ DT_MACHINE_START(SOCFPGA, "Altera SOCFPGA")
|
|||
.restart = socfpga_cyclone5_restart,
|
||||
.dt_compat = altera_dt_match,
|
||||
MACHINE_END
|
||||
|
||||
static const char *altera_a10_dt_match[] = {
|
||||
"altr,socfpga-arria10",
|
||||
NULL
|
||||
};
|
||||
|
||||
DT_MACHINE_START(SOCFPGA_A10, "Altera SOCFPGA Arria10")
|
||||
.l2c_aux_val = 0,
|
||||
.l2c_aux_mask = ~0,
|
||||
.init_irq = socfpga_init_irq,
|
||||
.restart = socfpga_arria10_restart,
|
||||
.dt_compat = altera_a10_dt_match,
|
||||
MACHINE_END
|
||||
|
|
Loading…
Reference in New Issue