summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire/intel.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2023-03-14 02:54:04 +0100
committerVinod Koul <vkoul@kernel.org>2023-03-15 14:54:02 +0100
commitfb43d62ee772fac7173bfbed3ca1bccdc508f10a (patch)
treee664cc81466428b2764ff4e37a62eaa2d4468079 /drivers/soundwire/intel.c
parentsoundwire: intel: add abstraction for cmdsync check (diff)
downloadlinux-fb43d62ee772fac7173bfbed3ca1bccdc508f10a.tar.xz
linux-fb43d62ee772fac7173bfbed3ca1bccdc508f10a.zip
soundwire: intel: move bank switch routine to common intel_bus_common.c
No functionality change, just moving the routines to a common file so that they can be used for new hardware. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230314015410.487311-11-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/intel.c')
-rw-r--r--drivers/soundwire/intel.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index 1131ecb4b5e7..046c67a2a39b 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
@@ -683,55 +683,6 @@ static int intel_free_stream(struct sdw_intel *sdw,
}
/*
- * bank switch routines
- */
-
-static int intel_pre_bank_switch(struct sdw_intel *sdw)
-{
- struct sdw_cdns *cdns = &sdw->cdns;
- struct sdw_bus *bus = &cdns->bus;
-
- /* Write to register only for multi-link */
- if (!bus->multi_link)
- return 0;
-
- sdw_intel_sync_arm(sdw);
-
- return 0;
-}
-
-static int intel_post_bank_switch(struct sdw_intel *sdw)
-{
- struct sdw_cdns *cdns = &sdw->cdns;
- struct sdw_bus *bus = &cdns->bus;
- int ret = 0;
-
- /* Write to register only for multi-link */
- if (!bus->multi_link)
- return 0;
-
- mutex_lock(sdw->link_res->shim_lock);
-
- /*
- * post_bank_switch() ops is called from the bus in loop for
- * all the Masters in the steam with the expectation that
- * we trigger the bankswitch for the only first Master in the list
- * and do nothing for the other Masters
- *
- * So, set the SYNCGO bit only if CMDSYNC bit is set for any Master.
- */
- if (sdw_intel_sync_check_cmdsync_unlocked(sdw))
- ret = sdw_intel_sync_go_unlocked(sdw);
-
- mutex_unlock(sdw->link_res->shim_lock);
-
- if (ret < 0)
- dev_err(sdw->cdns.dev, "Post bank switch failed: %d\n", ret);
-
- return ret;
-}
-
-/*
* DAI routines
*/