diff options
Diffstat (limited to 'apps/main.c')
-rw-r--r-- | apps/main.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/apps/main.c b/apps/main.c index a27998168c..bc8a12dd4e 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -334,9 +334,7 @@ static void init(void) | |||
334 | /* if nobody initialized ATA before, I consider this a cold start */ | 334 | /* if nobody initialized ATA before, I consider this a cold start */ |
335 | bool coldstart = (PACR2 & 0x4000) != 0; /* starting from Flash */ | 335 | bool coldstart = (PACR2 & 0x4000) != 0; /* starting from Flash */ |
336 | #endif | 336 | #endif |
337 | #ifdef CPU_PP | 337 | |
338 | COP_CTL = PROC_WAKE; | ||
339 | #endif | ||
340 | system_init(); | 338 | system_init(); |
341 | kernel_init(); | 339 | kernel_init(); |
342 | 340 | ||
@@ -591,25 +589,19 @@ void cop_main(void) | |||
591 | so it should not be assumed that the coprocessor be usable even on | 589 | so it should not be assumed that the coprocessor be usable even on |
592 | platforms which support it. | 590 | platforms which support it. |
593 | 591 | ||
594 | A kernel thread runs on the coprocessor which waits for other threads to be | 592 | A kernel thread is initially setup on the coprocessor and immediately |
595 | added, and gracefully handles RoLo */ | 593 | destroyed for purposes of continuity. The cop sits idle until at least |
594 | one thread exists on it. */ | ||
596 | 595 | ||
597 | #if CONFIG_CPU == PP5002 | ||
598 | /* 3G doesn't have Rolo or dual core support yet */ | 596 | /* 3G doesn't have Rolo or dual core support yet */ |
599 | while(1) { | 597 | #if NUM_CORES > 1 |
600 | COP_CTL = PROC_SLEEP; | ||
601 | } | ||
602 | #else | ||
603 | extern volatile unsigned char cpu_message; | ||
604 | |||
605 | system_init(); | 598 | system_init(); |
606 | kernel_init(); | 599 | kernel_init(); |
607 | 600 | /* This should never be reached */ | |
608 | while(cpu_message != COP_REBOOT) { | 601 | #endif |
609 | sleep(HZ); | 602 | while(1) { |
603 | COP_CTL = PROC_SLEEP; | ||
610 | } | 604 | } |
611 | rolo_restart_cop(); | ||
612 | #endif /* PP5002 */ | ||
613 | } | 605 | } |
614 | #endif /* CPU_PP */ | 606 | #endif /* CPU_PP */ |
615 | 607 | ||