From f65cf301fbbbb23ffde08527755ff57e973c7bef Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 21 Mar 2008 17:20:57 +0000 Subject: Modification to scale_suspend_core to prevent a potential permanent freezing of the other core. Just unfreeze it unconditionally after freezing it since it really makes no difference to do so right now. Don't bother with freezing/unfreezing if compiling as single. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16731 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/system-pp502x.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'firmware/target') diff --git a/firmware/target/arm/system-pp502x.c b/firmware/target/arm/system-pp502x.c index e77349d2e3..390c80d9fd 100644 --- a/firmware/target/arm/system-pp502x.c +++ b/firmware/target/arm/system-pp502x.c @@ -144,22 +144,19 @@ void scale_suspend_core(bool suspend) ICODE_ATTR; void scale_suspend_core(bool suspend) { unsigned int core = CURRENT_CORE; - unsigned int othercore = 1 - core; - static unsigned long proc_bits IBSS_ATTR; + IF_COP( unsigned int othercore = 1 - core; ) static int oldstatus IBSS_ATTR; if (suspend) { oldstatus = set_interrupt_status(IRQ_FIQ_DISABLED, IRQ_FIQ_STATUS); - proc_bits = PROC_CTL(othercore) & 0xc0000000; - PROC_CTL(othercore) = 0x40000000; nop; + IF_COP( PROC_CTL(othercore) = 0x40000000; nop; ) PROC_CTL(core) = 0x48000003; nop; } else { PROC_CTL(core) = 0x4800001f; nop; - if (proc_bits == 0) - PROC_CTL(othercore) = 0; + IF_COP( PROC_CTL(othercore) = 0x00000000; nop; ) set_interrupt_status(oldstatus, IRQ_FIQ_STATUS); } } -- cgit v1.2.3