Commit 4d1e2464 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Vinod Koul

soundwire: intel_ace2x: add sync_arm/sync_go helpers

Same functionality as before, but with the registers moved to the
HDaudio multi-link area.
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarRander Wang <rander.wang@intel.com>
Reviewed-by: default avatarPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230515071042.2038-16-yung-chuan.liao@linux.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent d2f0daf6
......@@ -116,6 +116,41 @@ static int intel_link_power_down(struct sdw_intel *sdw)
return ret;
}
static void intel_sync_arm(struct sdw_intel *sdw)
{
unsigned int link_id = sdw->instance;
mutex_lock(sdw->link_res->shim_lock);
hdac_bus_eml_sdw_sync_arm_unlocked(sdw->link_res->hbus, link_id);
mutex_unlock(sdw->link_res->shim_lock);
}
static int intel_sync_go_unlocked(struct sdw_intel *sdw)
{
int ret;
ret = hdac_bus_eml_sdw_sync_go_unlocked(sdw->link_res->hbus);
if (ret < 0)
dev_err(sdw->cdns.dev, "%s: SyncGO clear failed: %d\n", __func__, ret);
return ret;
}
static int intel_sync_go(struct sdw_intel *sdw)
{
int ret;
mutex_lock(sdw->link_res->shim_lock);
ret = intel_sync_go_unlocked(sdw);
mutex_unlock(sdw->link_res->shim_lock);
return ret;
}
/*
* DAI operations
*/
......@@ -283,6 +318,10 @@ const struct sdw_intel_hw_ops sdw_intel_lnl_hw_ops = {
.link_power_up = intel_link_power_up,
.link_power_down = intel_link_power_down,
.sync_arm = intel_sync_arm,
.sync_go_unlocked = intel_sync_go_unlocked,
.sync_go = intel_sync_go,
};
EXPORT_SYMBOL_NS(sdw_intel_lnl_hw_ops, SOUNDWIRE_INTEL);
......
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