diff options
author | Chris Kimber <chris.kimber@stericsson.com> | 2011-09-12 16:10:16 +0100 |
---|---|---|
committer | Rajagopala V <rajagopala.v@stericsson.com> | 2011-09-22 14:32:51 +0530 |
commit | 41fb326bdd6142c6e1b91e23e0f4090f94a53606 (patch) | |
tree | 56681964fbc3dc970152dc0de639d300b9792def /arch | |
parent | e2d441872442cbb1a7319304654cf14aaa335dea (diff) |
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 <chris.kimber@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30745
Reviewed-by: QABUILD
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Reviewed-by: Andrew LYNN <andrew.lynn@stericsson.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-ux500/include/mach/reboot_reasons.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-ux500/reboot_reasons.c | 5 |
2 files changed, 5 insertions, 3 deletions
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"; } |