Merge "soc: qcom: crm: Add IPC logging"

This commit is contained in:
qctecmdr 2022-11-28 02:50:38 -08:00 committed by Gerrit - the friendly Code Review server
commit 5f2a8575e0

View File

@ -404,6 +404,7 @@ int crm_channel_switch_complete(const struct crm_drv *drv, u32 ch)
ret = -EBUSY;
trace_crm_switch_channel(drv->name, ch, ret);
ipc_log_string(drv->ipc_log_ctx, "Switch Channel: ch: %u ret: %d", ch, ret);
return ret;
}
@ -462,6 +463,9 @@ static void crm_flush_cache(struct crm_drv *drv, struct crm_vcd *vcd, u32 ch, u3
reg = crm_get_pwr_state_reg(j);
write_crm_reg(drv, reg, ch, vcd_type, i, vcd->cache[i][j]);
trace_crm_write_vcd_votes(drv->name, vcd_type, i, j, vcd->cache[i][j]);
ipc_log_string(drv->ipc_log_ctx,
"Flush: type: %u resource_idx:%u pwr_state: %u data: %#x",
vcd_type, i, j, vcd->cache[i][j]);
}
}
}
@ -558,6 +562,9 @@ static irqreturn_t crm_vote_complete_irq(int irq, void *p)
write_crm_reg(drv, IRQ_CLEAR, 0, j, k, IRQ_CLEAR_BIT);
trace_crm_irq(drv->name, j, k, irq_status);
ipc_log_string(drv->ipc_log_ctx,
"IRQ: type: %u resource_idx:%u irq_status: %lu"
, j, k, irq_status);
votes = &vcd->sw_votes[k];
if (!votes->in_progress) {
@ -648,6 +655,9 @@ static int crm_send_cmd(struct crm_drv *drv, u32 vcd_type, const struct crm_cmd
spin_unlock_irqrestore(&drv->lock, flags);
trace_crm_write_vcd_votes(drv->name, vcd_type, resource_idx, pwr_state, data);
ipc_log_string(drv->ipc_log_ctx,
"Write: type: %u resource_idx:%u pwr_state: %u data: %#x",
vcd_type, resource_idx, pwr_state, data);
if (compl && wait) {
time_left = CRM_TIMEOUT_MS;
@ -678,6 +688,10 @@ static void crm_cache_vcd_votes(struct crm_drv *drv, u32 vcd_type, const struct
spin_unlock(&drv->cache_lock);
trace_crm_cache_vcd_votes(drv->name, vcd_type, resource_idx, pwr_state, data);
ipc_log_string(drv->ipc_log_ctx,
"Cache: type: %u resource_idx:%u pwr_state: %u data: %#x",
vcd_type, resource_idx, pwr_state, data);
}
static bool crm_is_invalid_cmd(struct crm_drv *drv, u32 vcd_type, const struct crm_cmd *cmd)