diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2020-07-16 18:09:40 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-07-21 13:35:40 +0300 |
commit | 4a17c441c7cb06ac1e5fd3409a64d8ce78151983 (patch) | |
tree | 486d772aea4250183d58290578130b0a379a13dd /drivers/ata/pata_cmd640.c | |
parent | 7d2845d58d257921f771f3fbed5982464ee4855b (diff) | |
download | linux-4a17c441c7cb06ac1e5fd3409a64d8ce78151983.tar.xz |
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>
Diffstat (limited to 'drivers/ata/pata_cmd640.c')
0 files changed, 0 insertions, 0 deletions