diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/app.lds | 2 | ||||
-rw-r--r-- | firmware/export/config.h | 3 | ||||
-rw-r--r-- | firmware/export/kernel.h | 2 | ||||
-rw-r--r-- | firmware/export/timer.h | 2 | ||||
-rw-r--r-- | firmware/kernel.c | 2 | ||||
-rw-r--r-- | firmware/rolo.c | 8 | ||||
-rw-r--r-- | firmware/timer.c | 13 |
7 files changed, 16 insertions, 16 deletions
diff --git a/firmware/app.lds b/firmware/app.lds index a081536dfb..965d7950af 100644 --- a/firmware/app.lds +++ b/firmware/app.lds | |||
@@ -36,7 +36,7 @@ INPUT(target/sh/crt0.o) | |||
36 | #define DRAMORIG 0x31000000 + STUBOFFSET | 36 | #define DRAMORIG 0x31000000 + STUBOFFSET |
37 | #define IRAMORIG 0x10000000 | 37 | #define IRAMORIG 0x10000000 |
38 | #define IRAMSIZE 0x10000 | 38 | #define IRAMSIZE 0x10000 |
39 | #elif (CONFIG_CPU==PP5002) || (CONFIG_CPU==PP5020) | 39 | #elif defined(CPU_PP) |
40 | #define DRAMORIG 0x00000000 + STUBOFFSET | 40 | #define DRAMORIG 0x00000000 + STUBOFFSET |
41 | #define IRAMORIG 0x40000000 | 41 | #define IRAMORIG 0x40000000 |
42 | #define IRAMSIZE 0xc000 | 42 | #define IRAMSIZE 0xc000 |
diff --git a/firmware/export/config.h b/firmware/export/config.h index 74c7e924ff..95e3399690 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -275,8 +275,7 @@ | |||
275 | #if !defined(SIMULATOR) && /* Not for simulators */ \ | 275 | #if !defined(SIMULATOR) && /* Not for simulators */ \ |
276 | (((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \ | 276 | (((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \ |
277 | defined(CPU_COLDFIRE) || /* Coldfire: core, plugins, codecs */ \ | 277 | defined(CPU_COLDFIRE) || /* Coldfire: core, plugins, codecs */ \ |
278 | (CONFIG_CPU == PP5020) || /* iPod and H10: core, plugins, codecs */ \ | 278 | defined(CPU_PP) || /* PortalPlayer: core, plugins, codecs */ \ |
279 | (CONFIG_CPU == PP5002) || /* iPod: core, plugins, codecs */ \ | ||
280 | (CONFIG_CPU == PNX0101)) | 279 | (CONFIG_CPU == PNX0101)) |
281 | #define ICODE_ATTR __attribute__ ((section(".icode"))) | 280 | #define ICODE_ATTR __attribute__ ((section(".icode"))) |
282 | #define ICONST_ATTR __attribute__ ((section(".irodata"))) | 281 | #define ICONST_ATTR __attribute__ ((section(".irodata"))) |
diff --git a/firmware/export/kernel.h b/firmware/export/kernel.h index 32c052a34d..2474c6dcac 100644 --- a/firmware/export/kernel.h +++ b/firmware/export/kernel.h | |||
@@ -70,7 +70,7 @@ struct mutex | |||
70 | }; | 70 | }; |
71 | 71 | ||
72 | /* global tick variable */ | 72 | /* global tick variable */ |
73 | #if ((CONFIG_CPU == PP5002) || (CONFIG_CPU == PP5020)) && defined(BOOTLOADER) | 73 | #if defined(CPU_PP) && defined(BOOTLOADER) |
74 | /* We don't enable interrupts in the iPod bootloader, so we need to fake | 74 | /* We don't enable interrupts in the iPod bootloader, so we need to fake |
75 | the current_tick variable */ | 75 | the current_tick variable */ |
76 | #define current_tick (signed)(USEC_TIMER/10000) | 76 | #define current_tick (signed)(USEC_TIMER/10000) |
diff --git a/firmware/export/timer.h b/firmware/export/timer.h index 2fb7c6495f..f32a8a1790 100644 --- a/firmware/export/timer.h +++ b/firmware/export/timer.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #ifndef SIMULATOR | 26 | #ifndef SIMULATOR |
27 | 27 | ||
28 | 28 | ||
29 | #if CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002 | 29 | #if defined(CPU_PP) |
30 | /* Portalplayer chips use a microsecond timer. */ | 30 | /* Portalplayer chips use a microsecond timer. */ |
31 | #define TIMER_FREQ 1000000 | 31 | #define TIMER_FREQ 1000000 |
32 | #elif defined(CPU_COLDFIRE) | 32 | #elif defined(CPU_COLDFIRE) |
diff --git a/firmware/kernel.c b/firmware/kernel.c index 79f26f58f2..5a58935601 100644 --- a/firmware/kernel.c +++ b/firmware/kernel.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "system.h" | 25 | #include "system.h" |
26 | #include "panic.h" | 26 | #include "panic.h" |
27 | 27 | ||
28 | #if ((CONFIG_CPU != PP5020) && (CONFIG_CPU != PP5002)) || !defined(BOOTLOADER) | 28 | #if !defined(CPU_PP) || !defined(BOOTLOADER) |
29 | long current_tick = 0; | 29 | long current_tick = 0; |
30 | #endif | 30 | #endif |
31 | 31 | ||
diff --git a/firmware/rolo.c b/firmware/rolo.c index 846cebff6f..057c4820eb 100644 --- a/firmware/rolo.c +++ b/firmware/rolo.c | |||
@@ -32,8 +32,10 @@ | |||
32 | 32 | ||
33 | #if !defined(IRIVER_IFP7XX_SERIES) && \ | 33 | #if !defined(IRIVER_IFP7XX_SERIES) && \ |
34 | (CONFIG_CPU != PP5002) && !defined(IRIVER_H10) && \ | 34 | (CONFIG_CPU != PP5002) && !defined(IRIVER_H10) && \ |
35 | !defined(IRIVER_H10_5GB) && (CONFIG_CPU != S3C2440) | 35 | !defined(IRIVER_H10_5GB) && (CONFIG_CPU != S3C2440) && \ |
36 | !defined(SANSA_E200) | ||
36 | /* FIX: this doesn't work on iFP, 3rd Gen ipods, or H10 yet */ | 37 | /* FIX: this doesn't work on iFP, 3rd Gen ipods, or H10 yet */ |
38 | /* TODO: Test on the Sansa */ | ||
37 | 39 | ||
38 | #define IRQ0_EDGE_TRIGGER 0x80 | 40 | #define IRQ0_EDGE_TRIGGER 0x80 |
39 | 41 | ||
@@ -111,7 +113,7 @@ int rolo_load(const char* filename) | |||
111 | { | 113 | { |
112 | int fd; | 114 | int fd; |
113 | long length; | 115 | long length; |
114 | #if defined(CPU_COLDFIRE) || (CONFIG_CPU == PP5002) || (CONFIG_CPU == PP5020) | 116 | #if defined(CPU_COLDFIRE) || defined(CPU_PP) |
115 | int i; | 117 | int i; |
116 | unsigned long checksum,file_checksum; | 118 | unsigned long checksum,file_checksum; |
117 | #else | 119 | #else |
@@ -141,7 +143,7 @@ int rolo_load(const char* filename) | |||
141 | 143 | ||
142 | length = filesize(fd) - FIRMWARE_OFFSET_FILE_DATA; | 144 | length = filesize(fd) - FIRMWARE_OFFSET_FILE_DATA; |
143 | 145 | ||
144 | #if defined(CPU_COLDFIRE) || (CONFIG_CPU == PP5002) || (CONFIG_CPU == PP5020) | 146 | #if defined(CPU_COLDFIRE) || defined(CPU_PP) |
145 | /* Read and save checksum */ | 147 | /* Read and save checksum */ |
146 | lseek(fd, FIRMWARE_OFFSET_FILE_CRC, SEEK_SET); | 148 | lseek(fd, FIRMWARE_OFFSET_FILE_CRC, SEEK_SET); |
147 | if (read(fd, &file_checksum, 4) != 4) { | 149 | if (read(fd, &file_checksum, 4) != 4) { |
diff --git a/firmware/timer.c b/firmware/timer.c index 80d3fec561..849e4ba598 100644 --- a/firmware/timer.c +++ b/firmware/timer.c | |||
@@ -49,7 +49,7 @@ void TIMER1(void) | |||
49 | pfn_timer(); | 49 | pfn_timer(); |
50 | TER1 = 0xff; /* clear all events */ | 50 | TER1 = 0xff; /* clear all events */ |
51 | } | 51 | } |
52 | #elif CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002 | 52 | #elif defined(CPU_PP) |
53 | void TIMER2(void) | 53 | void TIMER2(void) |
54 | { | 54 | { |
55 | TIMER2_VAL; /* ACK interrupt */ | 55 | TIMER2_VAL; /* ACK interrupt */ |
@@ -150,7 +150,7 @@ static bool timer_set(long cycles, bool start) | |||
150 | if (start || (TCN1 >= TRR1)) | 150 | if (start || (TCN1 >= TRR1)) |
151 | TCN1 = 0; /* reset the timer */ | 151 | TCN1 = 0; /* reset the timer */ |
152 | TER1 = 0xff; /* clear all events */ | 152 | TER1 = 0xff; /* clear all events */ |
153 | #elif CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002 | 153 | #elif defined(CPU_PP) |
154 | if (cycles > 0x20000000 || cycles < 2) | 154 | if (cycles > 0x20000000 || cycles < 2) |
155 | return false; | 155 | return false; |
156 | 156 | ||
@@ -200,9 +200,8 @@ bool timer_register(int reg_prio, void (*unregister_callback)(void), | |||
200 | if (reg_prio <= timer_prio || cycles == 0) | 200 | if (reg_prio <= timer_prio || cycles == 0) |
201 | return false; | 201 | return false; |
202 | 202 | ||
203 | #if (CONFIG_CPU==PP5002) || (CONFIG_CPU==PP5020) || (CONFIG_CPU==PNX0101) \ | 203 | #if defined(CPU_PP) || (CONFIG_CPU==PNX0101) || (CONFIG_CPU==S3C2440) |
204 | || (CONFIG_CPU==S3C2440) | 204 | /* TODO: Implement for PortalPlayer and iFP (if possible) */ |
205 | /* TODO: Implement for iPod and iFP (if possible) */ | ||
206 | (void)int_prio; | 205 | (void)int_prio; |
207 | #endif | 206 | #endif |
208 | 207 | ||
@@ -227,7 +226,7 @@ bool timer_register(int reg_prio, void (*unregister_callback)(void), | |||
227 | ICR2 = 0x90; /* interrupt on level 4.0 */ | 226 | ICR2 = 0x90; /* interrupt on level 4.0 */ |
228 | and_l(~(1<<10), &IMR); | 227 | and_l(~(1<<10), &IMR); |
229 | TMR1 |= 1; /* start timer */ | 228 | TMR1 |= 1; /* start timer */ |
230 | #elif CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002 | 229 | #elif defined(CPU_PP) |
231 | /* unmask interrupt source */ | 230 | /* unmask interrupt source */ |
232 | CPU_INT_EN = TIMER2_MASK; | 231 | CPU_INT_EN = TIMER2_MASK; |
233 | #endif | 232 | #endif |
@@ -247,7 +246,7 @@ void timer_unregister(void) | |||
247 | #elif defined CPU_COLDFIRE | 246 | #elif defined CPU_COLDFIRE |
248 | TMR1 = 0; /* disable timer 1 */ | 247 | TMR1 = 0; /* disable timer 1 */ |
249 | or_l((1<<10), &IMR); /* disable interrupt */ | 248 | or_l((1<<10), &IMR); /* disable interrupt */ |
250 | #elif CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002 | 249 | #elif defined(CPU_PP) |
251 | TIMER2_CFG = 0; /* stop timer 2 */ | 250 | TIMER2_CFG = 0; /* stop timer 2 */ |
252 | CPU_INT_CLR = TIMER2_MASK; | 251 | CPU_INT_CLR = TIMER2_MASK; |
253 | #endif | 252 | #endif |