mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
pp500x: Switch to plain C sleep/wake code (instead of asm)
Supposedly this is responsible for startup crashes on ipod1g/2g. Change-Id: I9d03ddc996f46db6fa782d1d8b1cd8baf9d23308
This commit is contained in:
parent
8e7fa2932e
commit
c33602375d
1 changed files with 3 additions and 3 deletions
|
@ -52,7 +52,7 @@ uintptr_t * const idle_stacks[NUM_CORES] =
|
||||||
* initializations.
|
* initializations.
|
||||||
*---------------------------------------------------------------------------
|
*---------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static void INIT_ATTR core_thread_init(unsigned int core)
|
static void INIT_ATTR core_thread_init(unsigned int core)
|
||||||
{
|
{
|
||||||
if (core == CPU)
|
if (core == CPU)
|
||||||
{
|
{
|
||||||
|
@ -154,7 +154,7 @@ struct core_semaphores
|
||||||
|
|
||||||
static struct core_semaphores core_semaphores[NUM_CORES] IBSS_ATTR;
|
static struct core_semaphores core_semaphores[NUM_CORES] IBSS_ATTR;
|
||||||
|
|
||||||
#if 1 /* Select ASM */
|
#if 0 /* Select ASM */
|
||||||
/*---------------------------------------------------------------------------
|
/*---------------------------------------------------------------------------
|
||||||
* Put core in a power-saving state if waking list wasn't repopulated and if
|
* Put core in a power-saving state if waking list wasn't repopulated and if
|
||||||
* no other core requested a wakeup for it to perform a task.
|
* no other core requested a wakeup for it to perform a task.
|
||||||
|
@ -294,7 +294,7 @@ static inline void core_sleep(unsigned int core)
|
||||||
"mov r0, r0, lsl %[c] \n"
|
"mov r0, r0, lsl %[c] \n"
|
||||||
"str r0, [%[mbx], #4] \n" /* signal intent to sleep */
|
"str r0, [%[mbx], #4] \n" /* signal intent to sleep */
|
||||||
"ldr r1, [%[mbx], #0] \n" /* && !(MBX_MSG_STAT & (0x10<<core)) ? */
|
"ldr r1, [%[mbx], #0] \n" /* && !(MBX_MSG_STAT & (0x10<<core)) ? */
|
||||||
"tst r1, r0, lsl #2 \n"
|
"tst r1, r0, lsl #2 \n"
|
||||||
"moveq r1, #0x80000000 \n" /* Then sleep */
|
"moveq r1, #0x80000000 \n" /* Then sleep */
|
||||||
"streq r1, [%[ctl], %[c], lsl #2] \n"
|
"streq r1, [%[ctl], %[c], lsl #2] \n"
|
||||||
"moveq r1, #0 \n" /* Clear control reg */
|
"moveq r1, #0 \n" /* Clear control reg */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue