}
#ifdef CONFIG_DM_ETH
-static void rtl8169_common_start(struct udevice *dev, unsigned char *enetaddr)
+static void rtl8169_common_start(struct udevice *dev, unsigned char *enetaddr,
+ unsigned long dev_iobase)
#else
-static void rtl8169_common_start(pci_dev_t dev, unsigned char *enetaddr)
+static void rtl8169_common_start(pci_dev_t dev, unsigned char *enetaddr,
+ unsigned long dev_iobase)
#endif
{
int i;
printf ("%s\n", __FUNCTION__);
#endif
+ ioaddr = dev_iobase;
+
rtl8169_init_ring(dev);
rtl8169_hw_start(dev);
/* Construct a perfect filter frame with the mac address as first match
static int rtl8169_eth_start(struct udevice *dev)
{
struct eth_pdata *plat = dev_get_platdata(dev);
+ struct rtl8169_private *priv = dev_get_priv(dev);
- rtl8169_common_start(dev, plat->enetaddr);
+ rtl8169_common_start(dev, plat->enetaddr, priv->iobase);
return 0;
}
static int rtl_reset(struct eth_device *dev, bd_t *bis)
{
rtl8169_common_start((pci_dev_t)(unsigned long)dev->priv,
- dev->enetaddr);
+ dev->enetaddr, dev->iobase);
return 0;
}