X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fnet%2Ftsec.c;h=f5e314b9ee06c366ae1360bc4b6b1f0452aa3eb6;hb=32e4f6bf2e35e99e1742c005e1ede4e0cf5f066c;hp=160bc0597d680fee4befaadda1b3412e2093b62b;hpb=0c2dd9a05bdcf3b2b4880509ec690116873fe158;p=u-boot diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index 160bc0597d..f5e314b9ee 100644 --- a/drivers/net/tsec.c +++ b/drivers/net/tsec.c @@ -44,8 +44,7 @@ static RTXBD rtx __attribute__ ((aligned(8))); #error "rtx must be 64-bit aligned" #endif -static int tsec_send(struct eth_device *dev, - volatile void *packet, int length); +static int tsec_send(struct eth_device *dev, void *packet, int length); /* Default initializations for TSEC controllers. */ @@ -377,7 +376,7 @@ static void startup_tsec(struct eth_device *dev) * do the same. Presumably, this would be zero if there were no * errors */ -static int tsec_send(struct eth_device *dev, volatile void *packet, int length) +static int tsec_send(struct eth_device *dev, void *packet, int length) { int i; int result = 0; @@ -481,6 +480,7 @@ static int tsec_init(struct eth_device *dev, bd_t * bd) int i; struct tsec_private *priv = (struct tsec_private *)dev->priv; tsec_t *regs = priv->regs; + int ret; /* Make sure the controller is stopped */ tsec_halt(dev); @@ -512,7 +512,12 @@ static int tsec_init(struct eth_device *dev, bd_t * bd) startup_tsec(dev); /* Start up the PHY */ - phy_startup(priv->phydev); + ret = phy_startup(priv->phydev); + if (ret) { + printf("Could not initialize PHY %s\n", + priv->phydev->dev->name); + return ret; + } adjust_link(priv, priv->phydev);