dm: pci: Add a function to read a PCI BAR
authorSimon Glass <sjg@chromium.org>
Sun, 15 Sep 2019 18:08:58 +0000 (12:08 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 8 Oct 2019 05:57:43 +0000 (13:57 +0800)
commit33c215af4b9de32e5052bb716411dc34ce9b63ac
tree36b6e9cc1fba5109206109b94a85fa64e6a0e6f7
parent6a73cf3d8fe32f3bddd4ba7dd47dcb75df5ca592
dm: pci: Add a function to read a PCI BAR

At present PCI address transaction is not supported so drivers must
manually read the correct BAR after reading the device tree info. The
ns16550 has a suitable implementation, so move this code into the core
DM support.

Note that there is no live-tree equivalent at present.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: correct the unclear comments in test.dts]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
arch/sandbox/dts/test.dts
drivers/core/fdtaddr.c
drivers/core/read.c
drivers/serial/ns16550.c
include/dm/fdtaddr.h
include/dm/read.h
test/dm/pci.c