blob: babea84660f197bb49c4b7287c789646673140f0 [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>
Heiko Schocher5b8e76c2017-06-07 17:33:09 +020010#if defined (CONFIG_4xx)
Niklaus Giger78d2a642009-10-04 20:04:21 +020011extern void ppc4xx_reginfo(void);
Becky Bruce4f93f8b2008-01-23 16:31:06 -060012#elif defined (CONFIG_MPC86xx)
13extern 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{
Heiko Schocher5b8e76c2017-06-07 17:33:09 +020021#if defined (CONFIG_4xx)
Niklaus Giger78d2a642009-10-04 20:04:21 +020022 ppc4xx_reginfo();
Becky Bruce4f93f8b2008-01-23 16:31:06 -060023#elif defined(CONFIG_MPC86xx)
24 mpc86xx_reginfo();
Mike Frysinger97c26e02008-02-04 19:26:56 -050025
Becky Bruce199e2622010-06-17 11:37:25 -050026#elif defined(CONFIG_MPC85xx)
27 mpc85xx_reginfo();
Sonic Zhanga2979dc2012-08-16 11:56:14 +080028#endif
Becky Bruce4f93f8b2008-01-23 16:31:06 -060029
wdenke887afc2002-08-27 09:44:07 +000030 return 0;
31}
32
wdenk8bde7f72003-06-27 21:31:46 +000033 /**************************************************/
34
Mike Frysinger97c26e02008-02-04 19:26:56 -050035#if defined(CONFIG_CMD_REGINFO)
wdenk0d498392003-07-01 21:06:45 +000036U_BOOT_CMD(
Wolfgang Denk53677ef2008-05-20 16:00:29 +020037 reginfo, 2, 1, do_reginfo,
Peter Tyser2fb26042009-01-27 18:03:12 -060038 "print register information",
Wolfgang Denka89c33d2009-05-24 17:06:54 +020039 ""
wdenk8bde7f72003-06-27 21:31:46 +000040);
41#endif