Serial driver for imx31. Perhaps not 100% but maybe 80-90% (future developments will...
[kugel-rb.git] / firmware / target / arm / imx31 / gigabeat-s / system-target.h
blob8db0c78eb7e7fe7aa58f5841a55d13331346edb1
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 by Greg White
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #ifndef SYSTEM_TARGET_H
20 #define SYSTEM_TARGET_H
22 #include "system-arm.h"
23 #include "mmu-arm.h"
25 #define CPUFREQ_NORMAL 532000000
27 static inline void udelay(unsigned int usecs)
29 volatile signed int stop = EPITCNT1 - usecs;
30 while ((signed int)EPITCNT1 > stop);
33 #define __dbg_hw_info(...) 0
34 #define __dbg_ports(...) 0
36 void system_prepare_fw_start(void);
37 void tick_stop(void);
38 void kernel_device_init(void);
40 #define KDEV_INIT
42 #define HAVE_INVALIDATE_ICACHE
43 static inline void invalidate_icache(void)
45 asm volatile(
46 /* Clean and invalidate entire data cache */
47 "mcr p15, 0, %0, c7, c14, 0 \n"
48 /* Invalidate entire instruction cache */
49 "mcr p15, 0, %0, c7, c5, 0 \n"
50 : : "r"(0)
54 #define HAVE_FLUSH_ICACHE
55 static inline void flush_icache(void)
57 asm volatile (
58 /* Clean entire data cache */
59 "mcr p15, 0, %0, c7, c10, 0 \n"
60 : : "r"(0)
64 struct ARM_REGS {
65 int r0;
66 int r1;
67 int r2;
68 int r3;
69 int r4;
70 int r5;
71 int r6;
72 int r7;
73 int r8;
74 int r9;
75 int r10;
76 int r11;
77 int r12;
78 int sp;
79 int lr;
80 int pc;
81 int cpsr;
82 } regs;
84 inline void dumpregs(void);
86 #endif /* SYSTEM_TARGET_H */