Skip to content

Commit

Permalink
soundwire: cadence_master: debug error on Olympic device in clock_stop
Browse files Browse the repository at this point in the history
Somehow the master-2 fails to stop the clock

[   24.007288] intel-sdw sdw-master-2: intel_suspend_runtime start
[   24.007297] intel-sdw sdw-master-2: sdw_cdns_clock_stop: start
[   24.007303] intel-sdw sdw-master-2: sdw_cdns_clock_stop: slave attached 0
[   24.007498] intel-sdw sdw-master-2: Msg ignored for Slave 15
[   24.007501] intel-sdw sdw-master-2: ClockStopNow Broadcast message failed -61
[   24.007505] intel-sdw sdw-master-2: bus clock stop failed -61
[   24.007508] intel-sdw sdw-master-2: cannot enable clock stop on suspend

there are not slaves attached, so the command ignored should be accepted

what's not clear is what the CMD_ACCEPT (1) is already the default?

Signed-off-by: Pierre-Louis Bossart <[email protected]>
  • Loading branch information
plbossart committed Dec 5, 2019
1 parent 85bb336 commit 5aef8fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/soundwire/cadence_master.c
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,8 @@ int sdw_cdns_clock_stop(struct sdw_cdns *cdns, bool block_wake)
u32 status;
int ret;

dev_dbg(cdns->dev, "%s: start\n", __func__);

/* Check suspend status */
status = cdns_readl(cdns, CDNS_MCP_STAT);
if (status & CDNS_MCP_STAT_CLK_STOP) {
Expand All @@ -1247,6 +1249,7 @@ int sdw_cdns_clock_stop(struct sdw_cdns *cdns, bool block_wake)
}
}

dev_dbg(cdns->dev, "%s: slave attached %d\n", __func__, slave_attached);
/*
* This CMD_ACCEPT should be used when there are no devices
* attached on the link when entering clock stop mode. If this is
Expand Down Expand Up @@ -1283,6 +1286,8 @@ int sdw_cdns_clock_stop(struct sdw_cdns *cdns, bool block_wake)
if (ret < 0)
dev_err(cdns->dev, "Clock stop failed %d\n", ret);

dev_dbg(cdns->dev, "%s: end\n", __func__);

return ret;
}
EXPORT_SYMBOL(sdw_cdns_clock_stop);
Expand Down

0 comments on commit 5aef8fe

Please sign in to comment.