diff options
author | Pali Rohár <pali@kernel.org> | 2022-01-05 10:50:20 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-01-24 16:03:27 -0500 |
commit | 253373d307e62ec6b78132ba9eae481fb748454c (patch) | |
tree | 8b4cb2674e8482a742a02b6681ce9430ea8bbd3b /drivers/pci | |
parent | 21a1439d986a889cefbc2ed785c3f592fc9266de (diff) | |
download | u-boot-253373d307e62ec6b78132ba9eae481fb748454c.tar.gz u-boot-253373d307e62ec6b78132ba9eae481fb748454c.tar.bz2 u-boot-253373d307e62ec6b78132ba9eae481fb748454c.zip |
pci: iproc: Set all 24 bits of PCI class code
Register 0x43c in its low 24 bits contains PCI class code.
Update code to set all 24 bits of PCI class code and not only upper 16 bits
of PCI class code.
Use standard U-Boot macro (PCI_CLASS_BRIDGE_PCI << 8) for constructing all
24-bits of PCI class for PCI bridge Normal decode.
Signed-off-by: Pali Rohár <pali@kernel.org>
Acked-by: Roman Bacik <roman.bacik@broadcom.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pcie_iproc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/pci/pcie_iproc.c b/drivers/pci/pcie_iproc.c index a31e74a0f2..85dfab5c72 100644 --- a/drivers/pci/pcie_iproc.c +++ b/drivers/pci/pcie_iproc.c @@ -1116,15 +1116,14 @@ static int iproc_pcie_check_link(struct iproc_pcie *pcie) u32 link_status, class; pcie->link_is_active = false; - /* force class to PCI_CLASS_BRIDGE_PCI (0x0604) */ + /* force class to PCI bridge Normal decode (0x060400) */ #define PCI_BRIDGE_CTRL_REG_OFFSET 0x43c -#define PCI_CLASS_BRIDGE_MASK 0xffff00 -#define PCI_CLASS_BRIDGE_SHIFT 8 +#define PCI_BRIDGE_CTRL_REG_CLASS_MASK 0xffffff iproc_pci_raw_config_read32(pcie, 0, PCI_BRIDGE_CTRL_REG_OFFSET, 4, &class); - class &= ~PCI_CLASS_BRIDGE_MASK; - class |= (PCI_CLASS_BRIDGE_PCI << PCI_CLASS_BRIDGE_SHIFT); + class &= ~PCI_BRIDGE_CTRL_REG_CLASS_MASK; + class |= (PCI_CLASS_BRIDGE_PCI << 8); iproc_pci_raw_config_write32(pcie, 0, PCI_BRIDGE_CTRL_REG_OFFSET, 4, class); |