Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1456589pxb; Fri, 1 Oct 2021 10:59:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQSeEe+Oxdyo2Mo0RW0zqJuGhkVG0RepjZ6N5WljyloEL0nV0KuowlsfECEfCDoKMDY+vK X-Received: by 2002:a17:907:e87:: with SMTP id ho7mr7580057ejc.16.1633111180594; Fri, 01 Oct 2021 10:59:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633111180; cv=none; d=google.com; s=arc-20160816; b=NMOojcmIDxZzbqfy3jnBqcSOupQua1/TQf2IECWGJ9t9tP3FOr2F4vGbuE+1YiR33L Gd0UU5BRENvZUIs/ZNj9oxctET80wVmI5VYoYw1y9/vAYRjnr2/uGaWWJz0OtAzJrjyl Ig1JoCMzJrTcVEGX4WToUyjzz/q4KEpTjE4t+H4O/Q9d7XMGY7BqX9Vo+7YY27zCA61U j3f+5j8+Huo/mOn9BXEGQiRrii3d+pO3/KctBdZpzGsAtp/Mzw1MGX0Q6MntFAWP0eFD rdS/T8yQLQqXupBV4TjLGryu2MSP49SCRjFldxuJl74t4VVpjGWuMvOft49MoNgY8Zhp FtFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=oUgty5+HPMv4CKLo0lFsRuHSO1Jr8QJBqb4xYld8X30=; b=ykYXjHMX43/bE32WsjDobtmyUBIB0L9Q4arU3nBR8/nRdmq9VZCrOqrdaz9mY7CVCm 2yPGa3oTqAfTr09Z5mjS+BFXDW2pOpuZvLq62oEikZfzcZPOgnMIKbMovH0NTVyBFdww eqiVFq5XiuXhN51heFtJfgGbJolHV9Wh/vlI97Z9HixMnfc+zu8C8nfmixL3iiWkbeJj iBocsBEhRFJVXBTGeEOr3X0FnZdFtjHR3qfWb387tG+aQRQ6IOJmP2EjZ24wde3d795U jGinQHszbxsIbUH5tinkJN+9bGTcAxvZdcHqzUtAOJZDO9qX/0Tw0mJyTFkhBFm70r7t GDrQ== 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 bo27si7753404edb.182.2021.10.01.10.59.15; Fri, 01 Oct 2021 10:59:40 -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 S1355528AbhJAR7f (ORCPT + 99 others); Fri, 1 Oct 2021 13:59:35 -0400 Received: from mga11.intel.com ([192.55.52.93]:29105 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238784AbhJAR7e (ORCPT ); Fri, 1 Oct 2021 13:59:34 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10124"; a="222315899" X-IronPort-AV: E=Sophos;i="5.85,339,1624345200"; d="scan'208";a="222315899" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2021 10:57:49 -0700 X-IronPort-AV: E=Sophos;i="5.85,339,1624345200"; d="scan'208";a="540435721" Received: from pwhela2-mobl1.ger.corp.intel.com (HELO [10.213.160.166]) ([10.213.160.166]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2021 10:57:48 -0700 Subject: Re: [PATCH] ASoC: qcom: soundwire: Enable soundwire bus clock for version 1.6 To: Srinivasa Rao Mandadapu , agross@kernel.org, bjorn.andersson@linaro.org, lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, plai@codeaurora.org, bgoswami@codeaurora.org, perex@perex.cz, tiwai@suse.com, srinivas.kandagatla@linaro.org, rohitkr@codeaurora.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, swboyd@chromium.org, judyhsiao@chromium.org Cc: Venkata Prasad Potturu References: <1633105471-30928-1-git-send-email-srivasam@codeaurora.org> From: Pierre-Louis Bossart Message-ID: Date: Fri, 1 Oct 2021 12:57:42 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <1633105471-30928-1-git-send-email-srivasam@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > @@ -610,6 +611,12 @@ static int qcom_swrm_init(struct qcom_swrm_ctrl *ctrl) > val = FIELD_PREP(SWRM_MCP_FRAME_CTRL_BANK_ROW_CTRL_BMSK, ctrl->rows_index); > val |= FIELD_PREP(SWRM_MCP_FRAME_CTRL_BANK_COL_CTRL_BMSK, ctrl->cols_index); > > + if (ctrl->swrm_hctl_reg) { > + val = ioread32(ctrl->swrm_hctl_reg); > + val &= 0xFFFFFFFD; magic value, use a #define MASK_SOMETHING? > + iowrite32(val, ctrl->swrm_hctl_reg); > + } > + > ctrl->reg_write(ctrl, SWRM_MCP_FRAME_CTRL_BANK_ADDR(0), val); > > /* Enable Auto enumeration */ > @@ -1200,7 +1207,7 @@ static int qcom_swrm_probe(struct platform_device *pdev) > struct qcom_swrm_ctrl *ctrl; > const struct qcom_swrm_data *data; > int ret; > - u32 val; > + int val, swrm_hctl_reg = 0; > > ctrl = devm_kzalloc(dev, sizeof(*ctrl), GFP_KERNEL); > if (!ctrl) > @@ -1251,6 +1258,9 @@ static int qcom_swrm_probe(struct platform_device *pdev) > ctrl->bus.port_ops = &qcom_swrm_port_ops; > ctrl->bus.compute_params = &qcom_swrm_compute_params; > > + if (!of_property_read_u32(dev->of_node, "qcom,swrm-hctl-reg", &swrm_hctl_reg)) > + ctrl->swrm_hctl_reg = devm_ioremap(&pdev->dev, swrm_hctl_reg, 0x4); if (!ctrl->swrm_hctl_reg) return -ENODEV; ? > + > ret = qcom_swrm_get_port_config(ctrl); > if (ret) > goto err_clk; >