diff options
Diffstat (limited to 'firmware/system.c')
-rw-r--r-- | firmware/system.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/firmware/system.c b/firmware/system.c index 0015b3a55d..7afa3f720e 100644 --- a/firmware/system.c +++ b/firmware/system.c | |||
@@ -1106,6 +1106,7 @@ int system_memory_guard(int newmode) | |||
1106 | } | 1106 | } |
1107 | #elif CONFIG_CPU==PP5020 | 1107 | #elif CONFIG_CPU==PP5020 |
1108 | 1108 | ||
1109 | #ifndef BOOTLOADER | ||
1109 | extern void TIMER1(void); | 1110 | extern void TIMER1(void); |
1110 | extern void ipod_4g_button_int(void); | 1111 | extern void ipod_4g_button_int(void); |
1111 | 1112 | ||
@@ -1116,6 +1117,7 @@ void irq(void) | |||
1116 | else if (PP5020_CPU_HI_INT_STAT & PP5020_I2C_MASK) | 1117 | else if (PP5020_CPU_HI_INT_STAT & PP5020_I2C_MASK) |
1117 | ipod_4g_button_int(); | 1118 | ipod_4g_button_int(); |
1118 | } | 1119 | } |
1120 | #endif | ||
1119 | 1121 | ||
1120 | /* TODO: The following two function have been lifted straight from IPL, and | 1122 | /* TODO: The following two function have been lifted straight from IPL, and |
1121 | hence have a lot of numeric addresses used straight. I'd like to use | 1123 | hence have a lot of numeric addresses used straight. I'd like to use |
@@ -1124,11 +1126,10 @@ void irq(void) | |||
1124 | to extend the funtions to do alternate cache configurations and/or | 1126 | to extend the funtions to do alternate cache configurations and/or |
1125 | some other CPU frequency scaling. */ | 1127 | some other CPU frequency scaling. */ |
1126 | 1128 | ||
1129 | #ifndef BOOTLOADER | ||
1127 | static void ipod_init_cache(void) | 1130 | static void ipod_init_cache(void) |
1128 | { | 1131 | { |
1129 | /* Initialising the cache in the iPod Video bootloader prevents | 1132 | /* Initialising the cache in the iPod bootloader prevents Rockbox from starting */ |
1130 | Rockbox from starting */ | ||
1131 | #if !defined(BOOTLOADER) || !defined(APPLE_IPODVIDEO) | ||
1132 | unsigned i; | 1133 | unsigned i; |
1133 | 1134 | ||
1134 | /* cache init mode? */ | 1135 | /* cache init mode? */ |
@@ -1147,7 +1148,6 @@ static void ipod_init_cache(void) | |||
1147 | 1148 | ||
1148 | for (i = 0x10000000; i < 0x10002000; i += 16) | 1149 | for (i = 0x10000000; i < 0x10002000; i += 16) |
1149 | inb(i); | 1150 | inb(i); |
1150 | #endif | ||
1151 | } | 1151 | } |
1152 | 1152 | ||
1153 | static void ipod_set_cpu_speed(void) | 1153 | static void ipod_set_cpu_speed(void) |
@@ -1163,9 +1163,11 @@ static void ipod_set_cpu_speed(void) | |||
1163 | 1163 | ||
1164 | outl((inl(0x60006020) & 0x0fffff0f) | 0x20000070, 0x60006020); | 1164 | outl((inl(0x60006020) & 0x0fffff0f) | 0x20000070, 0x60006020); |
1165 | } | 1165 | } |
1166 | #endif | ||
1166 | 1167 | ||
1167 | void system_init(void) | 1168 | void system_init(void) |
1168 | { | 1169 | { |
1170 | #ifndef BOOTLOADER | ||
1169 | /* disable all irqs */ | 1171 | /* disable all irqs */ |
1170 | outl(-1, 0x60001138); | 1172 | outl(-1, 0x60001138); |
1171 | outl(-1, 0x60001128); | 1173 | outl(-1, 0x60001128); |
@@ -1176,6 +1178,7 @@ void system_init(void) | |||
1176 | outl(-1, 0x6000101c); | 1178 | outl(-1, 0x6000101c); |
1177 | ipod_set_cpu_speed(); | 1179 | ipod_set_cpu_speed(); |
1178 | ipod_init_cache(); | 1180 | ipod_init_cache(); |
1181 | #endif | ||
1179 | } | 1182 | } |
1180 | 1183 | ||
1181 | void system_reboot(void) | 1184 | void system_reboot(void) |