1 #define TRUE 1
2 #define FALSE 0
4 #define ibl_MAGIC_VALUE 0xCEC11EBB
6 #define ibl_HIGHEST_PRIORITY 1
7 #define ibl_LOWEST_PRIORITY 10
8 #define ibl_DEVICE_NOBOOT 20
10 #define SETIP(array,i0,i1,i2,i3) array[0]=(i0); \
11 array[1]=(i1); \
12 array[2]=(i2); \
13 array[3]=(i3)
15 #define ibl_BOOT_FORMAT_AUTO 0
16 #define ibl_BOOT_FORMAT_NAME 1
17 #define ibl_BOOT_FORMAT_BIS 2
18 #define ibl_BOOT_FORMAT_COFF 3
19 #define ibl_BOOT_FORMAT_ELF 4
20 #define ibl_BOOT_FORMAT_BBLOB 5
21 #define ibl_BOOT_FORMAT_BTBL 6
23 #define ibl_MAIN_PLL 0
24 #define ibl_DDR_PLL 1
25 #define ibl_NET_PLL 2
28 menuitem "EVM c6472 IBL";
30 hotmenu setConfig_c6472()
31 {
32 ibl.iblMagic = ibl_MAGIC_VALUE;
34 ibl.pllConfig[ibl_MAIN_PLL].doEnable = TRUE;
35 ibl.pllConfig[ibl_MAIN_PLL].prediv = 1;
36 ibl.pllConfig[ibl_MAIN_PLL].mult = 28;
37 ibl.pllConfig[ibl_MAIN_PLL].postdiv = 1;
38 ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 700;
40 /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
41 ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
43 /* The network PLL. The multipliers/dividers are fixed */
44 ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
46 /* EMIF configuration. The values are for DDR at 533 MHz */
47 ibl.ddrConfig.configDdr = TRUE;
49 ibl.ddrConfig.uEmif.emif3p1.sdcfg = 0x00538832; /* timing, 32bit wide */
50 ibl.ddrConfig.uEmif.emif3p1.sdrfc = 0x0000073B; /* Refresh 533Mhz */
51 ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x47245BD2; /* Timing 1 */
52 ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x0125DC44; /* Timing 2 */
53 ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x50001906; /* PHY read latency for CAS 5 is 5 + 2 - 1 */
55 /* Ethernet configuration for port 0 */
56 ibl.ethConfig[0].ethPriority = ibl_HIGHEST_PRIORITY;
57 ibl.ethConfig[0].port = 0;
59 /* Bootp is disabled. The server and file name are provided here */
60 ibl.ethConfig[0].doBootp = FALSE;
61 ibl.ethConfig[0].useBootpServerIp = FALSE;
62 ibl.ethConfig[0].useBootpFileName = FALSE;
63 ibl.ethConfig[0].bootFormat = ibl_BOOT_FORMAT_BBLOB;
66 SETIP(ibl.ethConfig[0].ethInfo.ipAddr, 10,218,109,35);
67 SETIP(ibl.ethConfig[0].ethInfo.serverIp, 10,218,109,196);
68 SETIP(ibl.ethConfig[0].ethInfo.gatewayIp, 10,218,109,1);
69 SETIP(ibl.ethConfig[0].ethInfo.netmask, 255,255,255,0);
71 /* Leave the hardware address as 0 so the e-fuse value will be used */
73 strcpy (ibl.ethConfig[0].ethInfo.fileName, "test.blob");
75 /* Even though the entire range of DDR2 is chosen, the load will
76 * stop when the ftp reaches the end of the file */
77 ibl.ethConfig[0].blob.startAddress = 0xe0000000; /* Base address of DDR2 */
78 ibl.ethConfig[0].blob.sizeBytes = 0x20000000; /* All of DDR2 */
79 ibl.ethConfig[0].blob.branchAddress = 0xe0000000; /* Base of DDR2 */
81 /* For port 1 use bootp */
82 /* Ethernet configuration for port 0 */
83 ibl.ethConfig[1].ethPriority = ibl_HIGHEST_PRIORITY + 1;
84 ibl.ethConfig[1].port = 1;
86 /* Bootp is disabled. The server and file name are provided here */
87 ibl.ethConfig[1].doBootp = TRUE;
88 ibl.ethConfig[1].useBootpServerIp = TRUE;
89 ibl.ethConfig[1].useBootpFileName = TRUE;
90 ibl.ethConfig[1].bootFormat = ibl_BOOT_FORMAT_BBLOB;
93 /* SGMII not present */
94 ibl.sgmiiConfig[0].adviseAbility = 0;
95 ibl.sgmiiConfig[0].control = 0;
96 ibl.sgmiiConfig[0].txConfig = 0;
97 ibl.sgmiiConfig[0].rxConfig = 0;
98 ibl.sgmiiConfig[0].auxConfig = 0;
100 ibl.sgmiiConfig[1].adviseAbility = 0;
101 ibl.sgmiiConfig[1].control = 0;
102 ibl.sgmiiConfig[1].txConfig = 0;
103 ibl.sgmiiConfig[1].rxConfig = 0;
104 ibl.sgmiiConfig[1].auxConfig = 0;
107 /* Leave the hardware address as 0 so the e-fuse value will be used */
108 /* Leave all remaining fields as 0 since bootp will fill them in */
111 /* Even though the entire range of DDR2 is chosen, the load will
112 * stop when the ftp reaches the end of the file */
113 ibl.ethConfig[1].blob.startAddress = 0xe0000000; /* Base address of DDR2 */
114 ibl.ethConfig[1].blob.sizeBytes = 0x20000000; /* All of DDR2 */
115 ibl.ethConfig[1].blob.branchAddress = 0xe0000000; /* Base of DDR2 */
119 /* MDIO configuration */
120 ibl.mdioConfig.nMdioOps = 8;
121 ibl.mdioConfig.mdioClkDiv = 0x20;
122 ibl.mdioConfig.interDelay = 1400; /* ~2ms at 700 MHz */
124 ibl.mdioConfig.mdio[0] = (1 << 30) | (27 << 21) | (24 << 16) | 0x848b;
125 ibl.mdioConfig.mdio[1] = (1 << 30) | (20 << 21) | (24 << 16) | 0x0ce0;
126 ibl.mdioConfig.mdio[2] = (1 << 30) | (24 << 21) | (24 << 16) | 0x4101;
127 ibl.mdioConfig.mdio[3] = (1 << 30) | ( 0 << 21) | (24 << 16) | 0x9140;
129 ibl.mdioConfig.mdio[4] = (1 << 30) | (27 << 21) | (25 << 16) | 0x848b;
130 ibl.mdioConfig.mdio[5] = (1 << 30) | (20 << 21) | (25 << 16) | 0x0ce0;
131 ibl.mdioConfig.mdio[6] = (1 << 30) | (24 << 21) | (25 << 16) | 0x4101;
132 ibl.mdioConfig.mdio[7] = (1 << 30) | ( 0 << 21) | (25 << 16) | 0x9140;
135 /* Nand boot is disabled */
136 ibl.nandConfig.nandPriority = ibl_DEVICE_NOBOOT;
138 }
141 menuitem "EVM c6474 Mez IBL";
143 hotmenu setConfig_c6474()
144 {
145 ibl.iblMagic = ibl_MAGIC_VALUE;
147 ibl.pllConfig[ibl_MAIN_PLL].doEnable = TRUE;
148 ibl.pllConfig[ibl_MAIN_PLL].prediv = 1;
149 ibl.pllConfig[ibl_MAIN_PLL].mult = 20;
150 ibl.pllConfig[ibl_MAIN_PLL].postdiv = 1;
151 ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
153 /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
154 ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
156 /* The network PLL. The multipliers/dividers are fixed */
157 ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
159 /* EMIF configuration. The values are for DDR at 533 MHz */
160 ibl.ddrConfig.configDdr = TRUE;
162 ibl.ddrConfig.uEmif.emif3p1.sdcfg = 0x00d38a32; /* cas5, 8 banks, 10 bit column */
163 ibl.ddrConfig.uEmif.emif3p1.sdrfc = 0x00000a29; /* Refresh 333Mhz */
164 ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x4d246c9a; /* Timing 1 */
165 ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x00993c42; /* Timing 2 */
166 ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x50001906; /* PHY read latency for CAS 5 is 5 + 2 - 1 */
169 /* Ethernet configuration for port 0 */
170 ibl.ethConfig[0].ethPriority = ibl_HIGHEST_PRIORITY;
171 ibl.ethConfig[0].port = 0;
173 /* Bootp is disabled. The server and file name are provided here */
174 ibl.ethConfig[0].doBootp = FALSE;
175 ibl.ethConfig[0].useBootpServerIp = FALSE;
176 ibl.ethConfig[0].useBootpFileName = FALSE;
177 ibl.ethConfig[0].bootFormat = ibl_BOOT_FORMAT_BLOB;
179 SETIP(ibl.ethConfig[0].ethInfo.ipAddr, 10,218,109,35);
180 SETIP(ibl.ethConfig[0].ethInfo.serverIp, 10,218,109,196);
181 SETIP(ibl.ethConfig[0].ethInfo.gatewayIp, 10,218,109,1);
182 SETIP(ibl.ethConfig[0].ethInfo.netmask, 255,255,255,0);
184 /* Set the hardware address as 0 so the e-fuse value will be used */
185 ibl.ethConfig[0].hwAddress[0] = 0;
186 ibl.ethConfig[0].hwAddress[1] = 0;
187 ibl.ethConfig[0].hwAddress[2] = 0;
188 ibl.ethConfig[0].hwAddress[3] = 0;
189 ibl.ethConfig[0].hwAddress[4] = 0;
190 ibl.ethConfig[0].hwAddress[5] = 0;
193 ibl.ethConfig[0].ethInfo.fileName[0] = 't';
194 ibl.ethConfig[0].ethInfo.fileName[1] = 'e';
195 ibl.ethConfig[0].ethInfo.fileName[2] = 's';
196 ibl.ethConfig[0].ethInfo.fileName[3] = 't';
197 ibl.ethConfig[0].ethInfo.fileName[4] = '.';
198 ibl.ethConfig[0].ethInfo.fileName[5] = 'b';
199 ibl.ethConfig[0].ethInfo.fileName[6] = 'l';
200 ibl.ethConfig[0].ethInfo.fileName[7] = 'o';
201 ibl.ethConfig[0].ethInfo.fileName[8] = 'b';
202 ibl.ethConfig[0].ethInfo.fileName[9] = '\0';
203 ibl.ethConfig[0].ethInfo.fileName[10] = '\0';
204 ibl.ethConfig[0].ethInfo.fileName[11] = '\0';
205 ibl.ethConfig[0].ethInfo.fileName[12] = '\0';
206 ibl.ethConfig[0].ethInfo.fileName[13] = '\0';
207 ibl.ethConfig[0].ethInfo.fileName[14] = '\0';
210 /* Even though the entire range of DDR2 is chosen, the load will
211 * stop when the ftp reaches the end of the file */
212 ibl.ethConfig[0].blob.startAddress = 0xe0000000; /* Base address of DDR2 */
213 ibl.ethConfig[0].blob.sizeBytes = 0x20000000; /* All of DDR2 */
214 ibl.ethConfig[0].blob.branchAddress = 0xe0000000; /* Base of DDR2 */
216 /* There is no port 1 on the 6474 */
217 ibl.ethConfig[1].ethPriority = ibl_DEVICE_NOBOOT;
220 /* MDIO configuration */
221 ibl.mdioConfig.nMdioOps = 8;
222 ibl.mdioConfig.mdioClkDiv = 0x26;
223 ibl.mdioConfig.interDelay = 2000; /* ~2ms at 1000 MHz */
225 ibl.mdioConfig.mdio[0] = (1 << 30) | ( 4 << 21) | (27 << 16) | 0x0081;
226 ibl.mdioConfig.mdio[1] = (1 << 30) | (26 << 21) | (15 << 16) | 0x0047;
227 ibl.mdioConfig.mdio[2] = (1 << 30) | (26 << 21) | (14 << 16) | 0x0047;
228 ibl.mdioConfig.mdio[3] = (1 << 30) | ( 0 << 21) | (15 << 16) | 0x8140;
230 ibl.mdioConfig.mdio[4] = (1 << 30) | ( 0 << 21) | (14 << 16) | 0x8140;
231 ibl.mdioConfig.mdio[5] = (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
232 ibl.mdioConfig.mdio[6] = (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
233 ibl.mdioConfig.mdio[7] = (1 << 30) | ( 0 << 21) | ( 1 << 16) | 0xa100;
236 /* Nand boot is disabled */
237 ibl.nandConfig.nandPriority = ibl_DEVICE_NOBOOT;
239 }
242 menuitem "EVM c6455 IBL";
244 hotmenu setConfig_c6455()
245 {
246 ibl.iblMagic = ibl_MAGIC_VALUE;
248 ibl.pllConfig[ibl_MAIN_PLL].doEnable = TRUE;
249 ibl.pllConfig[ibl_MAIN_PLL].prediv = 1;
250 ibl.pllConfig[ibl_MAIN_PLL].mult = 20;
251 ibl.pllConfig[ibl_MAIN_PLL].postdiv = 1;
252 ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
254 /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
255 ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
257 /* The network PLL. The multipliers/dividers are fixed */
258 ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
260 /* EMIF configuration. The values are for DDR at 500 MHz */
261 ibl.ddrConfig.configDdr = TRUE;
263 ibl.ddrConfig.uEmif.emif3p1.sdcfg = 0x00538822; /* timing, 32bit wide */
264 ibl.ddrConfig.uEmif.emif3p1.sdrfc = 0x000007a2; /* Refresh 500Mhz */
265 ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x3edb4b91; /* Timing 1 */
266 ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x00a2c722; /* Timing 2 */
267 ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x00000005; /* PHY read latency for CAS 4 is 4 + 2 - 1 */
269 /* Ethernet configuration for port 0 */
270 ibl.ethConfig[0].ethPriority = ibl_HIGHEST_PRIORITY;
271 ibl.ethConfig[0].port = 0;
273 /* Bootp is disabled. The server and file name are provided here */
274 ibl.ethConfig[0].doBootp = FALSE;
275 ibl.ethConfig[0].useBootpServerIp = FALSE;
276 ibl.ethConfig[0].useBootpFileName = FALSE;
277 ibl.ethConfig[0].bootFormat = ibl_BOOT_FORMAT_BBLOB;
280 SETIP(ibl.ethConfig[0].ethInfo.ipAddr, 10,218,109,35);
281 SETIP(ibl.ethConfig[0].ethInfo.serverIp, 10,218,109,196);
282 SETIP(ibl.ethConfig[0].ethInfo.gatewayIp, 10,218,109,1);
283 SETIP(ibl.ethConfig[0].ethInfo.netmask, 255,255,255,0);
285 /* There is no e-fuse mac address. A value must be assigned
286 ibl.ethConfig[0].hwAddress[0] = 0x00;
287 ibl.ethConfig[0].hwAddress[1] = 0xe0;
288 ibl.ethConfig[0].hwAddress[2] = 0xa6;
289 ibl.ethConfig[0].hwAddress[3] = 0x66;
290 ibl.ethConfig[0].hwAddress[4] = 0x57;
291 ibl.ethConfig[0].hwAddress[5] = 0x19;
294 ibl.ethConfig[0].ethInfo.fileName[0] = 't';
295 ibl.ethConfig[0].ethInfo.fileName[1] = 'e';
296 ibl.ethConfig[0].ethInfo.fileName[2] = 's';
297 ibl.ethConfig[0].ethInfo.fileName[3] = 't';
298 ibl.ethConfig[0].ethInfo.fileName[4] = '.';
299 ibl.ethConfig[0].ethInfo.fileName[5] = 'b';
300 ibl.ethConfig[0].ethInfo.fileName[6] = 'l';
301 ibl.ethConfig[0].ethInfo.fileName[7] = 'o';
302 ibl.ethConfig[0].ethInfo.fileName[8] = 'b';
303 ibl.ethConfig[0].ethInfo.fileName[9] = '\0';
304 ibl.ethConfig[0].ethInfo.fileName[10] = '\0';
305 ibl.ethConfig[0].ethInfo.fileName[11] = '\0';
306 ibl.ethConfig[0].ethInfo.fileName[12] = '\0';
307 ibl.ethConfig[0].ethInfo.fileName[13] = '\0';
308 ibl.ethConfig[0].ethInfo.fileName[14] = '\0';
311 /* Even though the entire range of DDR2 is chosen, the load will
312 * stop when the ftp reaches the end of the file */
313 ibl.ethConfig[0].blob.startAddress = 0xe0000000; /* Base address of DDR2 */
314 ibl.ethConfig[0].blob.sizeBytes = 0x20000000; /* All of DDR2 */
315 ibl.ethConfig[0].blob.branchAddress = 0xe0000000; /* Base of DDR2 */
317 /* There is no ethernet port 1 */
318 ibl.ethConfig[1].ethPriority = ibl_DEVICE_NOBOOT;
321 /* SGMII not present */
322 ibl.sgmiiConfig[0].adviseAbility = 0;
323 ibl.sgmiiConfig[0].control = 0;
324 ibl.sgmiiConfig[0].txConfig = 0;
325 ibl.sgmiiConfig[0].rxConfig = 0;
326 ibl.sgmiiConfig[0].auxConfig = 0;
328 ibl.sgmiiConfig[1].adviseAbility = 0;
329 ibl.sgmiiConfig[1].control = 0;
330 ibl.sgmiiConfig[1].txConfig = 0;
331 ibl.sgmiiConfig[1].rxConfig = 0;
332 ibl.sgmiiConfig[1].auxConfig = 0;
336 /* MDIO configuration */
337 ibl.mdioConfig.nMdioOps = 0;
338 ibl.mdioConfig.mdioClkDiv = 0x20;
339 ibl.mdioConfig.interDelay = 2000; /* ~2ms at 1000 MHz */
341 ibl.mdioConfig.mdio[0] = (1 << 30) | (14 << 21) | (0 << 16) | 0xd5d0;
344 /* Nand boot is disabled */
345 ibl.nandConfig.nandPriority = ibl_DEVICE_NOBOOT;
347 }