[U-Boot] [PATCH 08/10] mpc85xx: Add reginfo command
Becky Bruce
beckyb at kernel.crashing.org
Fri May 28 23:45:23 CEST 2010
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 at kernel.crashing.org>
---
arch/powerpc/cpu/mpc85xx/cpu.c | 13 +++++++++++++
common/cmd_reginfo.c | 5 +++++
include/configs/MPC8536DS.h | 1 +
include/configs/MPC8540EVAL.h | 1 +
include/configs/MPC8541CDS.h | 1 +
include/configs/MPC8544DS.h | 1 +
include/configs/MPC8548CDS.h | 1 +
include/configs/MPC8555CDS.h | 1 +
include/configs/MPC8560ADS.h | 1 +
include/configs/MPC8568MDS.h | 1 +
include/configs/MPC8569MDS.h | 1 +
include/configs/MPC8572DS.h | 1 +
include/configs/P1_P2_RDB.h | 1 +
include/configs/P2020DS.h | 1 +
include/configs/PM854.h | 1 +
include/configs/PM856.h | 1 +
include/configs/SBC8540.h | 1 +
include/configs/TQM85xx.h | 1 +
include/configs/XPEDITE5200.h | 1 +
include/configs/XPEDITE5370.h | 1 +
include/configs/sbc8548.h | 1 +
include/configs/sbc8560.h | 1 +
include/configs/socrates.h | 1 +
include/configs/stxgp3.h | 1 +
include/configs/stxssa.h | 1 +
25 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index 4160b60..7ab4a2a 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -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();
+}
diff --git a/common/cmd_reginfo.c b/common/cmd_reginfo.c
index 89fd9ec..0fbe0b2 100644
--- a/common/cmd_reginfo.c
+++ b/common/cmd_reginfo.c
@@ -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 *argv[])
@@ -183,6 +185,9 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
#elif defined(CONFIG_MPC86xx)
mpc86xx_reginfo();
+#elif defined(CONFIG_MPC85xx)
+ mpc85xx_reginfo();
+
#elif defined(CONFIG_BLACKFIN)
puts("\nSystem Configuration registers\n");
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index da4313a..9c46d3e 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -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
diff --git a/include/configs/MPC8540EVAL.h b/include/configs/MPC8540EVAL.h
index 95ea275..7daf934 100644
--- a/include/configs/MPC8540EVAL.h
+++ b/include/configs/MPC8540EVAL.h
@@ -294,6 +294,7 @@
#define CONFIG_CMD_PING
#define CONFIG_CMD_I2C
+#define CONFIG_CMD_REGINFO
#if defined(CONFIG_PCI)
#define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8541CDS.h b/include/configs/MPC8541CDS.h
index e945da2..ae4fba8 100644
--- a/include/configs/MPC8541CDS.h
+++ b/include/configs/MPC8541CDS.h
@@ -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
diff --git a/include/configs/MPC8544DS.h b/include/configs/MPC8544DS.h
index 799d946..faba353 100644
--- a/include/configs/MPC8544DS.h
+++ b/include/configs/MPC8544DS.h
@@ -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
diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h
index 3eb0049..fdd3597 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -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
diff --git a/include/configs/MPC8555CDS.h b/include/configs/MPC8555CDS.h
index 07a8e61..5011e5a 100644
--- a/include/configs/MPC8555CDS.h
+++ b/include/configs/MPC8555CDS.h
@@ -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
diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h
index 4a4a9ed..98677e5 100644
--- a/include/configs/MPC8560ADS.h
+++ b/include/configs/MPC8560ADS.h
@@ -416,6 +416,7 @@
#define CONFIG_CMD_ELF
#define CONFIG_CMD_IRQ
#define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_REGINFO
#if defined(CONFIG_PCI)
#define CONFIG_CMD_PCI
diff --git a/include/configs/MPC8568MDS.h b/include/configs/MPC8568MDS.h
index 6973538..0cc2d47 100644
--- a/include/configs/MPC8568MDS.h
+++ b/include/configs/MPC8568MDS.h
@@ -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
diff --git a/include/configs/MPC8569MDS.h b/include/configs/MPC8569MDS.h
index 0c43b2b..bb7bb47 100644
--- a/include/configs/MPC8569MDS.h
+++ b/include/configs/MPC8569MDS.h
@@ -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
diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h
index 78b7369..6038de1 100644
--- a/include/configs/MPC8572DS.h
+++ b/include/configs/MPC8572DS.h
@@ -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
diff --git a/include/configs/P1_P2_RDB.h b/include/configs/P1_P2_RDB.h
index a9b4004..926c774 100644
--- a/include/configs/P1_P2_RDB.h
+++ b/include/configs/P1_P2_RDB.h
@@ -466,6 +466,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
diff --git a/include/configs/P2020DS.h b/include/configs/P2020DS.h
index 66be725..9bed161 100644
--- a/include/configs/P2020DS.h
+++ b/include/configs/P2020DS.h
@@ -553,6 +553,7 @@ extern unsigned long calculate_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
diff --git a/include/configs/PM854.h b/include/configs/PM854.h
index 4b9bcca..7426bca 100644
--- a/include/configs/PM854.h
+++ b/include/configs/PM854.h
@@ -326,6 +326,7 @@
#define CONFIG_CMD_MII
#define CONFIG_CMD_DATE
#define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_REGINFO
#if defined(CONFIG_PCI)
#define CONFIG_CMD_PCI
diff --git a/include/configs/PM856.h b/include/configs/PM856.h
index 1db20bc..0bd28fc 100644
--- a/include/configs/PM856.h
+++ b/include/configs/PM856.h
@@ -325,6 +325,7 @@
#define CONFIG_CMD_I2C
#define CONFIG_CMD_DATE
#define CONFIG_CMD_EEPROM
+#define CONFIG_CMD_REGINFO
#if defined(CONFIG_PCI)
#define CONFIG_CMD_PCI
diff --git a/include/configs/SBC8540.h b/include/configs/SBC8540.h
index 1989e5a..5d424dd 100644
--- a/include/configs/SBC8540.h
+++ b/include/configs/SBC8540.h
@@ -380,6 +380,7 @@
#define CONFIG_CMD_PING
#define CONFIG_CMD_I2C
+#define CONFIG_CMD_REGINFO
#if defined(CONFIG_PCI)
#define CONFIG_CMD_PCI
diff --git a/include/configs/TQM85xx.h b/include/configs/TQM85xx.h
index d44fb07..90abe14 100644
--- a/include/configs/TQM85xx.h
+++ b/include/configs/TQM85xx.h
@@ -593,6 +593,7 @@
#define CONFIG_CMD_EEPROM
#define CONFIG_CMD_DTT
#define CONFIG_CMD_MII
+#define CONFIG_CMD_REGINFO
#if defined(CONFIG_PCI)
#define CONFIG_CMD_PCI
diff --git a/include/configs/XPEDITE5200.h b/include/configs/XPEDITE5200.h
index 1a56c60..df5ef78 100644
--- a/include/configs/XPEDITE5200.h
+++ b/include/configs/XPEDITE5200.h
@@ -338,6 +338,7 @@
#define CONFIG_CMD_PCI
#define CONFIG_CMD_PING
#define CONFIG_CMD_SNTP
+#define CONFIG_CMD_REGINFO
/*
* Miscellaneous configurable options
diff --git a/include/configs/XPEDITE5370.h b/include/configs/XPEDITE5370.h
index 20a6753..1d6091c 100644
--- a/include/configs/XPEDITE5370.h
+++ b/include/configs/XPEDITE5370.h
@@ -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
diff --git a/include/configs/sbc8548.h b/include/configs/sbc8548.h
index aeac2de..3f4056e 100644
--- a/include/configs/sbc8548.h
+++ b/include/configs/sbc8548.h
@@ -487,6 +487,7 @@
#define CONFIG_CMD_I2C
#define CONFIG_CMD_MII
#define CONFIG_CMD_ELF
+#define CONFIG_CMD_REGINFO
#if defined(CONFIG_PCI)
#define CONFIG_CMD_PCI
diff --git a/include/configs/sbc8560.h b/include/configs/sbc8560.h
index dab4f80..53d06ed 100644
--- a/include/configs/sbc8560.h
+++ b/include/configs/sbc8560.h
@@ -382,6 +382,7 @@
#define CONFIG_CMD_PING
#define CONFIG_CMD_I2C
+#define CONFIG_CMD_REGINFO
#if defined(CONFIG_PCI)
#define CONFIG_CMD_PCI
diff --git a/include/configs/socrates.h b/include/configs/socrates.h
index 89f7cc4..ad70109 100644
--- a/include/configs/socrates.h
+++ b/include/configs/socrates.h
@@ -355,6 +355,7 @@
#define CONFIG_CMD_PING
#define CONFIG_CMD_SNTP
#define CONFIG_CMD_USB
+#define CONFIG_CMD_REGINFO
#if defined(CONFIG_PCI)
#define CONFIG_CMD_PCI
diff --git a/include/configs/stxgp3.h b/include/configs/stxgp3.h
index 86b231c..891d2bf 100644
--- a/include/configs/stxgp3.h
+++ b/include/configs/stxgp3.h
@@ -321,6 +321,7 @@
#define CONFIG_CMD_PING
#define CONFIG_CMD_I2C
+#define CONFIG_CMD_REGINFO
#if defined(CONFIG_SYS_RAMBOOT)
#undef CONFIG_CMD_SAVEENV
diff --git a/include/configs/stxssa.h b/include/configs/stxssa.h
index 2783f9e..363f7b4 100644
--- a/include/configs/stxssa.h
+++ b/include/configs/stxssa.h
@@ -353,6 +353,7 @@
#define CONFIG_CMD_NFS
#define CONFIG_CMD_PING
#define CONFIG_CMD_SNTP
+#define CONFIG_CMD_REGINFO
#if defined(CONFIG_PCI)
#define CONFIG_CMD_PCI
--
1.6.0.6
More information about the U-Boot
mailing list