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 <vgalla...@apm.com>
---
 arch/powerpc/cpu/ppc4xx/start.S |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/cpu/ppc4xx/start.S b/arch/powerpc/cpu/ppc4xx/start.S
index 4bad32f..bac8681 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_...@l /* Disable Trace Broadcast */
+       mtspr   SPRN_CCR0,r1
        mtspr   SPRN_DBCR0,r0
        mtspr   SPRN_DBCR1,r0
        mtspr   SPRN_DBCR2,r0
-- 
1.6.1.rc3

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to