dm/pci: Change the first CFG read to Vendor ID in enumeration
authorHou Zhiqiang <Zhiqiang.Hou@nxp.com>
Mon, 8 Oct 2018 08:35:47 +0000 (16:35 +0800)
committerSimon Glass <sjg@chromium.org>
Wed, 21 Nov 2018 02:14:22 +0000 (19:14 -0700)
commit2a87f7fdd599172879633faf33cae7005344d666
treecce5b9bdefdd2f5693fbce627e82da2522640a20
parenta3e1653ddeb02f39481eba572275016171e9670c
dm/pci: Change the first CFG read to Vendor ID in enumeration

As the PCIe specification recommend reading the Vendor ID register
to determine if a Function is present, read the Vendor ID of a
non-existent Function must not result in system error, so we'd better
make the first CFG read to Vendor ID instead of Header Type register
in the PCIe enumeration.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/pci/pci-uclass.c