Skip to content
Snippets Groups Projects
Commit 6758a6cc authored by Bin Meng's avatar Bin Meng
Browse files

net: designware: Use dm_pci_mem_to_phys() in the probe routine


Convert to use native DM PCI API dm_pci_mem_to_phys().

Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent c52ac3f9
No related branches found
No related tags found
No related merge requests found
...@@ -591,11 +591,9 @@ static int designware_eth_probe(struct udevice *dev) ...@@ -591,11 +591,9 @@ static int designware_eth_probe(struct udevice *dev)
* or via a PCI bridge, fill in platdata before we probe the hardware. * or via a PCI bridge, fill in platdata before we probe the hardware.
*/ */
if (device_is_on_pci_bus(dev)) { if (device_is_on_pci_bus(dev)) {
pci_dev_t bdf = dm_pci_get_bdf(dev);
dm_pci_read_config32(dev, PCI_BASE_ADDRESS_0, &iobase); dm_pci_read_config32(dev, PCI_BASE_ADDRESS_0, &iobase);
iobase &= PCI_BASE_ADDRESS_MEM_MASK; iobase &= PCI_BASE_ADDRESS_MEM_MASK;
iobase = pci_mem_to_phys(bdf, iobase); iobase = dm_pci_mem_to_phys(dev, iobase);
pdata->iobase = iobase; pdata->iobase = iobase;
pdata->phy_interface = PHY_INTERFACE_MODE_RMII; pdata->phy_interface = PHY_INTERFACE_MODE_RMII;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment