All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ppc4xx: Disable trace broadcast for 44x non debug mode
@ 2010-09-16 18:32 Victor Gallardo
  2010-09-22  9:01 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: Victor Gallardo @ 2010-09-16 18:32 UTC (permalink / raw)
  To: u-boot

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>
---
 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_DTB at l /* Disable Trace Broadcast */
+	mtspr	SPRN_CCR0,r1
 	mtspr	SPRN_DBCR0,r0
 	mtspr	SPRN_DBCR1,r0
 	mtspr	SPRN_DBCR2,r0
-- 
1.6.1.rc3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] ppc4xx: Disable trace broadcast for 44x non debug mode
  2010-09-16 18:32 [U-Boot] [PATCH] ppc4xx: Disable trace broadcast for 44x non debug mode Victor Gallardo
@ 2010-09-22  9:01 ` Stefan Roese
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2010-09-22  9:01 UTC (permalink / raw)
  To: u-boot

On Thursday 16 September 2010 20:32:04 Victor Gallardo wrote:
> 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.

Applied to u-boot-ppc4xx/next. Thanks.
 
Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-22  9:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-16 18:32 [U-Boot] [PATCH] ppc4xx: Disable trace broadcast for 44x non debug mode Victor Gallardo
2010-09-22  9:01 ` Stefan Roese

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.