summaryrefslogtreecommitdiff
path: root/firmware/export/system.h
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-01-12 00:35:50 +0000
committerDave Chapman <dave@dchapman.com>2006-01-12 00:35:50 +0000
commitd83e929f3fc369a5981e1e40e1c5307169a46cfc (patch)
treeac323ca5811374a030a1b65bb77fc7ccc163db04 /firmware/export/system.h
parent8d130684214d23a9163810d1dacc33d108f2338a (diff)
downloadrockbox-d83e929f3fc369a5981e1e40e1c5307169a46cfc.tar.gz
rockbox-d83e929f3fc369a5981e1e40e1c5307169a46cfc.zip
Work-in-progress iriver iFP-7xx port by Tomasz Malesinski
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8342 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/system.h')
-rw-r--r--firmware/export/system.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h
index d197b06547..50cbaee686 100644
--- a/firmware/export/system.h
+++ b/firmware/export/system.h
@@ -299,7 +299,7 @@ static inline void invalidate_icache(void)
299#define CPUFREQ_MAX_MULT 11 299#define CPUFREQ_MAX_MULT 11
300#define CPUFREQ_MAX (CPUFREQ_MAX_MULT * CPU_FREQ) 300#define CPUFREQ_MAX (CPUFREQ_MAX_MULT * CPU_FREQ)
301 301
302#elif CONFIG_CPU == PP5020 302#elif defined(CPU_ARM)
303 303
304/* TODO: Implement set_irq_level and check CPU frequencies */ 304/* TODO: Implement set_irq_level and check CPU frequencies */
305 305
@@ -330,14 +330,26 @@ static inline unsigned long swap32(unsigned long value)
330} 330}
331 331
332#define HIGHEST_IRQ_LEVEL (1) 332#define HIGHEST_IRQ_LEVEL (1)
333
333static inline int set_irq_level(int level) 334static inline int set_irq_level(int level)
334{ 335{
335 int result=level; 336 unsigned long cpsr;
336 return result; 337 /* Read the old level and set the new one */
338 asm volatile ("mrs %0,cpsr" : "=r" (cpsr));
339 asm volatile ("msr cpsr_c,%0"
340 : : "r" ((cpsr & ~0x80) | (level << 7)));
341 return (cpsr >> 7) & 1;
337} 342}
338 343
339#define invalidate_icache() 344#define invalidate_icache()
340 345
346#if CONFIG_CPU == PNX0101
347typedef void (*interrupt_handler_t)(void);
348
349void irq_set_int_handler(int n, interrupt_handler_t handler);
350void irq_enable_int(int n);
351#endif
352
341#elif CONFIG_CPU == TCC730 353#elif CONFIG_CPU == TCC730
342 354
343extern int smsc_version(void); 355extern int smsc_version(void);