OSDN Git Service

soundwire: intel/cadence: fix startup sequence
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tue, 22 Oct 2019 23:54:44 +0000 (18:54 -0500)
committerVinod Koul <vkoul@kernel.org>
Thu, 24 Oct 2019 11:52:01 +0000 (17:22 +0530)
commit49ea07d33d9a32c17e18b322e789507280ceb2a3
tree08ab30ff2bf4201f6a81e0454507a57493593a66
parent3fc40449a06bc4510fd4eee4590af87917c47184
soundwire: intel/cadence: fix startup sequence

Multiple changes squashed in single patch to avoid tick-tock effect
and avoid breaking compilation/bisect

1. Per the hardware documentation, all changes to MCP_CONFIG,
MCP_CONTROL, MCP_CMDCTRL and MCP_PHYCTRL need to be validated with a
self-clearing write to MCP_CONFIG_UPDATE. Add a helper and do the
update when the CONFIG is changed.

2. Move interrupt enable after interrupt handler registration

3. Add a new helper to start the hardware bus reset with maximum duration
to make sure the Slave(s) correctly detect the reset pattern and to
ensure electrical conflicts can be resolved.

4. flush command FIFOs

Better error handling will be provided after interrupt disable is
provided in follow-up patches.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191022235448.17586-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/cadence_master.c
drivers/soundwire/cadence_master.h
drivers/soundwire/intel.c