u-boot-brain/drivers/pci
Pali Rohár eccbd4ad8e arm: a37xx: pci: Fix processing PIO transfers
Trying to clear PIO_START register when it is non-zero (which indicates
that previous PIO transfer has not finished yet) causes an External
Abort with SError 0xbf000002.

This bug is currently worked around in TF-A by handling External Aborts
in EL3 and ignoring this particular SError.

This workaround was also discussed at:
https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=3c7dcdac5c50
https://lore.kernel.org/linux-pci/20190316161243.29517-1-repk@triplefau.lt/
https://lore.kernel.org/linux-pci/971be151d24312cc533989a64bd454b4@www.loen.fr/
https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/1541

Implement a proper fix to prevent this External Abort. As it is not
possible to cancel a pending PIO transfer, simply do not start a new one
if previous has not finished yet. In this case return an error to the
caller.

In most cases this SError happens when there is no PCIe card connected
or when PCIe link is down. The reason is that in these cases a PIO
transfer takes about 1.44 seconds. For this reason we also increase the
wait timeout in pcie_advk_wait_pio() to 1.5 seconds.

If PIO read transfer for PCI_VENDOR_ID register times out, or if it
isn't possible to read it yet because previous transfer is not finished,
return Completion Retry Status value instead of failing, to give the
caller a chance to send a new read request.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-04-29 07:45:43 +02:00
..
fsl_pci_init.c pci: fsl_pci_init: Dynamically allocate the PCI regions 2021-03-05 10:25:42 +05:30
Kconfig mips: octeon: Add Octeon PCIe host controller driver 2021-04-28 10:05:12 +02:00
Makefile mips: octeon: Add Octeon PCIe host controller driver 2021-04-28 10:05:12 +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 pci: Remove CONFIG_PCI_ENUM_ONLY as it's not used (any more) 2021-01-27 17:03:16 -05:00
pci_auto.c pci: Mark 64bit Memory BARs as such 2021-04-12 17:17:11 -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 pci: mpc85xx: Support 64-bit bus and cpu address 2021-03-05 10:25:43 +05:30
pci_msc01.c common: Drop init.h from common header 2020-05-18 17:33:33 -04:00
pci_mvebu.c pci: pci_mvebu: set local dev to number 1 2021-02-26 10:22:29 +01:00
pci_octeontx.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pci_rom.c video: Fix video on coreboot with the copy buffer 2021-03-27 15:04:30 +13:00
pci_sandbox.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07: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 dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07: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 arm: a37xx: pci: Fix processing PIO transfers 2021-04-29 07:45:43 +02:00
pci-emul-uclass.c dm: Use access methods for dev/uclass private data 2021-01-05 12:24:40 -07:00
pci-rcar-gen2.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
pci-rcar-gen3.c pci: renesas: Fix BAR mapping on Gen3 2021-02-20 22:38:28 +01:00
pci-uclass.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pci.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pcie_brcmstb.c pci: pcie-brcmstb: Fix inbound window configurations 2021-02-18 11:56:25 +01:00
pcie_dw_common.c pci: add common Designware PCIe functions 2021-04-15 10:43:17 +08:00
pcie_dw_common.h pci: add common Designware PCIe functions 2021-04-15 10:43:17 +08:00
pcie_dw_meson.c pci: add Amlogic Meson Designware PCIe controller 2021-04-15 10:43:17 +08:00
pcie_dw_mvebu.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pcie_dw_rockchip.c pci: pcie_dw_rockchip: migrate to common Designware PCIe functions 2021-04-15 10:43:17 +08:00
pcie_dw_ti.c pci: pcie_dw_ti: migrate to common Designware PCIe functions 2021-04-15 10:43:17 +08:00
pcie_ecam_generic.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
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 asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pcie_fsl.h dm: pci: fsl: Correct the workaround of erratum A-007815 2020-10-23 16:52:09 +05:30
pcie_imx.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
pcie_intel_fpga.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pcie_iproc.c dm: pci: Correct use of wrong flag name 2021-02-03 03:38:41 -07:00
pcie_layerscape_ep.c pci: layerscape: Change to allocate zeroed memery for struct ls_pcie 2021-03-23 18:06:07 +05:30
pcie_layerscape_fixup_common.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05: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 dm: Avoid accessing seq directly 2020-12-18 20:32:21 -07:00
pcie_layerscape_gen4_fixup.c dm: Avoid accessing seq directly 2020-12-18 20:32:21 -07:00
pcie_layerscape_gen4.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05: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: Change to allocate zeroed memery for struct ls_pcie 2021-03-23 18:06:07 +05:30
pcie_layerscape.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pcie_layerscape.h pci: layerscape: Remove the shadow SVR definitions 2021-02-08 14:01:18 +05:30
pcie_mediatek.c dm: Avoid accessing seq directly 2020-12-18 20:32:21 -07:00
pcie_octeon.c mips: octeon: Add Octeon PCIe host controller driver 2021-04-28 10:05:12 +02:00
pcie_phytium.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pcie_rockchip.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
pcie_xilinx.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00