diff options
author | Daniel Ankers <dan@weirdo.org.uk> | 2006-11-22 00:41:30 +0000 |
---|---|---|
committer | Daniel Ankers <dan@weirdo.org.uk> | 2006-11-22 00:41:30 +0000 |
commit | 242cbd5cd73542c79020a4ce9a8e83ee0391bc72 (patch) | |
tree | a1a66ed8d4eb65db38daedfe701138aa0bde726d | |
parent | 336cb6898ef55ea6480a0b5547d30bb5029c79ef (diff) | |
download | rockbox-242cbd5cd73542c79020a4ce9a8e83ee0391bc72.tar.gz rockbox-242cbd5cd73542c79020a4ce9a8e83ee0391bc72.zip |
Change if CONFIG_CPU==PP50XX to ifdef CPU_PP where appropriate
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11569 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/debug_menu.c | 4 | ||||
-rw-r--r-- | apps/playback.c | 2 | ||||
-rw-r--r-- | apps/plugins/plugin.lds | 8 | ||||
-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 |
10 files changed, 21 insertions, 25 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index ecdbe26370..d127aefbfb 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -385,8 +385,8 @@ bool dbg_flash_id(unsigned* p_manufacturer, unsigned* p_device, | |||
385 | unsigned addr1, unsigned addr2) | 385 | unsigned addr1, unsigned addr2) |
386 | 386 | ||
387 | { | 387 | { |
388 | #if (CONFIG_CPU == PP5002) || (CONFIG_CPU == PP5020) | 388 | #ifdef CPU_PP |
389 | /* TODO: Implement for iPod */ | 389 | /* TODO: Implement for PortalPlayer */ |
390 | (void)p_manufacturer; | 390 | (void)p_manufacturer; |
391 | (void)p_device; | 391 | (void)p_device; |
392 | (void)addr1; | 392 | (void)addr1; |
diff --git a/apps/playback.c b/apps/playback.c index 9bf6942e7f..9d03cd266c 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -167,7 +167,7 @@ enum { | |||
167 | #endif | 167 | #endif |
168 | 168 | ||
169 | /* As defined in plugin.lds */ | 169 | /* As defined in plugin.lds */ |
170 | #if CONFIG_CPU == PP5020 || CONFIG_CPU == PP5002 | 170 | #if defined(CPU_PP) |
171 | #define CODEC_IRAM_ORIGIN 0x4000c000 | 171 | #define CODEC_IRAM_ORIGIN 0x4000c000 |
172 | #define CODEC_IRAM_SIZE 0xc000 | 172 | #define CODEC_IRAM_SIZE 0xc000 |
173 | #elif defined(IAUDIO_X5) | 173 | #elif defined(IAUDIO_X5) |
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds index f72059c107..ef0dece36f 100644 --- a/apps/plugins/plugin.lds +++ b/apps/plugins/plugin.lds | |||
@@ -20,10 +20,6 @@ OUTPUT_FORMAT(elf32-sh) | |||
20 | #define ARCH_IRIVER | 20 | #define ARCH_IRIVER |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #if (CONFIG_CPU==PP5002) || (CONFIG_CPU==PP5020) | ||
24 | #define ARCH_IPOD | ||
25 | #endif | ||
26 | |||
27 | #ifdef ARCH_IRIVER | 23 | #ifdef ARCH_IRIVER |
28 | #define DRAMORIG 0x31000000 | 24 | #define DRAMORIG 0x31000000 |
29 | #define IRAMORIG 0x1000c000 | 25 | #define IRAMORIG 0x1000c000 |
@@ -32,7 +28,7 @@ OUTPUT_FORMAT(elf32-sh) | |||
32 | #define DRAMORIG 0x31000000 | 28 | #define DRAMORIG 0x31000000 |
33 | #define IRAMORIG 0x10010000 | 29 | #define IRAMORIG 0x10010000 |
34 | #define IRAMSIZE 0x10000 | 30 | #define IRAMSIZE 0x10000 |
35 | #elif defined(ARCH_IPOD) | 31 | #elif defined(CPU_PP) |
36 | #define DRAMORIG 0x00000000 | 32 | #define DRAMORIG 0x00000000 |
37 | #define IRAMORIG 0x4000c000 | 33 | #define IRAMORIG 0x4000c000 |
38 | #define IRAMSIZE 0xc000 | 34 | #define IRAMSIZE 0xc000 |
@@ -77,7 +73,7 @@ SECTIONS | |||
77 | .text : | 73 | .text : |
78 | { | 74 | { |
79 | *(.text*) | 75 | *(.text*) |
80 | #if (CONFIG_CPU==PP5020) || (CONFIG_CPU==PNX0101) || (CONFIG_CPU==PP5002) | 76 | #if defined(CPU_PP) || (CONFIG_CPU==PNX0101) |
81 | *(.glue_7) | 77 | *(.glue_7) |
82 | *(.glue_7t) | 78 | *(.glue_7t) |
83 | #endif | 79 | #endif |
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 |