summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/system-target.h
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2011-06-30 17:31:40 +0000
committerAmaury Pouly <pamaury@rockbox.org>2011-06-30 17:31:40 +0000
commit617d1e9f6b7969aff5e45746b9c5e3cee9ce2c45 (patch)
treebf2015d298c2b6bc80189d09b73426380e08451f /firmware/target/arm/imx233/system-target.h
parent4a04c47a97517930b29f00b9d7f4d157cb69fa9b (diff)
downloadrockbox-617d1e9f6b7969aff5e45746b9c5e3cee9ce2c45.tar.gz
rockbox-617d1e9f6b7969aff5e45746b9c5e3cee9ce2c45.zip
imx233/fuze+: ssp, dma, mmc now work properly, partially implement cpu frequency changing, implement panic waiting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30104 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx233/system-target.h')
-rw-r--r--firmware/target/arm/imx233/system-target.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/system-target.h b/firmware/target/arm/imx233/system-target.h
index 163eacb41f..0f7bde4896 100644
--- a/firmware/target/arm/imx233/system-target.h
+++ b/firmware/target/arm/imx233/system-target.h
@@ -31,10 +31,35 @@
31#define HW_DIGCTL_MICROSECONDS (*(volatile uint32_t *)(HW_DIGCTL_BASE + 0xC0)) 31#define HW_DIGCTL_MICROSECONDS (*(volatile uint32_t *)(HW_DIGCTL_BASE + 0xC0))
32 32
33#define HW_POWER_BASE 0x80044000 33#define HW_POWER_BASE 0x80044000
34
35#define HW_POWER_CTRL (*(volatile uint32_t *)(HW_POWER_BASE + 0x0))
36
37#define HW_POWER_5VCTRL (*(volatile uint32_t *)(HW_POWER_BASE + 0x10))
38
39#define HW_POWER_MINPWR (*(volatile uint32_t *)(HW_POWER_BASE + 0x20))
40
41#define HW_POWER_CHARGE (*(volatile uint32_t *)(HW_POWER_BASE + 0x30))
42
43#define HW_POWER_VDDDCTRL (*(volatile uint32_t *)(HW_POWER_BASE + 0x40))
44#define HW_POWER_VDDDCTRL__TRG_BP 0
45#define HW_POWER_VDDDCTRL__TRG_BM 0x1f
46#define HW_POWER_VDDDCTRL__TRG_STEP 25 /* mV */
47#define HW_POWER_VDDDCTRL__TRG_MIN 800 /* mV */
48
49#define HW_POWER_VDDACTRL (*(volatile uint32_t *)(HW_POWER_BASE + 0x50))
50
51#define HW_POWER_VDDIOCTRL (*(volatile uint32_t *)(HW_POWER_BASE + 0x60))
52
53#define HW_POWER_VDDMEMCTRL (*(volatile uint32_t *)(HW_POWER_BASE + 0x70))
54
55#define HW_POWER_MISC (*(volatile uint32_t *)(HW_POWER_BASE + 0x90))
56
34#define HW_POWER_STS (*(volatile uint32_t *)(HW_POWER_BASE + 0xc0)) 57#define HW_POWER_STS (*(volatile uint32_t *)(HW_POWER_BASE + 0xc0))
35#define HW_POWER_STS__PSWITCH_BP 20 58#define HW_POWER_STS__PSWITCH_BP 20
36#define HW_POWER_STS__PSWITCH_BM (3 << 20) 59#define HW_POWER_STS__PSWITCH_BM (3 << 20)
37 60
61#define HW_POWER_BATTMONITOR (*(volatile uint32_t *)(HW_POWER_BASE + 0xe0))
62
38#define HW_POWER_RESET (*(volatile uint32_t *)(HW_POWER_BASE + 0x100)) 63#define HW_POWER_RESET (*(volatile uint32_t *)(HW_POWER_BASE + 0x100))
39#define HW_POWER_RESET__UNLOCK 0x3E770000 64#define HW_POWER_RESET__UNLOCK 0x3E770000
40#define HW_POWER_RESET__PWD 0x1 65#define HW_POWER_RESET__PWD 0x1
@@ -67,6 +92,22 @@
67#define INT_SRC_LCDIF_ERROR 46 92#define INT_SRC_LCDIF_ERROR 46
68#define INT_SRC_NR_SOURCES 66 93#define INT_SRC_NR_SOURCES 66
69 94
95/**
96 * Absolute maximum CPU speed: 454.74 MHz
97 * Intermediate CPU speeds: 392.73 MHz, 360MHz, 261.82 MHz, 64 MHz
98 * Absolute minimum CPU speed: 24 MHz */
99#define IMX233_CPUFREQ_454_MHz 454740000
100#define IMX233_CPUFREQ_392_MHz 392730000
101#define IMX233_CPUFREQ_360_MHz 360000000
102#define IMX233_CPUFREQ_261_MHz 261820000
103#define IMX233_CPUFREQ_64_MHz 64000000
104#define IMX233_CPUFREQ_24_MHz 24000000
105
106#define CPUFREQ_DEFAULT IMX233_CPUFREQ_454_MHz
107#define CPUFREQ_NORMAL IMX233_CPUFREQ_454_MHz
108#define CPUFREQ_MAX IMX233_CPUFREQ_454_MHz
109#define CPUFREQ_SLEEP IMX233_CPUFREQ_454_MHz
110
70void imx233_enable_interrupt(int src, bool enable); 111void imx233_enable_interrupt(int src, bool enable);
71void imx233_softirq(int src, bool enable); 112void imx233_softirq(int src, bool enable);
72void udelay(unsigned us); 113void udelay(unsigned us);