Commit 1e80699f authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman

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: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bcb45307
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment