From cb7e695ef9d0166b77f14d6d260733f0ff888f13 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Thu, 5 Jan 2006 17:02:48 +0000 Subject: 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 --- firmware/kernel.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'firmware/kernel.c') 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 -- cgit v1.1