|
42 | 42 | #define CORE_FABRIC_STAT_MASK 0x001F001F
|
43 | 43 | #define CORE_LANE_CFG(port) (0x84000 + 0x4000 * (port))
|
44 | 44 | #define CORE_LANE_CFG_REFCLK0REQ BIT(0)
|
45 |
| -#define CORE_LANE_CFG_REFCLK1 BIT(1) |
| 45 | +#define CORE_LANE_CFG_REFCLK1REQ BIT(1) |
46 | 46 | #define CORE_LANE_CFG_REFCLK0ACK BIT(2)
|
| 47 | +#define CORE_LANE_CFG_REFCLK1ACK BIT(3) |
47 | 48 | #define CORE_LANE_CFG_REFCLKEN (BIT(9) | BIT(10))
|
48 | 49 | #define CORE_LANE_CTL(port) (0x84004 + 0x4000 * (port))
|
49 | 50 | #define CORE_LANE_CTL_CFGACC BIT(15)
|
@@ -482,9 +483,9 @@ static int apple_pcie_setup_refclk(struct apple_pcie *pcie,
|
482 | 483 | if (res < 0)
|
483 | 484 | return res;
|
484 | 485 |
|
485 |
| - rmw_set(CORE_LANE_CFG_REFCLK1, pcie->base + CORE_LANE_CFG(port->idx)); |
| 486 | + rmw_set(CORE_LANE_CFG_REFCLK1REQ, pcie->base + CORE_LANE_CFG(port->idx)); |
486 | 487 | res = readl_relaxed_poll_timeout(pcie->base + CORE_LANE_CFG(port->idx),
|
487 |
| - stat, stat & CORE_LANE_CFG_REFCLK1, |
| 488 | + stat, stat & CORE_LANE_CFG_REFCLK1ACK, |
488 | 489 | 100, 50000);
|
489 | 490 |
|
490 | 491 | if (res < 0)
|
@@ -553,6 +554,9 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
|
553 | 554 | return ret;
|
554 | 555 | }
|
555 | 556 |
|
| 557 | + rmw_clear(PORT_REFCLK_CGDIS, port->base + PORT_REFCLK); |
| 558 | + rmw_clear(PORT_APPCLK_CGDIS, port->base + PORT_APPCLK); |
| 559 | + |
556 | 560 | ret = apple_pcie_port_setup_irq(port);
|
557 | 561 | if (ret)
|
558 | 562 | return ret;
|
|
0 commit comments