aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKumar Sanghvi <Kumar.Sanghvi@stericsson.com>2010-03-25 11:20:07 +0530
committerJohn Rigby <john.rigby@linaro.org>2010-09-02 22:44:50 -0600
commite78ef2234f80654e79140083b891d1fc09d22b01 (patch)
tree13050cc3201fde8b78a81f1e2a53c2e28fdf8b85
parenteadf42a62ca69e8a3d4fedb5b80e347a946b522a (diff)
downloadlinux-2.6.34-ux500-e78ef2234f80654e79140083b891d1fc09d22b01.tar.gz
PRCMU, SHRM: Hooking modem reset request from PRCMU with SHRM
Signed-off-by: Kumar Sanghvi <Kumar.Sanghvi@stericsson.com>
-rwxr-xr-xarch/arm/mach-ux500/include/mach/prcmu-fw-api.h1
-rwxr-xr-xarch/arm/mach-ux500/prcmu-fw.c8
-rw-r--r--drivers/misc/shrm/shrm_protocol.c10
3 files changed, 18 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/include/mach/prcmu-fw-api.h b/arch/arm/mach-ux500/include/mach/prcmu-fw-api.h
index fe708a40134..504f8c506ae 100755
--- a/arch/arm/mach-ux500/include/mach/prcmu-fw-api.h
+++ b/arch/arm/mach-ux500/include/mach/prcmu-fw-api.h
@@ -78,6 +78,7 @@ int prcmu_configure_wakeup_events(u32, u32, int);
int prcmu_get_wakeup_reason(u32 *, u8 *);
int prcmu_ack_wakeup_reason(void);
void prcmu_set_callback_cawakereq(void (*func)(u8));
+void prcmu_set_callback_modem_reset_request(void (*func)(void));
void prcmu_system_reset(void);
int prcmu_is_ca_wake_req_pending(void);
int prcmu_read_ack_mb7(void);
diff --git a/arch/arm/mach-ux500/prcmu-fw.c b/arch/arm/mach-ux500/prcmu-fw.c
index 5c8f7102a6b..a09405dc189 100755
--- a/arch/arm/mach-ux500/prcmu-fw.c
+++ b/arch/arm/mach-ux500/prcmu-fw.c
@@ -1807,7 +1807,13 @@ void prcmu_ack_mb7_status_tasklet(unsigned long tasklet_data)
switch (ack_mb7) {
case MOD_SW_RESET_REQ:
- /*forward the reset request to ARM */
+ /*forward the reset request to SHRM */
+ if (prcmu_modem_reset_shrm != NULL)
+ (*prcmu_modem_reset_shrm)();
+ else {
+ /* SHRM callback for reset not registered!*/
+ printk(KERN_INFO "\nSHRM callback for reset NULL\n");
+ }
break;
case CA_SLEEP_REQ:
/* modem no longer requires to communicate
diff --git a/drivers/misc/shrm/shrm_protocol.c b/drivers/misc/shrm/shrm_protocol.c
index a493216b8fb..03374eb9542 100644
--- a/drivers/misc/shrm/shrm_protocol.c
+++ b/drivers/misc/shrm/shrm_protocol.c
@@ -56,6 +56,7 @@ static enum hrtimer_restart callback(struct hrtimer *timer)
static void shrm_cawake_req_callback(u8);
+static void shrm_modem_reset_req_callback(void);
void shm_ca_wake_req_tasklet(unsigned long tasklet_data)
{
@@ -267,12 +268,21 @@ void shm_protocol_init(received_msg_handler common_rx_handler,
/* register callback with PRCMU for ca_wake_req */
prcmu_set_callback_cawakereq(&shrm_cawake_req_callback);
+ /* register callback with PRCMU for ca_wake_req */
+ prcmu_set_callback_modem_reset_request(&shrm_modem_reset_req_callback);
+
/* check if there is any initial pending ca_wake_req */
if (prcmu_is_ca_wake_req_pending())
shrm_cawake_req_callback(1);
}
+void shrm_modem_reset_req_callback(void)
+{
+ /* Call the PRCMU reset API */
+ prcmu_system_reset();
+}
+
void shrm_cawake_req_callback(u8 ca_wake_state)
{
if (ca_wake_state) {