mpc85xx: Add reginfo command
authorBecky Bruce <beckyb@kernel.crashing.org>
Thu, 17 Jun 2010 16:37:25 +0000 (11:37 -0500)
committerKumar Gala <galak@kernel.crashing.org>
Fri, 16 Jul 2010 15:55:09 +0000 (10:55 -0500)
The new command dumps the TLBCAM, the LAWs, and the BR/OR regs.
Add CONFIG_CMD_REGINFO to the config for all MPC85xx parts.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
25 files changed:
arch/powerpc/cpu/mpc85xx/cpu.c
common/cmd_reginfo.c
include/configs/MPC8536DS.h
include/configs/MPC8540EVAL.h
include/configs/MPC8541CDS.h
include/configs/MPC8544DS.h
include/configs/MPC8548CDS.h
include/configs/MPC8555CDS.h
include/configs/MPC8560ADS.h
include/configs/MPC8568MDS.h
include/configs/MPC8569MDS.h
include/configs/MPC8572DS.h
include/configs/P1_P2_RDB.h
include/configs/P2020DS.h
include/configs/PM854.h
include/configs/PM856.h
include/configs/SBC8540.h
include/configs/TQM85xx.h
include/configs/XPEDITE5200.h
include/configs/XPEDITE5370.h
include/configs/sbc8548.h
include/configs/sbc8560.h
include/configs/socrates.h
include/configs/stxgp3.h
include/configs/stxssa.h

index 9cf2ef9c762f9f4a4056c4c8d981ab0e4662733c..790a6a4a4501c5b5453343663b889baaa651f4fe 100644 (file)
@@ -32,6 +32,8 @@
 #include <fsl_esdhc.h>
 #include <asm/cache.h>
 #include <asm/io.h>
+#include <asm/mmu.h>
+#include <asm/fsl_law.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -322,3 +324,14 @@ int cpu_mmc_init(bd_t *bis)
        return 0;
 #endif
 }
+
+/*
+ * Print out the state of various machine registers.
+ * Currently prints out LAWs, BR0/OR0, and TLBs
+ */
+void mpc85xx_reginfo(void)
+{
+       print_tlbcam();
+       print_laws();
+       print_lbc_regs();
+}
index 94b8d58698626c6ca1a6ea8932e35f523b127f58..908876ce45df3119e44e0605cb3848d6754dc5dc 100644 (file)
@@ -33,6 +33,8 @@ extern void ppc4xx_reginfo(void);
 #include <mpc5xxx.h>
 #elif defined (CONFIG_MPC86xx)
 extern void mpc86xx_reginfo(void);
+#elif defined(CONFIG_MPC85xx)
+extern void mpc85xx_reginfo(void);
 #endif
 
 int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
@@ -183,6 +185,9 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #elif defined(CONFIG_MPC86xx)
        mpc86xx_reginfo();
 
+#elif defined(CONFIG_MPC85xx)
+       mpc85xx_reginfo();
+
 #elif defined(CONFIG_BLACKFIN)
        puts("\nSystem Configuration registers\n");
 
index da4313ac3a14904ddba2fcaa9657a8b145174dae..9c46d3e9477d1bf2e283f7b0d4c44d3dea5d4177 100644 (file)
@@ -669,6 +669,7 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
 #define CONFIG_CMD_PCI
index 95ea27583986588795ca21380ba90a864a4284c8..7daf934d02bbe61095ad72d9bc2ec779a3f765eb 100644 (file)
 
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_I2C
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
index e945da2e6d2b74d9b27741bfbf3455d4f64f6f3e..ae4fba80141a8828237a07bb14d46f2ffbc9c596 100644 (file)
@@ -403,6 +403,7 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
index 799d9461f8f3215ccf70181beec8c421134172d2..faba353119ef72ff9ce202cedf258ddf217e5a5b 100644 (file)
@@ -420,6 +420,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
index 3eb0049a04f22c9eae1996a0bf96b8a68eceec84..fdd3597f790052365805ae4cba9d9e566ad24547 100644 (file)
@@ -462,6 +462,7 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
index 07a8e6126ac11ba2b29709f09512704e318b2faf..5011e5a8bf156b5eaec1c3b01dca46daf59c3c66 100644 (file)
@@ -401,6 +401,7 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
index 4a4a9eda8544911d2ebe83eccdc33b29b9d53800..98677e5f1bd433bdc29501672d98efa777463c74 100644 (file)
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
index 6973538a8c97b3c0c1b3afba9de50224a189f231..0cc2d474284149e8aada3771c19cd6646db33038 100644 (file)
@@ -421,6 +421,7 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
index 0c43b2b0c7ce891b4eb49dee6c0940778b0790a4..bb7bb47d65d11ae95d83b03eaf2661c5d9ef456f 100644 (file)
@@ -539,6 +539,7 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
index 78b73695bc38843fd48f036b701ecbc679a295ca..6038de1e67afebc668e52ae72b79957c606b8e74 100644 (file)
@@ -574,6 +574,7 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
 #define CONFIG_CMD_PCI
index f468ff360ec5f9f469a3ea29b0031caeb617e4c7..c41c9706158ccc4178504628357a29074b38b99e 100644 (file)
@@ -477,6 +477,7 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
 #define CONFIG_CMD_NET
index 99555012f837adfa0c202c9a821ed99c3949b50a..569da4f645127f493346d2c612bbbd54b8819c41 100644 (file)
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
 #define CONFIG_CMD_PCI
index 4b9bcca79bcd007a833ca46f09d36118863bcc72..7426bcadfdd624a18f2d97b18164cc3af03dbdaa 100644 (file)
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_DATE
 #define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
index 1db20bcceb5a22619c8f3acac39641faf3303df4..0bd28fc8ce18c98c7ba9a091c543eb6e5538214a 100644 (file)
 #define CONFIG_CMD_I2C
 #define CONFIG_CMD_DATE
 #define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
index 1989e5aea6b44ed08565744ebc462f91601f3c9c..5d424dd75f42f9aedd676e1c0eef73db085c20cc 100644 (file)
 
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_I2C
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
index d44fb07cc06944a77aec462f8354a2329b4ed8f0..90abe14f24914fe47c203f1ef4d44af0a1fb1e05 100644 (file)
 #define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_DTT
 #define CONFIG_CMD_MII
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
 #define CONFIG_CMD_PCI
index 1a56c6076b76631885e235c4fd9af520e7277d42..df5ef784892518436d21ec9f09065e2ff4c960b9 100644 (file)
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_SNTP
+#define CONFIG_CMD_REGINFO
 
 /*
  * Miscellaneous configurable options
index 20a67538c77216ad6ca2eb92f6b93a3526d2675b..1d6091caf67f641da19094c70735492b64a3ce8a 100644 (file)
@@ -397,6 +397,7 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_SAVEENV
 #define CONFIG_CMD_SNTP
+#define CONFIG_CMD_REGINFO
 
 /*
  * Miscellaneous configurable options
index aeac2dea3e491af4789954b44099d0348ec7441b..3f4056e82b46963b09af6ac126f56cc8b941f85d 100644 (file)
 #define CONFIG_CMD_I2C
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_ELF
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
index dab4f801d83d01538113bcf239ed6badcd2112f2..53d06ed69887a31fd9b25f04a02e72526805d391 100644 (file)
 
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_I2C
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
index 89f7cc4a1987882768c1fb349ffe282c31177c30..ad7010900d16267885b52f858819cb1179d47579 100644 (file)
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_SNTP
 #define CONFIG_CMD_USB
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
index 86b231ca8eec75ceec761d8431ec0e9b14d81f87..891d2bfb3b1f557c48fc7f45864d889cd0458751 100644 (file)
 
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_I2C
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_SYS_RAMBOOT)
     #undef CONFIG_CMD_SAVEENV
index 2783f9e04ea0c9e63044e50320c798ad4777b4d3..363f7b473adba55fb4b71f4cece885c31fc872f8 100644 (file)
 #define CONFIG_CMD_NFS
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_SNTP
+#define CONFIG_CMD_REGINFO
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI