Merge 'next' branch
[platform/kernel/u-boot.git] / cpu / ppc4xx / cpu.c
index 9e9c685..66a7737 100644 (file)
@@ -54,7 +54,8 @@ static int pci_async_enabled(void)
 #endif
 
 #if defined(CONFIG_440EP) || defined(CONFIG_440GR) || \
-    defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
+    defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
+    defined(CONFIG_460EX) || defined(CONFIG_460GT)
        unsigned long val;
 
        mfsdr(sdr_sdstp1, val);
@@ -86,7 +87,8 @@ static int pci_arbiter_enabled(void)
        return (val & 0x80000000);
 #endif
 #if defined(CONFIG_440EP) || defined(CONFIG_440GR) || \
-    defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
+    defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
+    defined(CONFIG_460EX) || defined(CONFIG_460GT)
        unsigned long val;
 
        mfsdr(sdr_pci0, val);
@@ -167,6 +169,34 @@ static char *bootstrap_str[] = {
 static char bootstrap_char[] = { 'A', 'B', 'C', 'D', 'E', 'G', 'F', 'H' };
 #endif
 
+#if defined(CONFIG_460EX) || defined(CONFIG_460GT)
+#define SDR0_PINSTP_SHIFT      29
+static char *bootstrap_str[] = {
+       "EBC (8 bits)",
+       "EBC (16 bits)",
+       "PCI",
+       "PCI",
+       "EBC (16 bits)",
+       "NAND (8 bits)",
+       "I2C (Addr 0x54)",      /* A8 */
+       "I2C (Addr 0x52)",      /* A4 */
+};
+static char bootstrap_char[] = { 'A', 'B', 'C', 'D', 'E', 'G', 'F', 'H' };
+#endif
+
+#if defined(CONFIG_460SX)
+#define SDR0_PINSTP_SHIFT      29
+static char *bootstrap_str[] = {
+       "EBC (8 bits)",
+       "EBC (16 bits)",
+       "EBC (32 bits)",
+       "NAND (8 bits)",
+       "I2C (Addr 0x54)",      /* A8 */
+       "I2C (Addr 0x52)",      /* A4 */
+};
+static char bootstrap_char[] = { 'A', 'B', 'C', 'D', 'E', 'G' };
+#endif
+
 #if defined(CONFIG_405EZ)
 #define SDR0_PINSTP_SHIFT      28
 static char *bootstrap_str[] = {
@@ -249,7 +279,11 @@ int checkcpu (void)
 
        get_sys_info(&sys_info);
 
+#if defined(CONFIG_XILINX_440)
+       puts("IBM PowerPC 4");
+#else
        puts("AMCC PowerPC 4");
+#endif
 
 #if defined(CONFIG_405GP) || defined(CONFIG_405CR) || \
     defined(CONFIG_405EP) || defined(CONFIG_405EZ) || \
@@ -257,8 +291,12 @@ int checkcpu (void)
        puts("05");
 #endif
 #if defined(CONFIG_440)
+#if defined(CONFIG_460EX) || defined(CONFIG_460GT)
+       puts("60");
+#else
        puts("40");
 #endif
+#endif
 
        switch (pvr) {
        case PVR_405GP_RB:
@@ -325,6 +363,26 @@ int checkcpu (void)
                strcpy(addstr, "No Security support");
                break;
 
+       case PVR_405EX1_RC:
+               puts("EX Rev. C");
+               strcpy(addstr, "Security support");
+               break;
+
+       case PVR_405EX2_RC:
+               puts("EX Rev. C");
+               strcpy(addstr, "No Security support");
+               break;
+
+       case PVR_405EXR1_RC:
+               puts("EXr Rev. C");
+               strcpy(addstr, "Security support");
+               break;
+
+       case PVR_405EXR2_RC:
+               puts("EXr Rev. C");
+               strcpy(addstr, "No Security support");
+               break;
+
 #if defined(CONFIG_440)
        case PVR_440GP_RB:
                puts("GP Rev. B");
@@ -448,6 +506,50 @@ int checkcpu (void)
                strcpy(addstr, "No RAID 6 support");
                break;
 
+       case PVR_460EX_RA:
+               puts("EX Rev. A");
+               strcpy(addstr, "No Security/Kasumi support");
+               break;
+
+       case PVR_460EX_SE_RA:
+               puts("EX Rev. A");
+               strcpy(addstr, "Security/Kasumi support");
+               break;
+
+       case PVR_460GT_RA:
+               puts("GT Rev. A");
+               strcpy(addstr, "No Security/Kasumi support");
+               break;
+
+       case PVR_460GT_SE_RA:
+               puts("GT Rev. A");
+               strcpy(addstr, "Security/Kasumi support");
+               break;
+
+       case PVR_460SX_RA:
+               puts("SX Rev. A");
+               strcpy(addstr, "Security support");
+               break;
+
+       case PVR_460SX_RA_V1:
+               puts("SX Rev. A");
+               strcpy(addstr, "No Security support");
+               break;
+
+       case PVR_460GX_RA:
+               puts("GX Rev. A");
+               strcpy(addstr, "Security support");
+               break;
+
+       case PVR_460GX_RA_V1:
+               puts("GX Rev. A");
+               strcpy(addstr, "No Security support");
+               break;
+
+       case PVR_VIRTEX5:
+               puts("x5 VIRTEX5");
+               break;
+
        default:
                printf (" UNKNOWN (PVR=%08x)", pvr);
                break;
@@ -527,14 +629,14 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 #if defined(CONFIG_BOARD_RESET)
        board_reset();
 #else
-#if defined(CFG_4xx_RESET_TYPE)
-       mtspr(dbcr0, CFG_4xx_RESET_TYPE << 28);
+#if defined(CONFIG_SYS_4xx_RESET_TYPE)
+       mtspr(dbcr0, CONFIG_SYS_4xx_RESET_TYPE << 28);
 #else
        /*
         * Initiate system reset in debug control register DBCR
         */
        mtspr(dbcr0, 0x30000000);
-#endif /* defined(CFG_4xx_RESET_TYPE) */
+#endif /* defined(CONFIG_SYS_4xx_RESET_TYPE) */
 #endif /* defined(CONFIG_BOARD_RESET) */
 
        return 1;