diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2008-03-21 17:20:57 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2008-03-21 17:20:57 +0000 |
commit | f65cf301fbbbb23ffde08527755ff57e973c7bef (patch) | |
tree | b7e9f7be2815012ae2cefa2fa022ca0d76a1bc24 /firmware/target/arm/system-pp502x.c | |
parent | 5af25c46e3e9be3bc96be38ba13ecb0979f3ccaa (diff) | |
download | rockbox-f65cf301fbbbb23ffde08527755ff57e973c7bef.tar.gz rockbox-f65cf301fbbbb23ffde08527755ff57e973c7bef.zip |
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
Diffstat (limited to 'firmware/target/arm/system-pp502x.c')
-rw-r--r-- | firmware/target/arm/system-pp502x.c | 9 |
1 files changed, 3 insertions, 6 deletions
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); } } |