u-boot-brain/drivers/pci
Michael Walle b7585aa9b1 pci: layerscape: Fix spurious writes and panic
The fdt_fixup_pcie_ls() scans all PCI devices and assumes that all PCI
root devices are layerscape PCIe controllers. Unfortunately, this is not
true for the LS1028A. There is one additional static PCI root complex
(this contains the networking devices) which has nothing to do with the
layerscape PCIe controllers. On recent U-Boot versions this results in
the following panic:

"Synchronous Abort" handler, esr 0x96000044
elr: 000000009602fa04 lr : 000000009602f9f4 (reloc)
elr: 00000000fbd73a04 lr : 00000000fbd739f4
x0 : 0080000002000101 x1 : 0000000000000000
x2 : 00000000fbde9000 x3 : 0000000000000001
x4 : 0000000000000000 x5 : 0000000000000030
x6 : 00000000fbdbd460 x7 : 00000000fbb3d3a0
x8 : 0000000000000002 x9 : 000000000000000c
x10: 00000000ffffffe8 x11: 0000000000000006
x12: 000000000001869f x13: 0000000000000a2c
x14: 00000000fbb3d2cc x15: 00000000ffffffff
x16: 0000000000010000 x17: 0000000000000000
x18: 00000000fbb3fda0 x19: 0000000000000800
x20: 0000000000000000 x21: 00000001f0000000
x22: 0000000000000800 x23: 0000000000000009
x24: 00000000fbdc3c1b x25: 00000000fbdc28e5
x26: 00000000fbdcc008 x27: 00000000fbdc16e2
x28: 000000000f000000 x29: 00000000fbb3d3a0

Code: 394072a1 f94006a0 34000041 5ac00a94 (b8336814)
Resetting CPU ...

This bug already existed in former versions, but the spurious write was
never trapped, because the destination address was a valid address (by
pure luck).

Make sure the PCI root is actually one of the expected PCIe layerscape
controllers by matching its compatible string.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2020-09-23 19:33:44 +05:30
..
fsl_pci_init.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
Kconfig arm64: a37xx: pci: Depends on DM_GPIO 2020-08-31 14:45:53 +02:00
Makefile pci: Add PCI controller driver for OcteonTX / TX2 2020-08-25 08:01:16 +02:00
pci_auto_common.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pci_auto_old.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pci_auto.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pci_common.c env: Move env_get() to env.h 2019-08-11 16:43:41 -04:00
pci_compat.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pci_ftpci100.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pci_gt64120.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pci_indirect.c pci: Don't use pci_indirect when DM is active 2018-05-08 18:50:23 -04:00
pci_internal.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pci_mpc85xx.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
pci_msc01.c common: Drop init.h from common header 2020-05-18 17:33:33 -04:00
pci_mvebu.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
pci_octeontx.c pci: Add PCI controller driver for OcteonTX / TX2 2020-08-25 08:01:16 +02:00
pci_rom.c video: pci: Set up the copy framebuffer 2020-07-09 12:33:24 +08:00
pci_sandbox.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pci_sh4.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
pci_sh7751.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
pci_sh7780.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
pci_tegra.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
pci_x86.c dm: pci: Update the PCI read_config() method to const dev * 2020-02-05 19:33:45 -07:00
pci-aardvark.c arm64: a37xx: pci: Depends on DM_GPIO 2020-08-31 14:45:53 +02:00
pci-emul-uclass.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pci-rcar-gen2.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
pci-rcar-gen3.c pci: Move some PCIe register offset definitions to a common header 2020-07-09 15:46:12 +02:00
pci-uclass.c pci: pci-uclass: Check validity of ofnode 2020-08-25 08:01:16 +02:00
pci.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
pcie_brcmstb.c pci: Add driver for Broadcom BCM2711 SoC PCIe controller 2020-07-10 11:49:28 +02:00
pcie_dw_mvebu.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
pcie_dw_ti.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
pcie_ecam_generic.c pci-host-ecam-generic: access config space independent of system-wide bus id 2020-03-30 08:11:56 +05:30
pcie_fsl_fixup.c treewide: convert bd_t to struct bd_info by coccinelle 2020-07-17 09:30:13 -04:00
pcie_fsl.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
pcie_fsl.h dm: pcie_fsl: Fix the calculation of controller index 2019-08-28 13:47:44 +05:30
pcie_imx.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
pcie_intel_fpga.c pci: Move some PCIe register offset definitions to a common header 2020-07-09 15:46:12 +02:00
pcie_iproc.c drivers: pcie: add Broadcom IPROC PCIe RC driver 2020-08-14 09:43:21 -04:00
pcie_layerscape_ep.c pci_ep: layerscape: Add the PCIe EP mode support for lx2160a-v2 2020-07-27 14:24:15 +05:30
pcie_layerscape_fixup_common.c treewide: convert bd_t to struct bd_info by coccinelle 2020-07-17 09:30:13 -04:00
pcie_layerscape_fixup_common.h treewide: convert bd_t to struct bd_info by coccinelle 2020-07-17 09:30:13 -04:00
pcie_layerscape_fixup.c pci: layerscape: Fix spurious writes and panic 2020-09-23 19:33:44 +05:30
pcie_layerscape_gen4_fixup.c pci: Drop dm.h inclusion from header file 2020-08-03 22:19:54 -04:00
pcie_layerscape_gen4.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pcie_layerscape_gen4.h pci: Drop dm.h inclusion from header file 2020-08-03 22:19:54 -04:00
pcie_layerscape_rc.c pci: layerscape: Modify the ls_pcie_dump_atu function 2020-07-27 14:24:15 +05:30
pcie_layerscape.c pci: layerscape: Modify the ls_pcie_dump_atu function 2020-07-27 14:24:15 +05:30
pcie_layerscape.h pci: Drop dm.h inclusion from header file 2020-08-03 22:19:54 -04:00
pcie_mediatek.c PCI: mediatek: Release the resource when PCIe enable port fail 2020-09-10 15:32:09 -04:00
pcie_phytium.c dm: pci: Update the PCI read_config() method to const dev * 2020-02-05 19:33:45 -07:00
pcie_rockchip.c pci: rockchip: Drop legacy PHY driver 2020-07-22 20:22:49 +08:00
pcie_xilinx.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00