]> git.dujemihanovic.xyz Git - u-boot.git/commit
fdt: Add several apis to decode pci device node
authorBin Meng <bmeng.cn@gmail.com>
Wed, 31 Dec 2014 08:05:11 +0000 (16:05 +0800)
committerSimon Glass <sjg@chromium.org>
Tue, 13 Jan 2015 15:24:40 +0000 (07:24 -0800)
commita62e84d7b1824a202dd6a9e9c7b1bc350c7b33b7
tree1c102299e34f9c25c8b17725586875ba9525062a
parent949dbc12db8ba628004ac70359ca0e0edf98432e
fdt: Add several apis to decode pci device node

This commit adds several APIs to decode PCI device node according to
the Open Firmware PCI bus bindings, including:
- fdtdec_get_pci_addr() for encoded pci address
- fdtdec_get_pci_vendev() for vendor id and device id
- fdtdec_get_pci_bdf() for pci device bdf triplet
- fdtdec_get_pci_bar32() for pci device register bar

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
(Include <pci.h> in fdtdec.h and adjust tegra to fix build error)
drivers/pci/pci_tegra.c
include/fdtdec.h
lib/fdtdec.c