summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/system-target.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/system-target.h')
-rw-r--r--firmware/target/arm/imx233/system-target.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/system-target.h b/firmware/target/arm/imx233/system-target.h
new file mode 100644
index 0000000000..675adb448b
--- /dev/null
+++ b/firmware/target/arm/imx233/system-target.h
@@ -0,0 +1,53 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2011 by Amaury Pouly
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#ifndef SYSTEM_TARGET_H
22#define SYSTEM_TARGET_H
23
24#include "system-arm.h"
25#include "mmu-arm.h"
26#include "panic.h"
27
28#include "clock-target.h" /* CPUFREQ_* are defined here */
29
30#define HW_DIGCTL_BASE 0x8001C000
31#define HW_DIGCTL_MICROSECONDS (*(volatile uint32_t *)(HW_DIGCTL_BASE + 0xC0))
32
33#define INT_SRC_USB_CTRL 11
34#define INT_SRC_TIMER(nr) (28 + (nr))
35#define INT_SRC_LCDIF_DMA 45
36#define INT_SRC_LCDIF_ERROR 46
37#define INT_SRC_NR_SOURCES 66
38
39void imx233_enable_interrupt(int src, bool enable);
40void imx233_softirq(int src, bool enable);
41void udelay(unsigned us);
42bool imx233_us_elapsed(uint32_t ref, unsigned us_delay);
43void imx233_reset_block(volatile uint32_t *block_reg);
44void power_off(void);
45
46void udelay(unsigned usecs);
47
48static inline void mdelay(unsigned msecs)
49{
50 udelay(1000 * msecs);
51}
52
53#endif /* SYSTEM_TARGET_H */