From 41fb326bdd6142c6e1b91e23e0f4090f94a53606 Mon Sep 17 00:00:00 2001 From: Chris Kimber Date: Mon, 12 Sep 2011 16:10:16 +0100 Subject: ARM: u8500: Update reboot reasons Make it possible to determine between a cold and warm start so the appropriate charging action can be taken. ST-Ericsson ID: 356867 ST-Ericsson Linux next: - ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Ibb979fa45753d85bc89f6319ee318d7b6893fdc6 Signed-off-by: Chris Kimber Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30745 Reviewed-by: QABUILD Reviewed-by: Jonas ABERG Reviewed-by: Andrew LYNN --- arch/arm/mach-ux500/include/mach/reboot_reasons.h | 3 ++- arch/arm/mach-ux500/reboot_reasons.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-ux500/include/mach/reboot_reasons.h b/arch/arm/mach-ux500/include/mach/reboot_reasons.h index a88f971a9f6..a8d816253e6 100644 --- a/arch/arm/mach-ux500/include/mach/reboot_reasons.h +++ b/arch/arm/mach-ux500/include/mach/reboot_reasons.h @@ -20,11 +20,12 @@ * location before resetting. These values are exposed through a sysfs * entry under /sys/socinfo, see mach-ux500/cpu-db8500.c */ -#define SW_RESET_NO_ARGUMENT 0x0 +#define SW_RESET_NO_ARGUMENT 0xBEEF #define SW_RESET_FACTORY_RESET 0x4242 #define SW_RESET_CRASH 0xDEAD #define SW_RESET_NORMAL 0xc001 #define SW_RESET_CHARGING 0xCAFE +#define SW_RESET_COLDSTART 0x0 /* * The array reboot_reasons[] is used when you want to map a string to a reboot diff --git a/arch/arm/mach-ux500/reboot_reasons.c b/arch/arm/mach-ux500/reboot_reasons.c index be69fcc0070..6a44493570d 100644 --- a/arch/arm/mach-ux500/reboot_reasons.c +++ b/arch/arm/mach-ux500/reboot_reasons.c @@ -18,7 +18,8 @@ struct reboot_reason reboot_reasons[] = { {"factory-reset", SW_RESET_FACTORY_RESET}, {"recovery", SW_RESET_NORMAL}, {"charging", SW_RESET_CHARGING}, - {"", SW_RESET_NORMAL}, /* Normal Boot */ + {"coldstart", SW_RESET_COLDSTART}, + {"none", SW_RESET_NO_ARGUMENT}, /* Normal Boot */ }; unsigned int reboot_reasons_size = ARRAY_SIZE(reboot_reasons); @@ -66,5 +67,5 @@ const char *reboot_reason_string(u16 code) } /* No valid reboot reason code found */ - return ""; + return "unknown"; } -- cgit v1.2.3