]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blob - src/util/i2cConfig/i2cConfig.gel
Merge pull request #3 in PROCESSOR-SDK/ibl from PRSDK-5675 to master
[keystone-rtos/ibl.git] / src / util / i2cConfig / i2cConfig.gel
1 #define TRUE  1
2 #define FALSE 0
4 #define ibl_MAGIC_VALUE                  0xCEC11EBC
6 #define ibl_HIGHEST_PRIORITY     1  
7 #define ibl_LOWEST_PRIORITY     10
8 #define ibl_DEVICE_NOBOOT       20
10 #define ibl_PORT_SWITCH_ALL     -2
12 #define SETIP(array,i0,i1,i2,i3)      array[0]=(i0);  \
13                                       array[1]=(i1);  \
14                                       array[2]=(i2);  \
15                                       array[3]=(i3)
17 #define  ibl_BOOT_MODE_TFTP     10
18 #define  ibl_BOOT_MODE_NAND     11
19 #define  ibl_BOOT_MODE_NOR      12
20 #define  ibl_BOOT_MODE_NONE     13
23 #define ibl_BOOT_FORMAT_AUTO    0
24 #define ibl_BOOT_FORMAT_NAME    1
25 #define ibl_BOOT_FORMAT_BIS     2
26 #define ibl_BOOT_FORMAT_COFF    3
27 #define ibl_BOOT_FORMAT_ELF     4
28 #define ibl_BOOT_FORMAT_BBLOB    5
29 #define ibl_BOOT_FORMAT_BTBL    6
31 #define  ibl_PMEM_IF_GPIO         0
33 #define  ibl_PMEM_IF_CHIPSEL_2    2   /* EMIF interface using chip select 2, no wait enabled */
34 #define  ibl_PMEM_IF_CHIPSEL_3    3   /* EMIF interface using chip select 3, no wait enabled */
35 #define  ibl_PMEM_IF_CHIPSEL_4    4   /* EMIF interface using chip select 4 */
36 #define  ibl_PMEM_IF_CHIPSEL_5    5   /* EMIF interface using chip select 5 */
38 #define  ibl_PMEM_IF_SPI          100 /* Interface through SPI */
41 #define ibl_MAIN_PLL    0
42 #define ibl_DDR_PLL     1
43 #define ibl_NET_PLL     2
45 #define ibl_EMIF4_ENABLE_sdRamConfig                  (1 <<  0)
46 #define  ibl_EMIF4_ENABLE_sdRamConfig2                (1 <<  1)
47 #define  ibl_EMIF4_ENABLE_sdRamRefreshCtl             (1 <<  2)
48 #define  ibl_EMIF4_ENABLE_sdRamTiming1                (1 <<  3)
49 #define  ibl_EMIF4_ENABLE_sdRamTiming2                (1 <<  4)
50 #define  ibl_EMIF4_ENABLE_sdRamTiming3                (1 <<  5)
51 #define  ibl_EMIF4_ENABLE_lpDdrNvmTiming              (1 <<  6)
52 #define  ibl_EMIF4_ENABLE_powerManageCtl              (1 <<  7)
53 #define  ibl_EMIF4_ENABLE_iODFTTestLogic              (1 <<  8)
54 #define  ibl_EMIF4_ENABLE_performCountCfg             (1 <<  9)
55 #define  ibl_EMIF4_ENABLE_performCountMstRegSel       (1 << 10)
56 #define  ibl_EMIF4_ENABLE_readIdleCtl                 (1 << 11)
57 #define  ibl_EMIF4_ENABLE_sysVbusmIntEnSet            (1 << 12)
58 #define  ibl_EMIF4_ENABLE_sdRamOutImpdedCalCfg        (1 << 13)
59 #define  ibl_EMIF4_ENABLE_tempAlterCfg                (1 << 14)
60 #define  ibl_EMIF4_ENABLE_ddrPhyCtl1                  (1 << 15)
61 #define  ibl_EMIF4_ENABLE_ddrPhyCtl2                  (1 << 16)
62 #define  ibl_EMIF4_ENABLE_priClassSvceMap             (1 << 17)
63 #define  ibl_EMIF4_ENABLE_mstId2ClsSvce1Map           (1 << 18)
64 #define  ibl_EMIF4_ENABLE_mstId2ClsSvce2Map           (1 << 11)
65 #define  ibl_EMIF4_ENABLE_eccCtl                      (1 << 19)
66 #define  ibl_EMIF4_ENABLE_eccRange1                   (1 << 20)
67 #define  ibl_EMIF4_ENABLE_eccRange2                   (1 << 21)
68 #define  ibl_EMIF4_ENABLE_rdWrtExcThresh              (1 << 22)
69 #define  ibl_BOOT_EMIF4_ENABLE_ALL                    0x007fffff
72 #define ibl_EVM_C6455L  0x10    /**< C6455 Low Cost EVM */
73 #define ibl_EVM_C6457L  0x20    /**< C6457 Low Cost EVM */
74 #define ibl_EVM_C6472L  0x30    /**< C6472 Low Cost EVM */
75 #define ibl_EVM_C6474L  0x40    /**< C6474 Low Cost EVM */
76 #define ibl_EVM_C6474M  0x41    /**< C6474 Mez EVM */
77 #define ibl_EVM_C6670L  0x50    /**< C6670 Low Cost EVM */
78 #define ibl_EVM_C6678L  0x60    /**< C6678 Low Cost EVM */
79 #define ibl_EVM_C6657L  0x70    /**< C6657 Low Cost EVM */    
80 #define ibl_EVM_TCI6634K2K  0x80        /**< TCI6634K2K Low Cost EVM */    
81 /* @} */  
83 menuitem "EVM c6472 IBL";
85 hotmenu setConfig_c6472()
86 {
87     ibl.iblMagic = ibl_MAGIC_VALUE;
88     ibl.iblEvmType = ibl_EVM_C6472L;
90     ibl.pllConfig[ibl_MAIN_PLL].doEnable      = TRUE;
91     ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
92     ibl.pllConfig[ibl_MAIN_PLL].mult          = 28;
93     ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 1;
94     ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 700;
96     /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
97     ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
99     /* The network PLL. The multipliers/dividers are fixed */
100     ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
102     /* EMIF configuration. The values are for DDR at 533 MHz  */
103     ibl.ddrConfig.configDdr = TRUE;
105     ibl.ddrConfig.uEmif.emif3p1.sdcfg  = 0x00538832; /* timing, 32bit wide */
106     ibl.ddrConfig.uEmif.emif3p1.sdrfc  = 0x0000073B; /* Refresh 533Mhz */ 
107     ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x47245BD2; /* Timing 1 */
108     ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x0125DC44; /* Timing 2 */
109     ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x50001906; /* PHY read latency for CAS 5 is 5 + 2 - 1 */
111     /* SGMII not present */
112     ibl.sgmiiConfig[0].configure = FALSE;
113     ibl.sgmiiConfig[1].configure = FALSE;
115     /* MDIO configuration */
116     ibl.mdioConfig.nMdioOps = 8;
117     ibl.mdioConfig.mdioClkDiv = 0x20;
118     ibl.mdioConfig.interDelay = 1400;   /* ~2ms at 700 MHz */
120     ibl.mdioConfig.mdio[0] =  (1 << 30) | (27 << 21) | (24 << 16) | 0x848b;
121     ibl.mdioConfig.mdio[1] =  (1 << 30) | (20 << 21) | (24 << 16) | 0x0ce0;
122     ibl.mdioConfig.mdio[2] =  (1 << 30) | (24 << 21) | (24 << 16) | 0x4101;
123     ibl.mdioConfig.mdio[3] =  (1 << 30) | ( 0 << 21) | (24 << 16) | 0x9140;
125     ibl.mdioConfig.mdio[4] =  (1 << 30) | (27 << 21) | (25 << 16) | 0x848b;
126     ibl.mdioConfig.mdio[5] =  (1 << 30) | (20 << 21) | (25 << 16) | 0x0ce0;
127     ibl.mdioConfig.mdio[6] =  (1 << 30) | (24 << 21) | (25 << 16) | 0x4101;
128     ibl.mdioConfig.mdio[7] =  (1 << 30) | ( 0 << 21) | (25 << 16) | 0x9140;
130     /* spiConfig and emifConfig not needed */
132     /* Ethernet configuration for Boot mode 0 */
133     ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
134     ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
135     ibl.bootModes[0].port     = 0;
137     /* Bootp is disabled. The server and file name are provided here */
138     ibl.bootModes[0].u.ethBoot.doBootp          = FALSE;
139     ibl.bootModes[0].u.ethBoot.useBootpServerIp = TRUE;
140     ibl.bootModes[0].u.ethBoot.useBootpFileName = TRUE;
141     ibl.bootModes[0].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
143     /* Even though the entire range of DDR2 is chosen, the load will
144      * stop when the ftp reaches the end of the file */
145     ibl.bootModes[0].u.ethBoot.blob.startAddress  = 0xe0000000;       /* Base address of DDR2 */
146     ibl.bootModes[0].u.ethBoot.blob.sizeBytes     = 0x20000000;       /* All of DDR2 */
147     ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0xe0000000;       /* Base of DDR2 */
149     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr,    158,218,100,113);
150     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp,  158,218,100,25);
151     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 158,218,100,2);
152     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask,   255,255,255,0);
154     /* Leave the hardware address as 0 so the e-fuse value will be used */
155     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 0;
156     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 0;
157     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 0;
158     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 0;
159     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 0;
160     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 0;
162     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0]  = 'c';
163     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1]  = '6';
164     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2]  = '4';
165     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3]  = '7';
166     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4]  = '2';
167     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5]  = '-';
168     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6]  = 'l';
169     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7]  = 'e';
170     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8]  = '.';
171     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9]  = 'b';
172     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'i';
173     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'n';
174     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = '\0';
175     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
176     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
178     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NAND;
179     ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY;
180     ibl.bootModes[1].port     = 0;
182     ibl.bootModes[1].u.nandBoot.bootFormat              = ibl_BOOT_FORMAT_BBLOB;
183     ibl.bootModes[1].u.nandBoot.bootAddress[0][0]         = 0x200000;         /* Image 0 NAND offset address (block 1) in LE mode */
184     ibl.bootModes[1].u.nandBoot.bootAddress[0][1]         = 0x4000000;      /* Image 1 NAND offset address (block 2048) in LE mode */
185     ibl.bootModes[1].u.nandBoot.bootAddress[1][0]         = 0x200000;       /* Image 0 NAND offset address (block 1) in BE mode */
186     ibl.bootModes[1].u.nandBoot.bootAddress[1][1]         = 0x4000000;      /* Image 1 NAND offset address (block 2048) in BE mode */
187     ibl.bootModes[1].u.nandBoot.interface         = ibl_PMEM_IF_GPIO;
189     ibl.bootModes[1].u.nandBoot.blob[0][0].startAddress  = 0xe0000000;       /* Image 0 load start address in LE mode */
190     ibl.bootModes[1].u.nandBoot.blob[0][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in LE mode */
191     ibl.bootModes[1].u.nandBoot.blob[0][0].branchAddress = 0xe0000000;       /* Image 0 branch address after loading in LE mode */
192     ibl.bootModes[1].u.nandBoot.blob[0][1].startAddress  = 0xe0000000;       /* Image 1 load start address in LE mode */
193     ibl.bootModes[1].u.nandBoot.blob[0][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in LE mode */
194     ibl.bootModes[1].u.nandBoot.blob[0][1].branchAddress = 0xe0000000;       /* Image 1 branch address after loading in LE mode */
195     ibl.bootModes[1].u.nandBoot.blob[1][0].startAddress  = 0xe0000000;       /* Image 0 load start address in BE mode */
196     ibl.bootModes[1].u.nandBoot.blob[1][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in BE mode */
197     ibl.bootModes[1].u.nandBoot.blob[1][0].branchAddress = 0xe0000000;       /* Image 0 branch address after loading in BE mode */
198     ibl.bootModes[1].u.nandBoot.blob[1][1].startAddress  = 0xe0000000;       /* Image 1 load start address in BE mode */
199     ibl.bootModes[1].u.nandBoot.blob[1][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in BE mode */
200     ibl.bootModes[1].u.nandBoot.blob[1][1].branchAddress = 0xe0000000;       /* Image 1 branch address after loading in BE mode */
203     ibl.bootModes[1].u.nandBoot.nandInfo.busWidthBits  = 8;
204     ibl.bootModes[1].u.nandBoot.nandInfo.pageSizeBytes = 2048;
205     ibl.bootModes[1].u.nandBoot.nandInfo.pageEccBytes  = 64;
206     ibl.bootModes[1].u.nandBoot.nandInfo.pagesPerBlock = 64;
207     ibl.bootModes[1].u.nandBoot.nandInfo.totalBlocks   = 512;
209     ibl.bootModes[1].u.nandBoot.nandInfo.addressBytes  = 4;
210     ibl.bootModes[1].u.nandBoot.nandInfo.lsbFirst      = TRUE;
211     ibl.bootModes[1].u.nandBoot.nandInfo.blockOffset   = 22;
212     ibl.bootModes[1].u.nandBoot.nandInfo.pageOffset    = 16;
213     ibl.bootModes[1].u.nandBoot.nandInfo.columnOffset  = 0;
215     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[0]  = 0; 
216     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[1]  = 1; 
217     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[2]  = 2; 
218     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[3]  = 3; 
219     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[4]  = 4; 
220     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[5]  = 6; 
221     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[6]  = 7; 
222     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[7]  = 13; 
223     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[8]  = 14; 
224     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[9]  = 15; 
226     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[0]= 0;
227     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[1]= 0xff;
229     ibl.bootModes[1].u.nandBoot.nandInfo.resetCommand    = 0xff;
230     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPre  = 0;
231     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPost = 0;
232     ibl.bootModes[1].u.nandBoot.nandInfo.postCommand     = FALSE;
234     /* bootMode[2] not configured */
235     ibl.bootModes[2].bootMode = ibl_BOOT_MODE_NONE;
236     
237     ibl.chkSum = 0;
241 menuitem "EVM c6474 Mez IBL";
243 hotmenu setConfig_c6474()
245     ibl.iblMagic = ibl_MAGIC_VALUE;
246     ibl.iblEvmType = ibl_EVM_C6474M;
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 533 MHz  */
261     ibl.ddrConfig.configDdr = TRUE;
263     ibl.ddrConfig.uEmif.emif3p1.sdcfg  = 0x00d38a32; /* cas5, 8 banks, 10 bit column */
264     ibl.ddrConfig.uEmif.emif3p1.sdrfc  = 0x00000a29; /* Refresh 333Mhz */ 
265     ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x4d246c9a; /* Timing 1 */
266     ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x00993c42; /* Timing 2 */
267     ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x50001906; /* PHY read latency for CAS 5 is 5 + 2 - 1 */
269     /* SGMII 0 is present */
270     ibl.sgmiiConfig[0].configure = TRUE;
271     ibl.sgmiiConfig[0].adviseAbility = 0x9801;
272     ibl.sgmiiConfig[0].control       = 0x20;
273     ibl.sgmiiConfig[0].txConfig      = 0x00000ea3;
274     ibl.sgmiiConfig[0].rxConfig      = 0x00081023;
275     ibl.sgmiiConfig[0].auxConfig     = 0x0000000b;
277     /* There is no port 1 on the 6474 */
278     ibl.sgmiiConfig[1].configure = FALSE;
280     /* MDIO configuration */
281     ibl.mdioConfig.nMdioOps = 8;
282     ibl.mdioConfig.mdioClkDiv = 0x26;
283     ibl.mdioConfig.interDelay = 2000;   /* ~2ms at 1000 MHz */
285     ibl.mdioConfig.mdio[0] =  (1 << 30) | ( 4 << 21) | (27 << 16) | 0x0081;
286     ibl.mdioConfig.mdio[1] =  (1 << 30) | (26 << 21) | (14 << 16) | 0x0047;
287     ibl.mdioConfig.mdio[2] =  (1 << 30) | (26 << 21) | (13 << 16) | 0x0047;
288     ibl.mdioConfig.mdio[3] =  (1 << 30) | ( 0 << 21) | (14 << 16) | 0x8140;
290     ibl.mdioConfig.mdio[4] =  (1 << 30) | ( 0 << 21) | (13 << 16) | 0x8140;
291     ibl.mdioConfig.mdio[5] =  (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
292     ibl.mdioConfig.mdio[6] =  (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
293     ibl.mdioConfig.mdio[7] =  (1 << 30) | ( 0 << 21) | ( 1 << 16) | 0x9140;
295     /* spiConfig and emifConfig not needed */
297     /* Ethernet configuration for Boot mode 0 */
298     ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
299     ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
300     ibl.bootModes[0].port     = 0;
302     /* Bootp is disabled. The server and file name are provided here */
303     ibl.bootModes[0].u.ethBoot.doBootp          = FALSE;
304     ibl.bootModes[0].u.ethBoot.useBootpServerIp = TRUE;
305     ibl.bootModes[0].u.ethBoot.useBootpFileName = TRUE;
306     ibl.bootModes[0].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
308     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr,    10,218,109,35);
309     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp,  10,218,109,196);
310     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 10,218,109,1);
311     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask,   255,255,255,0);
313     /* Set the hardware address as 0 so the e-fuse value will be used */
314     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 0;
315     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 0;
316     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 0;
317     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 0;
318     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 0;
319     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 0;
321     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0]  = 'c';
322     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1]  = '6';
323     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2]  = '4';
324     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3]  = '7';
325     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4]  = '4';
326     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5]  = '-';
327     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6]  = 'l';
328     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7]  = 'e';
329     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8]  = '.';
330     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9]  = 'b';
331     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'i';
332     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'n';
333     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = '\0';
334     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
335     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
337     /* Even though the entire range of DDR2 is chosen, the load will
338      * stop when the ftp reaches the end of the file */
339     ibl.bootModes[0].u.ethBoot.blob.startAddress  = 0x80000000;       /* Base address of DDR2 */
340     ibl.bootModes[0].u.ethBoot.blob.sizeBytes     = 0x20000000;       /* All of DDR2 */
341     ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0x80000000;       /* Base of DDR2 */
343     /* Alternative bootMode not configured for now */
344     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NONE;
346     ibl.chkSum = 0;
349 menuitem "EVM c6474 Lite EVM IBL";
351 hotmenu setConfig_c6474lite()
353     ibl.iblMagic = ibl_MAGIC_VALUE;
354     ibl.iblEvmType = ibl_EVM_C6474L;
356     ibl.pllConfig[ibl_MAIN_PLL].doEnable      = TRUE;
357     ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
358     ibl.pllConfig[ibl_MAIN_PLL].mult          = 20;
359     ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 1;
360     ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
362     /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
363     ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
365     /* The network PLL. The multipliers/dividers are fixed */
366     ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
368     /* EMIF configuration. The values are for DDR at 533 MHz  */
369     ibl.ddrConfig.configDdr = TRUE;
371     ibl.ddrConfig.uEmif.emif3p1.sdcfg  = 0x00d38a32; /* cas5, 8 banks, 10 bit column */
372     ibl.ddrConfig.uEmif.emif3p1.sdrfc  = 0x00000a29; /* Refresh 333Mhz */ 
373     ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x4d246c9a; /* Timing 1 */
374     ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x00993c42; /* Timing 2 */
375     ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x50001906; /* PHY read latency for CAS 5 is 5 + 2 - 1 */
377     /* SGMII 0 is present */
378     ibl.sgmiiConfig[0].configure = TRUE;
379     ibl.sgmiiConfig[0].adviseAbility = 0x9801;
380     ibl.sgmiiConfig[0].control       = 0x20;
381     ibl.sgmiiConfig[0].txConfig      = 0x00000e23;
382     ibl.sgmiiConfig[0].rxConfig      = 0x00081023;
383     ibl.sgmiiConfig[0].auxConfig     = 0x0000000b;
385     /* There is no port 1 on the 6474 */
386     ibl.sgmiiConfig[1].configure = FALSE;
388     /* MDIO configuration */
389     ibl.mdioConfig.nMdioOps = 5;
390     ibl.mdioConfig.mdioClkDiv = 0x20;
391     ibl.mdioConfig.interDelay = 2000;   /* ~2ms at 1000 MHz */
393     ibl.mdioConfig.mdio[0] =  (1 << 30) | ( 4 << 21) | (27 << 16) | 0x0081;
394     ibl.mdioConfig.mdio[1] =  (1 << 30) | (26 << 21) | (14 << 16) | 0x0047;
395     ibl.mdioConfig.mdio[2] =  (1 << 30) | ( 0 << 21) | (14 << 16) | 0x8140;
397     ibl.mdioConfig.mdio[3] =  (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
398     ibl.mdioConfig.mdio[4] =  (1 << 30) | ( 0 << 21) | ( 1 << 16) | 0x9140;
400     /* spiConfig and emifConfig not needed */
402     /* Ethernet configuration for Boot mode 0 */
403     ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
404     ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
405     ibl.bootModes[0].port     = 0;
407     /* Bootp is disabled. The server and file name are provided here */
408     ibl.bootModes[0].u.ethBoot.doBootp          = FALSE;
409     ibl.bootModes[0].u.ethBoot.useBootpServerIp = TRUE;
410     ibl.bootModes[0].u.ethBoot.useBootpFileName = TRUE;
411     ibl.bootModes[0].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
413     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr,    158,218,100,114);
414     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp,  158,218,100,25);
415     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 158,218,100,2);
416     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask,   255,255,255,0);
418     /* Set the hardware address as 0 so the e-fuse value will be used */
419     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 0;
420     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 0;
421     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 0;
422     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 0;
423     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 0;
424     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 0;
427     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0]  = 'c';
428     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1]  = '6';
429     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2]  = '4';
430     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3]  = '7';
431     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4]  = '4';
432     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5]  = 'l';
433     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6]  = '-';
434     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7]  = 'l';
435     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8]  = 'e';
436     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9]  = '.';
437     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'b';
438     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'i';
439     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = 'n';
440     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
441     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
444     /* Even though the entire range of DDR2 is chosen, the load will
445      * stop when the ftp reaches the end of the file */
446     ibl.bootModes[0].u.ethBoot.blob.startAddress  = 0x80000000;       /* Base address of DDR2 */
447     ibl.bootModes[0].u.ethBoot.blob.sizeBytes     = 0x20000000;       /* All of DDR2 */
448     ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0x80000000;       /* Base of DDR2 */
450     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NAND;
451     ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY;
452     ibl.bootModes[1].port     = 0;
454     ibl.bootModes[1].u.nandBoot.bootFormat              = ibl_BOOT_FORMAT_BBLOB;
455     ibl.bootModes[1].u.nandBoot.bootAddress[0][0]         = 0x200000;         /* Image 0 NAND offset address (block 1) in LE mode */
456     ibl.bootModes[1].u.nandBoot.bootAddress[0][1]         = 0x4000000;      /* Image 1 NAND offset address (block 2048) in LE mode */
457     ibl.bootModes[1].u.nandBoot.bootAddress[1][0]         = 0x200000;       /* Image 0 NAND offset address (block 1) in BE mode */
458     ibl.bootModes[1].u.nandBoot.bootAddress[1][1]         = 0x4000000;      /* Image 1 NAND offset address (block 2048) in BE mode */
459     ibl.bootModes[1].u.nandBoot.interface         = ibl_PMEM_IF_GPIO;
460     
461     ibl.bootModes[1].u.nandBoot.blob[0][0].startAddress  = 0x80000000;       /* Image 0 load start address in LE mode */
462     ibl.bootModes[1].u.nandBoot.blob[0][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in LE mode */
463     ibl.bootModes[1].u.nandBoot.blob[0][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in LE mode */
464     ibl.bootModes[1].u.nandBoot.blob[0][1].startAddress  = 0x80000000;       /* Image 1 load start address in LE mode */
465     ibl.bootModes[1].u.nandBoot.blob[0][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in LE mode */
466     ibl.bootModes[1].u.nandBoot.blob[0][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in LE mode */
467     ibl.bootModes[1].u.nandBoot.blob[1][0].startAddress  = 0x80000000;       /* Image 0 load start address in BE mode */
468     ibl.bootModes[1].u.nandBoot.blob[1][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in BE mode */
469     ibl.bootModes[1].u.nandBoot.blob[1][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in BE mode */
470     ibl.bootModes[1].u.nandBoot.blob[1][1].startAddress  = 0x80000000;       /* Image 1 load start address in BE mode */
471     ibl.bootModes[1].u.nandBoot.blob[1][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in BE mode */
472     ibl.bootModes[1].u.nandBoot.blob[1][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in BE mode */
475     ibl.bootModes[1].u.nandBoot.nandInfo.busWidthBits  = 8;
476     ibl.bootModes[1].u.nandBoot.nandInfo.pageSizeBytes = 2048;
477     ibl.bootModes[1].u.nandBoot.nandInfo.pageEccBytes  = 64;
478     ibl.bootModes[1].u.nandBoot.nandInfo.pagesPerBlock = 64;
479     ibl.bootModes[1].u.nandBoot.nandInfo.totalBlocks   = 512;
481     ibl.bootModes[1].u.nandBoot.nandInfo.addressBytes  = 4;
482     ibl.bootModes[1].u.nandBoot.nandInfo.lsbFirst      = TRUE;
483     ibl.bootModes[1].u.nandBoot.nandInfo.blockOffset   = 22;
484     ibl.bootModes[1].u.nandBoot.nandInfo.pageOffset    = 16;
485     ibl.bootModes[1].u.nandBoot.nandInfo.columnOffset  = 0;
487     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[0]  = 0; 
488     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[1]  = 1; 
489     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[2]  = 2; 
490     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[3]  = 3; 
491     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[4]  = 4; 
492     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[5]  = 6; 
493     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[6]  = 7; 
494     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[7]  = 13; 
495     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[8]  = 14; 
496     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[9]  = 15; 
498     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[0]= 0;
499     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[1]= 0xff;
501     ibl.bootModes[1].u.nandBoot.nandInfo.resetCommand    = 0xff;
502     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPre  = 0;
503     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPost = 0;
504     ibl.bootModes[1].u.nandBoot.nandInfo.postCommand     = FALSE;
507     /* bootMode[2] not configured */
508     ibl.bootModes[2].bootMode = ibl_BOOT_MODE_NONE;
510     ibl.chkSum = 0;
513 menuitem "EVM c6457 EVM IBL";
515 hotmenu setConfig_c6457()
517     ibl.iblMagic = ibl_MAGIC_VALUE;
518     ibl.iblEvmType = ibl_EVM_C6457L;
520     ibl.pllConfig[ibl_MAIN_PLL].doEnable      = TRUE;
521     ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
522     ibl.pllConfig[ibl_MAIN_PLL].mult          = 20;
523     ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 1;
524     ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
526     /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
527     ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
529     /* The network PLL. The multipliers/dividers are fixed */
530     ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
532     /* EMIF configuration */
533     ibl.ddrConfig.configDdr = TRUE;
535     ibl.ddrConfig.uEmif.emif3p1.sdcfg  = 0x00d38a32; /* cas5, 8 banks, 10 bit column */
536     ibl.ddrConfig.uEmif.emif3p1.sdrfc  = 0x00000a0e; /* Refresh 333Mhz */ 
537     ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x832474da; /* Timing 1 */
538     ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x0144c742; /* Timing 2 */
539     ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x001800C6;
541     /* SGMII 0 is present */
542     ibl.sgmiiConfig[0].configure = TRUE;
543     ibl.sgmiiConfig[0].adviseAbility = 0x9801;
544     ibl.sgmiiConfig[0].control       = 0x20;
545     ibl.sgmiiConfig[0].txConfig      = 0x00000e21;
546     ibl.sgmiiConfig[0].rxConfig      = 0x00081021;
547     ibl.sgmiiConfig[0].auxConfig     = 0x0000000b;
549     /* There is no port 1 on the 6457 */
550     ibl.sgmiiConfig[1].configure = FALSE;
552     /* MDIO configuration */
553     ibl.mdioConfig.nMdioOps = 5;
554     ibl.mdioConfig.mdioClkDiv = 0xa5;
555     ibl.mdioConfig.interDelay = 3000;   /* ~2ms at 1000 MHz */
557     ibl.mdioConfig.mdio[0] =  (1 << 30) | ( 4 << 21) | (27 << 16) | 0x0081;
558     ibl.mdioConfig.mdio[1] =  (1 << 30) | (26 << 21) | (14 << 16) | 0x0047;
559     ibl.mdioConfig.mdio[2] =  (1 << 30) | ( 0 << 21) | (14 << 16) | 0x8140;
560     ibl.mdioConfig.mdio[3] =  (1 << 30) | ( 1 << 21) | (22 << 16) | 0x043e;
561     ibl.mdioConfig.mdio[4] =  (1 << 30) | ( 0 << 21) | ( 1 << 16) | 0x9140;
563     /* spiConfig and emifConfig not needed */
565     /* Ethernet configuration for Boot mode 0 */
566     ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
567     ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
568     ibl.bootModes[0].port = 0;
570     /* Bootp is disabled. The server and file name are provided here */
571     ibl.bootModes[0].u.ethBoot.doBootp          = FALSE;
572     ibl.bootModes[0].u.ethBoot.useBootpServerIp = TRUE;
573     ibl.bootModes[0].u.ethBoot.useBootpFileName = TRUE;
574     ibl.bootModes[0].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
576     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr,    158,218,100,115);
577     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp,  158,218,100,25);
578     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 158,218,100,2);
579     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask,   255,255,255,0);
581     /* Set the hardware address as 0 so the e-fuse value will be used */
582     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 0;
583     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 0;
584     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 0;
585     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 0;
586     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 0;
587     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 0;
589     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0]  = 'c';
590     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1]  = '6';
591     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2]  = '4';
592     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3]  = '5';
593     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4]  = '7';
594     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5]  = '-';
595     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6]  = 'l';
596     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7]  = 'e';
597     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8]  = '.';
598     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9]  = 'b';
599     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'i';
600     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'n';
601     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = '\0';
602     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
603     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
606     /* Even though the entire range of DDR2 is chosen, the load will
607      * stop when the ftp reaches the end of the file */
608     ibl.bootModes[0].u.ethBoot.blob.startAddress  = 0xe0000000;       /* Base address of DDR2 */
609     ibl.bootModes[0].u.ethBoot.blob.sizeBytes     = 0x20000000;       /* All of DDR2 */
610     ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0xe0000000;       /* Base of DDR2 */
612     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NAND;
613     ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY;
614     ibl.bootModes[1].port     = 0;
616     ibl.bootModes[1].u.nandBoot.bootFormat              = ibl_BOOT_FORMAT_BBLOB;
617     ibl.bootModes[1].u.nandBoot.bootAddress[0][0]         = 0x200000;         /* Image 0 NAND offset address (block 1) in LE mode */
618     ibl.bootModes[1].u.nandBoot.bootAddress[0][1]         = 0x4000000;      /* Image 1 NAND offset address (block 2048) in LE mode */
619     ibl.bootModes[1].u.nandBoot.bootAddress[1][0]         = 0x200000;       /* Image 0 NAND offset address (block 1) in BE mode */
620     ibl.bootModes[1].u.nandBoot.bootAddress[1][1]         = 0x4000000;      /* Image 1 NAND offset address (block 2048) in BE mode */
621     ibl.bootModes[1].u.nandBoot.interface         = ibl_PMEM_IF_GPIO;
622     
623     ibl.bootModes[1].u.nandBoot.blob[0][0].startAddress  = 0xe0000000;       /* Image 0 load start address in LE mode */
624     ibl.bootModes[1].u.nandBoot.blob[0][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in LE mode */
625     ibl.bootModes[1].u.nandBoot.blob[0][0].branchAddress = 0xe0000000;       /* Image 0 branch address after loading in LE mode */
626     ibl.bootModes[1].u.nandBoot.blob[0][1].startAddress  = 0xe0000000;       /* Image 1 load start address in LE mode */
627     ibl.bootModes[1].u.nandBoot.blob[0][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in LE mode */
628     ibl.bootModes[1].u.nandBoot.blob[0][1].branchAddress = 0xe0000000;       /* Image 1 branch address after loading in LE mode */
629     ibl.bootModes[1].u.nandBoot.blob[1][0].startAddress  = 0xe0000000;       /* Image 0 load start address in BE mode */
630     ibl.bootModes[1].u.nandBoot.blob[1][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in BE mode */
631     ibl.bootModes[1].u.nandBoot.blob[1][0].branchAddress = 0xe0000000;       /* Image 0 branch address after loading in BE mode */
632     ibl.bootModes[1].u.nandBoot.blob[1][1].startAddress  = 0xe0000000;       /* Image 1 load start address in BE mode */
633     ibl.bootModes[1].u.nandBoot.blob[1][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in BE mode */
634     ibl.bootModes[1].u.nandBoot.blob[1][1].branchAddress = 0xe0000000;       /* Image 1 branch address after loading in BE mode */
637     ibl.bootModes[1].u.nandBoot.nandInfo.busWidthBits  = 8;
638     ibl.bootModes[1].u.nandBoot.nandInfo.pageSizeBytes = 2048;
639     ibl.bootModes[1].u.nandBoot.nandInfo.pageEccBytes  = 64;
640     ibl.bootModes[1].u.nandBoot.nandInfo.pagesPerBlock = 64;
641     ibl.bootModes[1].u.nandBoot.nandInfo.totalBlocks   = 512;
643     ibl.bootModes[1].u.nandBoot.nandInfo.addressBytes  = 4;
644     ibl.bootModes[1].u.nandBoot.nandInfo.lsbFirst      = TRUE;
645     ibl.bootModes[1].u.nandBoot.nandInfo.blockOffset   = 22;
646     ibl.bootModes[1].u.nandBoot.nandInfo.pageOffset    = 16;
647     ibl.bootModes[1].u.nandBoot.nandInfo.columnOffset  = 0;
649     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[0]  = 0; 
650     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[1]  = 1; 
651     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[2]  = 2; 
652     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[3]  = 3; 
653     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[4]  = 4; 
654     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[5]  = 6; 
655     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[6]  = 7; 
656     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[7]  = 13; 
657     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[8]  = 14; 
658     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[9]  = 15; 
660     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[0]= 0;
661     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[1]= 0xff;
663     ibl.bootModes[1].u.nandBoot.nandInfo.resetCommand    = 0xff;
664     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPre  = 0;
665     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPost = 0;
666     ibl.bootModes[1].u.nandBoot.nandInfo.postCommand     = FALSE;
669     /* bootMode[2] not configured */
670     ibl.bootModes[2].bootMode = ibl_BOOT_MODE_NONE;
672     ibl.chkSum = 0;
675 menuitem "EVM c6455 IBL";
677 hotmenu setConfig_c6455()
679     ibl.iblMagic = ibl_MAGIC_VALUE;
680     ibl.iblEvmType = ibl_EVM_C6455L;
682     ibl.pllConfig[ibl_MAIN_PLL].doEnable      = TRUE;
683     ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
684     ibl.pllConfig[ibl_MAIN_PLL].mult          = 20;
685     ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 1;
686     ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
688     /* The DDR PLL. The multipliers/dividers are fixed, so are really dont cares */
689     ibl.pllConfig[ibl_DDR_PLL].doEnable = TRUE;
691     /* The network PLL. The multipliers/dividers are fixed */
692     ibl.pllConfig[ibl_NET_PLL].doEnable = TRUE;
694     /* EMIF configuration. The values are for DDR at 500 MHz  */
695     ibl.ddrConfig.configDdr = TRUE;
697     ibl.ddrConfig.uEmif.emif3p1.sdcfg  = 0x00538822; /* timing, 32bit wide */
698     ibl.ddrConfig.uEmif.emif3p1.sdrfc  = 0x000007a2; /* Refresh 500Mhz */ 
699     ibl.ddrConfig.uEmif.emif3p1.sdtim1 = 0x3edb4b91; /* Timing 1 */
700     ibl.ddrConfig.uEmif.emif3p1.sdtim2 = 0x00a2c722; /* Timing 2 */
701     ibl.ddrConfig.uEmif.emif3p1.dmcctl = 0x00000005; /* PHY read latency for CAS 4 is 4 + 2 - 1 */
703     /* SGMII not present */
704     ibl.sgmiiConfig[0].configure = FALSE;
705     ibl.sgmiiConfig[1].configure = FALSE;
707     /* MDIO configuration */
708     ibl.mdioConfig.nMdioOps = 0;
709     ibl.mdioConfig.mdioClkDiv = 0x20;
710     ibl.mdioConfig.interDelay = 2000;   /* ~2ms at 1000 MHz */
712     ibl.mdioConfig.mdio[0] =  (1 << 30) | (14 << 21) | (0 << 16) | 0xd5d0;
714     /* spiConfig and emifConfig not needed */
716     /* Ethernet configuration for Boot mode 0 */
717     ibl.bootModes[0].bootMode = ibl_BOOT_MODE_TFTP;
718     ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
719     ibl.bootModes[0].port     = 0;
721     /* Bootp is disabled. The server and file name are provided here */
722     ibl.bootModes[0].u.ethBoot.doBootp          = FALSE;
723     ibl.bootModes[0].u.ethBoot.useBootpServerIp = TRUE;
724     ibl.bootModes[0].u.ethBoot.useBootpFileName = TRUE;
725     ibl.bootModes[0].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
727     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.ipAddr,    158,218,100,118);
728     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.serverIp,  158,218,100,25);
729     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.gatewayIp, 158,218,100,2);
730     SETIP(ibl.bootModes[0].u.ethBoot.ethInfo.netmask,   255,255,255,0);
732     /* There is no e-fuse mac address. A value must be assigned */
733     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[0] = 10;
734     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[1] = 224;
735     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[2] = 166;
736     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[3] = 102;
737     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[4] = 87;
738     ibl.bootModes[0].u.ethBoot.ethInfo.hwAddress[5] = 25;
741     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[0]  = 'c';
742     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[1]  = '6';
743     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[2]  = '4';
744     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[3]  = '5';
745     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[4]  = '5';
746     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[5]  = '-';
747     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[6]  = 'l';
748     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[7]  = 'e';
749     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[8]  = '.';
750     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[9]  = 'b';
751     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[10] = 'i';
752     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[11] = 'n';
753     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[12] = '\0';
754     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[13] = '\0';
755     ibl.bootModes[0].u.ethBoot.ethInfo.fileName[14] = '\0';
757     /* Even though the entire range of DDR2 is chosen, the load will
758      * stop when the ftp reaches the end of the file */
759     ibl.bootModes[0].u.ethBoot.blob.startAddress  = 0xe0000000;       /* Base address of DDR2 */
760     ibl.bootModes[0].u.ethBoot.blob.sizeBytes     = 0x20000000;       /* All of DDR2 */
761     ibl.bootModes[0].u.ethBoot.blob.branchAddress = 0xe0000000;       /* Base of DDR2 */
763     /* Alternative bootMode not configured for now */
764     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NONE;
766     ibl.chkSum = 0;
770 menuitem "EVM c6678 IBL";
772 hotmenu setConfig_c6678_main()
774         ibl.iblMagic = ibl_MAGIC_VALUE;
775         ibl.iblEvmType = ibl_EVM_C6678L;
777         /* Main PLL: 100 MHz reference, 1GHz output */
778         ibl.pllConfig[ibl_MAIN_PLL].doEnable      = 1;
779         ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
780         ibl.pllConfig[ibl_MAIN_PLL].mult          = 20;
781         ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 2;
782         ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
784         /* DDR PLL: 66.66 MHz reference, 400 MHz output, for an 800MHz DDR rate */
785         ibl.pllConfig[ibl_DDR_PLL].doEnable       = 1; 
786         ibl.pllConfig[ibl_DDR_PLL].prediv         = 1;
787         ibl.pllConfig[ibl_DDR_PLL].mult           = 20;
788         ibl.pllConfig[ibl_DDR_PLL].postdiv        = 2;
789         ibl.pllConfig[ibl_DDR_PLL].pllOutFreqMhz  = 1333;
791     /* Net PLL: 100 MHz reference, 1050 MHz output (followed by a built in divide by 3 to give 350 MHz to PA) */
792         ibl.pllConfig[ibl_NET_PLL].doEnable       = 1;
793         ibl.pllConfig[ibl_NET_PLL].prediv         = 1;
794         ibl.pllConfig[ibl_NET_PLL].mult                   = 21;
795         ibl.pllConfig[ibl_NET_PLL].postdiv        = 2;
796         ibl.pllConfig[ibl_NET_PLL].pllOutFreqMhz  = 1050;
799         ibl.ddrConfig.configDdr = 1;
800         ibl.ddrConfig.uEmif.emif4p0.registerMask = ibl_EMIF4_ENABLE_sdRamConfig | ibl_EMIF4_ENABLE_sdRamRefreshCtl | ibl_EMIF4_ENABLE_sdRamTiming1 | ibl_EMIF4_ENABLE_sdRamTiming2 | ibl_EMIF4_ENABLE_sdRamTiming3 | ibl_EMIF4_ENABLE_ddrPhyCtl1;
802         ibl.ddrConfig.uEmif.emif4p0.sdRamConfig                         = 0x63C452B2;
803         ibl.ddrConfig.uEmif.emif4p0.sdRamConfig2                        = 0;
804         ibl.ddrConfig.uEmif.emif4p0.sdRamRefreshCtl                     = 0x000030D4;
805         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming1                        = 0x0AAAE51B;
806         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming2                        = 0x2A2F7FDA;
807         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming3                        = 0x057F82B8;
808         ibl.ddrConfig.uEmif.emif4p0.lpDdrNvmTiming                      = 0;
809         ibl.ddrConfig.uEmif.emif4p0.powerManageCtl                      = 0;
810         ibl.ddrConfig.uEmif.emif4p0.iODFTTestLogic                      = 0;
811         ibl.ddrConfig.uEmif.emif4p0.performCountCfg                     = 0;
812         ibl.ddrConfig.uEmif.emif4p0.performCountMstRegSel       = 0;
813         ibl.ddrConfig.uEmif.emif4p0.readIdleCtl                         = 0;
814         ibl.ddrConfig.uEmif.emif4p0.sysVbusmIntEnSet            = 0;
815         ibl.ddrConfig.uEmif.emif4p0.sdRamOutImpdedCalCfg        = 0;
816         ibl.ddrConfig.uEmif.emif4p0.tempAlterCfg                        = 0;
817         ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl1                          = 0x0010010d;
818         ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl2                          = 0;
819         ibl.ddrConfig.uEmif.emif4p0.priClassSvceMap                     = 0;
820         ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce1Map           = 0;
821         ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce2Map           = 0;
822         ibl.ddrConfig.uEmif.emif4p0.eccCtl                                      = 0;
823         ibl.ddrConfig.uEmif.emif4p0.eccRange1                           = 0;
824         ibl.ddrConfig.uEmif.emif4p0.eccRange2                           = 0;
825         ibl.ddrConfig.uEmif.emif4p0.rdWrtExcThresh                      = 0;
828         ibl.sgmiiConfig[0].configure     = 1;
829         ibl.sgmiiConfig[0].adviseAbility = 1;
830         ibl.sgmiiConfig[0].control               = 1;
831         ibl.sgmiiConfig[0].txConfig      = 0x108a1;
832         ibl.sgmiiConfig[0].rxConfig      = 0x700621;
833         ibl.sgmiiConfig[0].auxConfig     = 0x41;
835         ibl.sgmiiConfig[1].configure     = 1;
836         ibl.sgmiiConfig[1].adviseAbility = 1;
837         ibl.sgmiiConfig[1].control               = 1;
838         ibl.sgmiiConfig[1].txConfig      = 0x108a1;
839         ibl.sgmiiConfig[1].rxConfig      = 0x700621;
840         ibl.sgmiiConfig[1].auxConfig     = 0x41;
842         ibl.mdioConfig.nMdioOps = 0;
844         ibl.spiConfig.addrWidth  = 24;
845         ibl.spiConfig.nPins      = 5;
846         ibl.spiConfig.mode       = 1;
847         ibl.spiConfig.csel       = 2;
848         ibl.spiConfig.c2tdelay   = 1;
849         ibl.spiConfig.busFreqMHz = 20;
851         ibl.emifConfig[0].csSpace    = 2;
852         ibl.emifConfig[0].busWidth   = 8;
853         ibl.emifConfig[0].waitEnable = 0;
855         ibl.emifConfig[1].csSpace    = 0;
856         ibl.emifConfig[1].busWidth   = 0;
857         ibl.emifConfig[1].waitEnable = 0;
859         ibl.bootModes[0].bootMode = ibl_BOOT_MODE_NOR;
860         ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
861         ibl.bootModes[0].port     = 0;
863         ibl.bootModes[0].u.norBoot.bootFormat   = ibl_BOOT_FORMAT_ELF;
864         ibl.bootModes[0].u.norBoot.bootAddress[0][0]    = 0;            /* Image 0 NOR offset byte address in LE mode */ 
865         ibl.bootModes[0].u.norBoot.bootAddress[0][1]    = 0xA00000;     /* Image 1 NOR offset byte address in LE mode  */
866         ibl.bootModes[0].u.norBoot.bootAddress[1][0]    = 0;            /* Image 0 NOR offset byte address in BE mode */ 
867         ibl.bootModes[0].u.norBoot.bootAddress[1][1]    = 0xA00000;     /* Image 1 NOR offset byte address in BE mode  */
868         ibl.bootModes[0].u.norBoot.interface    = ibl_PMEM_IF_SPI;
869     ibl.bootModes[0].u.norBoot.blob[0][0].startAddress  = 0x80000000;       /* Image 0 load start address in LE mode */
870     ibl.bootModes[0].u.norBoot.blob[0][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in LE mode */
871     ibl.bootModes[0].u.norBoot.blob[0][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in LE mode */
872     ibl.bootModes[0].u.norBoot.blob[0][1].startAddress  = 0x80000000;       /* Image 1 load start address in LE mode */
873     ibl.bootModes[0].u.norBoot.blob[0][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in LE mode */
874     ibl.bootModes[0].u.norBoot.blob[0][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in LE mode */
875     ibl.bootModes[0].u.norBoot.blob[1][0].startAddress  = 0x80000000;       /* Image 0 load start address in BE mode */
876     ibl.bootModes[0].u.norBoot.blob[1][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in BE mode */
877     ibl.bootModes[0].u.norBoot.blob[1][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in BE mode */
878     ibl.bootModes[0].u.norBoot.blob[1][1].startAddress  = 0x80000000;       /* Image 1 load start address in BE mode */
879     ibl.bootModes[0].u.norBoot.blob[1][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in BE mode */
880     ibl.bootModes[0].u.norBoot.blob[1][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in BE mode */
882     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NAND;
883     ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY;
884     ibl.bootModes[1].port     = 0;
886     ibl.bootModes[1].u.nandBoot.bootFormat        = ibl_BOOT_FORMAT_BBLOB;
887     ibl.bootModes[1].u.nandBoot.bootAddress[0][0]         = 0x4000;         /* Image 0 NAND offset address (block 1) in LE mode */
888     ibl.bootModes[1].u.nandBoot.bootAddress[0][1]         = 0x2000000;      /* Image 1 NAND offset address (block 2048) in LE mode */
889     ibl.bootModes[1].u.nandBoot.bootAddress[1][0]         = 0x4000;         /* Image 0 NAND offset address (block 1) in BE mode */
890     ibl.bootModes[1].u.nandBoot.bootAddress[1][1]         = 0x2000000;      /* Image 1 NAND offset address (block 2048) in BE mode */
891     ibl.bootModes[1].u.nandBoot.interface         = ibl_PMEM_IF_CHIPSEL_2;
893     ibl.bootModes[1].u.nandBoot.blob[0][0].startAddress  = 0x80000000;       /* Image 0 load start address in LE mode */
894     ibl.bootModes[1].u.nandBoot.blob[0][0].sizeBytes     = 0xFFC000;         /* Image 0 size in LE mode */
895     ibl.bootModes[1].u.nandBoot.blob[0][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in LE mode */
896     ibl.bootModes[1].u.nandBoot.blob[0][1].startAddress  = 0x80000000;       /* Image 1 load start address in LE mode */
897     ibl.bootModes[1].u.nandBoot.blob[0][1].sizeBytes     = 0xFFC000;         /* Image 1 size in LE mode */
898     ibl.bootModes[1].u.nandBoot.blob[0][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in LE mode */
899     ibl.bootModes[1].u.nandBoot.blob[1][0].startAddress  = 0x80000000;       /* Image 0 load start address in BE mode */
900     ibl.bootModes[1].u.nandBoot.blob[1][0].sizeBytes     = 0xFFC000;         /* Image 0 size in BE mode */
901     ibl.bootModes[1].u.nandBoot.blob[1][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in BE mode */
902     ibl.bootModes[1].u.nandBoot.blob[1][1].startAddress  = 0x80000000;       /* Image 1 load start address in BE mode */
903     ibl.bootModes[1].u.nandBoot.blob[1][1].sizeBytes     = 0xFFC000;         /* Image 1 size in BE mode */
904     ibl.bootModes[1].u.nandBoot.blob[1][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in BE mode */
907     ibl.bootModes[1].u.nandBoot.nandInfo.busWidthBits  = 8;
908     ibl.bootModes[1].u.nandBoot.nandInfo.pageSizeBytes = 512;
909     ibl.bootModes[1].u.nandBoot.nandInfo.pageEccBytes  = 16;
910     ibl.bootModes[1].u.nandBoot.nandInfo.pagesPerBlock = 32;
911     ibl.bootModes[1].u.nandBoot.nandInfo.totalBlocks   = 4096;
913     ibl.bootModes[1].u.nandBoot.nandInfo.addressBytes  = 4;
914     ibl.bootModes[1].u.nandBoot.nandInfo.lsbFirst      = TRUE;
915     ibl.bootModes[1].u.nandBoot.nandInfo.blockOffset   = 14;
916     ibl.bootModes[1].u.nandBoot.nandInfo.pageOffset    = 9;
917     ibl.bootModes[1].u.nandBoot.nandInfo.columnOffset  = 0;
919     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[0]  = 0; 
920     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[1]  = 1; 
921     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[2]  = 2; 
922     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[3]  = 3; 
923     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[4]  = 4; 
924     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[5]  = 6; 
925     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[6]  = 7; 
926     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[7]  = 13; 
927     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[8]  = 14; 
928     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[9]  = 15; 
929     
930     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[0]= 5;
931     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[1]= 0xff;
933     ibl.bootModes[1].u.nandBoot.nandInfo.resetCommand    = 0xff;
934     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPre  = 0;
935     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPost = 0;
936     ibl.bootModes[1].u.nandBoot.nandInfo.postCommand     = FALSE;
937     
938         ibl.bootModes[2].bootMode = ibl_BOOT_MODE_TFTP;
939         ibl.bootModes[2].priority = ibl_HIGHEST_PRIORITY+1;
940         ibl.bootModes[2].port     = ibl_PORT_SWITCH_ALL;
942         ibl.bootModes[2].u.ethBoot.doBootp          = FALSE;
943         ibl.bootModes[2].u.ethBoot.useBootpServerIp = TRUE;
944         ibl.bootModes[2].u.ethBoot.useBootpFileName = TRUE;
945         ibl.bootModes[2].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
948     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.ipAddr,    192,168,2,100);
949     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.serverIp,  192,168,2,101);
950     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.gatewayIp, 192,168,2,1);
951     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.netmask,   255,255,255,0);
953     /* Use the e-fuse value */
954     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[0] = 0;
955     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[1] = 0;
956     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[2] = 0;
957     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[3] = 0;
958     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[4] = 0;
959     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[5] = 0;
962     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[0]  = 'a';
963     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[1]  = 'p';
964     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[2]  = 'p';
965     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[3]  = '.';
966     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[4]  = 'o';
967     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[5]  = 'u';
968     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[6]  = 't';
969     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[7]  = '\0';
970     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[8]  = '\0';
971     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[9]  = '\0';
972     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[10] = '\0';
973     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[11] = '\0';
974     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[12] = '\0';
975     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[13] = '\0';
976     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[14] = '\0';
978     ibl.bootModes[2].u.ethBoot.blob.startAddress  = 0x80000000;       /* Load start address */
979     ibl.bootModes[2].u.ethBoot.blob.sizeBytes     = 0x20000000;
980     ibl.bootModes[2].u.ethBoot.blob.branchAddress = 0x80000000;       /* Branch address after loading */
982     ibl.chkSum = 0;
985 menuitem "EVM c6670 IBL";
987 hotmenu setConfig_c6670_main()
989         ibl.iblMagic = ibl_MAGIC_VALUE;
990         ibl.iblEvmType = ibl_EVM_C6670L;
992         /* Main PLL: 122.88 MHz reference, 983 MHz output */
993         ibl.pllConfig[ibl_MAIN_PLL].doEnable      = 1;
994         ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
995         ibl.pllConfig[ibl_MAIN_PLL].mult          = 16;
996         ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 2;
997         ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 983;
999         /* DDR PLL */
1000         ibl.pllConfig[ibl_DDR_PLL].doEnable       = 1;
1001         ibl.pllConfig[ibl_DDR_PLL].prediv         = 1;
1002         ibl.pllConfig[ibl_DDR_PLL].mult           = 20;
1003         ibl.pllConfig[ibl_DDR_PLL].postdiv        = 2;
1004         ibl.pllConfig[ibl_DDR_PLL].pllOutFreqMhz  = 1333;
1006     /* Net PLL: 122.88 MHz reference, 1044 MHz output (followed by a built in divide by 3 to give 348 MHz to PA) */
1007         ibl.pllConfig[ibl_NET_PLL].doEnable       = 1;
1008         ibl.pllConfig[ibl_NET_PLL].prediv         = 1;
1009         ibl.pllConfig[ibl_NET_PLL].mult           = 17;
1010         ibl.pllConfig[ibl_NET_PLL].postdiv        = 2;
1011         ibl.pllConfig[ibl_NET_PLL].pllOutFreqMhz  = 1044;
1014         ibl.ddrConfig.configDdr = 1;
1015         ibl.ddrConfig.uEmif.emif4p0.registerMask = ibl_EMIF4_ENABLE_sdRamConfig | ibl_EMIF4_ENABLE_sdRamRefreshCtl | ibl_EMIF4_ENABLE_sdRamTiming1 | ibl_EMIF4_ENABLE_sdRamTiming2 | ibl_EMIF4_ENABLE_sdRamTiming3 | ibl_EMIF4_ENABLE_ddrPhyCtl1;
1017         ibl.ddrConfig.uEmif.emif4p0.sdRamConfig                         = 0x63C452B2;
1018         ibl.ddrConfig.uEmif.emif4p0.sdRamConfig2                        = 0;
1019         ibl.ddrConfig.uEmif.emif4p0.sdRamRefreshCtl                     = 0x000030D4;
1020         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming1                        = 0x0AAAE51B;
1021         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming2                        = 0x2A2F7FDA;
1022         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming3                        = 0x057F82B8;
1023         ibl.ddrConfig.uEmif.emif4p0.lpDdrNvmTiming                      = 0;
1024         ibl.ddrConfig.uEmif.emif4p0.powerManageCtl                      = 0;
1025         ibl.ddrConfig.uEmif.emif4p0.iODFTTestLogic                      = 0;
1026         ibl.ddrConfig.uEmif.emif4p0.performCountCfg                     = 0;
1027         ibl.ddrConfig.uEmif.emif4p0.performCountMstRegSel       = 0;
1028         ibl.ddrConfig.uEmif.emif4p0.readIdleCtl                         = 0;
1029         ibl.ddrConfig.uEmif.emif4p0.sysVbusmIntEnSet            = 0;
1030         ibl.ddrConfig.uEmif.emif4p0.sdRamOutImpdedCalCfg        = 0;
1031         ibl.ddrConfig.uEmif.emif4p0.tempAlterCfg                        = 0;
1032         ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl1                          = 0x0010010d;
1033         ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl2                          = 0;
1034         ibl.ddrConfig.uEmif.emif4p0.priClassSvceMap                     = 0;
1035         ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce1Map           = 0;
1036         ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce2Map           = 0;
1037         ibl.ddrConfig.uEmif.emif4p0.eccCtl                                      = 0;
1038         ibl.ddrConfig.uEmif.emif4p0.eccRange1                           = 0;
1039         ibl.ddrConfig.uEmif.emif4p0.eccRange2                           = 0;
1040         ibl.ddrConfig.uEmif.emif4p0.rdWrtExcThresh                      = 0;
1042         ibl.sgmiiConfig[0].configure     = 1;
1043         ibl.sgmiiConfig[0].adviseAbility = 1;
1044         ibl.sgmiiConfig[0].control               = 1;
1045         ibl.sgmiiConfig[0].txConfig      = 0x108a1;
1046         ibl.sgmiiConfig[0].rxConfig      = 0x700621;
1047         ibl.sgmiiConfig[0].auxConfig     = 0x41;
1049         ibl.sgmiiConfig[1].configure     = 1;
1050         ibl.sgmiiConfig[1].adviseAbility = 1;
1051         ibl.sgmiiConfig[1].control               = 1;
1052         ibl.sgmiiConfig[1].txConfig      = 0x108a1;
1053         ibl.sgmiiConfig[1].rxConfig      = 0x700621;
1054         ibl.sgmiiConfig[1].auxConfig     = 0x51;
1056         ibl.mdioConfig.nMdioOps = 0;
1058         ibl.spiConfig.addrWidth  = 24;
1059         ibl.spiConfig.nPins      = 5;
1060         ibl.spiConfig.mode       = 1;
1061         ibl.spiConfig.csel       = 2;
1062         ibl.spiConfig.c2tdelay   = 1;
1063         ibl.spiConfig.busFreqMHz = 20;
1065         ibl.emifConfig[0].csSpace    = 2;
1066         ibl.emifConfig[0].busWidth   = 8;
1067         ibl.emifConfig[0].waitEnable = 0;
1069         ibl.emifConfig[1].csSpace    = 0;
1070         ibl.emifConfig[1].busWidth   = 0;
1071         ibl.emifConfig[1].waitEnable = 0;
1073         ibl.bootModes[0].bootMode = ibl_BOOT_MODE_NOR;
1074         ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
1075         ibl.bootModes[0].port     = 0;
1077         ibl.bootModes[0].u.norBoot.bootFormat   = ibl_BOOT_FORMAT_ELF;
1078         ibl.bootModes[0].u.norBoot.bootAddress[0][0]    = 0;            /* Image 0 NOR offset byte address in LE mode */ 
1079         ibl.bootModes[0].u.norBoot.bootAddress[0][1]    = 0xA00000;     /* Image 1 NOR offset byte address in LE mode  */
1080         ibl.bootModes[0].u.norBoot.bootAddress[1][0]    = 0;            /* Image 0 NOR offset byte address in BE mode */ 
1081         ibl.bootModes[0].u.norBoot.bootAddress[1][1]    = 0xA00000;     /* Image 1 NOR offset byte address in BE mode  */
1082         ibl.bootModes[0].u.norBoot.interface    = ibl_PMEM_IF_SPI;
1083     ibl.bootModes[0].u.norBoot.blob[0][0].startAddress  = 0x80000000;       /* Image 0 load start address in LE mode */
1084     ibl.bootModes[0].u.norBoot.blob[0][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in LE mode */
1085     ibl.bootModes[0].u.norBoot.blob[0][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in LE mode */
1086     ibl.bootModes[0].u.norBoot.blob[0][1].startAddress  = 0x80000000;       /* Image 1 load start address in LE mode */
1087     ibl.bootModes[0].u.norBoot.blob[0][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in LE mode */
1088     ibl.bootModes[0].u.norBoot.blob[0][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in LE mode */
1089     ibl.bootModes[0].u.norBoot.blob[1][0].startAddress  = 0x80000000;       /* Image 0 load start address in BE mode */
1090     ibl.bootModes[0].u.norBoot.blob[1][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in BE mode */
1091     ibl.bootModes[0].u.norBoot.blob[1][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in BE mode */
1092     ibl.bootModes[0].u.norBoot.blob[1][1].startAddress  = 0x80000000;       /* Image 1 load start address in BE mode */
1093     ibl.bootModes[0].u.norBoot.blob[1][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in BE mode */
1094     ibl.bootModes[0].u.norBoot.blob[1][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in BE mode */
1096     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NAND;
1097     ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY;
1098     ibl.bootModes[1].port     = 0;
1100     ibl.bootModes[1].u.nandBoot.bootFormat        = ibl_BOOT_FORMAT_BBLOB;
1101     ibl.bootModes[1].u.nandBoot.bootAddress[0][0]         = 0x4000;         /* Image 0 NAND offset address (block 1) in LE mode */
1102     ibl.bootModes[1].u.nandBoot.bootAddress[0][1]         = 0x2000000;      /* Image 1 NAND offset address (block 2048) in LE mode */
1103     ibl.bootModes[1].u.nandBoot.bootAddress[1][0]         = 0x4000;         /* Image 0 NAND offset address (block 1) in BE mode */
1104     ibl.bootModes[1].u.nandBoot.bootAddress[1][1]         = 0x2000000;      /* Image 1 NAND offset address (block 2048) in BE mode */
1105     ibl.bootModes[1].u.nandBoot.interface         = ibl_PMEM_IF_GPIO;
1107     ibl.bootModes[1].u.nandBoot.blob[0][0].startAddress  = 0x80000000;       /* Image 0 load start address in LE mode */
1108     ibl.bootModes[1].u.nandBoot.blob[0][0].sizeBytes     = 0xFFC000;         /* Image 0 size in LE mode */
1109     ibl.bootModes[1].u.nandBoot.blob[0][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in LE mode */
1110     ibl.bootModes[1].u.nandBoot.blob[0][1].startAddress  = 0x80000000;       /* Image 1 load start address in LE mode */
1111     ibl.bootModes[1].u.nandBoot.blob[0][1].sizeBytes     = 0xFFC000;         /* Image 1 size in LE mode */
1112     ibl.bootModes[1].u.nandBoot.blob[0][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in LE mode */
1113     ibl.bootModes[1].u.nandBoot.blob[1][0].startAddress  = 0x80000000;       /* Image 0 load start address in BE mode */
1114     ibl.bootModes[1].u.nandBoot.blob[1][0].sizeBytes     = 0xFFC000;         /* Image 0 size mode */
1115     ibl.bootModes[1].u.nandBoot.blob[1][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in BE mode */
1116     ibl.bootModes[1].u.nandBoot.blob[1][1].startAddress  = 0x80000000;       /* Image 1 load start address in BE mode */
1117     ibl.bootModes[1].u.nandBoot.blob[1][1].sizeBytes     = 0xFFC000;         /* Image 1 size in BE mode */
1118     ibl.bootModes[1].u.nandBoot.blob[1][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in BE mode */
1121     ibl.bootModes[1].u.nandBoot.nandInfo.busWidthBits  = 8;
1122     ibl.bootModes[1].u.nandBoot.nandInfo.pageSizeBytes = 512;
1123     ibl.bootModes[1].u.nandBoot.nandInfo.pageEccBytes  = 16;
1124     ibl.bootModes[1].u.nandBoot.nandInfo.pagesPerBlock = 32;
1125     ibl.bootModes[1].u.nandBoot.nandInfo.totalBlocks   = 4096;
1127     ibl.bootModes[1].u.nandBoot.nandInfo.addressBytes  = 4;
1128     ibl.bootModes[1].u.nandBoot.nandInfo.lsbFirst      = TRUE;
1129     ibl.bootModes[1].u.nandBoot.nandInfo.blockOffset   = 14;
1130     ibl.bootModes[1].u.nandBoot.nandInfo.pageOffset    = 9;
1131     ibl.bootModes[1].u.nandBoot.nandInfo.columnOffset  = 0;
1133     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[0]  = 0; 
1134     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[1]  = 1; 
1135     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[2]  = 2; 
1136     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[3]  = 3; 
1137     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[4]  = 4; 
1138     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[5]  = 6; 
1139     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[6]  = 7; 
1140     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[7]  = 13; 
1141     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[8]  = 14; 
1142     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[9]  = 15; 
1144     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[0]= 5;
1145     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[1]= 0xff;
1147     ibl.bootModes[1].u.nandBoot.nandInfo.resetCommand    = 0xff;
1148     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPre  = 0;
1149     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPost = 0;
1150     ibl.bootModes[1].u.nandBoot.nandInfo.postCommand     = FALSE;
1151     
1152         ibl.bootModes[2].bootMode = ibl_BOOT_MODE_TFTP;
1153         ibl.bootModes[2].priority = ibl_HIGHEST_PRIORITY+1;
1154         ibl.bootModes[2].port     = ibl_PORT_SWITCH_ALL;
1156         ibl.bootModes[2].u.ethBoot.doBootp          = FALSE;
1157         ibl.bootModes[2].u.ethBoot.useBootpServerIp = TRUE;
1158         ibl.bootModes[2].u.ethBoot.useBootpFileName = TRUE;
1159         ibl.bootModes[2].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
1162     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.ipAddr,    192,168,2,100);
1163     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.serverIp,  192,168,2,101);
1164     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.gatewayIp, 192,168,2,1);
1165     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.netmask,   255,255,255,0);
1167     /* Use the e-fuse value */
1168     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[0] = 0;
1169     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[1] = 0;
1170     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[2] = 0;
1171     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[3] = 0;
1172     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[4] = 0;
1173     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[5] = 0;
1176     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[0]  = 'a';
1177     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[1]  = 'p';
1178     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[2]  = 'p';
1179     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[3]  = '.';
1180     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[4]  = 'o';
1181     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[5]  = 'u';
1182     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[6]  = 't';
1183     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[7]  = '\0';
1184     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[8]  = '\0';
1185     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[9]  = '\0';
1186     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[10] = '\0';
1187     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[11] = '\0';
1188     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[12] = '\0';
1189     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[13] = '\0';
1190     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[14] = '\0';
1192     ibl.bootModes[2].u.ethBoot.blob.startAddress  = 0x80000000;       /* Load start address */
1193     ibl.bootModes[2].u.ethBoot.blob.sizeBytes     = 0x20000000;
1194     ibl.bootModes[2].u.ethBoot.blob.branchAddress = 0x80000000;       /* Branch address after loading */
1196     ibl.chkSum = 0;
1199 menuitem "EVM c6657 IBL";
1201 hotmenu setConfig_c6657_main()
1203         ibl.iblMagic = ibl_MAGIC_VALUE;
1204         ibl.iblEvmType = ibl_EVM_C6657L;
1206         /* Main PLL: 100 MHz reference, 1GHz output */
1207         ibl.pllConfig[ibl_MAIN_PLL].doEnable      = 1;
1208         ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
1209         ibl.pllConfig[ibl_MAIN_PLL].mult          = 20;
1210         ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 2;
1211         ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 1000;
1213         /* DDR PLL: */
1214         ibl.pllConfig[ibl_DDR_PLL].doEnable       = 1; 
1215         ibl.pllConfig[ibl_DDR_PLL].prediv         = 3;
1216         ibl.pllConfig[ibl_DDR_PLL].mult           = 80;
1217         ibl.pllConfig[ibl_DDR_PLL].postdiv        = 2;
1218         ibl.pllConfig[ibl_DDR_PLL].pllOutFreqMhz  = 1333;
1220     /* Net PLL: 100 MHz reference, 1050 MHz output (followed by a built in divide by 3 to give 350 MHz to PA) */
1222         ibl.pllConfig[ibl_NET_PLL].doEnable       = 0;
1225         ibl.ddrConfig.configDdr = TRUE;
1226         ibl.ddrConfig.uEmif.emif4p0.registerMask = ibl_EMIF4_ENABLE_sdRamConfig | ibl_EMIF4_ENABLE_sdRamRefreshCtl | ibl_EMIF4_ENABLE_sdRamTiming1 | ibl_EMIF4_ENABLE_sdRamTiming2 | ibl_EMIF4_ENABLE_sdRamTiming3 | ibl_EMIF4_ENABLE_ddrPhyCtl1;
1228         ibl.ddrConfig.uEmif.emif4p0.sdRamConfig                         = 0x62477AB2;
1229         ibl.ddrConfig.uEmif.emif4p0.sdRamConfig2                        = 0;
1230         ibl.ddrConfig.uEmif.emif4p0.sdRamRefreshCtl                     = 0x000030D4;
1231         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming1                        = 0x1333780C;
1232         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming2                        = 0x30717FE3;
1233         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming3                        = 0x559F86AF;
1234         ibl.ddrConfig.uEmif.emif4p0.lpDdrNvmTiming                      = 0;
1235         ibl.ddrConfig.uEmif.emif4p0.powerManageCtl                      = 0;
1236         ibl.ddrConfig.uEmif.emif4p0.iODFTTestLogic                      = 0;
1237         ibl.ddrConfig.uEmif.emif4p0.performCountCfg                     = 0;
1238         ibl.ddrConfig.uEmif.emif4p0.performCountMstRegSel               = 0;
1239         ibl.ddrConfig.uEmif.emif4p0.readIdleCtl                         = 0;
1240         ibl.ddrConfig.uEmif.emif4p0.sysVbusmIntEnSet                    = 0;
1241         ibl.ddrConfig.uEmif.emif4p0.sdRamOutImpdedCalCfg                = 0;
1242         ibl.ddrConfig.uEmif.emif4p0.tempAlterCfg                        = 0;
1243         ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl1                          = 0x0010010F;
1244         ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl2                          = 0;
1245         ibl.ddrConfig.uEmif.emif4p0.priClassSvceMap                     = 0;
1246         ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce1Map                   = 0;
1247         ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce2Map                   = 0;
1248         ibl.ddrConfig.uEmif.emif4p0.eccCtl                              = 0;
1249         ibl.ddrConfig.uEmif.emif4p0.eccRange1                           = 0;
1250         ibl.ddrConfig.uEmif.emif4p0.eccRange2                           = 0;
1251         ibl.ddrConfig.uEmif.emif4p0.rdWrtExcThresh                      = 0;
1253         /* SGMII 0 is present */
1254         ibl.sgmiiConfig[0].configure = TRUE;
1255         ibl.sgmiiConfig[0].adviseAbility = 0x1;
1256         ibl.sgmiiConfig[0].control       = 0x1;
1257         ibl.sgmiiConfig[0].txConfig      = 0x00000e21;
1258         ibl.sgmiiConfig[0].rxConfig      = 0x00081021;
1259         ibl.sgmiiConfig[0].auxConfig     = 0x0000000b;
1261         /* There is no port 1 on the 6657 */
1262         ibl.sgmiiConfig[1].configure = FALSE;
1264         /* MDIO configuration */
1265         ibl.mdioConfig.nMdioOps = 0;
1266         ibl.mdioConfig.mdioClkDiv = 0xa5;
1267         ibl.mdioConfig.interDelay = 3000;   /* ~2ms at 1000 MHz */
1269         ibl.spiConfig.addrWidth  = 24;
1270         ibl.spiConfig.nPins      = 5;
1271         ibl.spiConfig.mode       = 1;   /* TODO: Confirm SPI Mode */
1272         ibl.spiConfig.csel       = 2;
1273         ibl.spiConfig.c2tdelay   = 1;
1274         ibl.spiConfig.busFreqMHz = 20;
1276         ibl.emifConfig[0].csSpace    = 2;
1277         ibl.emifConfig[0].busWidth   = 8;
1278         ibl.emifConfig[0].waitEnable = 0;
1280         ibl.emifConfig[1].csSpace    = 0;
1281         ibl.emifConfig[1].busWidth   = 0;
1282         ibl.emifConfig[1].waitEnable = 0;
1284         ibl.bootModes[0].bootMode = ibl_BOOT_MODE_NOR;
1285         ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
1286         ibl.bootModes[0].port     = 0;
1288         ibl.bootModes[0].u.norBoot.bootFormat   = ibl_BOOT_FORMAT_ELF;
1289         ibl.bootModes[0].u.norBoot.bootAddress[0][0]    = 0;            /* Image 0 NOR offset byte address in LE mode */ 
1290         ibl.bootModes[0].u.norBoot.bootAddress[0][1]    = 0xA00000;     /* Image 1 NOR offset byte address in LE mode  */
1291         ibl.bootModes[0].u.norBoot.bootAddress[1][0]    = 0;            /* Image 0 NOR offset byte address in BE mode */ 
1292         ibl.bootModes[0].u.norBoot.bootAddress[1][1]    = 0xA00000;     /* Image 1 NOR offset byte address in BE mode  */
1293         ibl.bootModes[0].u.norBoot.interface    = ibl_PMEM_IF_SPI;
1294     ibl.bootModes[0].u.norBoot.blob[0][0].startAddress  = 0x80000000;       /* Image 0 load start address in LE mode */
1295     ibl.bootModes[0].u.norBoot.blob[0][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in LE mode */
1296     ibl.bootModes[0].u.norBoot.blob[0][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in LE mode */
1297     ibl.bootModes[0].u.norBoot.blob[0][1].startAddress  = 0x80000000;       /* Image 1 load start address in LE mode */
1298     ibl.bootModes[0].u.norBoot.blob[0][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in LE mode */
1299     ibl.bootModes[0].u.norBoot.blob[0][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in LE mode */
1300     ibl.bootModes[0].u.norBoot.blob[1][0].startAddress  = 0x80000000;       /* Image 0 load start address in BE mode */
1301     ibl.bootModes[0].u.norBoot.blob[1][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in BE mode */
1302     ibl.bootModes[0].u.norBoot.blob[1][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in BE mode */
1303     ibl.bootModes[0].u.norBoot.blob[1][1].startAddress  = 0x80000000;       /* Image 1 load start address in BE mode */
1304     ibl.bootModes[0].u.norBoot.blob[1][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in BE mode */
1305     ibl.bootModes[0].u.norBoot.blob[1][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in BE mode */
1307     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NAND;
1308     ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY;
1309     ibl.bootModes[1].port     = 0;
1311     ibl.bootModes[1].u.nandBoot.bootFormat        = ibl_BOOT_FORMAT_BBLOB;
1312     ibl.bootModes[1].u.nandBoot.bootAddress[0][0]         = 0x20000;         /* Image 0 NAND offset address (block 1) in LE mode */
1313     ibl.bootModes[1].u.nandBoot.bootAddress[0][1]         = 0x4000000;      /* Image 1 NAND offset address (block 512) in LE mode */
1314     ibl.bootModes[1].u.nandBoot.bootAddress[1][0]         = 0x20000;        /* Image 0 NAND offset address (block 1) in BE mode */
1315     ibl.bootModes[1].u.nandBoot.bootAddress[1][1]         = 0x4000000;      /* Image 1 NAND offset address (block 512) in BE mode */
1316     ibl.bootModes[1].u.nandBoot.interface         = ibl_PMEM_IF_CHIPSEL_2;
1318     ibl.bootModes[1].u.nandBoot.blob[0][0].startAddress  = 0x80000000;       /* Image 0 load start address in LE mode */
1319     ibl.bootModes[1].u.nandBoot.blob[0][0].sizeBytes     = 0xFFC000;         /* Image 0 size in LE mode */
1320     ibl.bootModes[1].u.nandBoot.blob[0][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in LE mode */
1321     ibl.bootModes[1].u.nandBoot.blob[0][1].startAddress  = 0x80000000;       /* Image 1 load start address in LE mode */
1322     ibl.bootModes[1].u.nandBoot.blob[0][1].sizeBytes     = 0xFFC000;         /* Image 1 size in LE mode */
1323     ibl.bootModes[1].u.nandBoot.blob[0][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in LE mode */
1324     ibl.bootModes[1].u.nandBoot.blob[1][0].startAddress  = 0x80000000;       /* Image 0 load start address in BE mode */
1325     ibl.bootModes[1].u.nandBoot.blob[1][0].sizeBytes     = 0xFFC000;         /* Image 0 size in BE mode */
1326     ibl.bootModes[1].u.nandBoot.blob[1][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in BE mode */
1327     ibl.bootModes[1].u.nandBoot.blob[1][1].startAddress  = 0x80000000;       /* Image 1 load start address in BE mode */
1328     ibl.bootModes[1].u.nandBoot.blob[1][1].sizeBytes     = 0xFFC000;         /* Image 1 size in BE mode */
1329     ibl.bootModes[1].u.nandBoot.blob[1][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in BE mode */
1332     ibl.bootModes[1].u.nandBoot.nandInfo.busWidthBits  = 8;
1333     ibl.bootModes[1].u.nandBoot.nandInfo.pageSizeBytes = 2048;
1334     ibl.bootModes[1].u.nandBoot.nandInfo.pageEccBytes  = 64;
1335     ibl.bootModes[1].u.nandBoot.nandInfo.pagesPerBlock = 64;
1336     ibl.bootModes[1].u.nandBoot.nandInfo.totalBlocks   = 1024;
1338     ibl.bootModes[1].u.nandBoot.nandInfo.addressBytes  = 4;
1339     ibl.bootModes[1].u.nandBoot.nandInfo.lsbFirst      = TRUE;
1340     ibl.bootModes[1].u.nandBoot.nandInfo.blockOffset   = 22;
1341     ibl.bootModes[1].u.nandBoot.nandInfo.pageOffset    = 16;
1342     ibl.bootModes[1].u.nandBoot.nandInfo.columnOffset  = 0;
1344     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[0]  = 0;
1345     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[1]  = 1;
1346     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[2]  = 2;
1347     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[3]  = 3;
1348     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[4]  = 4;
1349     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[5]  = 6;
1350     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[6]  = 7;
1351     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[7]  = 13;
1352     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[8]  = 14;
1353     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[9]  = 15;
1355     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[0]= 0;
1356     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[1]= 0xff;
1358     ibl.bootModes[1].u.nandBoot.nandInfo.resetCommand    = 0xff;
1359     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPre  = 0x00;
1360     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPost = 0x30;
1361     ibl.bootModes[1].u.nandBoot.nandInfo.postCommand     = TRUE;
1364         ibl.bootModes[2].bootMode = ibl_BOOT_MODE_TFTP;
1365         ibl.bootModes[2].priority = ibl_HIGHEST_PRIORITY+1;
1366         ibl.bootModes[2].port     = ibl_PORT_SWITCH_ALL;
1368         ibl.bootModes[2].u.ethBoot.doBootp          = TRUE;
1369         ibl.bootModes[2].u.ethBoot.useBootpServerIp = TRUE;
1370         ibl.bootModes[2].u.ethBoot.useBootpFileName = TRUE;
1371         ibl.bootModes[2].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
1374     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.ipAddr,    192,168,1,3);
1375     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.serverIp,  192,168,1,2);
1376     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.gatewayIp, 192,168,1,1);
1377     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.netmask,   255,255,255,0);
1379     /* Use the e-fuse value */
1380     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[0] = 0;
1381     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[1] = 0;
1382     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[2] = 0;
1383     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[3] = 0;
1384     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[4] = 0;
1385     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[5] = 0;
1388     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[0]  = 'c';
1389     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[1]  = '6';
1390     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[2]  = '6';
1391     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[3]  = '5';
1392     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[4]  = '7';
1393     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[5]  = '-';
1394     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[6]  = 'l';
1395     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[7]  = 'e';
1396     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[8]  = '.';
1397     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[9]  = 'b';
1398     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[10] = 'i';
1399     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[11] = 'n';
1400     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[12] = '\0';
1401     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[13] = '\0';
1402     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[14] = '\0';
1404     ibl.bootModes[2].u.ethBoot.blob.startAddress  = 0x80000000;       /* Load start address */
1405     ibl.bootModes[2].u.ethBoot.blob.sizeBytes     = 0x20000000;
1406     ibl.bootModes[2].u.ethBoot.blob.branchAddress = 0x80000000;       /* Branch address after loading */
1408     ibl.chkSum = 0;
1412 menuitem "EVM TCI6634K2K IBL";
1414 hotmenu setConfig_tci6634k2k_main()
1416         ibl.iblMagic = ibl_MAGIC_VALUE;
1417         ibl.iblEvmType = ibl_EVM_TCI6634K2K;
1419         /* Main PLL: 122.88 MHz reference, 983 MHz output */
1420         ibl.pllConfig[ibl_MAIN_PLL].doEnable      = 1;
1421         ibl.pllConfig[ibl_MAIN_PLL].prediv        = 1;
1422         ibl.pllConfig[ibl_MAIN_PLL].mult          = 16;
1423         ibl.pllConfig[ibl_MAIN_PLL].postdiv       = 2;
1424         ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz = 983;
1426         /* TBD: DDR PLL: 66.66->100 MHz reference, 400 MHz output, for an 800MHz DDR rate */
1427         ibl.pllConfig[ibl_DDR_PLL].doEnable       = 1; 
1428         ibl.pllConfig[ibl_DDR_PLL].prediv         = 1;
1429         ibl.pllConfig[ibl_DDR_PLL].mult           = 20;
1430         ibl.pllConfig[ibl_DDR_PLL].postdiv        = 2;
1431         ibl.pllConfig[ibl_DDR_PLL].pllOutFreqMhz  = 1333;
1433         /* Net PLL: 122.88 MHz reference, 1050 MHz output (followed by a built in divide by 3 to give 348 MHz to PA) */
1434         ibl.pllConfig[ibl_NET_PLL].doEnable       = 1;
1435         ibl.pllConfig[ibl_NET_PLL].prediv         = 1;
1436         ibl.pllConfig[ibl_NET_PLL].mult           = 17;
1437         ibl.pllConfig[ibl_NET_PLL].postdiv        = 2;
1438         ibl.pllConfig[ibl_NET_PLL].pllOutFreqMhz  = 1044;
1441         ibl.ddrConfig.configDdr = 1;
1442         ibl.ddrConfig.uEmif.emif4p0.registerMask = ibl_EMIF4_ENABLE_sdRamConfig | ibl_EMIF4_ENABLE_sdRamRefreshCtl | ibl_EMIF4_ENABLE_sdRamTiming1 | ibl_EMIF4_ENABLE_sdRamTiming2 | ibl_EMIF4_ENABLE_sdRamTiming3 | ibl_EMIF4_ENABLE_ddrPhyCtl1;
1444         ibl.ddrConfig.uEmif.emif4p0.sdRamConfig                         = 0x63C452B2;
1445         ibl.ddrConfig.uEmif.emif4p0.sdRamConfig2                        = 0;
1446         ibl.ddrConfig.uEmif.emif4p0.sdRamRefreshCtl                     = 0x000030D4;
1447         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming1                        = 0x0AAAE51B;
1448         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming2                        = 0x2A2F7FDA;
1449         ibl.ddrConfig.uEmif.emif4p0.sdRamTiming3                        = 0x057F82B8;
1450         ibl.ddrConfig.uEmif.emif4p0.lpDdrNvmTiming                      = 0;
1451         ibl.ddrConfig.uEmif.emif4p0.powerManageCtl                      = 0;
1452         ibl.ddrConfig.uEmif.emif4p0.iODFTTestLogic                      = 0;
1453         ibl.ddrConfig.uEmif.emif4p0.performCountCfg                     = 0;
1454         ibl.ddrConfig.uEmif.emif4p0.performCountMstRegSel       = 0;
1455         ibl.ddrConfig.uEmif.emif4p0.readIdleCtl                         = 0;
1456         ibl.ddrConfig.uEmif.emif4p0.sysVbusmIntEnSet            = 0;
1457         ibl.ddrConfig.uEmif.emif4p0.sdRamOutImpdedCalCfg        = 0;
1458         ibl.ddrConfig.uEmif.emif4p0.tempAlterCfg                        = 0;
1459         ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl1                          = 0x0010010d;
1460         ibl.ddrConfig.uEmif.emif4p0.ddrPhyCtl2                          = 0;
1461         ibl.ddrConfig.uEmif.emif4p0.priClassSvceMap                     = 0;
1462         ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce1Map           = 0;
1463         ibl.ddrConfig.uEmif.emif4p0.mstId2ClsSvce2Map           = 0;
1464         ibl.ddrConfig.uEmif.emif4p0.eccCtl                                      = 0;
1465         ibl.ddrConfig.uEmif.emif4p0.eccRange1                           = 0;
1466         ibl.ddrConfig.uEmif.emif4p0.eccRange2                           = 0;
1467         ibl.ddrConfig.uEmif.emif4p0.rdWrtExcThresh                      = 0;
1469         /* TBD: check SERDES configuration */
1470         ibl.sgmiiConfig[0].configure     = 1;
1471         ibl.sgmiiConfig[0].adviseAbility = 1;
1472         ibl.sgmiiConfig[0].control               = 1;
1473         ibl.sgmiiConfig[0].txConfig      = 0x108a1;
1474         ibl.sgmiiConfig[0].rxConfig      = 0x700621;
1475         ibl.sgmiiConfig[0].auxConfig     = 0x41;
1477         ibl.sgmiiConfig[1].configure     = 1;
1478         ibl.sgmiiConfig[1].adviseAbility = 1;
1479         ibl.sgmiiConfig[1].control               = 1;
1480         ibl.sgmiiConfig[1].txConfig      = 0x108a1;
1481         ibl.sgmiiConfig[1].rxConfig      = 0x700621;
1482         ibl.sgmiiConfig[1].auxConfig     = 0x41;
1484         ibl.mdioConfig.nMdioOps = 0;
1486         ibl.spiConfig.addrWidth  = 24;
1487         ibl.spiConfig.nPins      = 5;
1488         ibl.spiConfig.mode       = 1;
1489         ibl.spiConfig.csel       = 2;
1490         ibl.spiConfig.c2tdelay   = 1;
1491         ibl.spiConfig.busFreqMHz = 20;
1493         ibl.emifConfig[0].csSpace    = 2;
1494         ibl.emifConfig[0].busWidth   = 8;
1495         ibl.emifConfig[0].waitEnable = 0;
1497         ibl.emifConfig[1].csSpace    = 0;
1498         ibl.emifConfig[1].busWidth   = 0;
1499         ibl.emifConfig[1].waitEnable = 0;
1501         ibl.bootModes[0].bootMode = ibl_BOOT_MODE_NOR;
1502         ibl.bootModes[0].priority = ibl_HIGHEST_PRIORITY;
1503         ibl.bootModes[0].port     = 0;
1505         ibl.bootModes[0].u.norBoot.bootFormat   = ibl_BOOT_FORMAT_ELF;
1506         ibl.bootModes[0].u.norBoot.bootAddress[0][0]    = 0;            /* Image 0 NOR offset byte address in LE mode */ 
1507         ibl.bootModes[0].u.norBoot.bootAddress[0][1]    = 0xA00000;     /* Image 1 NOR offset byte address in LE mode  */
1508         ibl.bootModes[0].u.norBoot.bootAddress[1][0]    = 0;            /* Image 0 NOR offset byte address in BE mode */ 
1509         ibl.bootModes[0].u.norBoot.bootAddress[1][1]    = 0xA00000;     /* Image 1 NOR offset byte address in BE mode  */
1510         ibl.bootModes[0].u.norBoot.interface    = ibl_PMEM_IF_SPI;
1511     ibl.bootModes[0].u.norBoot.blob[0][0].startAddress  = 0x80000000;       /* Image 0 load start address in LE mode */
1512     ibl.bootModes[0].u.norBoot.blob[0][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in LE mode */
1513     ibl.bootModes[0].u.norBoot.blob[0][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in LE mode */
1514     ibl.bootModes[0].u.norBoot.blob[0][1].startAddress  = 0x80000000;       /* Image 1 load start address in LE mode */
1515     ibl.bootModes[0].u.norBoot.blob[0][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in LE mode */
1516     ibl.bootModes[0].u.norBoot.blob[0][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in LE mode */
1517     ibl.bootModes[0].u.norBoot.blob[1][0].startAddress  = 0x80000000;       /* Image 0 load start address in BE mode */
1518     ibl.bootModes[0].u.norBoot.blob[1][0].sizeBytes     = 0xA00000;         /* Image 0 size (10 MB) in BE mode */
1519     ibl.bootModes[0].u.norBoot.blob[1][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in BE mode */
1520     ibl.bootModes[0].u.norBoot.blob[1][1].startAddress  = 0x80000000;       /* Image 1 load start address in BE mode */
1521     ibl.bootModes[0].u.norBoot.blob[1][1].sizeBytes     = 0xA00000;         /* Image 1 size (10 MB) in BE mode */
1522     ibl.bootModes[0].u.norBoot.blob[1][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in BE mode */
1524     ibl.bootModes[1].bootMode = ibl_BOOT_MODE_NAND;
1525     ibl.bootModes[1].priority = ibl_HIGHEST_PRIORITY;
1526     ibl.bootModes[1].port     = 0;
1528     ibl.bootModes[1].u.nandBoot.bootFormat        = ibl_BOOT_FORMAT_BBLOB;
1529     ibl.bootModes[1].u.nandBoot.bootAddress[0][0]         = 0x20000;         /* Image 0 NAND offset address (block 1) in LE mode */
1530     ibl.bootModes[1].u.nandBoot.bootAddress[0][1]         = 0x4000000;      /* Image 1 NAND offset address (block 512) in LE mode */
1531     ibl.bootModes[1].u.nandBoot.bootAddress[1][0]         = 0x20000;        /* Image 0 NAND offset address (block 1) in BE mode */
1532     ibl.bootModes[1].u.nandBoot.bootAddress[1][1]         = 0x4000000;      /* Image 1 NAND offset address (block 512) in BE mode */
1533     ibl.bootModes[1].u.nandBoot.interface         = ibl_PMEM_IF_CHIPSEL_2;
1535     ibl.bootModes[1].u.nandBoot.blob[0][0].startAddress  = 0x80000000;       /* Image 0 load start address in LE mode */
1536     ibl.bootModes[1].u.nandBoot.blob[0][0].sizeBytes     = 0xFFC000;         /* Image 0 size in LE mode */
1537     ibl.bootModes[1].u.nandBoot.blob[0][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in LE mode */
1538     ibl.bootModes[1].u.nandBoot.blob[0][1].startAddress  = 0x80000000;       /* Image 1 load start address in LE mode */
1539     ibl.bootModes[1].u.nandBoot.blob[0][1].sizeBytes     = 0xFFC000;         /* Image 1 size in LE mode */
1540     ibl.bootModes[1].u.nandBoot.blob[0][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in LE mode */
1541     ibl.bootModes[1].u.nandBoot.blob[1][0].startAddress  = 0x80000000;       /* Image 0 load start address in BE mode */
1542     ibl.bootModes[1].u.nandBoot.blob[1][0].sizeBytes     = 0xFFC000;         /* Image 0 size in BE mode */
1543     ibl.bootModes[1].u.nandBoot.blob[1][0].branchAddress = 0x80000000;       /* Image 0 branch address after loading in BE mode */
1544     ibl.bootModes[1].u.nandBoot.blob[1][1].startAddress  = 0x80000000;       /* Image 1 load start address in BE mode */
1545     ibl.bootModes[1].u.nandBoot.blob[1][1].sizeBytes     = 0xFFC000;         /* Image 1 size in BE mode */
1546     ibl.bootModes[1].u.nandBoot.blob[1][1].branchAddress = 0x80000000;       /* Image 1 branch address after loading in BE mode */
1549     ibl.bootModes[1].u.nandBoot.nandInfo.busWidthBits  = 8;
1550     ibl.bootModes[1].u.nandBoot.nandInfo.pageSizeBytes = 2048;
1551     ibl.bootModes[1].u.nandBoot.nandInfo.pageEccBytes  = 64;
1552     ibl.bootModes[1].u.nandBoot.nandInfo.pagesPerBlock = 64;
1553     ibl.bootModes[1].u.nandBoot.nandInfo.totalBlocks   = 1024;
1555     ibl.bootModes[1].u.nandBoot.nandInfo.addressBytes  = 4;
1556     ibl.bootModes[1].u.nandBoot.nandInfo.lsbFirst      = TRUE;
1557     ibl.bootModes[1].u.nandBoot.nandInfo.blockOffset   = 22;
1558     ibl.bootModes[1].u.nandBoot.nandInfo.pageOffset    = 16;
1559     ibl.bootModes[1].u.nandBoot.nandInfo.columnOffset  = 0;
1561     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[0]  = 0; 
1562     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[1]  = 1; 
1563     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[2]  = 2; 
1564     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[3]  = 3; 
1565     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[4]  = 4; 
1566     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[5]  = 6; 
1567     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[6]  = 7; 
1568     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[7]  = 13; 
1569     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[8]  = 14; 
1570     ibl.bootModes[1].u.nandBoot.nandInfo.eccBytesIdx[9]  = 15; 
1571     
1572     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[0]= 5;
1573     ibl.bootModes[1].u.nandBoot.nandInfo.badBlkMarkIdx[1]= 0xff;
1575     ibl.bootModes[1].u.nandBoot.nandInfo.resetCommand    = 0xff;
1576     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPre  = 0x00;
1577     ibl.bootModes[1].u.nandBoot.nandInfo.readCommandPost = 0x30;
1578     ibl.bootModes[1].u.nandBoot.nandInfo.postCommand     = TRUE;
1579     
1580         ibl.bootModes[2].bootMode = ibl_BOOT_MODE_TFTP;
1581         ibl.bootModes[2].priority = ibl_HIGHEST_PRIORITY+1;
1582         ibl.bootModes[2].port     = ibl_PORT_SWITCH_ALL;
1584         ibl.bootModes[2].u.ethBoot.doBootp          = FALSE;
1585         ibl.bootModes[2].u.ethBoot.useBootpServerIp = TRUE;
1586         ibl.bootModes[2].u.ethBoot.useBootpFileName = TRUE;
1587         ibl.bootModes[2].u.ethBoot.bootFormat       = ibl_BOOT_FORMAT_BBLOB;
1590     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.ipAddr,    192,168,2,100);
1591     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.serverIp,  192,168,2,101);
1592     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.gatewayIp, 192,168,2,1);
1593     SETIP(ibl.bootModes[2].u.ethBoot.ethInfo.netmask,   255,255,255,0);
1595     /* Use the e-fuse value */
1596     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[0] = 0;
1597     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[1] = 0;
1598     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[2] = 0;
1599     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[3] = 0;
1600     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[4] = 0;
1601     ibl.bootModes[2].u.ethBoot.ethInfo.hwAddress[5] = 0;
1604     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[0]  = 'a';
1605     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[1]  = 'p';
1606     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[2]  = 'p';
1607     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[3]  = '.';
1608     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[4]  = 'o';
1609     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[5]  = 'u';
1610     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[6]  = 't';
1611     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[7]  = '\0';
1612     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[8]  = '\0';
1613     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[9]  = '\0';
1614     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[10] = '\0';
1615     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[11] = '\0';
1616     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[12] = '\0';
1617     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[13] = '\0';
1618     ibl.bootModes[2].u.ethBoot.ethInfo.fileName[14] = '\0';
1620     ibl.bootModes[2].u.ethBoot.blob.startAddress  = 0x80000000;       /* Load start address */
1621     ibl.bootModes[2].u.ethBoot.blob.sizeBytes     = 0x20000000;
1622     ibl.bootModes[2].u.ethBoot.blob.branchAddress = 0x80000000;       /* Branch address after loading */
1624     ibl.chkSum = 0;