diff options
Diffstat (limited to 'firmware/target/arm/system-target.h')
-rw-r--r-- | firmware/target/arm/system-target.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/firmware/target/arm/system-target.h b/firmware/target/arm/system-target.h index e9419b3f86..8dcbf0f9da 100644 --- a/firmware/target/arm/system-target.h +++ b/firmware/target/arm/system-target.h | |||
@@ -77,7 +77,7 @@ static inline unsigned int current_core(void) | |||
77 | /* Return the actual ID instead of core index */ | 77 | /* Return the actual ID instead of core index */ |
78 | static inline unsigned int processor_id(void) | 78 | static inline unsigned int processor_id(void) |
79 | { | 79 | { |
80 | unsigned char id; | 80 | unsigned int id; |
81 | 81 | ||
82 | asm volatile ( | 82 | asm volatile ( |
83 | "ldrb %0, [%1] \n" | 83 | "ldrb %0, [%1] \n" |
@@ -92,12 +92,18 @@ static inline unsigned int processor_id(void) | |||
92 | /* All addresses within rockbox are in IRAM in the bootloader so | 92 | /* All addresses within rockbox are in IRAM in the bootloader so |
93 | are therefore uncached */ | 93 | are therefore uncached */ |
94 | #define UNCACHED_ADDR(a) (a) | 94 | #define UNCACHED_ADDR(a) (a) |
95 | #else | 95 | |
96 | #define UNCACHED_ADDR(a) \ | 96 | #else /* !BOOTLOADER */ |
97 | ((typeof (a))((uintptr_t)(a) | 0x10000000)) | 97 | |
98 | #if CONFIG_CPU == PP5002 | ||
99 | #define UNCACHED_BASE_ADDR 0x28000000 | ||
100 | #else /* PP502x */ | ||
101 | #define UNCACHED_BASE_ADDR 0x10000000 | ||
98 | #endif | 102 | #endif |
99 | 103 | ||
100 | #ifdef CPU_PP502x | 104 | #define UNCACHED_ADDR(a) \ |
105 | ((typeof (a))((uintptr_t)(a) | UNCACHED_BASE_ADDR)) | ||
106 | #endif /* BOOTLOADER */ | ||
101 | 107 | ||
102 | /* Certain data needs to be out of the way of cache line interference | 108 | /* Certain data needs to be out of the way of cache line interference |
103 | * such as data for COP use or for use with UNCACHED_ADDR */ | 109 | * such as data for COP use or for use with UNCACHED_ADDR */ |
@@ -115,8 +121,6 @@ void invalidate_icache(void); | |||
115 | void flush_icache(void); | 121 | void flush_icache(void); |
116 | #endif | 122 | #endif |
117 | 123 | ||
118 | #endif /* CPU_PP502x */ | ||
119 | |||
120 | #endif /* CPU_PP */ | 124 | #endif /* CPU_PP */ |
121 | 125 | ||
122 | #endif /* SYSTEM_TARGET_H */ | 126 | #endif /* SYSTEM_TARGET_H */ |