]> git.ipfire.org Git - people/ms/u-boot.git/blame - cmd/reginfo.c
powerpc, 5xx: remove support for 5xx
[people/ms/u-boot.git] / cmd / reginfo.c
CommitLineData
e887afc9
WD
1/*
2 * (C) Copyright 2000
3 * Subodh Nijsure, SkyStream Networks, snijsure@skystream.com
4 *
1a459660 5 * SPDX-License-Identifier: GPL-2.0+
e887afc9
WD
6 */
7
8#include <common.h>
9#include <command.h>
5b8e76c3 10#if defined (CONFIG_4xx)
78d2a641 11extern void ppc4xx_reginfo(void);
56523f12
WD
12#elif defined (CONFIG_MPC5200)
13#include <mpc5xxx.h>
4f93f8b1
BB
14#elif defined (CONFIG_MPC86xx)
15extern void mpc86xx_reginfo(void);
199e262e
BB
16#elif defined(CONFIG_MPC85xx)
17extern void mpc85xx_reginfo(void);
e887afc9 18#endif
65c450b4 19
088f1b19
KP
20static int do_reginfo(cmd_tbl_t *cmdtp, int flag, int argc,
21 char * const argv[])
e887afc9 22{
5b8e76c3 23#if defined (CONFIG_4xx)
78d2a641 24 ppc4xx_reginfo();
56523f12
WD
25#elif defined(CONFIG_MPC5200)
26 puts ("\nMPC5200 registers\n");
6d0f6bcf 27 printf ("MBAR=%08x\n", CONFIG_SYS_MBAR);
56523f12 28 puts ("Memory map registers\n");
9b55a253 29 printf ("\tCS0: start %08lX\tstop %08lX\tconfig %08lX\ten %d\n",
56523f12
WD
30 *(volatile ulong*)MPC5XXX_CS0_START,
31 *(volatile ulong*)MPC5XXX_CS0_STOP,
32 *(volatile ulong*)MPC5XXX_CS0_CFG,
33 (*(volatile ulong*)MPC5XXX_ADDECR & 0x00010000) ? 1 : 0);
9b55a253 34 printf ("\tCS1: start %08lX\tstop %08lX\tconfig %08lX\ten %d\n",
56523f12
WD
35 *(volatile ulong*)MPC5XXX_CS1_START,
36 *(volatile ulong*)MPC5XXX_CS1_STOP,
37 *(volatile ulong*)MPC5XXX_CS1_CFG,
38 (*(volatile ulong*)MPC5XXX_ADDECR & 0x00020000) ? 1 : 0);
9b55a253 39 printf ("\tCS2: start %08lX\tstop %08lX\tconfig %08lX\ten %d\n",
56523f12
WD
40 *(volatile ulong*)MPC5XXX_CS2_START,
41 *(volatile ulong*)MPC5XXX_CS2_STOP,
42 *(volatile ulong*)MPC5XXX_CS2_CFG,
43 (*(volatile ulong*)MPC5XXX_ADDECR & 0x00040000) ? 1 : 0);
9b55a253 44 printf ("\tCS3: start %08lX\tstop %08lX\tconfig %08lX\ten %d\n",
56523f12
WD
45 *(volatile ulong*)MPC5XXX_CS3_START,
46 *(volatile ulong*)MPC5XXX_CS3_STOP,
47 *(volatile ulong*)MPC5XXX_CS3_CFG,
48 (*(volatile ulong*)MPC5XXX_ADDECR & 0x00080000) ? 1 : 0);
9b55a253 49 printf ("\tCS4: start %08lX\tstop %08lX\tconfig %08lX\ten %d\n",
56523f12
WD
50 *(volatile ulong*)MPC5XXX_CS4_START,
51 *(volatile ulong*)MPC5XXX_CS4_STOP,
52 *(volatile ulong*)MPC5XXX_CS4_CFG,
53 (*(volatile ulong*)MPC5XXX_ADDECR & 0x00100000) ? 1 : 0);
9b55a253 54 printf ("\tCS5: start %08lX\tstop %08lX\tconfig %08lX\ten %d\n",
56523f12
WD
55 *(volatile ulong*)MPC5XXX_CS5_START,
56 *(volatile ulong*)MPC5XXX_CS5_STOP,
57 *(volatile ulong*)MPC5XXX_CS5_CFG,
58 (*(volatile ulong*)MPC5XXX_ADDECR & 0x00200000) ? 1 : 0);
9b55a253 59 printf ("\tCS6: start %08lX\tstop %08lX\tconfig %08lX\ten %d\n",
56523f12
WD
60 *(volatile ulong*)MPC5XXX_CS6_START,
61 *(volatile ulong*)MPC5XXX_CS6_STOP,
62 *(volatile ulong*)MPC5XXX_CS6_CFG,
63 (*(volatile ulong*)MPC5XXX_ADDECR & 0x04000000) ? 1 : 0);
9b55a253 64 printf ("\tCS7: start %08lX\tstop %08lX\tconfig %08lX\ten %d\n",
56523f12
WD
65 *(volatile ulong*)MPC5XXX_CS7_START,
66 *(volatile ulong*)MPC5XXX_CS7_STOP,
67 *(volatile ulong*)MPC5XXX_CS7_CFG,
68 (*(volatile ulong*)MPC5XXX_ADDECR & 0x08000000) ? 1 : 0);
9b55a253 69 printf ("\tBOOTCS: start %08lX\tstop %08lX\tconfig %08lX\ten %d\n",
56523f12
WD
70 *(volatile ulong*)MPC5XXX_BOOTCS_START,
71 *(volatile ulong*)MPC5XXX_BOOTCS_STOP,
72 *(volatile ulong*)MPC5XXX_BOOTCS_CFG,
73 (*(volatile ulong*)MPC5XXX_ADDECR & 0x02000000) ? 1 : 0);
9b55a253 74 printf ("\tSDRAMCS0: %08lX\n",
56523f12 75 *(volatile ulong*)MPC5XXX_SDRAM_CS0CFG);
9b55a253 76 printf ("\tSDRAMCS1: %08lX\n",
56523f12 77 *(volatile ulong*)MPC5XXX_SDRAM_CS1CFG);
4f93f8b1
BB
78#elif defined(CONFIG_MPC86xx)
79 mpc86xx_reginfo();
97c26e00 80
199e262e
BB
81#elif defined(CONFIG_MPC85xx)
82 mpc85xx_reginfo();
a2979dcd 83#endif
4f93f8b1 84
e887afc9
WD
85 return 0;
86}
87
8bde7f77
WD
88 /**************************************************/
89
97c26e00 90#if defined(CONFIG_CMD_REGINFO)
0d498393 91U_BOOT_CMD(
53677ef1 92 reginfo, 2, 1, do_reginfo,
2fb2604d 93 "print register information",
a89c33db 94 ""
8bde7f77
WD
95);
96#endif