summaryrefslogtreecommitdiff
path: root/include/cmd_immap.h
blob: 9febee2f3636de1a2de924e9a1b90bff4e91564a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
/*
 * (C) Copyright 2000
 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 *
 * See file CREDITS for list of people who contributed to this
 * project.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 * MA 02111-1307 USA
 */

/*
 * PowerPC 8xx/8260 Internal Memory Map commands
 */
#ifndef	_CMD_IMMAP_H
#define	_CMD_IMMAP_H

#if (CONFIG_COMMANDS & CFG_CMD_IMMAP) && \
    (defined(CONFIG_8xx) || defined(CONFIG_8260))

#define	CMD_TBL_SIUINFO		MK_CMD_TBL_ENTRY(			\
	"siuinfo",	3,	1,	1,	do_siuinfo,		\
	"siuinfo - print System Interface Unit (SIU) registers\n",	\
	NULL								\
),

#define CMD_TBL_MEMCINFO	MK_CMD_TBL_ENTRY(			\
	"memcinfo",	4,	1,	1,	do_memcinfo,		\
	"memcinfo- print Memory Controller registers\n",		\
	NULL								\
),

#define CMD_TBL_SITINFO		MK_CMD_TBL_ENTRY(			\
	"sitinfo",	3,	1,	1,	do_sitinfo,		\
	"sitinfo - print System Integration Timers (SIT) registers\n",	\
	NULL								\
),

#ifdef CONFIG_8260
#define	CMD_TBL_ICINFO		MK_CMD_TBL_ENTRY(			\
	"icinfo",	3,	1,	1,	do_icinfo,		\
	"icinfo  - print Interrupt Controller registers\n",		\
	NULL								\
),
#endif

#define	CMD_TBL_CARINFO		MK_CMD_TBL_ENTRY(			\
	"carinfo",	3,	1,	1,	do_carinfo,		\
	"carinfo - print Clocks and Reset registers\n",			\
	NULL								\
),

#define	CMD_TBL_IOPINFO		MK_CMD_TBL_ENTRY(			\
	"iopinfo",	4,	1,	1,	do_iopinfo,		\
	"iopinfo - print I/O Port registers\n",				\
	NULL								\
),

#define	CMD_TBL_IOPSET 		MK_CMD_TBL_ENTRY(			\
	"iopset",	4,	5,	0,	do_iopset,		\
	"iopset - set I/O Port registers\n",				\
	"PORT PIN CMD VALUE\nPORT: A-D, PIN: 0-31, CMD: [dat|dir|odr|sor], VALUE: 0|1" \
),

#define	CMD_TBL_DMAINFO		MK_CMD_TBL_ENTRY(			\
	"dmainfo",	3,	1,	1,	do_dmainfo,		\
	"dmainfo - print SDMA/IDMA registers\n",			\
	NULL								\
),

#define	CMD_TBL_FCCINFO		MK_CMD_TBL_ENTRY(			\
	"fccinfo",	3,	1,	1,	do_fccinfo,		\
	"fccinfo - print FCC registers\n",				\
	NULL								\
),

#define	CMD_TBL_BRGINFO		MK_CMD_TBL_ENTRY(			\
	"brginfo",	3,	1,	1,	do_brginfo,		\
	"brginfo - print Baud Rate Generator (BRG) registers\n",	\
	NULL								\
),

#define	CMD_TBL_I2CINFO		MK_CMD_TBL_ENTRY(			\
	"i2cinfo",	4,	1,	1,	do_i2cinfo,		\
	"i2cinfo - print I2C registers\n",				\
	NULL								\
),

#define	CMD_TBL_SCCINFO		MK_CMD_TBL_ENTRY(			\
	"sccinfo",	3,	1,	1,	do_sccinfo,		\
	"sccinfo - print SCC registers\n",				\
	NULL								\
),

#define	CMD_TBL_SMCINFO		MK_CMD_TBL_ENTRY(			\
	"smcinfo",	3,	1,	1,	do_smcinfo,		\
	"smcinfo - print SMC registers\n",				\
	NULL								\
),

#define	CMD_TBL_SPIINFO		MK_CMD_TBL_ENTRY(			\
	"spiinfo",	3,	1,	1,	do_spiinfo,		\
	"spiinfo - print Serial Peripheral Interface (SPI) registers\n",\
	NULL								\
),

#define	CMD_TBL_MUXINFO		MK_CMD_TBL_ENTRY(			\
	"muxinfo",	3,	1,	1,	do_muxinfo,		\
	"muxinfo - print CPM Multiplexing registers\n",			\
	NULL								\
),

#define	CMD_TBL_SIINFO		MK_CMD_TBL_ENTRY(			\
	"siinfo",	3,	1,	1,	do_siinfo,		\
	"siinfo  - print Serial Interface (SI) registers\n",		\
	NULL								\
),

#define	CMD_TBL_MCCINFO		MK_CMD_TBL_ENTRY(			\
	"mccinfo",	3,	1,	1,	do_mccinfo,		\
	"mccinfo - print MCC registers\n",				\
	NULL								\
),

int do_siuinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_sitinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
#ifdef CONFIG_8260
int do_icinfo  (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
#endif
int do_carinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_iopinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_iopset  (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_dmainfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_fccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_brginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_i2cinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_sccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_smcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_spiinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_muxinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_siinfo  (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_mccinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);

#else

#define CMD_TBL_SIUINFO
#define CMD_TBL_MEMCINFO
#define CMD_TBL_SITINFO
#ifdef CONFIG_8260
#define	CMD_TBL_ICINFO
#endif
#define	CMD_TBL_CARINFO
#define	CMD_TBL_IOPINFO
#define	CMD_TBL_IOPSET
#define	CMD_TBL_DMAINFO
#define	CMD_TBL_FCCINFO
#define	CMD_TBL_BRGINFO
#define	CMD_TBL_I2CINFO
#define	CMD_TBL_SCCINFO
#define	CMD_TBL_SMCINFO
#define	CMD_TBL_SPIINFO
#define	CMD_TBL_MUXINFO
#define	CMD_TBL_SIINFO
#define	CMD_TBL_MCCINFO

#endif	/* CFG_CMD_IMMAP && (CONFIG_8xx || CONFIG_8260) */

#endif	/* _CMD_IMMAP_H */