]> git.baikalelectronics.ru Git - uboot.git/commit
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)
commitbc8d05f6eb039bdfcd54c680c9b7a0349a68dbcf
tree9b288afc525d82917979763b2d415d8973d78632
parente5e1e970f74f11d4b10cbb2ba278d683234f27ea
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