aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-10-18 11:37:17 -0400
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2018-10-18 12:50:30 -0400
commiteae6aaf8488ebbf0fd6e1588f0923db0462e4c5c (patch)
tree0a120d24e512e19da5cf8f288233daa30e34be57
parent23a5fba4d9411787c8e86ff5808e7d8e41bf3935 (diff)
PCI: mvebu: Drop unused PCI express capability code
Commit dc0352ab0b2a0 ("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 <thomas.petazzoni@bootlin.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
-rw-r--r--drivers/pci/controller/pci-mvebu.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c
index 50eb0729385b..beaff9325a09 100644
--- a/drivers/pci/controller/pci-mvebu.c
+++ b/drivers/pci/controller/pci-mvebu.c
@@ -111,11 +111,6 @@ struct mvebu_sw_pci_bridge {
111 u8 intline; 111 u8 intline;
112 u8 intpin; 112 u8 intpin;
113 u16 bridgectrl; 113 u16 bridgectrl;
114
115 /* PCI express capability */
116 u32 pcie_sltcap;
117 u16 pcie_devctl;
118 u16 pcie_rtctl;
119}; 114};
120 115
121struct mvebu_pcie_port; 116struct mvebu_pcie_port;
@@ -588,7 +583,6 @@ static int mvebu_sw_pci_bridge_read(struct mvebu_pcie_port *port,
588 *value = mvebu_readl(port, PCIE_CAP_PCIEXP + PCI_EXP_DEVCTL) & 583 *value = mvebu_readl(port, PCIE_CAP_PCIEXP + PCI_EXP_DEVCTL) &
589 ~(PCI_EXP_DEVCTL_URRE | PCI_EXP_DEVCTL_FERE | 584 ~(PCI_EXP_DEVCTL_URRE | PCI_EXP_DEVCTL_FERE |
590 PCI_EXP_DEVCTL_NFERE | PCI_EXP_DEVCTL_CERE); 585 PCI_EXP_DEVCTL_NFERE | PCI_EXP_DEVCTL_CERE);
591 *value |= bridge->pcie_devctl;
592 break; 586 break;
593 587
594 case PCISWCAP_EXP_LNKCAP: 588 case PCISWCAP_EXP_LNKCAP:
@@ -604,18 +598,10 @@ static int mvebu_sw_pci_bridge_read(struct mvebu_pcie_port *port,
604 *value = mvebu_readl(port, PCIE_CAP_PCIEXP + PCI_EXP_LNKCTL); 598 *value = mvebu_readl(port, PCIE_CAP_PCIEXP + PCI_EXP_LNKCTL);
605 break; 599 break;
606 600
607 case PCISWCAP_EXP_SLTCAP:
608 *value = bridge->pcie_sltcap;
609 break;
610
611 case PCISWCAP_EXP_SLTCTL: 601 case PCISWCAP_EXP_SLTCTL:
612 *value = PCI_EXP_SLTSTA_PDS << 16; 602 *value = PCI_EXP_SLTSTA_PDS << 16;
613 break; 603 break;
614 604
615 case PCISWCAP_EXP_RTCTL:
616 *value = bridge->pcie_rtctl;
617 break;
618
619 case PCISWCAP_EXP_RTSTA: 605 case PCISWCAP_EXP_RTSTA:
620 *value = mvebu_readl(port, PCIE_RC_RTSTA); 606 *value = mvebu_readl(port, PCIE_RC_RTSTA);
621 break; 607 break;