diff options
author | 2025-05-11 00:07:08 +0800 | |
---|---|---|
committer | 2025-05-13 10:12:59 +0100 | |
commit | f46bfb1d3c6a601caad90eb3c11a1e1e17cccb1a (patch) | |
tree | c4e059220b319d991a827ef4791dbfa7ed1d89f4 /drivers/pci/controller/dwc/pci-keystone.c | |
parent | PCI: dw-rockchip: Fix PHY function call sequence in rockchip_pcie_phy_deinit() (diff) | |
download | linux-rng-f46bfb1d3c6a601caad90eb3c11a1e1e17cccb1a.tar.xz linux-rng-f46bfb1d3c6a601caad90eb3c11a1e1e17cccb1a.zip |
PCI: dwc: Return bool from link up check
PCIe link status check is supposed to return a boolean to indicate whether
the link is up or not. So, modify the link_up callbacks and
dw_pcie_link_up() function to return bool instead of int.
Signed-off-by: Hans Zhang <18255117159@163.com>
[mani: commit message reword]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Link: https://patch.msgid.link/20250510160710.392122-2-18255117159@163.com
Diffstat (limited to 'drivers/pci/controller/dwc/pci-keystone.c')
-rw-r--r-- | drivers/pci/controller/dwc/pci-keystone.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c index 76a37368ae4f..968464530e3d 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -492,13 +492,12 @@ static struct pci_ops ks_pcie_ops = { * @pci: A pointer to the dw_pcie structure which holds the DesignWare PCIe host * controller driver information. */ -static int ks_pcie_link_up(struct dw_pcie *pci) +static bool ks_pcie_link_up(struct dw_pcie *pci) { u32 val; val = dw_pcie_readl_dbi(pci, PCIE_PORT_DEBUG0); - val &= PORT_LOGIC_LTSSM_STATE_MASK; - return (val == PORT_LOGIC_LTSSM_STATE_L0); + return (val & PORT_LOGIC_LTSSM_STATE_MASK) == PORT_LOGIC_LTSSM_STATE_L0; } static void ks_pcie_stop_link(struct dw_pcie *pci) |