diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-02-09 14:18:12 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-02-09 14:18:12 +0000 |
commit | c2600d82896f821d843efd8c6925c86725e1460c (patch) | |
tree | 6d73675263e74419d4c3c003e4df634a4514f97f /firmware | |
parent | e8b443052de7d29b937610a6689ed5d6dbde25a8 (diff) | |
download | rockbox-c2600d82896f821d843efd8c6925c86725e1460c.tar.gz rockbox-c2600d82896f821d843efd8c6925c86725e1460c.zip |
iRiver: Temporary speed improvement by removing LCD waitstates. Enabled instruction cache.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5869 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/crt0.S | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/firmware/crt0.S b/firmware/crt0.S index 339366582f..25c32d1a58 100644 --- a/firmware/crt0.S +++ b/firmware/crt0.S | |||
@@ -158,7 +158,7 @@ irq_handler: | |||
158 | move.l %d0,(0x08c,%a0) | 158 | move.l %d0,(0x08c,%a0) |
159 | move.l #0x00000075,%d0 /* CSMR1 - 64K, Only data access */ | 159 | move.l #0x00000075,%d0 /* CSMR1 - 64K, Only data access */ |
160 | move.l %d0,(0x090,%a0) | 160 | move.l %d0,(0x090,%a0) |
161 | move.l #0x00002180,%d0 /* CSCR1 - 8 wait states, 16 bits, no bursts */ | 161 | move.l #0x00000180,%d0 /* CSCR1 - 0 wait states, 16 bits, no bursts */ |
162 | move.l %d0,(0x094,%a0) | 162 | move.l %d0,(0x094,%a0) |
163 | 163 | ||
164 | /* Chip select 2 - ATA controller */ | 164 | /* Chip select 2 - ATA controller */ |
@@ -235,6 +235,20 @@ irq_handler: | |||
235 | move.l %d0,(0x108,%a0) | 235 | move.l %d0,(0x108,%a0) |
236 | #endif | 236 | #endif |
237 | 237 | ||
238 | /* Invalicate cache */ | ||
239 | move.l #0x01000000,%d0 | ||
240 | movec.l %d0,%cacr | ||
241 | |||
242 | /* Enable cache, default=non-cacheable,no buffered writes */ | ||
243 | move.l #0x80000000,%d0 | ||
244 | movec.l %d0,%cacr | ||
245 | |||
246 | /* Cache enabled in SDRAM only, buffered writes enabled */ | ||
247 | move.l #0x3103c020,%d0 | ||
248 | movec.l %d0,%acr0 | ||
249 | move.l #0,%d0 | ||
250 | movec.l %d0,%acr1 | ||
251 | |||
238 | #ifndef BOOTLOADER | 252 | #ifndef BOOTLOADER |
239 | lea _iramcopy,%a2 | 253 | lea _iramcopy,%a2 |
240 | lea _iramstart,%a3 | 254 | lea _iramstart,%a3 |
@@ -267,6 +281,17 @@ irq_handler: | |||
267 | bra .dataloop | 281 | bra .dataloop |
268 | .dataloopend: | 282 | .dataloopend: |
269 | 283 | ||
284 | /* Munge the main stack */ | ||
285 | lea _stackbegin,%a2 | ||
286 | lea _stackend,%a4 | ||
287 | move.l #0xdeadbeef,%d0 | ||
288 | .mungeloop: | ||
289 | cmp.l %a2,%a4 | ||
290 | beq .mungeloopend | ||
291 | move.l %d0,(%a2)+ | ||
292 | bra .mungeloop | ||
293 | .mungeloopend: | ||
294 | |||
270 | lea stackend,%sp | 295 | lea stackend,%sp |
271 | jsr main | 296 | jsr main |
272 | .hoo: | 297 | .hoo: |