aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/sun8i_emac.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-12-14 18:57:57 -0500
committerTom Rini <trini@konsulko.com>2020-12-14 18:57:57 -0500
commit8351a29d2df18c92d8e365cfa848218c3859f3d2 (patch)
tree5d29001be9accfb8029df9d9ed78fba196ee07b9 /drivers/net/sun8i_emac.c
parentddaa94978583d07ec515e7226e397221d8cc44c8 (diff)
parentb7bbd553de0d9752f919dfc616f560f6f2504c14 (diff)
Merge tag 'dm-pull-14dec20' of git://git.denx.de/u-boot-dm into next
Driver model tidy-up for livetree Driver model big rename for consistency Python 3 clean-ups for patman Update sandbox serial driver to use membuff
Diffstat (limited to 'drivers/net/sun8i_emac.c')
-rw-r--r--drivers/net/sun8i_emac.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index 4524604126..cf15e9f475 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -255,7 +255,7 @@ static int sun8i_mdio_write(struct mii_dev *bus, int addr, int devad, int reg,
static int sun8i_eth_write_hwaddr(struct udevice *dev)
{
struct emac_eth_dev *priv = dev_get_priv(dev);
- struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_pdata *pdata = dev_get_plat(dev);
uchar *mac_id = pdata->enetaddr;
u32 macid_lo, macid_hi;
@@ -712,7 +712,7 @@ static int sun8i_mdio_reset(struct mii_dev *bus)
{
struct udevice *dev = bus->priv;
struct emac_eth_dev *priv = dev_get_priv(dev);
- struct sun8i_eth_pdata *pdata = dev_get_platdata(dev);
+ struct sun8i_eth_pdata *pdata = dev_get_plat(dev);
int ret;
if (!dm_gpio_is_valid(&priv->reset_gpio))
@@ -799,7 +799,7 @@ static void sun8i_emac_eth_stop(struct udevice *dev)
static int sun8i_emac_eth_probe(struct udevice *dev)
{
- struct sun8i_eth_pdata *sun8i_pdata = dev_get_platdata(dev);
+ struct sun8i_eth_pdata *sun8i_pdata = dev_get_plat(dev);
struct eth_pdata *pdata = &sun8i_pdata->eth_pdata;
struct emac_eth_dev *priv = dev_get_priv(dev);
int ret;
@@ -861,9 +861,9 @@ static int sun8i_handle_internal_phy(struct udevice *dev, struct emac_eth_dev *p
return 0;
}
-static int sun8i_emac_eth_ofdata_to_platdata(struct udevice *dev)
+static int sun8i_emac_eth_of_to_plat(struct udevice *dev)
{
- struct sun8i_eth_pdata *sun8i_pdata = dev_get_platdata(dev);
+ struct sun8i_eth_pdata *sun8i_pdata = dev_get_plat(dev);
struct eth_pdata *pdata = &sun8i_pdata->eth_pdata;
struct emac_eth_dev *priv = dev_get_priv(dev);
const char *phy_mode;
@@ -1001,10 +1001,10 @@ U_BOOT_DRIVER(eth_sun8i_emac) = {
.name = "eth_sun8i_emac",
.id = UCLASS_ETH,
.of_match = sun8i_emac_eth_ids,
- .ofdata_to_platdata = sun8i_emac_eth_ofdata_to_platdata,
+ .of_to_plat = sun8i_emac_eth_of_to_plat,
.probe = sun8i_emac_eth_probe,
.ops = &sun8i_emac_eth_ops,
- .priv_auto_alloc_size = sizeof(struct emac_eth_dev),
- .platdata_auto_alloc_size = sizeof(struct sun8i_eth_pdata),
+ .priv_auto = sizeof(struct emac_eth_dev),
+ .plat_auto = sizeof(struct sun8i_eth_pdata),
.flags = DM_FLAG_ALLOC_PRIV_DMA,
};