On 31 December 2014 at 01:05, Bin Meng <bmeng...@gmail.com> wrote: > 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...@gmail.com> > > --- > > Changes in v4: > - Check compatible string 12th byte against '\0'
Acked-by: Simon Glass <s...@chromium.org> > > Changes in v3: > - Fixed a typo: parant -> parent > - Return better error code in fdtdec_get_pci_addr() > - Add some debug output in fdtdec_get_pci_addr() > - Reuse variable 'len' instead of creating a new one 'l' > - Check compatible string length and existence of '.' > - Using simple_strtol() directly on the compatible sub-string > - Change variable 'bn' to 'barnum' which is self-documenting > > Changes in v2: > - New patch to add several apis to decode pci device node > > include/fdtdec.h | 108 +++++++++++++++++++++++++++++++---- > lib/fdtdec.c | 171 > ++++++++++++++++++++++++++++++++++++++++++++++++++----- > 2 files changed, 254 insertions(+), 25 deletions(-) > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot