u-boot-brain/drivers/pci
Phil Sutter c1b1263b16 pci: Make auto-config code a little more robust
On my DS414, some PCI devices return odd values when probing BAR sizes.
An obvious case is all-ones response, the Linux driver
(drivers/pci/probe.c) catches those explicitly and a comment explains
that either bit 0 or bit 1 must be clear (depending on MEM or IO type).
Other BARs return e.g. 0xfff0000f or 0xfff00004 and thus manage to break
size calculation due to the "middle" zeroes. Mitigate that copying more
or less what Linux does and do a "find least bit set".

Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-27 07:29:43 +01:00
..
fsl_pci_init.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
Kconfig pci: Add Rockchip dwc based PCIe controller driver 2021-01-21 12:00:45 +08:00
Makefile pci: Add Rockchip dwc based PCIe controller driver 2021-01-21 12:00:45 +08: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 pci: Make auto-config code a little more robust 2021-01-27 07:29:43 +01: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 dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
pci_msc01.c common: Drop init.h from common header 2020-05-18 17:33:33 -04:00
pci_mvebu.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
pci_octeontx.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
pci_rom.c dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07: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 Prepare v2021.01-rc5 2021-01-05 16:20:26 -05: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 dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
pci-uclass.c common: board_r: Drop initr_pci wrapper 2021-01-15 14:36:12 -05:00
pci.c common: board_r: Drop initr_pci wrapper 2021-01-15 14:36:12 -05:00
pcie_brcmstb.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
pcie_dw_mvebu.c dm: Avoid accessing seq directly 2020-12-18 20:32:21 -07:00
pcie_dw_rockchip.c pci: Add Rockchip dwc based PCIe controller driver 2021-01-21 12:00:45 +08:00
pcie_dw_ti.c dm: Avoid accessing seq directly 2020-12-18 20:32:21 -07:00
pcie_ecam_generic.c dm: Avoid accessing seq directly 2020-12-18 20:32:21 -07: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 dm: Avoid accessing seq directly 2020-12-18 20:32:21 -07: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 dm: Avoid accessing seq directly 2020-12-18 20:32:21 -07:00
pcie_iproc.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
pcie_layerscape_ep.c Prepare v2021.01-rc5 2021-01-05 16:20:26 -05:00
pcie_layerscape_fixup_common.c pci: layerscape: fix a dead loop issue 2020-12-10 13:56:39 +05:30
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 Prepare v2021.01-rc5 2021-01-05 16:20:26 -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 Prepare v2021.01-rc5 2021-01-05 16:20:26 -05:00
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 dm: Avoid accessing seq directly 2020-12-18 20:32:21 -07:00
pcie_phytium.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00
pcie_rockchip.c dm: Avoid accessing seq directly 2020-12-18 20:32:21 -07:00
pcie_xilinx.c dm: treewide: Rename ofdata_to_platdata() to of_to_plat() 2020-12-13 16:51:09 -07:00