]> git.ipfire.org Git - thirdparty/u-boot.git/commit - drivers/pci/pci-uclass.c
pci: Match region flags using a mask
authorAndrew Scull <ascull@google.com>
Thu, 21 Apr 2022 16:11:11 +0000 (16:11 +0000)
committerTom Rini <trini@konsulko.com>
Tue, 3 May 2022 22:33:26 +0000 (18:33 -0400)
commit7739d93d8288d9b58946ff5c5e46fb9e89599886
tree9b288afc525d82917979763b2d415d8973d78632
parent12507a2d2269f36d16232d78ec15e861d3fff2d7
pci: Match region flags using a mask

When converting addresses, apply a mask to the region flags during
lookup. This allows the caller to specify which flags are important and
which are not, for example to exclude system memory regions.

The behaviour of the function is changed such that they don't
preferentially search for a non-system memory region. However, system
memory regions are added after other regions in decode_regions() leading
to a similar outcome.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/pci/pci-uclass.c
include/pci.h
test/dm/pci.c