Commit b21bded7 authored by Vinod Koul's avatar Vinod Koul Committed by Greg Kroah-Hartman

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: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 90abe60b
......@@ -146,30 +146,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("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("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("IPC Modify failed!!!%d\n", retval);
return retval;
}
if (retval)
goto err;
}
}
return retval;
return 0;
err:
pr_err("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;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment