Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2758485rdh; Wed, 27 Sep 2023 11:45:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHklbF/l6Xe4jJ/y5sz0Bq4vzxZdPD+8lW3Bmlg0o4KNQk7URSZDvreA5kryMXNIZEVjfEt X-Received: by 2002:a17:903:258d:b0:1b8:94e9:e7b0 with SMTP id jb13-20020a170903258d00b001b894e9e7b0mr1909831plb.9.1695840325990; Wed, 27 Sep 2023 11:45:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695840325; cv=none; d=google.com; s=arc-20160816; b=rFGtbCnnO9/3ElTs3DTKROB9vCyW6s/C2f9ptRqFEF7Xe8J2kd6hnVIQbxB0lXZFQ/ IvWtHjwS2tBiOWgjrRJaWDiZkZAUF1xkiTxEjgFgd+zmXs0OcK8AQ9oO6HTsmrL/8+mv HsxcAO41jDRx1XbjouS2ckiCFfR/ehQEtAM60kF8ha0zna58jt4SLA87Wv+d8++cn06c oineBVdUf7zNxMvbm4tSbVANprG/f+KENM9uGbR61LP9SqGsTLNpT+LczsdoNwg9+YMR 3GEgkQu3yWBGCTFD0EP9t1CWEkkCDcnqEtYB7O0h3DRrzJwbgskEhdD5JvTgEZRqyJnw 8mDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gSqf2S54Kv1lkMAHr+0KP81a4E6zfxwF+MNET+Rax3c=; fh=LeFukldqIeMuH68ZTsP4l380Xr65B4LBj9v86l9Fpqs=; b=TaYic57YZOeyfQTWQKa75TnT0f0FT+lAOBtGeRli4lea6RxV7P85oHwR+zcWFWRysh raQQ/xUQ6ttxPqUSg1OR0xm6qw9r/S8QoLQc+PLIjhvJfDw1/2h91IbyBQyngPBejoCX /N00XNmMgChsdmOMq+AkAhLlfPP9GMYiDZbyJaxwqCJbpS2eloEcjufo2OB5sTaIsAuF oF2RbaIeLMGXox8fqjQsxCVmvwYgvklTh6l4uZTZQPyDco6+c2ZicpT3sLebG6RVuGBY D4XbiYRomHBR23mxZhFsEnGg1C0KbpULfM0xpsm8edGZ/b/TPf5d3opNv+iZvUNadkgU 3A2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IWl0QOCk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id h8-20020a170902f54800b001c584378322si17629198plf.619.2023.09.27.11.45.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 11:45:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IWl0QOCk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id ECA078029DDD; Wed, 27 Sep 2023 08:46:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232564AbjI0PqR (ORCPT + 99 others); Wed, 27 Sep 2023 11:46:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232363AbjI0PqK (ORCPT ); Wed, 27 Sep 2023 11:46:10 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F8F3272B4 for ; Wed, 27 Sep 2023 08:46:09 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40572aeb73cso83049865e9.3 for ; Wed, 27 Sep 2023 08:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695829567; x=1696434367; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gSqf2S54Kv1lkMAHr+0KP81a4E6zfxwF+MNET+Rax3c=; b=IWl0QOCkM8lrXZ1jZzlyBzdXx2OF+33inXwOXs20l/kx+WXdtxI2INUhTRH7As/Hv6 jYVkN/P62rapmmjgO8vFeqG3OnDo8xbCFO7hs6l1IcUlJ3g9psphfmUoo3hSJP6z8v8j ecSgoo4QjokjceebU2tCxvqnrqDFnXGFNfwlETnc4NeF+U9BLDQDg3WHbiupdo5w47p9 W2TnvxvmEctIMpKVPdeRpzG1hNBexBo1yPL6B1ywYyPUDpsUR29vUdURxE4rSvB63q76 y+cjlBAlwk93qOQwVsImwaUJjcOkB4ZQ393W6jHvgKAjZD3RqplOTiAgvQOp/+/aFl1m jRJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695829567; x=1696434367; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gSqf2S54Kv1lkMAHr+0KP81a4E6zfxwF+MNET+Rax3c=; b=n1ckyPvSOeCtXLdVBlqekuj1HX7eqTiF8z7JcXDJJbL38kAEnd2+aAFsU+gxoc2M5w 9HLKRS0uWuuoY2mOlkG7CGnMM0vXJlG60hMrBQISOdTx0bDfoa4zWl1TM/k3gf9ZvJk/ DEjWMV2p+kFai592xuH/JCtgedhtNKjVz3U77TukyulBClQ4Vouo0aQ8DftEkmMatkns mn9/cZhR7JlL9UlsaVhR4yCycvTVEZql4l8FuqdpmSghF0tvu2hyM6Qobg0mrdNsEqzv kybwpgTTi+XSvnSMJiQgtrqIX0UTod4mDkzWpRdhBQOnky3KYX9KSnBo0Ay7ZhsC5wvu u1kA== X-Gm-Message-State: AOJu0YwQ60TdXIk3P4olpVPBwUj7xEKQJIXSOLT3VK/nmZCxpV888Y01 j777T3KN5dVRdvgEs4UCVwjw X-Received: by 2002:a05:600c:1e14:b0:406:44e6:15f0 with SMTP id ay20-20020a05600c1e1400b0040644e615f0mr1832590wmb.5.1695829567489; Wed, 27 Sep 2023 08:46:07 -0700 (PDT) Received: from thinkpad.fritz.box ([2a02:2454:9d09:3f00:b024:394e:56d7:d8b4]) by smtp.gmail.com with ESMTPSA id s28-20020adfa29c000000b003232f167df5sm6925852wra.108.2023.09.27.08.46.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 08:46:06 -0700 (PDT) From: Manivannan Sadhasivam To: lpieralisi@kernel.org, kw@linux.com Cc: andersson@kernel.org, konrad.dybcio@linaro.org, bhelgaas@google.com, linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, abel.vesa@linaro.org, Manivannan Sadhasivam , Vidya Sagar Subject: [PATCH v3 3/3] PCI: tegra194: Use Mbps_to_icc() macro for setting icc speed Date: Wed, 27 Sep 2023 17:46:03 +0200 Message-Id: <20230927154603.172049-3-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230927154603.172049-1-manivannan.sadhasivam@linaro.org> References: <20230927154603.172049-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 27 Sep 2023 08:46:28 -0700 (PDT) PCIe speed returned by the PCIE_SPEED2MBS_ENC() macro is in Mbps. So instead of converting it to MBps explicitly and using the MBps_to_icc() macro, let's use the Mbps_to_icc() macro to pass the value directly. Cc: Vidya Sagar Signed-off-by: Manivannan Sadhasivam --- Changes in v3: - New patch drivers/pci/controller/dwc/pcie-tegra194.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c index 4bba31502ce1..5feac690e127 100644 --- a/drivers/pci/controller/dwc/pcie-tegra194.c +++ b/drivers/pci/controller/dwc/pcie-tegra194.c @@ -321,9 +321,9 @@ static void tegra_pcie_icc_set(struct tegra_pcie_dw *pcie) speed = FIELD_GET(PCI_EXP_LNKSTA_CLS, val); width = FIELD_GET(PCI_EXP_LNKSTA_NLW, val); - val = width * (PCIE_SPEED2MBS_ENC(pcie_link_speed[speed]) / BITS_PER_BYTE); + val = width * PCIE_SPEED2MBS_ENC(pcie_link_speed[speed]); - if (icc_set_bw(pcie->icc_path, MBps_to_icc(val), 0)) + if (icc_set_bw(pcie->icc_path, Mbps_to_icc(val), 0)) dev_err(pcie->dev, "can't set bw[%u]\n", val); if (speed >= ARRAY_SIZE(pcie_gen_freq)) -- 2.25.1