diff options
author | Arun Murthy <arun.murthy@stericsson.com> | 2012-01-27 20:38:10 +0530 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-06-05 10:40:27 +0200 |
commit | e5167e878c133bd5f1c3ac5f207084355a43b234 (patch) | |
tree | b9a578f8d32b1842f9af30e52fe0aec9b6f5ad5e | |
parent | bb42ff684d592b1c5819980b2592429a71cab4f9 (diff) |
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 <arun.murthy@stericsson.com>
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/47128
Reviewed-by: QABUILD
Reviewed-by: QATEST
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
-rw-r--r-- | drivers/modem/shrm/shrm_protocol.c | 14 | ||||
-rw-r--r-- | include/linux/modem/shrm/shrm_driver.h | 2 |
2 files changed, 16 insertions, 0 deletions
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 <linux/modem/shrm/shrm_net.h> #include <linux/modem/modem_client.h> #include <linux/mfd/dbx500-prcmu.h> +#include <linux/mfd/abx500.h> #include <mach/reboot_reasons.h> #include <mach/suspend.h> +#include <mach/prcmu-debug.h> #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; }; /** |