1
0
Fork 0
forked from len0rd/rockbox

iPod: Fix the bootloader so it can load and run the original Apple firmware again. The Rockbox firmware was doing too much to the hardware so we remove most of the initialisation.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8301 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dave Chapman 2006-01-05 17:02:48 +00:00
parent 5a313efa0c
commit cb7e695ef9
9 changed files with 45 additions and 10 deletions

View file

@ -25,7 +25,9 @@
#include "system.h"
#include "panic.h"
#if (CONFIG_CPU != PP5020) || !defined(BOOTLOADER)
long current_tick = 0;
#endif
static void (*tick_funcs[MAX_NUM_TICK_TASKS])(void);
@ -48,7 +50,7 @@ void kernel_init(void)
num_queues = 0;
memset(all_queues, 0, sizeof(all_queues));
tick_start(1000/HZ);
}
@ -319,6 +321,7 @@ void tick_start(unsigned int interval_in_ms)
#define USECS_PER_INT 0x2710
#ifndef BOOTLOADER
void TIMER1(void)
{
int i;
@ -336,9 +339,11 @@ void TIMER1(void)
current_tick++;
wake_up_thread();
}
#endif
void tick_start(unsigned int interval_in_ms)
{
#ifndef BOOTLOADER
/* TODO: use interval_in_ms to set timer periode */
(void)interval_in_ms;
PP5020_TIMER1 = 0x0;
@ -347,6 +352,10 @@ void tick_start(unsigned int interval_in_ms)
PP5020_TIMER1 = 0xc0000000 | USECS_PER_INT;
/* unmask interrupt source */
PP5020_CPU_INT_EN = PP5020_TIMER1_MASK;
#else
/* We don't enable interrupts in the bootloader */
(void)interval_in_ms;
#endif
}
#endif