aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc8xx/immap.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2018-03-16 17:20:57 +0100
committerTom Rini <trini@konsulko.com>2018-04-06 16:30:37 -0400
commitab0d8192583a725f992279fe895653a146509bdc (patch)
tree3bcccf19faf0e21dd3fb89cb2bd555ae82c07671 /arch/powerpc/cpu/mpc8xx/immap.c
parent0fb62205652a1327eb79ea1c84649493e7f628fa (diff)
downloadu-boot-ab0d8192583a725f992279fe895653a146509bdc.zip
u-boot-ab0d8192583a725f992279fe895653a146509bdc.tar.gz
u-boot-ab0d8192583a725f992279fe895653a146509bdc.tar.bz2
powerpc: mpc8xx: refactorise reginfo
reginfo is redundant with some of the commands in immap.c, so move reginfo into that file and remove duplicated info. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Diffstat (limited to 'arch/powerpc/cpu/mpc8xx/immap.c')
-rw-r--r--arch/powerpc/cpu/mpc8xx/immap.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/powerpc/cpu/mpc8xx/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c
index 6164de2..8e73255 100644
--- a/arch/powerpc/cpu/mpc8xx/immap.c
+++ b/arch/powerpc/cpu/mpc8xx/immap.c
@@ -342,6 +342,26 @@ static int do_brginfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0;
}
+#ifdef CONFIG_CMD_REGINFO
+void print_reginfo(void)
+{
+ immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
+ sit8xx_t __iomem *timers = &immap->im_sit;
+
+ printf("\nSystem Configuration registers\n"
+ "\tIMMR\t0x%08X\n", get_immr());
+ do_siuinfo(NULL, 0, 0, NULL);
+
+ printf("Memory Controller Registers\n");
+ do_memcinfo(NULL, 0, 0, NULL);
+
+ printf("\nSystem Integration Timers\n");
+ printf("\tTBSCR\t0x%04X\tRTCSC\t0x%04X\n",
+ in_be16(&timers->sit_tbscr), in_be16(&timers->sit_rtcsc));
+ printf("\tPISCR\t0x%04X\n", in_be16(&timers->sit_piscr));
+}
+#endif
+
/***************************************************/
U_BOOT_CMD(