]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - net/eth-uclass.c
arcv2: Set IOC aperture so it covers available DDR
[people/ms/u-boot.git] / net / eth-uclass.c
index 140e47d52d3cdb09502ac22414eb66d797aa3481..b659961a5dd4dd883c933f5dad3e3a2754bc2d89 100644 (file)
@@ -181,7 +181,7 @@ int eth_get_dev_index(void)
 
 static int eth_write_hwaddr(struct udevice *dev)
 {
-       struct eth_pdata *pdata = dev->platdata;
+       struct eth_pdata *pdata;
        int ret = 0;
 
        if (!dev || !device_active(dev))
@@ -189,6 +189,7 @@ static int eth_write_hwaddr(struct udevice *dev)
 
        /* seq is valid since the device is active */
        if (eth_get_ops(dev)->write_hwaddr && !eth_mac_skip(dev->seq)) {
+               pdata = dev->platdata;
                if (!is_valid_ethaddr(pdata->enetaddr)) {
                        printf("\nError: %s address %pM illegal value\n",
                               dev->name, pdata->enetaddr);
@@ -500,7 +501,7 @@ static int eth_post_probe(struct udevice *dev)
                    memcmp(pdata->enetaddr, env_enetaddr, ARP_HLEN)) {
                        printf("\nWarning: %s MAC addresses don't match:\n",
                               dev->name);
-                       printf("Address in SROM is         %pM\n",
+                       printf("Address in ROM is          %pM\n",
                               pdata->enetaddr);
                        printf("Address in environment is  %pM\n",
                               env_enetaddr);