From a7ed099ffc8edf2a6dccd8a22469347f5cdcfa57 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Sun, 2 Dec 2012 15:12:47 +0100 Subject: ARM: spear: move all files to mach-spear There are no conflicting files between the three mach-spear* directories and plat-spear any more, so we can now move all file to a common mach-spear directory. Signed-off-by: Arnd Bergmann Acked-by: Viresh Kumar --- arch/arm/mach-spear/restart.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 arch/arm/mach-spear/restart.c (limited to 'arch/arm/mach-spear/restart.c') diff --git a/arch/arm/mach-spear/restart.c b/arch/arm/mach-spear/restart.c new file mode 100644 index 000000000000..7d4616d5df11 --- /dev/null +++ b/arch/arm/mach-spear/restart.c @@ -0,0 +1,33 @@ +/* + * arch/arm/plat-spear/restart.c + * + * SPEAr platform specific restart functions + * + * Copyright (C) 2009 ST Microelectronics + * Viresh Kumar + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ +#include +#include +#include +#include +#include + +#define SPEAR13XX_SYS_SW_RES (VA_MISC_BASE + 0x204) +void spear_restart(char mode, const char *cmd) +{ + if (mode == 's') { + /* software reset, Jump into ROM at address 0 */ + soft_restart(0); + } else { + /* hardware reset, Use on-chip reset capability */ +#ifdef CONFIG_ARCH_SPEAR13XX + writel_relaxed(0x01, SPEAR13XX_SYS_SW_RES); +#else + sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE); +#endif + } +} -- cgit v1.2.3 From 2b9c613c4ee1756664fcbf6fc4926fee3e7139c3 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Sun, 2 Dec 2012 15:49:04 +0100 Subject: ARM: spear: move generic.h and pl080.h into private dir No file outside of mach-spear includes these files any more, so they don't have to be globally visible now. Signed-off-by: Arnd Bergmann Acked-by: Viresh Kumar --- arch/arm/mach-spear/restart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-spear/restart.c') diff --git a/arch/arm/mach-spear/restart.c b/arch/arm/mach-spear/restart.c index 7d4616d5df11..004f0f2ff1c6 100644 --- a/arch/arm/mach-spear/restart.c +++ b/arch/arm/mach-spear/restart.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include "generic.h" #define SPEAR13XX_SYS_SW_RES (VA_MISC_BASE + 0x204) void spear_restart(char mode, const char *cmd) -- cgit v1.2.3 From af63275bc4da161f4c78c8ddcddc9f90c2d2d194 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 25 Jan 2013 23:09:57 +0000 Subject: ARM: spear: fix build error in restart.c We can now enable mach-spear without selecting any of the machines in a multiplatform configuration. Doing so causes a build error that is trivial to fix by making both the spear13xx and the spear3xx/6xx portion of this file conditional rather than alternatives. Signed-off-by: Arnd Bergmann Acked-by: Viresh Kumar --- arch/arm/mach-spear/restart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-spear/restart.c') diff --git a/arch/arm/mach-spear/restart.c b/arch/arm/mach-spear/restart.c index 004f0f2ff1c6..2b44500bb718 100644 --- a/arch/arm/mach-spear/restart.c +++ b/arch/arm/mach-spear/restart.c @@ -26,7 +26,8 @@ void spear_restart(char mode, const char *cmd) /* hardware reset, Use on-chip reset capability */ #ifdef CONFIG_ARCH_SPEAR13XX writel_relaxed(0x01, SPEAR13XX_SYS_SW_RES); -#else +#endif +#if defined(CONFIG_ARCH_SPEAR3XX) || defined(CONFIG_ARCH_SPEAR6XX) sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE); #endif } -- cgit v1.2.3