@@ -240,6 +240,8 @@ static int handle_fsi2pib_status(struct scom_device *scom, uint32_t status)
{
uint32_t dummy = -1;
+ dev_dbg(&scom->dev, "handle_fsi2pib_status %08x\n", status);
+
if (status & SCOM_STATUS_PROTECTION)
return -EPERM;
if (status & SCOM_STATUS_PARITY) {
@@ -288,8 +290,12 @@ static int put_scom(struct scom_device *scom, uint64_t value,
int rc, retries;
for (retries = 0; retries < SCOM_MAX_RETRIES; retries++) {
+ dev_dbg(&scom->dev, "put_scom retry %d\n", retries);
+
rc = raw_put_scom(scom, value, addr, &status);
if (rc) {
+ dev_dbg(&scom->dev, "raw_put_scom failed rc = %d\n", rc);
+
/* Try resetting the bridge if FSI fails */
if (rc != -ENODEV && retries == 0) {
fsi_device_write(scom->fsi_dev, SCOM_FSI2PIB_RESET_REG,
@@ -322,9 +328,13 @@ static int get_scom(struct scom_device *scom, uint64_t *value,
int rc, retries;
for (retries = 0; retries < SCOM_MAX_RETRIES; retries++) {
+ dev_dbg(&scom->dev, "get_scom retry %d\n", retries);
+
rc = raw_get_scom(scom, value, addr, &status);
if (rc) {
/* Try resetting the bridge if FSI fails */
+ dev_dbg(&scom->dev, "raw_get_scom failed rc = %d\n", rc);
+
if (rc != -ENODEV && retries == 0) {
fsi_device_write(scom->fsi_dev, SCOM_FSI2PIB_RESET_REG,
&dummy, sizeof(uint32_t));
This helps understand scom failures by producing more information about the state of the slave. Signed-off-by: Joel Stanley <joel@jms.id.au> --- drivers/fsi/fsi-scom.c | 10 ++++++++++ 1 file changed, 10 insertions(+)