1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#include <common.h>
25#include <mpc8xx.h>
26
27#define _NOT_USED_ 0xFFFFFFFF
28
29
30const uint sdram_table[] =
31{
32
33 0x1f07cc04, 0xeeaeec04, 0x11adcc04, 0xefbbac00,
34 0x1ff74c47,
35
36 0x1FF74C05,
37 _NOT_USED_,
38 _NOT_USED_,
39
40 0x1f07cc04, 0xeeaeec04, 0x00adcc04, 0x00afcc00,
41 0x00afcc00, 0x01afcc00, 0x0fbb8c00, 0x1ff74c47,
42 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
43 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
44
45 0x1f27cc04, 0xeeaeac00, 0x01b90c04, 0x1ff74c47,
46
47 0x1FF74C34,
48 0xEFEA8C34,
49 0x1FB54C35,
50 _NOT_USED_,
51
52
53 0x1f07cc04, 0xeeaeac00, 0x00ad4c00, 0x00afcc00,
54 0x00afcc00, 0x01bb8c04, 0x1ff74c47, _NOT_USED_,
55 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
56 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
57
58 0x1ff5cc84, 0xffffec04, 0xffffec04, 0xffffec04,
59 0xffffec84, 0xffffec07, _NOT_USED_, _NOT_USED_,
60 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
61
62 0x7fffec07, _NOT_USED_, _NOT_USED_, _NOT_USED_,
63};
64
65
66
67const uint dsp_disp_table[] =
68{
69
70 0xffffc80c, 0xffffc004, 0x0fffc004, 0x0fffd004,
71 0x0fffc000, 0x0fffc004, 0x3fffc004, 0xffffcc05,
72
73 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
74 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
75 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
76 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
77
78 0xffffcc0c, 0xffffc004, 0x0fffc004, 0x0fffd004,
79 0x0fffc000, 0x0fffc004, 0x7fffc004, 0xfffffc05,
80
81 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
82 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
83 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
84 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
85
86 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
87 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
88 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
89
90 _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_,
91};
92
93int checkboard (void)
94{
95 puts ("Board: FlagaDM V3.0\n");
96 return 0;
97}
98
99phys_size_t initdram (int board_type)
100{
101 volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR;
102 volatile memctl8xx_t *memctl = &immap->im_memctl;
103 long int size_b0;
104
105 memctl->memc_or2 = CONFIG_SYS_OR2;
106 memctl->memc_br2 = CONFIG_SYS_BR2;
107
108 udelay(100);
109 upmconfig(UPMA, (uint *)sdram_table, sizeof(sdram_table)/sizeof(uint));
110
111 memctl->memc_mptpr = MPTPR_PTP_DIV16;
112 memctl->memc_mamr = CONFIG_SYS_MAMR_48_SDR | MAMR_TLFA_1X;
113
114
115
116 memctl->memc_mcr = (MCR_OP_RUN | MCR_UPM_A | MCR_MB_CS2 | \
117 MCR_MLCF(1) | MCR_MAD(0x5));
118
119
120 memctl->memc_mamr = CONFIG_SYS_MAMR_48_SDR | MAMR_TLFA_2X;
121 memctl->memc_mcr = (MCR_OP_RUN | MCR_UPM_A | MCR_MB_CS2 | \
122 MCR_MLCF(2) | MCR_MAD(0x30));
123
124
125 memctl->memc_mar = 0x00000088;
126 memctl->memc_mcr = (MCR_OP_RUN | MCR_UPM_A | MCR_MB_CS2 | \
127 MCR_MLCF(1) | MCR_MAD(0x1C));
128
129
130 memctl->memc_mamr = CONFIG_SYS_MAMR_48_SDR | MAMR_TLFA_4X;
131 memctl->memc_mamr |= (MAMR_PTAE | MAMR_GPL_A4DIS);
132
133 size_b0 = 16*1024*1024;
134
135
136
137
138
139 memctl->memc_br1 = 0;
140 memctl->memc_br3 = 0;
141
142 upmconfig(UPMB, (uint *)dsp_disp_table, sizeof(dsp_disp_table)/sizeof(uint));
143
144 memctl->memc_mbmr = MBMR_GPL_B4DIS;
145
146 memctl->memc_or4 = CONFIG_SYS_OR4;
147 memctl->memc_br4 = CONFIG_SYS_BR4;
148
149 return (size_b0);
150}
151