]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - board/siemens/pxm2/board.c
net: cosmetic: Name ethaddr variables consistently
[karo-tx-uboot.git] / board / siemens / pxm2 / board.c
index 559af0e0e52f9c6bb3eb5be6fe29a139d9e3b2f6..4d8ba3cd800c83a24d6bc00d194fd7cb2b91fa5a 100644 (file)
@@ -222,7 +222,7 @@ int board_eth_init(bd_t *bis)
        struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
 #ifdef CONFIG_FACTORYSET
        int rv;
-       if (!is_valid_ether_addr(factory_dat.mac))
+       if (!is_valid_ethaddr(factory_dat.mac))
                printf("Error: no valid mac address\n");
        else
                eth_setenv_enetaddr("ethaddr", factory_dat.mac);
@@ -428,4 +428,38 @@ static int board_video_init(void)
        return 0;
 }
 #endif
+
+#ifdef CONFIG_BOARD_LATE_INIT
+int board_late_init(void)
+{
+       int ret;
+
+       omap_nand_switch_ecc(1, 8);
+
+#ifdef CONFIG_FACTORYSET
+       if (factory_dat.asn[0] != 0) {
+               char tmp[2 * MAX_STRING_LENGTH + 2];
+
+               if (strncmp((const char *)factory_dat.asn, "PXM50", 5) == 0)
+                       factory_dat.pxm50 = 1;
+               else
+                       factory_dat.pxm50 = 0;
+               sprintf(tmp, "%s_%s", factory_dat.asn,
+                       factory_dat.comp_version);
+               ret = setenv("boardid", tmp);
+               if (ret)
+                       printf("error setting board id\n");
+       } else {
+               factory_dat.pxm50 = 1;
+               ret = setenv("boardid", "PXM50_1.0");
+               if (ret)
+                       printf("error setting board id\n");
+       }
+       debug("PXM50: %d\n", factory_dat.pxm50);
+#endif
+
+       return 0;
+}
+#endif
+
 #include "../common/board.c"