summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorSergio Paracuellos2018-11-04 11:49:56 +0100
committerGreg Kroah-Hartman2018-11-11 20:36:16 +0100
commit1e80699fd6a5e3f6940aa1209c30ca1b02f57819 (patch)
tree054f77c59c7805cf9f1ae1fb6c50c57271c5a3ca /drivers/staging
parentstaging: mt7621-pci: use PCIE_PORT_LINKUP instead of hardcode value (diff)
downloadkernel-qcow2-linux-1e80699fd6a5e3f6940aa1209c30ca1b02f57819.tar.gz
kernel-qcow2-linux-1e80699fd6a5e3f6940aa1209c30ca1b02f57819.tar.xz
kernel-qcow2-linux-1e80699fd6a5e3f6940aa1209c30ca1b02f57819.zip
staging: mt7621-pci: enable interrupt when port is being enabled
Interrupt is being enabled in port initialization when the port phy has not been initialized yet. Just enable the interrupt when the port is being enabled which is a more accurate place for this. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/mt7621-pci/pci-mt7621.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
index 8b7c63d7e353..5f7ff70e289f 100644
--- a/drivers/staging/mt7621-pci/pci-mt7621.c
+++ b/drivers/staging/mt7621-pci/pci-mt7621.c
@@ -601,10 +601,6 @@ static int mt7621_pcie_init_port(struct mt7621_pcie_port *port)
port->enabled = false;
} else {
port->enabled = true;
- /* enable pcie interrupt */
- val = pcie_read(pcie, RALINK_PCI_PCIMSK_ADDR);
- val |= PCIE_PORT_INT_EN(slot);
- pcie_write(pcie, val, RALINK_PCI_PCIMSK_ADDR);
}
mt7621_enable_phy(port);
@@ -667,6 +663,11 @@ static void mt7621_pcie_enable_ports(struct mt7621_pcie *pcie)
continue;
}
+ /* enable pcie interrupt */
+ val = pcie_read(pcie, RALINK_PCI_PCIMSK_ADDR);
+ val |= PCIE_PORT_INT_EN(slot);
+ pcie_write(pcie, val, RALINK_PCI_PCIMSK_ADDR);
+
/* map 2G DDR region */
pcie_write(pcie, PCIE_BAR_MAP_MAX | PCIE_BAR_ENABLE,
offset + RALINK_PCI_BAR0SETUP_ADDR);