Skip to content

Commit 5b0f073

Browse files
Zhou Wangbjorn-helgaas
authored andcommitted
PCI: designware: Add support for x8 links
Add support for x8 links. Signed-off-by: Zhou Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Jingoo Han <[email protected]> Acked-by: Pratyush Anand <[email protected]>
1 parent 5ebe6af commit 5b0f073

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/pci/host/pcie-designware.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,15 @@
3131
#define PORT_LINK_MODE_1_LANES (0x1 << 16)
3232
#define PORT_LINK_MODE_2_LANES (0x3 << 16)
3333
#define PORT_LINK_MODE_4_LANES (0x7 << 16)
34+
#define PORT_LINK_MODE_8_LANES (0xf << 16)
3435

3536
#define PCIE_LINK_WIDTH_SPEED_CONTROL 0x80C
3637
#define PORT_LOGIC_SPEED_CHANGE (0x1 << 17)
3738
#define PORT_LOGIC_LINK_WIDTH_MASK (0x1ff << 8)
3839
#define PORT_LOGIC_LINK_WIDTH_1_LANES (0x1 << 8)
3940
#define PORT_LOGIC_LINK_WIDTH_2_LANES (0x2 << 8)
4041
#define PORT_LOGIC_LINK_WIDTH_4_LANES (0x4 << 8)
42+
#define PORT_LOGIC_LINK_WIDTH_8_LANES (0x8 << 8)
4143

4244
#define PCIE_MSI_ADDR_LO 0x820
4345
#define PCIE_MSI_ADDR_HI 0x824
@@ -778,6 +780,9 @@ void dw_pcie_setup_rc(struct pcie_port *pp)
778780
case 4:
779781
val |= PORT_LINK_MODE_4_LANES;
780782
break;
783+
case 8:
784+
val |= PORT_LINK_MODE_8_LANES;
785+
break;
781786
}
782787
dw_pcie_writel_rc(pp, val, PCIE_PORT_LINK_CONTROL);
783788

@@ -794,6 +799,9 @@ void dw_pcie_setup_rc(struct pcie_port *pp)
794799
case 4:
795800
val |= PORT_LOGIC_LINK_WIDTH_4_LANES;
796801
break;
802+
case 8:
803+
val |= PORT_LOGIC_LINK_WIDTH_8_LANES;
804+
break;
797805
}
798806
dw_pcie_writel_rc(pp, val, PCIE_LINK_WIDTH_SPEED_CONTROL);
799807

0 commit comments

Comments
 (0)