Skip to content

Commit 85e9eb3

Browse files
Mani-Sadhasivamkwilczynski
authored andcommitted
PCI: tegra194: Use Mbps_to_icc() macro for setting icc speed
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. Link: https://lore.kernel.org/linux-pci/[email protected] Signed-off-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Krzysztof Wilczyński <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Cc: Vidya Sagar <[email protected]>
1 parent dc2f2a9 commit 85e9eb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/controller/dwc/pcie-tegra194.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,9 @@ static void tegra_pcie_icc_set(struct tegra_pcie_dw *pcie)
321321
speed = FIELD_GET(PCI_EXP_LNKSTA_CLS, val);
322322
width = FIELD_GET(PCI_EXP_LNKSTA_NLW, val);
323323

324-
val = width * (PCIE_SPEED2MBS_ENC(pcie_link_speed[speed]) / BITS_PER_BYTE);
324+
val = width * PCIE_SPEED2MBS_ENC(pcie_link_speed[speed]);
325325

326-
if (icc_set_bw(pcie->icc_path, MBps_to_icc(val), 0))
326+
if (icc_set_bw(pcie->icc_path, Mbps_to_icc(val), 0))
327327
dev_err(pcie->dev, "can't set bw[%u]\n", val);
328328

329329
if (speed >= ARRAY_SIZE(pcie_gen_freq))

0 commit comments

Comments
 (0)