summaryrefslogtreecommitdiff
path: root/board/tb0229/lowlevel_init.S
blob: 5fce8567d795e01487a021b09cd9c2dcd2690cd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
 *  Memory sub-system initialization code for TANBAC Evaluation board TB0229.
 *
 *  Copyright (c) 2003  Masami Komiya <mkomiya@sonare.it>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2, or (at
 * your option) any later version.
 */

#include <config.h>
#include <asm/regdef.h>


	.globl  lowlevel_init
lowlevel_init:

	/* BCUCNTREG1 = 0x0040 */
	la	t0, 0xaf000000
	li	t1, 0x0040
	sh	t1, 0(t0)

	/* ROMSIZEREG = 0x3333 */
	la	t0, 0xaf000004
	li	t1, 0x3333
	sh	t1, 0(t0)

	/* ROMSPEEDREG = 0x3003 */
	la	t0, 0xaf000006
	li	t1, 0x3003
	sh	t1, 0(t0)

	/* BCUCNTREG3 = 0 */
	la	t0, 0xaf000016
	li	t1, 0x0000
	sh	t1, 0(t0)

	/* CMUCLKMSK */
	la	t0, 0xaf000060
	li	t1, 0x39a2
	sh	t1, 0(t0)

	/* PMUCNTREG */
	la	t0, 0xaf0000c2
	li	t1, 0x0006
	sh	t1, 0(t0)

	/* SDRAMMODEREG = 0x8029 */
	la	t0, 0xaf000400
	li	t1, 0x8029
	sh	t1, 0(t0)

	/* SDRAMCNTREG = 0x2322 */
	la	t0, 0xaf000402
	li	t1, 0x2322
	sh	t1, 0(t0)

	/* BCURFCNTREG = 0x0106 */
	la	t0, 0xaf000404
	li	t1, 0x0106
	sh	t1, 0(t0)

	/* RAMSZEREG = 0x5555 (64MB Bank) */
	la	t0, 0xaf000408
	li	t1, 0x5555
	sh	t1, 0(t0)

	j       ra
	nop