forked from len0rd/rockbox
Dual core support for PP502x players (iPod G4 and later, iriver h10, Sansa - iPod G3 will be coming soon.) This allows threads to be run on either core provided that all communications between the cores is done using uncached memory. There should be no significant change in battery life from doing this. Documentation (on the RockboxKernel wiki page) will follow shortly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12601 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
74e572c9d6
commit
82f9056988
38 changed files with 379 additions and 211 deletions
14
apps/main.c
14
apps/main.c
|
@ -296,6 +296,9 @@ static void init(void)
|
|||
#if CONFIG_CHARGING && (CONFIG_CPU == SH7034)
|
||||
/* if nobody initialized ATA before, I consider this a cold start */
|
||||
bool coldstart = (PACR2 & 0x4000) != 0; /* starting from Flash */
|
||||
#endif
|
||||
#ifdef CPU_PP
|
||||
COP_CTL = PROC_WAKE;
|
||||
#endif
|
||||
system_init();
|
||||
kernel_init();
|
||||
|
@ -549,19 +552,22 @@ void cop_main(void)
|
|||
so it should not be assumed that the coprocessor be usable even on
|
||||
platforms which support it.
|
||||
|
||||
At present the COP sleeps unless it receives a message from the CPU telling
|
||||
it that we are loading a new kernel, so must reboot */
|
||||
A kernel thread runs on the coprocessor which waits for other threads to be
|
||||
added, and gracefully handles RoLo */
|
||||
|
||||
#if CONFIG_CPU == PP5002
|
||||
/* 3G doesn't have Rolo support yet */
|
||||
/* 3G doesn't have Rolo or dual core support yet */
|
||||
while(1) {
|
||||
COP_CTL = PROC_SLEEP;
|
||||
}
|
||||
#else
|
||||
extern volatile unsigned char cpu_message;
|
||||
|
||||
system_init();
|
||||
kernel_init();
|
||||
|
||||
while(cpu_message != COP_REBOOT) {
|
||||
COP_CTL = PROC_SLEEP;
|
||||
sleep(HZ);
|
||||
}
|
||||
rolo_restart_cop();
|
||||
#endif /* PP5002 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue