wdenk | e887afc | 2002-08-27 09:44:07 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2000 |
| 3 | * Subodh Nijsure, SkyStream Networks, snijsure@skystream.com |
| 4 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | e887afc | 2002-08-27 09:44:07 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <common.h> |
| 9 | #include <command.h> |
Christophe Leroy | 907208c | 2017-07-06 10:23:22 +0200 | [diff] [blame] | 10 | #if defined(CONFIG_8xx) |
Christophe Leroy | d794966 | 2017-07-06 10:33:11 +0200 | [diff] [blame] | 11 | void mpc8xx_reginfo(void); |
Christophe Leroy | 907208c | 2017-07-06 10:23:22 +0200 | [diff] [blame] | 12 | #elif defined(CONFIG_MPC86xx) |
Becky Bruce | 4f93f8b | 2008-01-23 16:31:06 -0600 | [diff] [blame] | 13 | extern void mpc86xx_reginfo(void); |
Becky Bruce | 199e262 | 2010-06-17 11:37:25 -0500 | [diff] [blame] | 14 | #elif defined(CONFIG_MPC85xx) |
| 15 | extern void mpc85xx_reginfo(void); |
wdenk | e887afc | 2002-08-27 09:44:07 +0000 | [diff] [blame] | 16 | #endif |
Jon Loeliger | 65c450b | 2007-06-11 19:01:54 -0500 | [diff] [blame] | 17 | |
Kim Phillips | 088f1b1 | 2012-10-29 13:34:31 +0000 | [diff] [blame] | 18 | static int do_reginfo(cmd_tbl_t *cmdtp, int flag, int argc, |
| 19 | char * const argv[]) |
wdenk | e887afc | 2002-08-27 09:44:07 +0000 | [diff] [blame] | 20 | { |
Christophe Leroy | 907208c | 2017-07-06 10:23:22 +0200 | [diff] [blame] | 21 | #if defined(CONFIG_8xx) |
Christophe Leroy | d794966 | 2017-07-06 10:33:11 +0200 | [diff] [blame] | 22 | mpc8xx_reginfo(); |
Christophe Leroy | 907208c | 2017-07-06 10:23:22 +0200 | [diff] [blame] | 23 | |
| 24 | #elif defined(CONFIG_MPC86xx) |
Becky Bruce | 4f93f8b | 2008-01-23 16:31:06 -0600 | [diff] [blame] | 25 | mpc86xx_reginfo(); |
Mike Frysinger | 97c26e0 | 2008-02-04 19:26:56 -0500 | [diff] [blame] | 26 | |
Becky Bruce | 199e262 | 2010-06-17 11:37:25 -0500 | [diff] [blame] | 27 | #elif defined(CONFIG_MPC85xx) |
| 28 | mpc85xx_reginfo(); |
Sonic Zhang | a2979dc | 2012-08-16 11:56:14 +0800 | [diff] [blame] | 29 | #endif |
Becky Bruce | 4f93f8b | 2008-01-23 16:31:06 -0600 | [diff] [blame] | 30 | |
wdenk | e887afc | 2002-08-27 09:44:07 +0000 | [diff] [blame] | 31 | return 0; |
| 32 | } |
| 33 | |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 34 | /**************************************************/ |
| 35 | |
Mike Frysinger | 97c26e0 | 2008-02-04 19:26:56 -0500 | [diff] [blame] | 36 | #if defined(CONFIG_CMD_REGINFO) |
wdenk | 0d49839 | 2003-07-01 21:06:45 +0000 | [diff] [blame] | 37 | U_BOOT_CMD( |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 38 | reginfo, 2, 1, do_reginfo, |
Peter Tyser | 2fb2604 | 2009-01-27 18:03:12 -0600 | [diff] [blame] | 39 | "print register information", |
Wolfgang Denk | a89c33d | 2009-05-24 17:06:54 +0200 | [diff] [blame] | 40 | "" |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 41 | ); |
| 42 | #endif |