diff options
Diffstat (limited to 'firmware/target/arm/system-pp.h')
-rw-r--r-- | firmware/target/arm/system-pp.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/firmware/target/arm/system-pp.h b/firmware/target/arm/system-pp.h new file mode 100644 index 0000000000..05fd8b6edf --- /dev/null +++ b/firmware/target/arm/system-pp.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 by Alan Korr | ||
11 | * Copyright (C) 2007 by Michael Sevakis | ||
12 | * | ||
13 | * All files in this archive are subject to the GNU General Public License. | ||
14 | * See the file COPYING in the source tree root for full license agreement. | ||
15 | * | ||
16 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
17 | * KIND, either express or implied. | ||
18 | * | ||
19 | ****************************************************************************/ | ||
20 | |||
21 | #define inl(a) (*(volatile unsigned long *) (a)) | ||
22 | #define outl(a,b) (*(volatile unsigned long *) (b) = (a)) | ||
23 | #define inb(a) (*(volatile unsigned char *) (a)) | ||
24 | #define outb(a,b) (*(volatile unsigned char *) (b) = (a)) | ||
25 | #define inw(a) (*(volatile unsigned short *) (a)) | ||
26 | #define outw(a,b) (*(volatile unsigned short *) (b) = (a)) | ||
27 | extern unsigned int ipod_hw_rev; | ||
28 | |||
29 | static inline void udelay(unsigned usecs) | ||
30 | { | ||
31 | unsigned stop = USEC_TIMER + usecs; | ||
32 | while (TIME_BEFORE(USEC_TIMER, stop)); | ||
33 | } | ||
34 | |||
35 | unsigned int current_core(void); | ||
36 | |||
37 | #define HAVE_INVALIDATE_ICACHE | ||
38 | static inline void invalidate_icache(void) | ||
39 | { | ||
40 | outl(inl(0xf000f044) | 0x6, 0xf000f044); | ||
41 | while ((CACHE_CTL & 0x8000) != 0); | ||
42 | } | ||
43 | |||
44 | #define HAVE_FLUSH_ICACHE | ||
45 | static inline void flush_icache(void) | ||
46 | { | ||
47 | outl(inl(0xf000f044) | 0x2, 0xf000f044); | ||
48 | while ((CACHE_CTL & 0x8000) != 0); | ||
49 | } | ||