Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3140569pxa; Tue, 18 Aug 2020 07:38:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOA8SQJV6luA7pfi0Fs9M+Uz07ukCyPqQSv9o5S+8I5xoDmwSGKEiOe59G32e26lRVlJLi X-Received: by 2002:a05:6402:1e2:: with SMTP id i2mr19761006edy.70.1597761496252; Tue, 18 Aug 2020 07:38:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597761496; cv=none; d=google.com; s=arc-20160816; b=yetAAHFajGNf4y8RgnnpglssyZUT8h6B01v6YvUH7MSU5+q5Mfp0kFne9LJ0LDbIs6 qrJXRIpzxy6YOTSD899RogFhq/HLlaBwHmnHFb03fHHpqQUK1USwhKyc0u0jCbuKatbG GLlAbFTM1b2g+1/NZmJ3g+a+4YjKq8H9GXO0s+/kqHXGvvcq+wEZUm0bUvM2eDDNdKu0 rkzLc723B7BpefwBQIR5Gq19P2cqofF7z3N5yaw2JwpSL7OFLXNovxlIMX9goi4K8Zy3 KJU0S0yyodVI50ZfVH4ecfePlpFltw50HAXwrO4QXBqKoKLKEMgVTX3PG8Rz0MqXA0tM UvhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:ironport-sdr:ironport-sdr; bh=sN8CyZDpOW3niRPKjORggvPI5EeU9bpBn1y7e5yDjkM=; b=aLgeNv1ZCBcjrGq8iPVPBCLkWyoOs4Gr7oxnLpIZ9GQ3w2u8TfgTPtgc+hPW6gvORo gVs0h1TNW852eVpUU3xfZRWjeQSXY+e7ty2YHmK4bA8KRATkS/M0daQYzdY0sehvolxn Fq5KaKApnLi6hyXAby6Mc2m4cGLg8fDgL7Ctpr1Dh/smdg5MPoa7i2SrXocKgMli3Onn IpM2Brow6cc9TryMXHYpZ2Eo0cj8g/75FVlYB18FciyjP4VUottdGx8OT8dqxY/Sdhc0 O4+QuUkx78gOFP3DAtQW0j5NTmREK0Zt+c0gXNPn50ca1NzAm4PtIgtaf/PiWQAAyPWu NGJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y26si13152306edr.390.2020.08.18.07.37.52; Tue, 18 Aug 2020 07:38:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727828AbgHROf6 (ORCPT + 99 others); Tue, 18 Aug 2020 10:35:58 -0400 Received: from mga14.intel.com ([192.55.52.115]:33372 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727809AbgHROfz (ORCPT ); Tue, 18 Aug 2020 10:35:55 -0400 IronPort-SDR: KccPKi6+YWw2zEJCPbCWKT9N/B9ezfQ0qy9oHemVX6mdBhlNA00UYaqMv7D7tnAIdT1ZnB0fg6 mghAx3X6Jfxw== X-IronPort-AV: E=McAfee;i="6000,8403,9716"; a="154170574" X-IronPort-AV: E=Sophos;i="5.76,327,1592895600"; d="scan'208";a="154170574" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2020 07:35:54 -0700 IronPort-SDR: rZQzk4DF3+xAvZfsyWodrluSh4F2EA7HqkIff5aE6I1tvoej7gQmzrAw+wnYCYMOJ9IH7EKeXN k20Ozb9nFSWQ== X-IronPort-AV: E=Sophos;i="5.76,327,1592895600"; d="scan'208";a="471830766" Received: from bard-ubuntu.sh.intel.com ([10.239.13.33]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2020 07:35:50 -0700 From: Bard Liao To: alsa-devel@alsa-project.org, vkoul@kernel.org Cc: vinod.koul@linaro.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, rander.wang@linux.intel.com, ranjani.sridharan@linux.intel.com, hui.wang@canonical.com, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, mengdong.lin@intel.com, bard.liao@intel.com Subject: [PATCH 10/11] soundwire: intel: pass link_mask information to each master Date: Tue, 18 Aug 2020 10:41:19 +0800 Message-Id: <20200818024120.20721-11-yung-chuan.liao@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200818024120.20721-1-yung-chuan.liao@linux.intel.com> References: <20200818024120.20721-1-yung-chuan.liao@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pierre-Louis Bossart 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 Signed-off-by: Bard Liao --- drivers/soundwire/intel.h | 2 ++ drivers/soundwire/intel_init.c | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/soundwire/intel.h b/drivers/soundwire/intel.h index 23daab9da329..76820d0b9deb 100644 --- a/drivers/soundwire/intel.h +++ b/drivers/soundwire/intel.h @@ -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; }; diff --git a/drivers/soundwire/intel_init.c b/drivers/soundwire/intel_init.c index add46d8fc85c..65d9b9bd2106 100644 --- a/drivers/soundwire/intel_init.c +++ b/drivers/soundwire/intel_init.c @@ -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)); -- 2.17.1