From e5167e878c133bd5f1c3ac5f207084355a43b234 Mon Sep 17 00:00:00 2001 From: Arun Murthy Date: Fri, 27 Jan 2012 20:38:10 +0530 Subject: modem: u8500-shrm: print prcmu and abb regs on stuck timeout ST-Ericsson Linux next: - ST-Ericsson ID: 402239 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Ia08165f58c0d55db7ed97a0c74cd4b493cf14495 Signed-off-by: Arun Murthy Signed-off-by: Mian Yousaf Kaukab Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/47128 Reviewed-by: QABUILD Reviewed-by: QATEST Reviewed-by: Jonas ABERG --- drivers/modem/shrm/shrm_protocol.c | 14 ++++++++++++++ include/linux/modem/shrm/shrm_driver.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/drivers/modem/shrm/shrm_protocol.c b/drivers/modem/shrm/shrm_protocol.c index b9613f544e5..40e77993613 100644 --- a/drivers/modem/shrm/shrm_protocol.c +++ b/drivers/modem/shrm/shrm_protocol.c @@ -17,8 +17,10 @@ #include #include #include +#include #include #include +#include #define L2_HEADER_ISI 0x0 #define L2_HEADER_RPC 0x1 @@ -80,6 +82,13 @@ enum shrm_nl { SHRM_NL_STATUS_MOD_OFFLINE, }; +void shm_print_dbg_info_work(struct kthread_work *work) +{ + abx500_dump_all_banks(); + prcmu_debug_dump_regs(); + prcmu_debug_dump_data_mem(); +} + void shm_mod_reset_req_work(struct kthread_work *work) { prcmu_modem_reset(); @@ -115,6 +124,8 @@ static enum hrtimer_restart shm_fifo_full_timeout(struct hrtimer *timer) { queue_kthread_work(&shm_dev->shm_mod_stuck_kw, &shm_dev->shm_mod_reset_req); + queue_kthread_work(&shm_dev->shm_mod_stuck_kw, + &shm_dev->shm_print_dbg_info); return HRTIMER_NORESTART; } @@ -136,6 +147,8 @@ static enum hrtimer_restart shm_mod_stuck_timeout(struct hrtimer *timer) dev_err(shm_dev->dev, "APE initiating MSR\n"); queue_kthread_work(&shm_dev->shm_mod_stuck_kw, &shm_dev->shm_mod_reset_req); + queue_kthread_work(&shm_dev->shm_mod_stuck_kw, + &shm_dev->shm_print_dbg_info); return HRTIMER_NORESTART; } @@ -889,6 +902,7 @@ int shrm_protocol_init(struct shrm_dev *shrm, init_kthread_work(&shrm->shm_ac_sleep_req, shm_ac_sleep_req_work); init_kthread_work(&shrm->shm_ac_wake_req, shm_ac_wake_req_work); init_kthread_work(&shrm->shm_mod_reset_req, shm_mod_reset_req_work); + init_kthread_work(&shrm->shm_print_dbg_info, shm_print_dbg_info_work); /* set tasklet data */ shm_ca_0_tasklet.data = (unsigned long)shrm; diff --git a/include/linux/modem/shrm/shrm_driver.h b/include/linux/modem/shrm/shrm_driver.h index e8905e68778..b6e5c354db5 100644 --- a/include/linux/modem/shrm/shrm_driver.h +++ b/include/linux/modem/shrm/shrm_driver.h @@ -87,6 +87,7 @@ * @shm_ca_sleep_req: work to send cmt-ape sleep request * @shm_ac_sleep_req: work to send ape-cmt sleep request * @shm_mod_reset_req: work to send a reset request to modem + * @shm_print_dbg_info: work function to print all prcmu/abb registers */ struct shrm_dev { u8 ca_wake_irq; @@ -145,6 +146,7 @@ struct shrm_dev { struct kthread_work shm_ca_sleep_req; struct kthread_work shm_ac_sleep_req; struct kthread_work shm_mod_reset_req; + struct kthread_work shm_print_dbg_info; }; /** -- cgit v1.2.3