diff options
| author | Dave Chapman <dave@dchapman.com> | 2006-01-05 17:02:48 +0000 |
|---|---|---|
| committer | Dave Chapman <dave@dchapman.com> | 2006-01-05 17:02:48 +0000 |
| commit | cb7e695ef9d0166b77f14d6d260733f0ff888f13 (patch) | |
| tree | d43209034aaffbe28ce5fbc3b4c59cdd5187a3b6 /firmware/kernel.c | |
| parent | 5a313efa0c685c52116e008b0e0fa132c05fd9bb (diff) | |
| download | rockbox-cb7e695ef9d0166b77f14d6d260733f0ff888f13.zip rockbox-cb7e695ef9d0166b77f14d6d260733f0ff888f13.tar.gz rockbox-cb7e695ef9d0166b77f14d6d260733f0ff888f13.tar.bz2 rockbox-cb7e695ef9d0166b77f14d6d260733f0ff888f13.tar.xz | |
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
Diffstat (limited to 'firmware/kernel.c')
| -rw-r--r-- | firmware/kernel.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/firmware/kernel.c b/firmware/kernel.c index 6166437..a353c4b 100644 --- a/firmware/kernel.c +++ b/firmware/kernel.c @@ -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 |