]> git.ipfire.org Git - people/ms/u-boot.git/commit
dm: pci: Support decoding ranges with duplicate entries
authorSimon Glass <sjg@chromium.org>
Fri, 20 Nov 2015 03:26:58 +0000 (20:26 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 1 Dec 2015 13:26:36 +0000 (06:26 -0700)
commit9526d83ac5a39bfa3dc4c07a242aa052093744b5
tree26c20dd918905828a1074e349e1441c1dee7220b
parent2084c5af6dc03b500622ae8844bc69cc5a8e51fb
dm: pci: Support decoding ranges with duplicate entries

At present we add a new resource entry for every range entry. But some range
entries refer to configuration regions. To make this work, avoid adding two
regions of the same type. The later ranges will overwrite the earlier
(configuration) ones.

There does not seem to be a way to distinguish the configuration ranges
other than by ordering (as per the device tree binding).

We could perhaps instead just store one region of each type in a simple
array. Once we are sure that we don't need to support multiple regions, we
could change this. It would be easier to do it when all drivers are
converted to use driver model for PCI.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
drivers/pci/pci-uclass.c