summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-07-28 11:31:21 -0400
committerTom Rini <trini@konsulko.com>2015-07-28 11:31:21 -0400
commit66d10c18bf2c34698362b6fe1891bcc6e8755243 (patch)
treee645a386e4de9330d2d7793bc90631416caa8bea /common
parent0a0db402d1c9c93a91e2e229eea2e3f547d6148b (diff)
parent711e5e26b41457e658155e7c225c9ccfed0182ef (diff)
downloadtalos-obmc-uboot-66d10c18bf2c34698362b6fe1891bcc6e8755243.tar.gz
talos-obmc-uboot-66d10c18bf2c34698362b6fe1891bcc6e8755243.zip
Merge branch 'zynq' of git://www.denx.de/git/u-boot-microblaze
Diffstat (limited to 'common')
-rw-r--r--common/cmd_mp.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/common/cmd_mp.c b/common/cmd_mp.c
index 328b338068..a80c642157 100644
--- a/common/cmd_mp.c
+++ b/common/cmd_mp.c
@@ -7,11 +7,32 @@
#include <common.h>
#include <command.h>
+static int cpu_status_all(void)
+{
+ unsigned long cpuid;
+
+ for (cpuid = 0; ; cpuid++) {
+ if (!is_core_valid(cpuid)) {
+ if (cpuid == 0) {
+ printf("Core num: %lu is not valid\n", cpuid);
+ return 1;
+ }
+ break;
+ }
+ cpu_status(cpuid);
+ }
+
+ return 0;
+}
+
static int
cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
unsigned long cpuid;
+ if (argc == 2 && strncmp(argv[1], "status", 6) == 0)
+ return cpu_status_all();
+
if (argc < 3)
return CMD_RET_USAGE;
@@ -48,6 +69,7 @@ cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#ifdef CONFIG_SYS_LONGHELP
static char cpu_help_text[] =
"<num> reset - Reset cpu <num>\n"
+ "cpu status - Status of all cpus\n"
"cpu <num> status - Status of cpu <num>\n"
"cpu <num> disable - Disable cpu <num>\n"
"cpu <num> release <addr> [args] - Release cpu <num> at <addr> with [args]"
OpenPOWER on IntegriCloud