summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMattias Nilsson <mattias.i.nilsson@stericsson.com>2012-02-27 16:08:24 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 10:59:33 +0200
commit6fdae26dd1ed7dc56d6d231a48f88e59aee98d8c (patch)
tree2e837b3e40ee0317149a0b5ff1b6765862f748d3 /include
parent4eb4e784ac67d4339cb56842aa411ef07fab1313 (diff)
mfd: db8500-prcmu: add function to read reset status
This patch adds a function that returns the value of the reset status register at startup. It also changes the read of the (software) reset code, so that the saved value is only read at startup. ST Ericsson ID: 366664 ST Ericsson FOSS-OUT ID: trivial Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/db8500-prcmu.h6
-rw-r--r--include/linux/mfd/dbx500-prcmu.h13
2 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/mfd/db8500-prcmu.h b/include/linux/mfd/db8500-prcmu.h
index 0ef481f7edc..705af54b89f 100644
--- a/include/linux/mfd/db8500-prcmu.h
+++ b/include/linux/mfd/db8500-prcmu.h
@@ -486,6 +486,7 @@ void db8500_prcmu_config_abb_event_readout(u32 abb_events);
void db8500_prcmu_get_abb_event_buffer(void __iomem **buf);
int db8500_prcmu_config_esram0_deep_sleep(u8 state);
u16 db8500_prcmu_get_reset_code(void);
+u32 db8500_prcmu_get_reset_status(void);
bool db8500_prcmu_is_ac_wake_requested(void);
int db8500_prcmu_set_arm_opp(u8 opp);
int db8500_prcmu_get_arm_opp(void);
@@ -669,6 +670,11 @@ static inline u16 db8500_prcmu_get_reset_code(void)
return 0;
}
+static inline u32 db8500_prcmu_get_reset_status(void)
+{
+ return 0;
+}
+
static inline int db8500_prcmu_config_a9wdog(u8 num, bool sleep_auto_off)
{
return 0;
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h
index 90fed71c29e..818209b84c0 100644
--- a/include/linux/mfd/dbx500-prcmu.h
+++ b/include/linux/mfd/dbx500-prcmu.h
@@ -447,6 +447,14 @@ static inline u16 prcmu_get_reset_code(void)
return db8500_prcmu_get_reset_code();
}
+static inline u32 prcmu_get_reset_status(void)
+{
+ if (cpu_is_u8500())
+ return db8500_prcmu_get_reset_status();
+ else
+ return 0;
+}
+
void prcmu_ac_wake_req(void);
void prcmu_ac_sleep_req(void);
static inline void prcmu_modem_reset(void)
@@ -696,6 +704,11 @@ static inline u16 prcmu_get_reset_code(void)
return 0;
}
+static inline u32 prcmu_get_reset_status(void)
+{
+ return 0;
+}
+
static inline void prcmu_ac_wake_req(void) {}
static inline void prcmu_ac_sleep_req(void) {}