summaryrefslogtreecommitdiff
path: root/drivers/ddr/imx/imx8m
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2021-01-03 23:06:45 +0100
committerStefan Roese <sr@denx.de>2021-01-27 07:29:43 +0100
commitc1b1263b160ece33b2164dc3cd107f0d1dec52fd (patch)
treec51ca6f2e09f5595c973fe101ea2ab4a65768a67 /drivers/ddr/imx/imx8m
parent7d3c6c6e9ff431669d22d5f46bc8ad4b963a905a (diff)
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>
Diffstat (limited to 'drivers/ddr/imx/imx8m')
0 files changed, 0 insertions, 0 deletions