diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-09-17 22:22:39 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-09-19 09:47:35 +0200 |
commit | f94a71cb514d6dc3a8395f2300c6a680ec6d7e82 (patch) | |
tree | d76ff6711df4ef34a6df448aebbefc04a86560f2 /arch/arm/mach-mvebu/armada-370-xp.c | |
parent | 5c0bd50319f20655b3c6e93ac9c7a72e44de7bd9 (diff) | |
download | barebox-f94a71cb514d6dc3a8395f2300c6a680ec6d7e82.tar.gz barebox-f94a71cb514d6dc3a8395f2300c6a680ec6d7e82.tar.xz |
ARM: mvebu: Add common reset_cpu function
mvebu has a reset_cpu function per SoC this does not work when multiple
SoCs are selected, so add a common reset_cpu function which calls into
the SoC specific ones.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Diffstat (limited to 'arch/arm/mach-mvebu/armada-370-xp.c')
-rw-r--r-- | arch/arm/mach-mvebu/armada-370-xp.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c index f2b991e5a7..6251100e88 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.c +++ b/arch/arm/mach-mvebu/armada-370-xp.c @@ -44,11 +44,21 @@ static inline void armada_370_xp_memory_find(unsigned long *phys_base, } } +static void __noreturn armada_370_xp_reset_cpu(unsigned long addr) +{ + writel(0x1, ARMADA_370_XP_SYSCTL_BASE + 0x60); + writel(0x1, ARMADA_370_XP_SYSCTL_BASE + 0x64); + while (1) + ; +} + static int armada_370_xp_init_soc(void) { unsigned long phys_base, phys_size; u32 reg; + mvebu_set_reset(armada_370_xp_reset_cpu); + barebox_set_model("Marvell Armada 370/XP"); barebox_set_hostname("armada"); @@ -65,12 +75,3 @@ static int armada_370_xp_init_soc(void) return 0; } core_initcall(armada_370_xp_init_soc); - -void __noreturn reset_cpu(unsigned long addr) -{ - writel(0x1, ARMADA_370_XP_SYSCTL_BASE + 0x60); - writel(0x1, ARMADA_370_XP_SYSCTL_BASE + 0x64); - while (1) - ; -} -EXPORT_SYMBOL(reset_cpu); |