1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 by Linus Nielsen Feltzing
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 ****************************************************************************/
25 /* Platform: iRiver H1xx */
37 /* 64K DMA-capable SRAM at 0x10000000
38 DMA is enabled and has priority in both banks
39 All types of accesses are allowed
40 (We might want to restrict that to save power) */
41 move.l #0x1000e001,%d0
44 /* 32K Non-DMA SRAM at 0x10010000
45 All types of accesses are allowed
46 (We might want to restrict that to save power) */
47 move.l #0x10010001,%d0
50 /* Chip select 0 - Flash ROM */
51 move.l #0x00000000,%d0 /* CSAR0 - Base = 0x00000000 */
52 move.l %d0,(0x080,%a0)
53 move.l #0x001f0101,%d0 /* CSMR0 - 2M, All access, write protect */
54 move.l %d0,(0x084,%a0)
55 move.l #0x00000d80,%d0 /* CSCR0 - 3 wait states, 16 bits, no bursts */
56 move.l %d0,(0x088,%a0)
58 /* Chip select 1 - LCD controller */
59 move.l #0xf0000000,%d0 /* CSAR1 - Base = 0xf0000000 */
60 move.l %d0,(0x08c,%a0)
61 move.l #0x00000075,%d0 /* CSMR1 - 64K, Only data access */
62 move.l %d0,(0x090,%a0)
63 move.l #0x00002180,%d0 /* CSCR1 - 8 wait states, 16 bits, no bursts */
64 move.l %d0,(0x094,%a0)
66 /* Chip select 2 - ATA controller */
67 move.l #0x20000000,%d0 /* CSAR2 - Base = 0x20000000 */
68 move.l %d0,(0x098,%a0)
69 move.l #0x00000075,%d0 /* CSMR2 - 64K, Only data access */
70 move.l %d0,(0x09c,%a0)
71 move.l #0x00000180,%d0 /* CSCR2 - no wait states, 16 bits, no bursts */
72 move.l %d0,(0x0a0,%a0) /* NOTE: I'm not sure about the wait states.
73 We have to be careful with the access times,
74 since IORDY isn't connected to the HDD. */
77 /* Set up the DRAM controller. The refresh is based on the 11.2896MHz
78 clock (5.6448MHz bus frequency). We haven't yet started the PLL */
79 move.l #0x80050000,%d0
80 move.l %d0,(0x100,%a0) /* DCR - Synchronous, 80 cycle refresh */
81 move.l #0x3000a520,%d0
82 move.l %d0,(0x108,%a0) /* DACR0 - Base 0x30000000, Banks on 23 and up,
83 CAS latency 3, Refresh enable */
84 move.l #0x01fc0001,%d0
85 move.l %d0,(0x10c,%a0) /* DMR0 - 32Mb */
112 .section .resetvectors
117 /* Platform: Archos Jukebox
118 * We begin with some tricks. If we have built our code to be loaded
119 * via the standalone GDB stub, we will have out VBR at some other
120 * location than 0x9000000. We must copy the trap vectors for the
121 * GDB stub to our vector table.
122 * If, on the other hand, we are running standalone we will have
123 * the VBR at 0x9000000, and the copy will not do any harm.
128 /* Move the invalid instruction vector (4) */
134 /* Move the invalid slot vector (6) */
140 /* Move the bus error vector (9) */
146 /* Move the DMA bus error vector (10) */
152 /* Move the NMI vector as well (11) */
158 /* Move the breakpoint trap vector (32) */
164 /* Move the IO trap vector (33) */
170 /* Move the serial Rx interrupt vector (105) */
176 /* Move the single step trap vector (127) */
184 /* Now let's get on with the normal business */
198 /* copy the .iram section */
211 /* copy the .data section, for rombased execution */
215 /* Don't copy if src and dest are equal */
227 /* Munge the main thread stack */
230 mov.l stackbegin_k,r1
278 .section .resetvectors