Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3140133pxa; Tue, 18 Aug 2020 07:37:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfx7f1wtN0YgvsdILBG6s7U7oup6dYxQpak9GPZqH3VnRpV6+rOVITxrdlCVjwuEZD1ukt X-Received: by 2002:a50:93a2:: with SMTP id o31mr20570849eda.203.1597761465096; Tue, 18 Aug 2020 07:37:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597761465; cv=none; d=google.com; s=arc-20160816; b=jF17yRBgwEBS9DROMzO6TihmVIMGSdu0ecbHeJJ0iOObofQQADqUcKeS6UeOH3DT34 0zmBGu4FQaZi6e5Hs2cvJWChy8FROB3xXzeuVIkqIfP+olUn7iInj9XVV+rAA4DWtKTb wo7OzFyRHrjjN/5KNS303id86LvcOaqdv7jxW3b3fp4x32F/yXRQGynlZVGazOuz6voa OTQATO9EsU4ZU19n+auY0Eln7LtewjR/dctLGjB92pWci4Luyce+uSTn6PWUAdxS8vYU Zsf7TbI577RjaUwCnvSktZDO6c6CrK6BVyiOfQvLD1iN+l462q3kOc2mcFhGOzhPSwlH 2Rqg== 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=xFqdCNFIQ0S3RSVDQiUKnKF2TI8vtOg3UD4VZC2yKvE=; b=MhJjfeSK6OF2macA60mhOj7yCWywDx7R5pIzrxAigydAO0tvFAS8v1gLpFdfB56R3L 8uzATz7oMmIxM4famwmqcwsVNFGvzphzFXrASypuXZauXxQzNzQj7va6RlOya6cSCzTr S4DPSiYx6eqpr2KZVkF2+XMRd1pMVMfUjwzogAxlfa6036/XL+n0NSWvuw5oND6xb1uO 9cPooG9Y3B0W/w0T3hfU2+xoN5b51fJYfc5u8aDsTMhkCjj+o/+dPbnmlQi+otOJ1vqk aPR1WaBVQxC9mXTVfpNWpiOnNdY6nREycXXa3zDOR1WD0A5k4ag/fA6UlvSWCgybFw6C IW/g== 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 g13si13079752edv.263.2020.08.18.07.37.21; Tue, 18 Aug 2020 07:37:45 -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 S1727817AbgHROfw (ORCPT + 99 others); Tue, 18 Aug 2020 10:35:52 -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 S1727809AbgHROfv (ORCPT ); Tue, 18 Aug 2020 10:35:51 -0400 IronPort-SDR: cpFjaGuLeJnazvHufe9kzVuX1CpVd67hVpTdG0H/fLJlP6kNkCds0Yj67GBhRZQ25cR9HnvRmW jt8y4Yug9vIA== X-IronPort-AV: E=McAfee;i="6000,8403,9716"; a="154170553" X-IronPort-AV: E=Sophos;i="5.76,327,1592895600"; d="scan'208";a="154170553" 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:50 -0700 IronPort-SDR: AIhjxwyM/gfQSxofSktFFoxr2OoyARo0h0simTSsqnoe5EB4uk2nh/bTMpBp5WJIXwwfmz8CS0 zNwFVoSKeEwg== X-IronPort-AV: E=Sophos;i="5.76,327,1592895600"; d="scan'208";a="471830737" 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:46 -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 09/11] soundwire: intel: add dynamic debug trace for clock-stop invalid configs Date: Tue, 18 Aug 2020 10:41:18 +0800 Message-Id: <20200818024120.20721-10-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 Detect cases where the clock is assumed to be stopped but the IP is not in the relevant state, and add a dynamic debug trace. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- drivers/soundwire/intel.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 7c63581270fd..b82d02af3c4f 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -1964,6 +1964,11 @@ static int intel_resume_runtime(struct device *dev) } } } else if (!clock_stop_quirks) { + + clock_stop0 = sdw_cdns_is_clock_stop(&sdw->cdns); + if (!clock_stop0) + dev_err(dev, "%s invalid configuration, clock was not stopped", __func__); + ret = intel_init(sdw); if (ret) { dev_err(dev, "%s failed: %d", __func__, ret); -- 2.17.1