linux/drivers/soundwire
Pierre-Louis Bossart 4a17c441c7 soundwire: intel: revisit SHIM programming sequences.
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>
2020-07-21 16:05:40 +05:30
..
bus_type.c soundwire: extend SDW_SLAVE_ENTRY 2020-06-30 21:26:17 +05:30
bus.c soundwire: bus: initialize bus clock base and scale registers 2020-06-30 21:26:17 +05:30
bus.h soundwire: add Slave sysfs support 2020-05-20 17:22:41 +05:30
cadence_master.c soundwire: cadence: allocate/free dma_data in set_sdw_stream 2020-07-15 10:10:05 +05:30
cadence_master.h soundwire: cadence: make SSP interval programmable 2020-03-19 12:43:04 +05:30
debugfs.c soundwire: debugfs: clarify SDPX license with GPL-2.0-only 2020-05-05 08:51:44 +05:30
intel_init.c soundwire: intel: revisit SHIM programming sequences. 2020-07-21 16:05:40 +05:30
intel.c soundwire: intel: revisit SHIM programming sequences. 2020-07-21 16:05:40 +05:30
intel.h soundwire: intel: revisit SHIM programming sequences. 2020-07-21 16:05:40 +05:30
Kconfig soundwire: qcom: add support for SoundWire controller 2020-01-14 11:57:47 +05:30
Makefile soundwire: Replace 'objs' by 'y' 2020-06-22 17:06:08 +05:30
master.c soundwire: master: add sysfs support 2020-05-20 17:22:36 +05:30
mipi_disco.c soundwire: disco: s/ch/channels/ 2020-05-20 17:22:30 +05:30
qcom.c soundwire: qcom: Constify static structs 2020-06-22 17:28:10 +05:30
slave.c soundwire: bus_type: introduce sdw_slave_type and sdw_master_type 2020-05-19 12:44:34 +05:30
stream.c soundwire: fix the kernel-doc comment 2020-07-16 09:37:43 +05:30
sysfs_local.h soundwire: add Slave sysfs support 2020-05-20 17:22:41 +05:30
sysfs_slave_dpn.c soundwire: fix spelling mistake 2020-05-20 17:29:37 +05:30
sysfs_slave.c soundwire: fix trailing line in sysfs_slave.c 2020-05-20 17:27:45 +05:30