From 392e8802486cb573b916e746010e141a75f507e6 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 15 Nov 2014 09:58:27 +0800 Subject: init android origin source code --- ANDROID_3.4.5/arch/arm/plat-spear/restart.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 ANDROID_3.4.5/arch/arm/plat-spear/restart.c (limited to 'ANDROID_3.4.5/arch/arm/plat-spear/restart.c') diff --git a/ANDROID_3.4.5/arch/arm/plat-spear/restart.c b/ANDROID_3.4.5/arch/arm/plat-spear/restart.c new file mode 100644 index 00000000..16f203e7 --- /dev/null +++ b/ANDROID_3.4.5/arch/arm/plat-spear/restart.c @@ -0,0 +1,28 @@ +/* + * 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 + +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 */ + sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE); + } +} -- cgit