aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2010-12-09 10:37:33 +0000
committerAlan Cox <alan@linux.intel.com>2010-12-09 10:37:33 +0000
commita3606a731aeb49659561b5b25d65a02654cacb89 (patch)
treeb9e2a9a69c405044edfe84dfb277b1a2b3658d77
parentdb31648359abb96d1eac3576745b0ca06bc2accf (diff)
downloadmrst-s0i3-test-a3606a731aeb49659561b5b25d65a02654cacb89.tar.gz
mrst-s0i3-test-a3606a731aeb49659561b5b25d65a02654cacb89.tar.xz
mrst-s0i3-test-a3606a731aeb49659561b5b25d65a02654cacb89.zip
sst: log error returned by scu ipc read/write
scu ipc driver fails sometimes to read/write. This add logs with register addr and ret code when these errors occur. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
-rw-r--r--drivers/staging/intel_sst/intelmid_pvt.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/staging/intel_sst/intelmid_pvt.c b/drivers/staging/intel_sst/intelmid_pvt.c
index e8938d98137..ecf3b602625 100644
--- a/drivers/staging/intel_sst/intelmid_pvt.c
+++ b/drivers/staging/intel_sst/intelmid_pvt.c
@@ -143,30 +143,29 @@ int sst_sc_reg_access(struct sc_reg_access *sc_access,
for (i = 0; i < num_val; i++) {
retval = intel_scu_ipc_iowrite8(sc_access[i].reg_addr,
sc_access[i].value);
- if (retval) {
- pr_err("sst: IPC write failed!!! %d\n", retval);
- return retval;
- }
+ if (retval)
+ goto err;
}
} else if (type == PMIC_READ) {
for (i = 0; i < num_val; i++) {
retval = intel_scu_ipc_ioread8(sc_access[i].reg_addr,
&(sc_access[i].value));
- if (retval) {
- pr_err("sst: IPC read failed!!!!!%d\n", retval);
- return retval;
- }
+ if (retval)
+ goto err;
}
} else {
for (i = 0; i < num_val; i++) {
retval = intel_scu_ipc_update_register(
sc_access[i].reg_addr, sc_access[i].value,
sc_access[i].mask);
- if (retval) {
- pr_err("sst: IPC Modify failed!!!%d\n", retval);
- return retval;
- }
+ if (retval)
+ goto err;
}
- }
+ }
+ return 0;
+err:
+ pr_err("sst: IPC failed for cmd!!!%d, %d\n", retval, type);
+ pr_err("reg:0x%2x addr:0x%2x\n",
+ sc_access[i].reg_addr, sc_access[i].value);
return retval;
}