Skip to content

Commit 0a19b52

Browse files
P33Mpelwell
authored andcommitted
drivers: pcie-brcmstb: add best-effort workaround for QoS bug on bcm2712
If a set of read requests are issued by an endpoint, they are streamed into a resynchronisation FIFO prior to exiting the RC. This FIFO has an edge case where it can drop QoS for a request to 0 if there's a single outstanding read request in the FIFO, and another is pushed when the FIFO is popped. Requests with a QoS of 0 can take hundreds of microseconds to complete. By adding an experimentally-determined amount of backpressure on the pop side, the critical level transition can largely be avoided. Signed-off-by: Jonathan Bell <[email protected]>
1 parent 55faf2e commit 0a19b52

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/pci/controller/pcie-brcmstb.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,18 @@ static void brcm_pcie_set_tc_qos(struct brcm_pcie *pcie)
568568
AXI_DIS_QOS_GATING_IN_MASTER;
569569
writel(reg, pcie->base + PCIE_MISC_AXI_INTF_CTRL);
570570

571+
/*
572+
* If the QOS_UPDATE_TIMING_FIX bit is Reserved-0, then this is a
573+
* 2712C1 chip, or a single-lane RC. Use the best-effort alternative
574+
* which is to partially throttle AXI requests in-flight to the SDC.
575+
*/
576+
reg = readl(pcie->base + PCIE_MISC_AXI_INTF_CTRL);
577+
if (!(reg & AXI_EN_QOS_UPDATE_TIMING_FIX)) {
578+
reg &= ~AXI_MASTER_MAX_OUTSTANDING_REQUESTS_MASK;
579+
reg |= 15;
580+
writel(reg, pcie->base + PCIE_MISC_AXI_INTF_CTRL);
581+
}
582+
571583
/* Disable VDM reception by default - QoS map defaults to 0 */
572584
reg = readl(pcie->base + PCIE_MISC_CTRL_1);
573585
reg &= ~PCIE_MISC_CTRL_1_EN_VDM_QOS_CONTROL_MASK;

0 commit comments

Comments
 (0)