struct sh_eth_dev shdev;
struct mii_dev *bus;
- void __iomem *iobase;
+ phys_addr_t iobase;
struct clk clk;
struct gpio_desc reset_gpio;
};
struct sh_ether_priv *priv = dev_get_priv(udev);
struct sh_eth_dev *eth = &priv->shdev;
struct mii_dev *mdiodev;
- void __iomem *iobase;
int ret;
- iobase = map_physmem(pdata->iobase, 0x1000, MAP_NOCACHE);
- priv->iobase = iobase;
+ priv->iobase = pdata->iobase;
ret = clk_get_by_index(udev, 0, &priv->clk);
if (ret < 0)
- goto err_mdio_alloc;
+ return ret;
gpio_request_by_name(udev, "reset-gpios", 0, &priv->reset_gpio,
GPIOD_IS_OUT);
mdiodev = mdio_alloc();
if (!mdiodev) {
ret = -ENOMEM;
- goto err_mdio_alloc;
+ return ret;
}
mdiodev->read = bb_miiphy_read;
err_mdio_register:
mdio_free(mdiodev);
-err_mdio_alloc:
- unmap_physmem(priv->iobase, MAP_NOCACHE);
return ret;
}
if (dm_gpio_is_valid(&priv->reset_gpio))
dm_gpio_free(udev, &priv->reset_gpio);
- unmap_physmem(priv->iobase, MAP_NOCACHE);
-
return 0;
}