]> git.sur5r.net Git - u-boot/commit
net: pch_gbe: Use dm_pci_map_bar to discover MMIO base
authorPaul Burton <paul.burton@imgtec.com>
Thu, 8 Sep 2016 06:47:33 +0000 (07:47 +0100)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Wed, 21 Sep 2016 13:04:32 +0000 (15:04 +0200)
commit154bf12f78c012895e7b42f844b7b92c4f015509
tree85c3dfca8995bbadf2902f07fc9433ce74520879
parent65f62b1ca12050c4e3b3e5ed641447918f4c4b7b
net: pch_gbe: Use dm_pci_map_bar to discover MMIO base

Reading the PCI BAR & converting the result to a physical address is not
safe across all architectures. For example on MIPS the virtual:physical
mapping is not 1:1, so we cannot directly make use of the physical
address.

Use the more generic BAR-mapping function dm_pci_map_bar to discover the
MMIO base address, which should work across architectures.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/pch_gbe.c