From patchwork Wed Jun 7 02:06:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liao, Bard" X-Patchwork-Id: 690555 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6F0E5C7EE37 for ; Wed, 7 Jun 2023 01:45:27 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5FA5F822; Wed, 7 Jun 2023 03:44:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5FA5F822 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1686102324; bh=oak0LJhMLWtP9UoshEOtnO5xklZAVt1BPVezT+IWuFw=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=tXrC2v+UKpeE7wyCQDzU7eMZkAADdcaaaQPkjzejSZ9+nyGv1tQMzYKyUR0/GmPrj 8x86nnjG9RfKO2YDCECUmR8A6fM1iDhVpKkNo5/nyYQSe0rFY3oWnIifbOhBfOtcZJ ybdLqY/ULqK8ufzfNHpFFF/3xIWDl2Y2IcH7XrrE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 68088F8016C; Wed, 7 Jun 2023 03:44:06 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 22C5EF800C8; Wed, 7 Jun 2023 03:44:06 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 07492F80199; Wed, 7 Jun 2023 03:44:00 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C4ABEF800C8 for ; Wed, 7 Jun 2023 03:43:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C4ABEF800C8 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=VoSzJvqU DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686102234; x=1717638234; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=oak0LJhMLWtP9UoshEOtnO5xklZAVt1BPVezT+IWuFw=; b=VoSzJvqUAOcfqwb2dk64YigPJZ16TQza+felYkpAvsyUOPZG70kRsC4f AEGd/3v9+0BEN3z4r2J24qS6LUD7cVEdZcJaL3KxUAClNjwXjcQoyklLY IQH9zIY89Yed45dJ9k9tLajgJHDBh/W5PPTPZp/aIeahuB2SAqPEInoD4 uMfShdN+w8brb6R4hqysVyb+tyb3dtkqn1M1Apems9BXzTRrmZhtbkZyF lRjO/1jUptJDJapzYQJK3rM+avLdSSBVqQ9omfZb3JOR7sL0828NnF60h SFfa4zfOP5TxjCBakuqS9vYQPDZHffUS+qAYira4Qp4wA7gPCrjDBG2Gr w==; X-IronPort-AV: E=McAfee;i="6600,9927,10733"; a="359314356" X-IronPort-AV: E=Sophos;i="6.00,222,1681196400"; d="scan'208";a="359314356" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2023 18:43:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10733"; a="742396227" X-IronPort-AV: E=Sophos;i="6.00,222,1681196400"; d="scan'208";a="742396227" Received: from bard-ubuntu.sh.intel.com ([10.239.185.57]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2023 18:43:44 -0700 From: Bard Liao To: alsa-devel@alsa-project.org, vkoul@kernel.org Cc: vinod.koul@linaro.org, linux-kernel@vger.kernel.org, pierre-louis.bossart@linux.intel.com, bard.liao@intel.com Subject: [PATCH] soundwire: debugfs: Add missing SCP registers Date: Wed, 7 Jun 2023 10:06:32 +0800 Message-Id: <20230607020632.1030309-1-yung-chuan.liao@linux.intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Message-ID-Hash: XQPCHTXX3IO6U74Q77DQU25IRFCYWT2E X-Message-ID-Hash: XQPCHTXX3IO6U74Q77DQU25IRFCYWT2E X-MailFrom: yung-chuan.liao@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Uday M Bhat SCP registers needs to be updated to accommodate additional register entries as per the Soundwire 1.2 specification. Signed-off-by: Uday M Bhat Signed-off-by: Yong Zhi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao --- drivers/soundwire/debugfs.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/soundwire/debugfs.c b/drivers/soundwire/debugfs.c index c3a1a359ee5c..d1553cb77187 100644 --- a/drivers/soundwire/debugfs.c +++ b/drivers/soundwire/debugfs.c @@ -86,10 +86,17 @@ static int sdw_slave_reg_show(struct seq_file *s_file, void *data) /* SCP registers */ ret += scnprintf(buf + ret, RD_BUF - ret, "\nSCP\n"); - for (i = SDW_SCP_INT1; i <= SDW_SCP_BANKDELAY; i++) + for (i = SDW_SCP_INT1; i <= SDW_SCP_BUS_CLOCK_BASE; i++) ret += sdw_sprintf(slave, buf, ret, i); for (i = SDW_SCP_DEVID_0; i <= SDW_SCP_DEVID_5; i++) ret += sdw_sprintf(slave, buf, ret, i); + for (i = SDW_SCP_FRAMECTRL_B0; i <= SDW_SCP_BUSCLOCK_SCALE_B0; i++) + ret += sdw_sprintf(slave, buf, ret, i); + for (i = SDW_SCP_FRAMECTRL_B1; i <= SDW_SCP_BUSCLOCK_SCALE_B1; i++) + ret += sdw_sprintf(slave, buf, ret, i); + for (i = SDW_SCP_PHY_OUT_CTRL_0; i <= SDW_SCP_PHY_OUT_CTRL_7; i++) + ret += sdw_sprintf(slave, buf, ret, i); + /* * SCP Bank 0/1 registers are read-only and cannot be