Added support for the TQM8272 board from TQ
[oweals/u-boot.git] / cpu / mpc8260 / cpu.c
index 2a1c0e13fe66f51648ae61d6414f989518f3822f..94651dc4a69846731d2e8bae49645e5b2eb63c95 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2000-2003
+ * (C) Copyright 2000-2006
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -36,7 +36,7 @@
  * added 8260 masks by
  * Marius Groeger <mag@sysgo.de>
  *
- * added HiP7 (8270/8275/8280) processors support by
+ * added HiP7 (824x/827x/8280) processors support by
  * Yuli Barcohen <yuli@arabellasw.com>
  */
 
 #include <asm/processor.h>
 #include <asm/cpm_8260.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
+#if defined(CONFIG_GET_CPU_STR_F)
+extern int get_cpu_str_f (char *buf);
+#endif
+
 int checkcpu (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        volatile immap_t *immap = (immap_t *) CFG_IMMR;
        ulong clock = gd->cpu_clk;
        uint pvr = get_pvr ();
@@ -68,6 +72,7 @@ int checkcpu (void)
                k = 4;
                break;
        case PVR_8260_HIP7R1:
+       case PVR_8260_HIP7RA:
        case PVR_8260_HIP7:
                k = 7;
                break;
@@ -80,7 +85,12 @@ int checkcpu (void)
        if ((immr & IMMR_ISB_MSK) != CFG_IMMR)
                return -1;      /* whoops! someone moved the IMMR */
 
+#if defined(CONFIG_GET_CPU_STR_F)
+       get_cpu_str_f (buf);
+       printf ("%s (HiP%d Rev %02x, Mask ", buf, k, rev);
+#else
        printf (CPU_ID_STR " (HiP%d Rev %02x, Mask ", k, rev);
+#endif
 
        /*
         * the bottom 16 bits of the immr are the Part Number and Mask Number
@@ -129,6 +139,21 @@ int checkcpu (void)
        case 0x0A01:
                puts ("0.1 1K49M");
                break;
+       case 0x0A10:
+               puts ("1.0 1K49M");
+               break;
+       case 0x0C00:
+               puts ("0.0 0K50M");
+               break;
+       case 0x0C10:
+               puts ("1.0 1K50M");
+               break;
+       case 0x0D00:
+               puts ("0.0 0K50M");
+               break;
+       case 0x0D10:
+               puts ("1.0 1K50M");
+               break;
        default:
                printf ("unknown [immr=0x%04x,k=0x%04x]", m, k);
                break;
@@ -204,6 +229,7 @@ void upmconfig (uint upm, uint * table, uint size)
 
 /* ------------------------------------------------------------------------- */
 
+#if !defined(CONFIG_HAVE_OWN_RESET)
 int
 do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 {
@@ -237,6 +263,7 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        return 1;
 
 }
+#endif /* CONFIG_HAVE_OWN_RESET */
 
 /* ------------------------------------------------------------------------- */
 
@@ -246,8 +273,6 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
  */
 unsigned long get_tbclk (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        ulong tbclk;
 
        tbclk = (gd->bus_clk + 3L) / 4L;