diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2010-01-12 11:51:52 -0600 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2010-01-26 23:17:50 -0600 |
commit | c894852b7aa2ac5f04ca70a073f803aa665c3ec1 (patch) | |
tree | 6dbe2158b17be3ba3d89b9005b7601524bc8e4f4 /cpu/mpc86xx | |
parent | 4194b3668a93eee18dd1f7eb1309ca7b05003aa7 (diff) | |
download | u-boot-imx-c894852b7aa2ac5f04ca70a073f803aa665c3ec1.zip u-boot-imx-c894852b7aa2ac5f04ca70a073f803aa665c3ec1.tar.gz u-boot-imx-c894852b7aa2ac5f04ca70a073f803aa665c3ec1.tar.bz2 |
86xx: Add support for 'cpu disable' command
Support disabling of a core via user command 'cpu disable'.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'cpu/mpc86xx')
-rw-r--r-- | cpu/mpc86xx/mp.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/cpu/mpc86xx/mp.c b/cpu/mpc86xx/mp.c index ecdf2fb..b4a0faa 100644 --- a/cpu/mpc86xx/mp.c +++ b/cpu/mpc86xx/mp.c @@ -48,8 +48,22 @@ int cpu_status(int nr) int cpu_disable(int nr) { - /* dummy function so common/cmd_mp.c will build */ - return 1; + volatile immap_t *immap = (immap_t *) CONFIG_SYS_CCSRBAR; + volatile ccsr_gur_t *gur = &immap->im_gur; + + switch (nr) { + case 0: + setbits_be32(&gur->devdisr, MPC86xx_DEVDISR_CPU0); + break; + case 1: + setbits_be32(&gur->devdisr, MPC86xx_DEVDISR_CPU1); + break; + default: + printf("Invalid cpu number for disable %d\n", nr); + return 1; + } + + return 0; } int cpu_release(int nr, int argc, char *argv[]) |