mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
4a17c441c7
Somehow the existing code is not aligned with the steps described in the documentation, refactor code and make sure the register programming sequences are correct. Also add missing power-up, power-down and wake capabilities (the last two are used in follow-up patches but introduced here for consistency). Some of the SHIM registers exposed fields that are link specific, and in addition some of the power-related registers (SPA/CPA) take time to be updated. Uncontrolled access leads to timeouts or errors. Add a mutex, shared by all links, so that all accesses to such registers are serialized, and follow a pattern of read-modify-write. This includes making sure SHIM_SYNC is programmed only once, before the first master is powered on. We use a 'shim_mask' field, shared between all links and protected by a mutex, to deal with power-up and power-down sequences. Note that the SYNCPRD value is tied only to the XTAL value and not the current bus frequency or the frame rate. BugLink: https://github.com/thesofproject/linux/issues/1555 Signed-off-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20200716150947.22119-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> |
||
---|---|---|
.. | ||
bus_type.c | ||
bus.c | ||
bus.h | ||
cadence_master.c | ||
cadence_master.h | ||
debugfs.c | ||
intel_init.c | ||
intel.c | ||
intel.h | ||
Kconfig | ||
Makefile | ||
master.c | ||
mipi_disco.c | ||
qcom.c | ||
slave.c | ||
stream.c | ||
sysfs_local.h | ||
sysfs_slave_dpn.c | ||
sysfs_slave.c |