restart: replace reset_cpu with registered restart handlers
This replaces the reset_cpu() function which every SoC or board must
provide with registered handlers. This makes it possible to have multiple
reset functions for boards which have multiple ways to reset the machine.
Also boards which have no way at all to reset the machine no longer
have to provide a dummy reset_cpu() function.

The problem this solves is that some machines have external PMICs or
similar to reset the system which have to be preferred over the
internal SoC reset, because the PMIC can reset not only the SoC but also
the external devices.

To pick the right way to reset a machine each handler has a priority. The
default priority is 100 and all currently existing restart handlers are
registered with this priority. of_get_restart_priority() allows to retrieve
the priority from the device tree which makes it possible for boards to
give certain restart handlers a higher priority in order to use this one
instead of the default one.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 167e939 commit 83b0a5ae055bc084938dac96b3ea1c796d99d86c
@Sascha Hauer Sascha Hauer authored on 26 Aug 2015
Showing 68 changed files
View
arch/arm/lib/bootm.c
View
arch/arm/mach-at91/at91rm9200_time.c
View
arch/arm/mach-at91/at91sam9_reset.S
View
arch/arm/mach-at91/at91sam9g45_reset.S
View
arch/arm/mach-at91/bootstrap.c
View
arch/arm/mach-at91/setup.c
View
arch/arm/mach-bcm2835/core.c
View
arch/arm/mach-clps711x/reset.c
View
arch/arm/mach-davinci/time.c
View
arch/arm/mach-digic/Makefile
View
arch/arm/mach-digic/core.c 100644 → 0
View
arch/arm/mach-ep93xx/clocksource.c
View
arch/arm/mach-highbank/reset.c
View
arch/arm/mach-mvebu/armada-370-xp.c
View
arch/arm/mach-mvebu/common.c
View
arch/arm/mach-mvebu/dove.c
View
arch/arm/mach-mvebu/include/mach/common.h
View
arch/arm/mach-mvebu/kirkwood.c
View
arch/arm/mach-mxs/soc-imx23.c
View
arch/arm/mach-mxs/soc-imx28.c
View
arch/arm/mach-netx/generic.c
View
arch/arm/mach-nomadik/reset.c
View
arch/arm/mach-omap/am33xx_generic.c
View
arch/arm/mach-omap/include/mach/am33xx-generic.h
View
arch/arm/mach-omap/include/mach/omap3-generic.h
View
arch/arm/mach-omap/include/mach/omap4-generic.h
View
arch/arm/mach-omap/omap3_generic.c
View
arch/arm/mach-omap/omap4_generic.c
View
arch/arm/mach-omap/omap_generic.c
View
arch/arm/mach-pxa/common.c
View
arch/arm/mach-rockchip/core.c
View
arch/arm/mach-samsung/generic.c
View
arch/arm/mach-socfpga/reset-manager.c
View
arch/arm/mach-tegra/tegra20-pmc.c
View
arch/arm/mach-uemd/Makefile
View
arch/arm/mach-uemd/reset.c 100644 → 0
View
arch/arm/mach-versatile/core.c
View
arch/arm/mach-vexpress/reset.c
View
arch/arm/mach-zynq/zynq.c
View
arch/blackfin/lib/cpu.c
View
arch/blackfin/lib/traps.c
View
arch/efi/efi/efi.c
View
arch/mips/lib/bootm.c
View
arch/mips/mach-ar231x/ar231x_reset.c
View
arch/mips/mach-ath79/reset.c
View
arch/mips/mach-bcm47xx/reset.c
View
arch/mips/mach-loongson/loongson1_reset.c
View
arch/mips/mach-malta/reset.c
View
arch/nios2/cpu/cpu.c
View
arch/openrisc/cpu/cpu.c
View
arch/ppc/lib/ppclinux.c
View
arch/ppc/mach-mpc5xxx/cpu.c
View
arch/ppc/mach-mpc85xx/cpu.c
View
arch/sandbox/board/Makefile
View
arch/sandbox/board/restart.c 0 → 100644
View
arch/sandbox/mach-sandbox/include/mach/linux.h
View
arch/sandbox/os/common.c
View
arch/x86/mach-i386/Makefile
View
arch/x86/mach-i386/reset.c 100644 → 0
View
commands/reset.c
View
common/Makefile
View
common/misc.c
View
common/restart.c 0 → 100644
View
drivers/usb/gadget/f_fastboot.c
View
drivers/watchdog/imxwd.c
View
drivers/watchdog/jz4740.c
View
include/common.h
View
include/restart.h 0 → 100644