summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMattias Nilsson <mattias.i.nilsson@stericsson.com>2012-02-28 14:19:20 +0100
committerPhilippe Langlais <philippe.langlais@linaro.org>2012-03-19 08:55:43 +0100
commitd6d012d7483ec11d2ba426f5602933bc9bf38f3a (patch)
treee816c5a31acb89ecb252f3a518311d39f9255383 /arch
parent99a8ac5b11281f78e18d502de5f4f2994bc8454a (diff)
arm: ux500: add sys/socinfo/reset_status
This patch adds a sysfs node for reading the value of the reset status register as read at startup. ST Ericsson ID: 366664 ST Ericsson FOSS-OUT ID: trivial Change-Id: I9bb515bacdb72f77da6a0b55979342c9632af8c3 Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/50767 Reviewed-by: QABUILD Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ux500/cpu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c
index 8753341116b..8f030b40efa 100644
--- a/arch/arm/mach-ux500/cpu.c
+++ b/arch/arm/mach-ux500/cpu.c
@@ -147,6 +147,11 @@ static ssize_t ux500_get_reset_reason(char *buf, struct sysfs_soc_info *si)
reboot_reason_string(prcmu_get_reset_code()));
}
+static ssize_t ux500_get_reset_status(char *buf, struct sysfs_soc_info *si)
+{
+ return sprintf(buf, "0x%08x\n", prcmu_get_reset_status());
+}
+
static struct sysfs_soc_info soc_info[] = {
SYSFS_SOC_ATTR_CALLBACK("machine", ux500_get_machine),
SYSFS_SOC_ATTR_VALUE("family", "Ux500"),
@@ -155,6 +160,7 @@ static struct sysfs_soc_info soc_info[] = {
SYSFS_SOC_ATTR_CALLBACK("process", ux500_get_process),
SYSFS_SOC_ATTR_CALLBACK("reset_code", ux500_get_reset_code),
SYSFS_SOC_ATTR_CALLBACK("reset_reason", ux500_get_reset_reason),
+ SYSFS_SOC_ATTR_CALLBACK("reset_status", ux500_get_reset_status),
};
static int __init ux500_sys_soc_init(void)