soundwire: intel: add mutex for shared SHIM register access
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Thu, 12 Dec 2019 01:45:06 +0000 (19:45 -0600)
committerVinod Koul <vkoul@kernel.org>
Thu, 12 Dec 2019 03:47:07 +0000 (09:17 +0530)
commit4da0680f24c9af2de8406ded68c4ef967f448de3
tree1e31712c8ad7dbfdf5ac3bf02fd01bf6af8f5854
parent905b5a81afe15e8252e5892b8ca1ff1c1adfb79d
soundwire: intel: add mutex for shared SHIM register access

Some of the Intel SoundWire SHIM registers contain fields for
different links. Without protection, the master drivers for the
different links will access these shared registers, leading to invalid
configurations and timeouts (specifically when changing CPA/SPA
power-related registers and polling for the changes to be applied).

A mutex is added to make sure all rmw access to those registers are
serialized.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191212014507.28050-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
include/linux/soundwire/sdw_intel.h