aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-08-01 18:54:34 -0600
committerTom Rini <trini@konsulko.com>2021-09-13 18:23:13 -0400
commite882a59ef1b293b6af496c3bd8417f648315a42f (patch)
treeb3de4cb21624642ef297948563e1553eca854052
parentd6d504d7ba8dc61dc0015ddd682bfce1dafa7dfc (diff)
downloadu-boot-e882a59ef1b293b6af496c3bd8417f648315a42f.zip
u-boot-e882a59ef1b293b6af496c3bd8417f648315a42f.tar.gz
u-boot-e882a59ef1b293b6af496c3bd8417f648315a42f.tar.bz2
net: Drop DM_PCI check from designware driver
We don't need this check anymore since when PCI is enabled, driver model is always used. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--drivers/net/designware.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 5d92257..5aaac60 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -756,16 +756,16 @@ int designware_eth_write_hwaddr(struct udevice *dev)
static int designware_eth_bind(struct udevice *dev)
{
-#ifdef CONFIG_DM_PCI
- static int num_cards;
- char name[20];
-
- /* Create a unique device name for PCI type devices */
- if (device_is_on_pci_bus(dev)) {
- sprintf(name, "eth_designware#%u", num_cards++);
- device_set_name(dev, name);
+ if (IS_ENABLED(CONFIG_PCI)) {
+ static int num_cards;
+ char name[20];
+
+ /* Create a unique device name for PCI type devices */
+ if (device_is_on_pci_bus(dev)) {
+ sprintf(name, "eth_designware#%u", num_cards++);
+ device_set_name(dev, name);
+ }
}
-#endif
return 0;
}
@@ -831,12 +831,11 @@ int designware_eth_probe(struct udevice *dev)
else
reset_deassert_bulk(&reset_bulk);
-#ifdef CONFIG_DM_PCI
/*
* If we are on PCI bus, either directly attached to a PCI root port,
* or via a PCI bridge, fill in plat before we probe the hardware.
*/
- if (device_is_on_pci_bus(dev)) {
+ if (IS_ENABLED(CONFIG_PCI) && device_is_on_pci_bus(dev)) {
dm_pci_read_config32(dev, PCI_BASE_ADDRESS_0, &iobase);
iobase &= PCI_BASE_ADDRESS_MEM_MASK;
iobase = dm_pci_mem_to_phys(dev, iobase);
@@ -844,7 +843,6 @@ int designware_eth_probe(struct udevice *dev)
pdata->iobase = iobase;
pdata->phy_interface = PHY_INTERFACE_MODE_RMII;
}
-#endif
debug("%s, iobase=%x, priv=%p\n", __func__, iobase, priv);
ioaddr = iobase;