u-boot/drivers
Pali Rohár 4cd61c43fd arm: a37xx: pci: Fix handling PIO config error responses
Returning fabricated CRS value (0xFFFF0001) by PCIe Root Complex to OS is
allowed only for 4-byte PCI_VENDOR_ID config read request and only when
CRSSVE bit in Root Port PCIe device is enabled. In all other error PCIe
Root Complex must return all-ones.

So implement this logic in pci-aardvark.c driver properly.

aardvark HW does not have Root Port PCIe device and U-Boot does not
implement emulation of this device. So expect that CRSSVE bit is set as
U-Boot can already handle CRS value for PCI_VENDOR_ID config read request.

More callers of pci_bus_read_config() function in U-Boot do not check for
return value, but check readback value. Therefore always fill readback
value in pcie_advk_read_config() function. On error fill all-ones of
correct size as it is required for PCIe Root Complex.

And also correctly propagates error from failed config write request to
return value of pcie_advk_write_config() function. Most U-Boot callers
ignores this return value, but it is a good idea to return correct value
from function.

These issues about return value of failed config read requests, including
special handling of CRS were reported by Lorenzo and Bjorn for Linux kernel
driver pci-aardvark together with quotes from PCIe r4.0 spec, see details:
https://lore.kernel.org/linux-pci/20210624213345.3617-1-pali@kernel.org/t/#u

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-08-11 08:42:26 +02:00
..
adc dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
ata arm: mvebu: sata_mv failed to identify HDDs during cold start 2021-08-11 08:42:26 +02:00
axi dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
bios_emulator pci: Drop DM_PCI check from bios_emul 2021-08-05 19:46:35 -04:00
block blk: Support iteration 2021-07-21 10:27:35 -06:00
bootcount am335x, guardian: software update available status is stored in AM3352 RTC scracth register 2021-07-15 17:56:03 +05:30
bus bus: ti-sysc: change in a normal driver 2021-03-22 19:23:27 +13:00
button dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
cache dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
clk clk: stm32mp1: add support of missing SPI clocks 2021-07-27 09:47:40 +02:00
core dm: core: Don't allow uclass use before ready 2021-08-08 11:27:27 -06:00
cpu dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
crypto dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
ddr ddr: Add DDR driver for iMX8ULP 2021-08-09 14:46:51 +02:00
demo common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
dfu global: Convert simple_strtoul() with decimal to dectoul() 2021-08-02 13:32:14 -04:00
dma dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
fastboot global: Convert simple_strtoul() with hex to hextoul() 2021-08-02 13:32:14 -04:00
firmware psci: Do not define do_poweroff() if CONFIG_SYSRESET_CMD_POWEROFF is enabled 2021-07-26 09:18:45 +02:00
fpga arm: socfpga: Move Stratix10 and Agilex to use TARGET_SOCFPGA_SOC64 2021-03-08 10:59:10 +08:00
gpio global: Convert simple_strtoul() with decimal to dectoul() 2021-08-02 13:32:14 -04:00
hwspinlock dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
i2c i2c: Create a new Kconfig for I2C 2021-07-28 14:29:37 -04:00
input dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
led dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
mailbox dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
memory memory: stm32-fmc2: migrate trace to dev and log macro 2021-01-13 09:52:58 +01:00
misc imx8ulp: move struct mu_type to common header 2021-08-09 14:46:51 +02:00
mmc drivers: mmc: fsl_esdhc_imx: support i.MX8ULP 2021-08-09 14:46:51 +02:00
mtd mtd: spi-nor: Mask out fast read if not requested in DT 2021-08-03 11:56:25 +05:30
mux dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
net net: fec_mxc: support i.MX8ULP 2021-08-09 14:46:50 +02:00
nvme dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
pch dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
pci arm: a37xx: pci: Fix handling PIO config error responses 2021-08-11 08:42:26 +02:00
pci_endpoint dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
phy Merge tag 'ti-v2021.10-rc2' of https://source.denx.de/u-boot/custodians/u-boot-ti 2021-07-29 08:20:06 -04:00
pinctrl pinctrl: Add pinctrl driver for imx8ulp 2021-08-09 14:46:51 +02:00
power global: Convert simple_strtoul() with hex to hextoul() 2021-08-02 13:32:14 -04:00
pwm dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
qe global: Convert simple_strtoul() with hex to hextoul() 2021-08-02 13:32:14 -04:00
ram global: Convert simple_strtoul() with decimal to dectoul() 2021-08-02 13:32:14 -04:00
reboot-mode reboot-mode: read the boot mode from RTC memory 2021-07-23 10:16:39 -04:00
remoteproc remoteproc: pru: Add support for various PRU cores on K3 AM65x SoCs 2021-07-15 17:56:04 +05:30
reset reset: ast2600: Fix missing reference operator 2021-07-24 08:57:53 -04:00
rng dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
rtc global: Convert simple_strtoul() with hex to hextoul() 2021-08-02 13:32:14 -04:00
scsi pci: scsi: pci: Drop DM_PCI check from scsi 2021-08-05 19:46:35 -04:00
serial global: Convert simple_strtoul() with decimal to dectoul() 2021-08-02 13:32:14 -04:00
smem dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
soc soc: ti: pruss: Add a platform driver for PRUSS in TI SoCs 2021-07-15 17:56:04 +05:30
sound dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
spi Merge https://source.denx.de/u-boot/custodians/u-boot-spi 2021-08-03 14:06:41 -04:00
spmi dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
sysinfo sysinfo: rcar3: Add Renesas R-Car Gen3 sysinfo driver 2021-07-20 23:33:54 +02:00
sysreset sysreset: provide type of reset in do_reset cmd 2021-04-20 07:31:12 -04:00
tee tee: optee: sync cache on pre-reloc OP-TEE invocation 2021-07-23 07:13:25 -04:00
thermal dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
timer x86: tsc: Rename X86_TSC_TIMER_EARLY_FREQ to X86_TSC_TIMER_FREQ 2021-08-02 15:11:40 +08:00
tpm sandbox: tpm: Support extending a PCR multiple times 2021-08-01 09:05:24 -06:00
ufs dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
usb pci: usb: ohci: Test on PCI not DM_PCI 2021-08-05 19:45:54 -04:00
video - add display driver for ST-Ericsson MCDE 2021-08-06 13:46:40 -04:00
virtio dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
w1 various minor sandbox improvements 2021-07-07 13:34:42 -04:00
w1-eeprom dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
watchdog i.MX 2021-07-17 10:52:21 -04:00
xen dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
Kconfig reboot-mode: add support for reboot mode control 2021-07-23 10:16:39 -04:00
Makefile ddr: Add DDR driver for iMX8ULP 2021-08-09 14:46:51 +02:00