]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/cpu/mpc83xx/cpu.c
libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>
[u-boot] / arch / powerpc / cpu / mpc83xx / cpu.c
index e275fcea41e8ed519de09d90ba56bc32c050ac32..3bdebd845cd1c0d5eb7a98b4e25aae82cc7de242 100644 (file)
 #include <command.h>
 #include <mpc83xx.h>
 #include <asm/processor.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
 #include <tsec.h>
 #include <netdev.h>
 #include <fsl_esdhc.h>
-#ifdef CONFIG_BOOTCOUNT_LIMIT
-#include <asm/immap_qe.h>
+#if defined(CONFIG_BOOTCOUNT_LIMIT) && !defined(CONFIG_MPC831x)
+#include <linux/immap_qe.h>
 #include <asm/io.h>
 #endif
 
@@ -33,6 +33,7 @@ int checkcpu(void)
        u32 pvr = get_pvr();
        u32 spridr;
        char buf[32];
+       int ret;
        int i;
 
        const struct cpu_type {
@@ -61,6 +62,10 @@ int checkcpu(void)
 
        immr = (immap_t *)CONFIG_SYS_IMMR;
 
+       ret = prt_83xx_rsr();
+       if (ret)
+               return ret;
+
        puts("CPU:   ");
 
        switch (pvr & 0xffff0000) {
@@ -173,11 +178,7 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 
 unsigned long get_tbclk(void)
 {
-       ulong tbclk;
-
-       tbclk = (gd->bus_clk + 3L) / 4L;
-
-       return tbclk;
+       return (gd->bus_clk + 3L) / 4L;
 }