Skip to content

Commit eae6aaf

Browse files
tpetazzoniLorenzo Pieralisi
authored andcommitted
PCI: mvebu: Drop unused PCI express capability code
Commit dc0352a ("PCI: mvebu: Add PCI Express root complex capability block") added support for emulating the PCI Express capability block. As part of this, the pcie_sltcap, pcie_devctl and pcie_rtctl fields were added to the mvebu_sw_pci_bridge structure, and used when reading the corresponding PCI Express capability block registers. However, those structure members are never set to any value other than zero. This makes them unneeded because: - pcie_devctl is used to OR *value, so with pcie_devctl always zero, it has no effect. - for pcie_sltcap and pcie_rtstl, the mvebu_sw_pci_bridge_read() function always returns 0 for registers that are not explicitly handled. In preparation for reworking the PCI bridge emulation logic in pci-mvebu, let's simplify the code by dropping those structure members. Signed-off-by: Thomas Petazzoni <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]>
1 parent 23a5fba commit eae6aaf

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

drivers/pci/controller/pci-mvebu.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,6 @@ struct mvebu_sw_pci_bridge {
111111
u8 intline;
112112
u8 intpin;
113113
u16 bridgectrl;
114-
115-
/* PCI express capability */
116-
u32 pcie_sltcap;
117-
u16 pcie_devctl;
118-
u16 pcie_rtctl;
119114
};
120115

121116
struct mvebu_pcie_port;
@@ -588,7 +583,6 @@ static int mvebu_sw_pci_bridge_read(struct mvebu_pcie_port *port,
588583
*value = mvebu_readl(port, PCIE_CAP_PCIEXP + PCI_EXP_DEVCTL) &
589584
~(PCI_EXP_DEVCTL_URRE | PCI_EXP_DEVCTL_FERE |
590585
PCI_EXP_DEVCTL_NFERE | PCI_EXP_DEVCTL_CERE);
591-
*value |= bridge->pcie_devctl;
592586
break;
593587

594588
case PCISWCAP_EXP_LNKCAP:
@@ -604,18 +598,10 @@ static int mvebu_sw_pci_bridge_read(struct mvebu_pcie_port *port,
604598
*value = mvebu_readl(port, PCIE_CAP_PCIEXP + PCI_EXP_LNKCTL);
605599
break;
606600

607-
case PCISWCAP_EXP_SLTCAP:
608-
*value = bridge->pcie_sltcap;
609-
break;
610-
611601
case PCISWCAP_EXP_SLTCTL:
612602
*value = PCI_EXP_SLTSTA_PDS << 16;
613603
break;
614604

615-
case PCISWCAP_EXP_RTCTL:
616-
*value = bridge->pcie_rtctl;
617-
break;
618-
619605
case PCISWCAP_EXP_RTSTA:
620606
*value = mvebu_readl(port, PCIE_RC_RTSTA);
621607
break;

0 commit comments

Comments
 (0)