Skip to content

Commit d4a5d7e

Browse files
shawn1221Mani-Sadhasivam
authored andcommitted
PCI: dw-rockchip: Move rockchip_pcie_ep_hide_broken_ats_cap_rk3588() to dw_pcie_ep_ops::init()
In the case of PERST# deassert, non-sticky registers will get reset to their hardware default state and EXT_CAP registers are one among them. But since the broken ATS cap is hidden only in dw_pcie_ep_ops::pre_init() callback which is not gettting called during PERST# deassert, it results in the capability getting advertised again. So move it to dw_pcie_ep_ops::init() to fix it. Suggested-by: Niklas Cassel <[email protected]> Signed-off-by: Shawn Lin <[email protected]> [mani: subject and description rewording] Signed-off-by: Manivannan Sadhasivam <[email protected]> Tested-by: Niklas Cassel <[email protected]> Reviewed-by: Niklas Cassel <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 198e69c commit d4a5d7e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/pci/controller/dwc/pcie-dw-rockchip.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,17 +278,13 @@ static void rockchip_pcie_ep_hide_broken_ats_cap_rk3588(struct dw_pcie_ep *ep)
278278
dev_err(dev, "failed to hide ATS capability\n");
279279
}
280280

281-
static void rockchip_pcie_ep_pre_init(struct dw_pcie_ep *ep)
282-
{
283-
rockchip_pcie_ep_hide_broken_ats_cap_rk3588(ep);
284-
}
285-
286281
static void rockchip_pcie_ep_init(struct dw_pcie_ep *ep)
287282
{
288283
struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
289284
enum pci_barno bar;
290285

291286
rockchip_pcie_enable_l0s(pci);
287+
rockchip_pcie_ep_hide_broken_ats_cap_rk3588(ep);
292288

293289
for (bar = 0; bar < PCI_STD_NUM_BARS; bar++)
294290
dw_pcie_ep_reset_bar(pci, bar);
@@ -359,7 +355,6 @@ rockchip_pcie_get_features(struct dw_pcie_ep *ep)
359355

360356
static const struct dw_pcie_ep_ops rockchip_pcie_ep_ops = {
361357
.init = rockchip_pcie_ep_init,
362-
.pre_init = rockchip_pcie_ep_pre_init,
363358
.raise_irq = rockchip_pcie_raise_irq,
364359
.get_features = rockchip_pcie_get_features,
365360
};

0 commit comments

Comments
 (0)