summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorVictor Gallardo <vgallardo@apm.com>2010-09-16 11:32:04 -0700
committerStefan Roese <sr@denx.de>2010-09-23 09:02:06 +0200
commitad876fff342c67ca4536f7e2fec44c99498d8889 (patch)
tree75217d83f79d94fec3226a1113ad6d13e11cc013 /arch/powerpc
parente02d44964407716104c78d72170a086052c64e86 (diff)
downloadu-boot-imx-ad876fff342c67ca4536f7e2fec44c99498d8889.zip
u-boot-imx-ad876fff342c67ca4536f7e2fec44c99498d8889.tar.gz
u-boot-imx-ad876fff342c67ca4536f7e2fec44c99498d8889.tar.bz2
ppc4xx: Disable trace broadcast for 44x non debug mode
By default the trace broadcast is enabled on 44x systems. To reduce power consumption when instruction tracing is not needed, disable trace broadcast. Check External Debug Mode (EDM) bit to detect if it should be disabled or not. Resetting system via a debugger will set the DBCR0[EDM] bit. Resetting via u-boot or OS will not. Signed-off-by: Victor Gallardo <vgallardo@apm.com> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/cpu/ppc4xx/start.S3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/cpu/ppc4xx/start.S b/arch/powerpc/cpu/ppc4xx/start.S
index fcef0c2..7a65d9f 100644
--- a/arch/powerpc/cpu/ppc4xx/start.S
+++ b/arch/powerpc/cpu/ppc4xx/start.S
@@ -340,6 +340,9 @@ _start_440:
mfspr r1,SPRN_DBCR0
andis. r1, r1, 0x8000 /* test DBCR0[EDM] bit */
bne skip_debug_init /* if set, don't clear debug register */
+ mfspr r1,SPRN_CCR0
+ ori r1,r1,CCR0_DTB@l /* Disable Trace Broadcast */
+ mtspr SPRN_CCR0,r1
mtspr SPRN_DBCR0,r0
mtspr SPRN_DBCR1,r0
mtspr SPRN_DBCR2,r0