]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/amcc/katmai/katmai.c
Fix incorrect use of getenv() before relocation
[karo-tx-uboot.git] / board / amcc / katmai / katmai.c
index 0bbc75e7cf26909f824abb6ac11a01d61788ea96..34380658e5e05300d676a7a93156da75b6e4ffb5 100644 (file)
  */
 
 #include <common.h>
-#include <ppc4xx.h>
+#include <asm/ppc4xx.h>
 #include <i2c.h>
 #include <libfdt.h>
 #include <fdt_support.h>
 #include <netdev.h>
 #include <asm/processor.h>
 #include <asm/io.h>
-#include <asm/gpio.h>
+#include <asm/ppc4xx-gpio.h>
 #include <asm/4xx_pcie.h>
 #include <asm/errno.h>
 
@@ -236,12 +236,13 @@ int board_early_init_f (void)
 
 int checkboard (void)
 {
-       char *s = getenv("serial#");
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
 
        printf("Board: Katmai - AMCC 440SPe Evaluation Board");
-       if (s != NULL) {
+       if (i > 0) {
                puts(", serial# ");
-               puts(s);
+               puts(buf);
        }
        putc('\n');