diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2010-01-12 12:56:05 -0600 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2010-01-26 23:17:50 -0600 |
commit | a9c3ac78d81d7ff4fe239e292e11e0f78ac5d461 (patch) | |
tree | 533cf3a024947aaf74c16573a6d951cd0c3d0a7d | |
parent | c894852b7aa2ac5f04ca70a073f803aa665c3ec1 (diff) | |
download | u-boot-imx-a9c3ac78d81d7ff4fe239e292e11e0f78ac5d461.zip u-boot-imx-a9c3ac78d81d7ff4fe239e292e11e0f78ac5d461.tar.gz u-boot-imx-a9c3ac78d81d7ff4fe239e292e11e0f78ac5d461.tar.bz2 |
85xx: 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>
-rw-r--r-- | cpu/mpc85xx/mp.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/cpu/mpc85xx/mp.c b/cpu/mpc85xx/mp.c index 6ae7f0a..826bf32 100644 --- a/cpu/mpc85xx/mp.c +++ b/cpu/mpc85xx/mp.c @@ -68,11 +68,35 @@ int cpu_status(int nr) return 0; } +#ifdef CONFIG_FSL_CORENET +int cpu_disable(int nr) +{ + volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); + + setbits_be32(&gur->coredisrl, 1 << nr); + + return 0; +} +#else int cpu_disable(int nr) { - /* dummy function so common/cmd_mp.c will build */ - return 1; + volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); + + switch (nr) { + case 0: + setbits_be32(&gur->devdisr, MPC85xx_DEVDISR_CPU0); + break; + case 1: + setbits_be32(&gur->devdisr, MPC85xx_DEVDISR_CPU1); + break; + default: + printf("Invalid cpu number for disable %d\n", nr); + return 1; + } + + return 0; } +#endif static u8 boot_entry_map[4] = { 0, |