src/mb/pcengines/apu2/mainboard.c: Fix retrieving serial number
commit0486458c730a2424ce2decc43dbea7610eb09957
authorMichał Żygowski <michal.zygowski@3mdeb.com>
Mon, 26 Nov 2018 18:47:23 +0000 (26 19:47 +0100)
committerPatrick Georgi <pgeorgi@google.com>
Mon, 3 Dec 2018 13:03:32 +0000 (3 13:03 +0000)
tree102f563775071a9ee8ab065baff310f35ace8b3a
parent4d2d171f02f7b2b238b2b3183af2a756d9377bb7
src/mb/pcengines/apu2/mainboard.c: Fix retrieving serial number

Handle situation when first NIC is not BDF 1:0.0. The PCI enumeration
is different when a external PCIe device is connected to mPCIe2 slot
which is routed to first PCIe bridge. The first NIC is then assigned
BDF 2:0.0, because it is connected to the second PCIe bridge.

Read the secondary bus number from the NIC PCIe bridge before attempting
to read MAC adress and calculating serial number.

Change-Id: I9f89a6f3cd0c23a2d2924e587338f69c260b12f8
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/29842
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
src/mainboard/pcengines/apu2/mainboard.c