]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/ml2/ml2.c
ppc4xx: Remove IOP480 support
[karo-tx-uboot.git] / board / ml2 / ml2.c
index a89a8f9b417697b3c33140478c01ad7753e4d646..319dca09db08e0903667f5f442b55c53580d65b8 100644 (file)
@@ -22,8 +22,7 @@
 #include <asm/processor.h>
 
 
-
-int board_pre_init (void)
+int board_early_init_f (void)
 {
        return 0;
 }
@@ -31,30 +30,26 @@ int board_pre_init (void)
 
 int checkboard (void)
 {
-       unsigned char *s = getenv ("serial#");
-       unsigned char *e;
+       char buf[64];
+       int i;
+       int l = getenv_f("serial#", buf, sizeof(buf));
 
-       if (!s || strncmp (s, "ML2", 9)) {
+       if (l < 0 || strncmp(buf, "ML2", 9)) {
                printf ("### No HW ID - assuming ML2");
        } else {
-               for (e = s; *e; ++e) {
-                       if (*e == ' ')
+               for (i = 0; i < l; i++) {
+                       if (buf[i] == ' ')
                                break;
-               }
-
-               for (; s < e; ++s) {
-                       putc (*s);
+                       putc(buf[i]);
                }
        }
-
-
        putc ('\n');
 
        return (0);
 }
 
 
-long int initdram (int board_type)
+phys_size_t initdram (int board_type)
 {
        return 32 * 1024 * 1024;
 }