blob: b364cc899a00ac55c3d5a44b48a8b3d966bcc674 [file] [log] [blame]
wdenke887afc2002-08-27 09:44:07 +00001/*
2 * (C) Copyright 2000
3 * Subodh Nijsure, SkyStream Networks, snijsure@skystream.com
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenke887afc2002-08-27 09:44:07 +00006 */
7
8#include <common.h>
9#include <command.h>
Christophe Leroy907208c2017-07-06 10:23:22 +020010#if defined(CONFIG_8xx)
Christophe Leroyd7949662017-07-06 10:33:11 +020011void mpc8xx_reginfo(void);
Christophe Leroy907208c2017-07-06 10:23:22 +020012#elif defined(CONFIG_MPC86xx)
Becky Bruce4f93f8b2008-01-23 16:31:06 -060013extern void mpc86xx_reginfo(void);
Becky Bruce199e2622010-06-17 11:37:25 -050014#elif defined(CONFIG_MPC85xx)
15extern void mpc85xx_reginfo(void);
wdenke887afc2002-08-27 09:44:07 +000016#endif
Jon Loeliger65c450b2007-06-11 19:01:54 -050017
Kim Phillips088f1b12012-10-29 13:34:31 +000018static int do_reginfo(cmd_tbl_t *cmdtp, int flag, int argc,
19 char * const argv[])
wdenke887afc2002-08-27 09:44:07 +000020{
Christophe Leroy907208c2017-07-06 10:23:22 +020021#if defined(CONFIG_8xx)
Christophe Leroyd7949662017-07-06 10:33:11 +020022 mpc8xx_reginfo();
Christophe Leroy907208c2017-07-06 10:23:22 +020023
24#elif defined(CONFIG_MPC86xx)
Becky Bruce4f93f8b2008-01-23 16:31:06 -060025 mpc86xx_reginfo();
Mike Frysinger97c26e02008-02-04 19:26:56 -050026
Becky Bruce199e2622010-06-17 11:37:25 -050027#elif defined(CONFIG_MPC85xx)
28 mpc85xx_reginfo();
Sonic Zhanga2979dc2012-08-16 11:56:14 +080029#endif
Becky Bruce4f93f8b2008-01-23 16:31:06 -060030
wdenke887afc2002-08-27 09:44:07 +000031 return 0;
32}
33
wdenk8bde7f72003-06-27 21:31:46 +000034 /**************************************************/
35
Mike Frysinger97c26e02008-02-04 19:26:56 -050036#if defined(CONFIG_CMD_REGINFO)
wdenk0d498392003-07-01 21:06:45 +000037U_BOOT_CMD(
Wolfgang Denk53677ef2008-05-20 16:00:29 +020038 reginfo, 2, 1, do_reginfo,
Peter Tyser2fb26042009-01-27 18:03:12 -060039 "print register information",
Wolfgang Denka89c33d2009-05-24 17:06:54 +020040 ""
wdenk8bde7f72003-06-27 21:31:46 +000041);
42#endif