msm: bam_dmux: log state changes
Log power collapse state changes for a complete trace.
Change-Id: Ie716b7337ad418d1dc1ed01be9c77f025e40f92c
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
diff --git a/arch/arm/mach-msm/bam_dmux.c b/arch/arm/mach-msm/bam_dmux.c
index 644a666..b865f24 100644
--- a/arch/arm/mach-msm/bam_dmux.c
+++ b/arch/arm/mach-msm/bam_dmux.c
@@ -999,10 +999,12 @@
return;
}
if (ul_packet_written) {
+ pr_info("%s: packet written\n", __func__);
ul_packet_written = 0;
schedule_delayed_work(&ul_timeout_work,
msecs_to_jiffies(UL_TIMEOUT_DELAY));
} else {
+ pr_info("%s: powerdown\n", __func__);
wait_for_ack = 1;
INIT_COMPLETION(ul_wakeup_ack_completion);
smsm_change_state(SMSM_APPS_STATE, SMSM_A2_POWER_CONTROL, 0);
@@ -1020,6 +1022,7 @@
mutex_unlock(&wakeup_lock);
return;
}
+ pr_info("%s\n", __func__);
/*
* must wait for the previous power down request to have been acked
* chances are it already came in and this will just fall through
@@ -1325,6 +1328,7 @@
static void toggle_apps_ack(void)
{
static unsigned int clear_bit; /* 0 = set the bit, else clear bit */
+ pr_info("%s: clear bit: %d\n", __func__, clear_bit);
smsm_change_state(SMSM_APPS_STATE,
clear_bit & SMSM_A2_POWER_CONTROL_ACK,
~clear_bit & SMSM_A2_POWER_CONTROL_ACK);
@@ -1333,15 +1337,19 @@
static void bam_dmux_smsm_cb(void *priv, uint32_t old_state, uint32_t new_state)
{
- DBG("%s: smsm activity\n", __func__);
+ pr_info("%s: smsm activity 0x%08x -> 0x%08x\n", __func__, old_state,
+ new_state);
if (bam_mux_initialized && new_state & SMSM_A2_POWER_CONTROL) {
+ pr_info("%s: reconnect\n", __func__);
wake_lock(&bam_wakelock);
reconnect_to_bam();
} else if (bam_mux_initialized &&
!(new_state & SMSM_A2_POWER_CONTROL)) {
+ pr_info("%s: disconnect\n", __func__);
disconnect_to_bam();
wake_unlock(&bam_wakelock);
} else if (new_state & SMSM_A2_POWER_CONTROL) {
+ pr_info("%s: init\n", __func__);
wake_lock(&bam_wakelock);
bam_init();
} else {
@@ -1353,6 +1361,7 @@
static void bam_dmux_smsm_ack_cb(void *priv, uint32_t old_state,
uint32_t new_state)
{
+ pr_info("%s: 0x%08x -> 0x%08x\n", __func__, old_state, new_state);
complete_all(&ul_wakeup_ack_completion);
}