From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73FB0C4332F for ; Thu, 22 Dec 2022 22:17:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235205AbiLVWR3 (ORCPT ); Thu, 22 Dec 2022 17:17:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229840AbiLVWR2 (ORCPT ); Thu, 22 Dec 2022 17:17:28 -0500 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC8692666 for ; Thu, 22 Dec 2022 14:17:26 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id bf43so4693420lfb.6 for ; Thu, 22 Dec 2022 14:17:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=S54q1Ly25fucvW8wy0dU1/tQS+0Zh9k/n0J/KMOoAU0=; b=UW/yqmwPTVLenNcJd2Qd9e0NTgzQmDmaeg/bt/1PlCivJ63Y0t909OjvU07U0fiXq5 F+fAfdqnxDQCZ3CD1hBEotehTTTx9o02Jrp9q4h5qnUGBTYTyZuyM/4nsDCaMpRFE6bn yxw1PjO7chlYHaKDLmRK/jM3xriUiZsxpwOJQmd4PMJpNJ5ftd11U64ACeCg8Yo6a02d ziaB+GPZOefHkuvljAfNwQo7C5F0DVM2QOHfxosbMflSALoeveHH9J85byzk0nDEFU0y rMrqkMl04eBixz/FrvumqndbNMhC/JV4CE0W4pXBfE2zdOsiCkiYVWb1D6f04Jj0wmJT DQtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=S54q1Ly25fucvW8wy0dU1/tQS+0Zh9k/n0J/KMOoAU0=; b=4YwCPfJ/gESq2suDNKZGOkiUM1kLyIGiJiR1vVSvo/HEib8gIa8ZyiYXGYR9GHkBcS wGnk6KfWt7eRfDPDiRQFXc7Ut95NfyV9TqurcAz4tIfeeU14dNZsE2l4ozKYDJsb7cnZ cT7ngCTKn8X4aTSgMk/BNsJICqlH3BaC2iQaCqD0bcjmtXwFkG1nGZ46NF2thOyXmeTf Oo4PSuh7pX5Co80BJ3wTB1EK93moQ++7g/g9t0v4rZMkUNMip/lAm2G3yXP/H1x1SN+F /N8a/t+jdTNqgrSMVW7HvtdurUvO6v5s7hXYgvIfoqBgMuulX4kq+O8+XceraxKVblYt GRnA== X-Gm-Message-State: AFqh2koULiyseKo4+d+lz8bY2sD+R9qmb6nFM35XA7VL/nXRAYC4BX0G v+/wRUh9Dxug9Z1tuvtKoVqvlQ== X-Google-Smtp-Source: AMrXdXtWAyVvjnaVxKo6msD2MtpwrZhPvPMCjOS4jjqOp4cyiwI3D+yRNc34Pp4Vgq6Bd/bxog2D0g== X-Received: by 2002:a05:6512:3e0d:b0:4a9:a1f1:3f57 with SMTP id i13-20020a0565123e0d00b004a9a1f13f57mr2962950lfv.50.1671747445066; Thu, 22 Dec 2022 14:17:25 -0800 (PST) Received: from ?IPV6:2001:14ba:a085:4d00::8a5? (dzccz6yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a085:4d00::8a5]) by smtp.gmail.com with ESMTPSA id x11-20020a0565123f8b00b004b5adb59ed5sm222468lfa.297.2022.12.22.14.17.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Dec 2022 14:17:23 -0800 (PST) Message-ID: <71bf6521-71d7-ec45-912f-e3dc6038d3a4@linaro.org> Date: Fri, 23 Dec 2022 00:17:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH 1/2] scsi: ufs: ufs-qcom: add basic interconnect support Content-Language: en-GB To: Brian Masney , andersson@kernel.org Cc: agross@kernel.org, konrad.dybcio@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, jejb@linux.ibm.com, martin.petersen@oracle.com, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org References: <20221117104957.254648-1-bmasney@redhat.com> <20221117104957.254648-2-bmasney@redhat.com> From: Dmitry Baryshkov In-Reply-To: <20221117104957.254648-2-bmasney@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 17/11/2022 12:49, Brian Masney wrote: > The firmware on the Qualcomm platforms expects the interconnect votes to > be present. Let's add very basic support where the maximum throughput is > requested to match what's done in a few other drivers. > > This will not break boot on systems where the interconnects and > interconnect-names properties are not specified in device tree for UFS > since the interconnect framework will silently return. > > Signed-off-by: Brian Masney > --- > drivers/ufs/host/ufs-qcom.c | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > > diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c > index 8ad1415e10b6..55bf8dd88985 100644 > --- a/drivers/ufs/host/ufs-qcom.c > +++ b/drivers/ufs/host/ufs-qcom.c > @@ -7,6 +7,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -936,6 +937,22 @@ static const struct reset_control_ops ufs_qcom_reset_ops = { > .deassert = ufs_qcom_reset_deassert, > }; > > +static int ufs_qcom_icc_init(struct device *dev, char *pathname) > +{ > + struct icc_path *path; > + int ret; > + > + path = devm_of_icc_get(dev, pathname); > + if (IS_ERR(path)) > + return dev_err_probe(dev, PTR_ERR(path), "failed to acquire interconnect path\n"); > + > + ret = icc_set_bw(path, 0, UINT_MAX); I noticed that this patch bumps peak_bw (and leaves average_bw as 0), while vendor kernels bump average_bw, but ib (peak_bw) is set to 0. > + if (ret < 0) > + return dev_err_probe(dev, ret, "failed to set bandwidth request\n"); > + > + return 0; > +} > + > /** > * ufs_qcom_init - bind phy with controller > * @hba: host controller instance > @@ -991,6 +1008,14 @@ static int ufs_qcom_init(struct ufs_hba *hba) > err = dev_err_probe(dev, PTR_ERR(host->generic_phy), "Failed to get PHY\n"); > goto out_variant_clear; > } > + > + err = ufs_qcom_icc_init(dev, "ufs-ddr"); > + if (err) > + goto out_variant_clear; > + > + err = ufs_qcom_icc_init(dev, "cpu-ufs"); > + if (err) > + goto out_variant_clear; > } > > host->device_reset = devm_gpiod_get_optional(dev, "reset", -- With best wishes Dmitry