]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/cpu/mpc86xx/cpu.c
ppc: Move lbc_clk and cpu to arch_global_data
[u-boot] / arch / powerpc / cpu / mpc86xx / cpu.c
index 9064e780374098c82a5ccb8841ce9ad133ed1253..c553415b555a5a122b5f4966d97c9915ad2efc1e 100644 (file)
@@ -48,7 +48,6 @@ checkcpu(void)
 {
        sys_info_t sysinfo;
        uint pvr, svr;
-       uint ver;
        uint major, minor;
        char buf1[32], buf2[32];
        volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
@@ -57,7 +56,6 @@ checkcpu(void)
        uint msscr0 = mfspr(MSSCR0);
 
        svr = get_svr();
-       ver = SVR_SOC_VER(svr);
        major = SVR_MAJ(svr);
        minor = SVR_MIN(svr);
 
@@ -69,7 +67,7 @@ checkcpu(void)
        }
        puts("CPU:   ");
 
-       cpu = gd->cpu;
+       cpu = gd->arch.cpu;
 
        puts(cpu->name);
 
@@ -77,7 +75,6 @@ checkcpu(void)
        puts("Core:  ");
 
        pvr = get_pvr();
-       ver = PVR_E600_VER(pvr);
        major = PVR_E600_MAJ(pvr);
        minor = PVR_E600_MIN(pvr);
 
@@ -123,8 +120,7 @@ checkcpu(void)
 }
 
 
-void
-do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
        volatile ccsr_gur_t *gur = &immap->im_gur;
@@ -137,6 +133,8 @@ do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
        while (1)
                ;
+
+       return 1;
 }
 
 
@@ -180,22 +178,9 @@ watchdog_reset(void)
  */
 void mpc86xx_reginfo(void)
 {
-       immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
-       ccsr_lbc_t *lbc = &immap->im_lbc;
-
        print_bats();
        print_laws();
-
-       printf ("Local Bus Controller Registers\n"
-               "\tBR0\t0x%08X\tOR0\t0x%08X \n", in_be32(&lbc->br0), in_be32(&lbc->or0));
-       printf("\tBR1\t0x%08X\tOR1\t0x%08X \n", in_be32(&lbc->br1), in_be32(&lbc->or1));
-       printf("\tBR2\t0x%08X\tOR2\t0x%08X \n", in_be32(&lbc->br2), in_be32(&lbc->or2));
-       printf("\tBR3\t0x%08X\tOR3\t0x%08X \n", in_be32(&lbc->br3), in_be32(&lbc->or3));
-       printf("\tBR4\t0x%08X\tOR4\t0x%08X \n", in_be32(&lbc->br4), in_be32(&lbc->or4));
-       printf("\tBR5\t0x%08X\tOR5\t0x%08X \n", in_be32(&lbc->br5), in_be32(&lbc->or5));
-       printf("\tBR6\t0x%08X\tOR6\t0x%08X \n", in_be32(&lbc->br6), in_be32(&lbc->or6));
-       printf("\tBR7\t0x%08X\tOR7\t0x%08X \n", in_be32(&lbc->br7), in_be32(&lbc->or7));
-
+       print_lbc_regs();
 }
 
 /*