soundwire: intel: pass link_mask information to each master
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tue, 1 Sep 2020 15:05:55 +0000 (23:05 +0800)
committerVinod Koul <vkoul@kernel.org>
Thu, 3 Sep 2020 10:44:39 +0000 (16:14 +0530)
While the hardware exposes independent bits to power-up each master,
the recommended sequence is to power all links or none. Idle links can
still use the clock stop mode while the master is powered.

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/20200901150556.19432-10-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/intel.h
drivers/soundwire/intel_init.c

index 23daab9da32932cd155434250988eab20ab8eb29..76820d0b9deb0bbce3e7a36273eb97288cdc8c2a 100644 (file)
@@ -18,6 +18,7 @@
  * @shim_lock: mutex to handle access to shared SHIM registers
  * @shim_mask: global pointer to check SHIM register initialization
  * @clock_stop_quirks: mask defining requested behavior on pm_suspend
+ * @link_mask: global mask needed for power-up/down sequences
  * @cdns: Cadence master descriptor
  * @list: used to walk-through all masters exposed by the same controller
  */
@@ -33,6 +34,7 @@ struct sdw_intel_link_res {
        struct mutex *shim_lock; /* protect shared registers */
        u32 *shim_mask;
        u32 clock_stop_quirks;
+       u32 link_mask;
        struct sdw_cdns *cdns;
        struct list_head list;
 };
index add46d8fc85cfd4c562538b223c607686517d0ff..65d9b9bd2106f183f1efbfed673ef4a7c37abfab 100644 (file)
@@ -255,6 +255,7 @@ static struct sdw_intel_ctx
                link->clock_stop_quirks = res->clock_stop_quirks;
                link->shim_lock = &ctx->shim_lock;
                link->shim_mask = &ctx->shim_mask;
+               link->link_mask = link_mask;
 
                memset(&pdevinfo, 0, sizeof(pdevinfo));