mirror of https://gitee.com/openkylin/linux.git
staging: mt7621-pci: use PCI definitions instead of hardcode values
Seting up ports to enable PCI_COMMAND_MASTER is using '0x4' as a hardcore value and '0x4' also for PCI_COMMAND register instead of use definitions from linux pci system headers. Replace both. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0a54ea9f48
commit
7c106cbb2b
|
@ -515,8 +515,9 @@ static void mt7621_pcie_enable_ports(struct mt7621_pcie *pcie)
|
|||
}
|
||||
|
||||
for (slot = 0; slot < num_slots_enabled; slot++) {
|
||||
val = read_config(pcie, slot, 0x4);
|
||||
write_config(pcie, slot, 0x4, val | 0x4);
|
||||
val = read_config(pcie, slot, PCI_COMMAND);
|
||||
val |= PCI_COMMAND_MASTER;
|
||||
write_config(pcie, slot, PCI_COMMAND, val);
|
||||
/* configure RC FTS number to 250 when it leaves L0s */
|
||||
val = read_config(pcie, slot, PCIE_FTS_NUM);
|
||||
val &= ~PCIE_FTS_NUM_MASK;
|
||||
|
|
Loading…
Reference in New Issue