[U-Boot] [PATCH 05/23] pci: xilinx: Avoid writing memory base or limit registers
Paul Burton
paul.burton at imgtec.com
Mon Sep 26 20:28:59 CEST 2016
Writing the PCI memory base & limit registers leads to the root bridge
reporting a PCI_MEMORY_BASE value of 0 & a PCI_MEMORY_LIMIT value of
0x1600. If we then boot Linux, it sees that the bridge device needs
0x16000000 bytes of memory space & fails to assign it.
It's unclear to me why this happens, and poking values from the shell
doesn't seem to make anything clearer, but this workaround allows a MIPS
Boston board to boot Linux & let Linux successfully probe the PCIe bus &
all devices connected to it.
Signed-off-by: Paul Burton <paul.burton at imgtec.com>
---
drivers/pci/pcie_xilinx.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/pci/pcie_xilinx.c b/drivers/pci/pcie_xilinx.c
index 9059c41..0237bec 100644
--- a/drivers/pci/pcie_xilinx.c
+++ b/drivers/pci/pcie_xilinx.c
@@ -160,6 +160,15 @@ static int pcie_xilinx_write_config(struct udevice *bus, pci_dev_t bdf,
if (err < 0)
return 0;
+ if (bdf == PCI_BDF(bus->seq, 0, 0)) {
+ switch (offset) {
+ case PCI_MEMORY_BASE:
+ case PCI_MEMORY_LIMIT:
+ /* Writing the memory base or limit causes problems */
+ return 0;
+ }
+ }
+
switch (size) {
case PCI_SIZE_8:
__raw_writeb(value, address);
--
2.10.0
More information about the U-Boot
mailing list