mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-13 20:36:02 +01:00
net: sun8i_emac: Drop DM_GPIO checks
DM_GPIO is always enable in U-Boot proper for ARCH_SUNXI, and this driver is never enabled in SPL, so the condition is always true. Series-to: sunxi Signed-off-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
parent
cbba1b7766
commit
5b4f8fc6d0
@ -168,9 +168,7 @@ struct emac_eth_dev {
|
|||||||
struct clk ephy_clk;
|
struct clk ephy_clk;
|
||||||
struct reset_ctl tx_rst;
|
struct reset_ctl tx_rst;
|
||||||
struct reset_ctl ephy_rst;
|
struct reset_ctl ephy_rst;
|
||||||
#if CONFIG_IS_ENABLED(DM_GPIO)
|
|
||||||
struct gpio_desc reset_gpio;
|
struct gpio_desc reset_gpio;
|
||||||
#endif
|
|
||||||
struct udevice *phy_reg;
|
struct udevice *phy_reg;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -617,7 +615,6 @@ err_tx_clk:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_IS_ENABLED(DM_GPIO)
|
|
||||||
static int sun8i_mdio_reset(struct mii_dev *bus)
|
static int sun8i_mdio_reset(struct mii_dev *bus)
|
||||||
{
|
{
|
||||||
struct udevice *dev = bus->priv;
|
struct udevice *dev = bus->priv;
|
||||||
@ -649,7 +646,6 @@ static int sun8i_mdio_reset(struct mii_dev *bus)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static int sun8i_mdio_init(const char *name, struct udevice *priv)
|
static int sun8i_mdio_init(const char *name, struct udevice *priv)
|
||||||
{
|
{
|
||||||
@ -664,9 +660,7 @@ static int sun8i_mdio_init(const char *name, struct udevice *priv)
|
|||||||
bus->write = sun8i_mdio_write;
|
bus->write = sun8i_mdio_write;
|
||||||
snprintf(bus->name, sizeof(bus->name), name);
|
snprintf(bus->name, sizeof(bus->name), name);
|
||||||
bus->priv = (void *)priv;
|
bus->priv = (void *)priv;
|
||||||
#if CONFIG_IS_ENABLED(DM_GPIO)
|
|
||||||
bus->reset = sun8i_mdio_reset;
|
bus->reset = sun8i_mdio_reset;
|
||||||
#endif
|
|
||||||
|
|
||||||
return mdio_register(bus);
|
return mdio_register(bus);
|
||||||
}
|
}
|
||||||
@ -783,9 +777,7 @@ static int sun8i_emac_eth_of_to_plat(struct udevice *dev)
|
|||||||
const fdt32_t *reg;
|
const fdt32_t *reg;
|
||||||
int node = dev_of_offset(dev);
|
int node = dev_of_offset(dev);
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
#if CONFIG_IS_ENABLED(DM_GPIO)
|
|
||||||
int reset_flags = GPIOD_IS_OUT;
|
int reset_flags = GPIOD_IS_OUT;
|
||||||
#endif
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
pdata->iobase = dev_read_addr(dev);
|
pdata->iobase = dev_read_addr(dev);
|
||||||
@ -872,7 +864,6 @@ static int sun8i_emac_eth_of_to_plat(struct udevice *dev)
|
|||||||
printf("%s: Invalid RX delay value %d\n", __func__,
|
printf("%s: Invalid RX delay value %d\n", __func__,
|
||||||
sun8i_pdata->rx_delay_ps);
|
sun8i_pdata->rx_delay_ps);
|
||||||
|
|
||||||
#if CONFIG_IS_ENABLED(DM_GPIO)
|
|
||||||
if (fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
|
if (fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
|
||||||
"snps,reset-active-low"))
|
"snps,reset-active-low"))
|
||||||
reset_flags |= GPIOD_ACTIVE_LOW;
|
reset_flags |= GPIOD_ACTIVE_LOW;
|
||||||
@ -887,7 +878,6 @@ static int sun8i_emac_eth_of_to_plat(struct udevice *dev)
|
|||||||
} else if (ret == -ENOENT) {
|
} else if (ret == -ENOENT) {
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user