Skip to content

Commit a206d2e

Browse files
plbossartvinodkoul
authored andcommitted
soundwire: intel_ace2.x: power-up first before setting SYNCPRD
The existing sequence is fine if we want to only use the xtal clock. However if we want to select the clock, we first need to power-up, then select the clock and last set the SYNCPRD. This patch first modifies the order, we will add the clock selection as a follow-up. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Rander Wang <[email protected]> Signed-off-by: Bard Liao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 769d698 commit a206d2e

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

drivers/soundwire/intel_ace2x.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ static int intel_link_power_up(struct sdw_intel *sdw)
9393

9494
mutex_lock(sdw->link_res->shim_lock);
9595

96+
ret = hdac_bus_eml_sdw_power_up_unlocked(sdw->link_res->hbus, link_id);
97+
if (ret < 0) {
98+
dev_err(sdw->cdns.dev, "%s: hdac_bus_eml_sdw_power_up failed: %d\n",
99+
__func__, ret);
100+
goto out;
101+
}
102+
96103
if (!*shim_mask) {
97104
/* we first need to program the SyncPRD/CPU registers */
98105
dev_dbg(sdw->cdns.dev, "first link up, programming SYNCPRD\n");
@@ -103,16 +110,7 @@ static int intel_link_power_up(struct sdw_intel *sdw)
103110
__func__, ret);
104111
goto out;
105112
}
106-
}
107113

108-
ret = hdac_bus_eml_sdw_power_up_unlocked(sdw->link_res->hbus, link_id);
109-
if (ret < 0) {
110-
dev_err(sdw->cdns.dev, "%s: hdac_bus_eml_sdw_power_up failed: %d\n",
111-
__func__, ret);
112-
goto out;
113-
}
114-
115-
if (!*shim_mask) {
116114
/* SYNCPU will change once link is active */
117115
ret = hdac_bus_eml_sdw_wait_syncpu_unlocked(sdw->link_res->hbus);
118116
if (ret < 0) {

0 commit comments

Comments
 (0)