summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/system-imx233.c
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2011-07-23 11:45:18 +0000
committerAmaury Pouly <pamaury@rockbox.org>2011-07-23 11:45:18 +0000
commit06c94740e510d0ce04e069f34631a0539e9e6742 (patch)
tree64035ab2001e3820ab0dd61e328d5fa16140f4c0 /firmware/target/arm/imx233/system-imx233.c
parent3f8bf5e041fe052c859f283c9309118f3e791440 (diff)
downloadrockbox-06c94740e510d0ce04e069f34631a0539e9e6742.tar.gz
rockbox-06c94740e510d0ce04e069f34631a0539e9e6742.zip
imx233/fuze+: prepare target to enable MMU
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30199 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx233/system-imx233.c')
-rw-r--r--firmware/target/arm/imx233/system-imx233.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/firmware/target/arm/imx233/system-imx233.c b/firmware/target/arm/imx233/system-imx233.c
index 58f12506df..c4a32dd46e 100644
--- a/firmware/target/arm/imx233/system-imx233.c
+++ b/firmware/target/arm/imx233/system-imx233.c
@@ -141,6 +141,25 @@ void imx233_softirq(int src, bool enable)
141 __REG_CLR(HW_ICOLL_INTERRUPT(src)) = HW_ICOLL_INTERRUPT__SOFTIRQ; 141 __REG_CLR(HW_ICOLL_INTERRUPT(src)) = HW_ICOLL_INTERRUPT__SOFTIRQ;
142} 142}
143 143
144static void set_page_tables(void)
145{
146 /* map every memory region to itself */
147 map_section(0, 0, 0x1000, CACHE_NONE);
148
149 /* map RAM and enable caching for it */
150 map_section(DRAM_ORIG, DRAM_ORIG, MEMORYSIZE, CACHE_ALL);
151
152 /* enable buffered writing for the framebuffer */
153 map_section((int)FRAME, (int)FRAME, 1, BUFFERED);
154}
155
156void memory_init(void)
157{
158 ttb_init();
159 set_page_tables();
160 enable_mmu();
161}
162
144void system_init(void) 163void system_init(void)
145{ 164{
146 /* disable all interrupts */ 165 /* disable all interrupts */
@@ -158,14 +177,6 @@ void system_init(void)
158 imx233_timrot_init(); 177 imx233_timrot_init();
159 imx233_dma_init(); 178 imx233_dma_init();
160 imx233_ssp_init(); 179 imx233_ssp_init();
161 imx233_i2c_init();
162}
163
164void power_off(void)
165{
166 /* power down */
167 HW_POWER_RESET = HW_POWER_RESET__UNLOCK | HW_POWER_RESET__PWD;
168 while(1);
169} 180}
170 181
171bool imx233_us_elapsed(uint32_t ref, unsigned us_delay) 182bool imx233_us_elapsed(uint32_t ref, unsigned us_delay)