2 * Copyright (C) 2006 Freescale Semiconductor, Inc.
4 * Dave Liu <daveliu@freescale.com>
5 * based on board/mpc8349emds/mpc8349emds.c
7 * See file CREDITS for list of people who contributed to this
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
23 #if defined(CONFIG_PCI)
26 #if defined(CONFIG_SPD_EEPROM)
27 #include <spd_sdram.h>
31 #if defined(CONFIG_OF_FLAT_TREE)
35 const qe_iop_conf_t qe_iop_conf_tab[] = {
37 {0, 3, 1, 0, 1}, /* TxD0 */
38 {0, 4, 1, 0, 1}, /* TxD1 */
39 {0, 5, 1, 0, 1}, /* TxD2 */
40 {0, 6, 1, 0, 1}, /* TxD3 */
41 {1, 6, 1, 0, 3}, /* TxD4 */
42 {1, 7, 1, 0, 1}, /* TxD5 */
43 {1, 9, 1, 0, 2}, /* TxD6 */
44 {1, 10, 1, 0, 2}, /* TxD7 */
45 {0, 9, 2, 0, 1}, /* RxD0 */
46 {0, 10, 2, 0, 1}, /* RxD1 */
47 {0, 11, 2, 0, 1}, /* RxD2 */
48 {0, 12, 2, 0, 1}, /* RxD3 */
49 {0, 13, 2, 0, 1}, /* RxD4 */
50 {1, 1, 2, 0, 2}, /* RxD5 */
51 {1, 0, 2, 0, 2}, /* RxD6 */
52 {1, 4, 2, 0, 2}, /* RxD7 */
53 {0, 7, 1, 0, 1}, /* TX_EN */
54 {0, 8, 1, 0, 1}, /* TX_ER */
55 {0, 15, 2, 0, 1}, /* RX_DV */
56 {0, 16, 2, 0, 1}, /* RX_ER */
57 {0, 0, 2, 0, 1}, /* RX_CLK */
58 {2, 9, 1, 0, 3}, /* GTX_CLK - CLK10 */
59 {2, 8, 2, 0, 1}, /* GTX125 - CLK9 */
61 {0, 17, 1, 0, 1}, /* TxD0 */
62 {0, 18, 1, 0, 1}, /* TxD1 */
63 {0, 19, 1, 0, 1}, /* TxD2 */
64 {0, 20, 1, 0, 1}, /* TxD3 */
65 {1, 2, 1, 0, 1}, /* TxD4 */
66 {1, 3, 1, 0, 2}, /* TxD5 */
67 {1, 5, 1, 0, 3}, /* TxD6 */
68 {1, 8, 1, 0, 3}, /* TxD7 */
69 {0, 23, 2, 0, 1}, /* RxD0 */
70 {0, 24, 2, 0, 1}, /* RxD1 */
71 {0, 25, 2, 0, 1}, /* RxD2 */
72 {0, 26, 2, 0, 1}, /* RxD3 */
73 {0, 27, 2, 0, 1}, /* RxD4 */
74 {1, 12, 2, 0, 2}, /* RxD5 */
75 {1, 13, 2, 0, 3}, /* RxD6 */
76 {1, 11, 2, 0, 2}, /* RxD7 */
77 {0, 21, 1, 0, 1}, /* TX_EN */
78 {0, 22, 1, 0, 1}, /* TX_ER */
79 {0, 29, 2, 0, 1}, /* RX_DV */
80 {0, 30, 2, 0, 1}, /* RX_ER */
81 {0, 31, 2, 0, 1}, /* RX_CLK */
82 {2, 2, 1, 0, 2}, /* GTX_CLK = CLK10 */
83 {2, 3, 2, 0, 1}, /* GTX125 - CLK4 */
85 {0, 1, 3, 0, 2}, /* MDIO */
86 {0, 2, 1, 0, 1}, /* MDC */
88 {0, 0, 0, 0, QE_IOP_TAB_END}, /* END of table */
91 int board_early_init_f(void)
93 volatile u8 *bcsr = (volatile u8 *)CFG_BCSR;
95 /* Enable flash write */
101 #if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRC)
102 extern void ddr_enable_ecc(unsigned int dram_size);
104 int fixed_sdram(void);
105 void sdram_init(void);
107 long int initdram(int board_type)
109 volatile immap_t *im = (immap_t *) CFG_IMMR;
112 if ((im->sysconf.immrbar & IMMRBAR_BASE_ADDR) != (u32) im)
115 /* DDR SDRAM - Main SODIMM */
116 im->sysconf.ddrlaw[0].bar = CFG_DDR_BASE & LAWBAR_BAR;
117 #if defined(CONFIG_SPD_EEPROM)
120 msize = fixed_sdram();
123 #if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRC)
125 * Initialize DDR ECC byte
127 ddr_enable_ecc(msize * 1024 * 1024);
130 * Initialize SDRAM if it is on local bus.
134 /* return total bus SDRAM size(bytes) -- DDR */
135 return (msize * 1024 * 1024);
138 #if !defined(CONFIG_SPD_EEPROM)
139 /*************************************************************************
140 * fixed sdram init -- doesn't use serial presence detect.
141 ************************************************************************/
142 int fixed_sdram(void)
144 volatile immap_t *im = (immap_t *) CFG_IMMR;
149 msize = CFG_DDR_SIZE;
150 for (ddr_size = msize << 20, ddr_size_log2 = 0;
151 (ddr_size > 1); ddr_size = ddr_size >> 1, ddr_size_log2++) {
156 im->sysconf.ddrlaw[0].ar =
157 LAWAR_EN | ((ddr_size_log2 - 1) & LAWAR_SIZE);
158 #if (CFG_DDR_SIZE != 256)
159 #warning Currenly any ddr size other than 256 is not supported
162 im->ddr.csbnds[0].csbnds = CFG_DDR_CS0_BNDS;
163 im->ddr.cs_config[0] = CFG_DDR_CS0_CONFIG;
164 im->ddr.timing_cfg_0 = CFG_DDR_TIMING_0;
165 im->ddr.timing_cfg_1 = CFG_DDR_TIMING_1;
166 im->ddr.timing_cfg_2 = CFG_DDR_TIMING_2;
167 im->ddr.timing_cfg_3 = CFG_DDR_TIMING_3;
168 im->ddr.sdram_cfg = CFG_DDR_SDRAM_CFG;
169 im->ddr.sdram_cfg2 = CFG_DDR_SDRAM_CFG2;
170 im->ddr.sdram_mode = CFG_DDR_MODE;
171 im->ddr.sdram_mode2 = CFG_DDR_MODE2;
172 im->ddr.sdram_interval = CFG_DDR_INTERVAL;
173 im->ddr.sdram_clk_cntl = CFG_DDR_CLK_CNTL;
175 im->ddr.csbnds[0].csbnds = 0x00000007;
176 im->ddr.csbnds[1].csbnds = 0x0008000f;
178 im->ddr.cs_config[0] = CFG_DDR_CONFIG;
179 im->ddr.cs_config[1] = CFG_DDR_CONFIG;
181 im->ddr.timing_cfg_1 = CFG_DDR_TIMING_1;
182 im->ddr.timing_cfg_2 = CFG_DDR_TIMING_2;
183 im->ddr.sdram_cfg = CFG_DDR_CONTROL;
185 im->ddr.sdram_mode = CFG_DDR_MODE;
186 im->ddr.sdram_interval = CFG_DDR_INTERVAL;
189 im->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN;
193 #endif /*!CFG_SPD_EEPROM */
197 puts("Board: Freescale MPC8360EMDS\n");
202 * if MPC8360EMDS is soldered with SDRAM
204 #if defined(CFG_BR2_PRELIM) \
205 && defined(CFG_OR2_PRELIM) \
206 && defined(CFG_LBLAWBAR2_PRELIM) \
207 && defined(CFG_LBLAWAR2_PRELIM)
209 * Initialize SDRAM memory on the Local Bus.
212 void sdram_init(void)
214 volatile immap_t *immap = (immap_t *) CFG_IMMR;
215 volatile lbus83xx_t *lbc = &immap->lbus;
216 uint *sdram_addr = (uint *) CFG_LBC_SDRAM_BASE;
218 puts("\n SDRAM on Local Bus: ");
219 print_size(CFG_LBC_SDRAM_SIZE * 1024 * 1024, "\n");
221 * Setup SDRAM Base and Option Registers, already done in cpu_init.c
223 /*setup mtrpt, lsrt and lbcr for LB bus */
224 lbc->lbcr = CFG_LBC_LBCR;
225 lbc->mrtpr = CFG_LBC_MRTPR;
226 lbc->lsrt = CFG_LBC_LSRT;
230 * Configure the SDRAM controller Machine Mode Register.
232 lbc->lsdmr = CFG_LBC_LSDMR_5; /* Normal Operation */
233 lbc->lsdmr = CFG_LBC_LSDMR_1; /* Precharge All Banks */
239 * We need do 8 times auto refresh operation.
241 lbc->lsdmr = CFG_LBC_LSDMR_2;
243 *sdram_addr = 0xff; /* 1 times */
245 *sdram_addr = 0xff; /* 2 times */
247 *sdram_addr = 0xff; /* 3 times */
249 *sdram_addr = 0xff; /* 4 times */
251 *sdram_addr = 0xff; /* 5 times */
253 *sdram_addr = 0xff; /* 6 times */
255 *sdram_addr = 0xff; /* 7 times */
257 *sdram_addr = 0xff; /* 8 times */
260 /* Mode register write operation */
261 lbc->lsdmr = CFG_LBC_LSDMR_4;
263 *(sdram_addr + 0xcc) = 0xff;
266 /* Normal operation */
267 lbc->lsdmr = CFG_LBC_LSDMR_5 | 0x40000000;
273 void sdram_init(void)
275 puts("SDRAM on Local Bus is NOT available!\n");
279 #if defined(CONFIG_DDR_ECC) && defined(CONFIG_DDR_ECC_CMD)
283 void ecc_print_status(void)
285 volatile immap_t *immap = (immap_t *) CFG_IMMR;
286 volatile ddr83xx_t *ddr = &immap->ddr;
288 printf("\nECC mode: %s\n\n",
289 (ddr->sdram_cfg & SDRAM_CFG_ECC_EN) ? "ON" : "OFF");
292 printf("Memory Error Interrupt Enable:\n");
293 printf(" Multiple-Bit Error Interrupt Enable: %d\n",
294 (ddr->err_int_en & ECC_ERR_INT_EN_MBEE) ? 1 : 0);
295 printf(" Single-Bit Error Interrupt Enable: %d\n",
296 (ddr->err_int_en & ECC_ERR_INT_EN_SBEE) ? 1 : 0);
297 printf(" Memory Select Error Interrupt Enable: %d\n\n",
298 (ddr->err_int_en & ECC_ERR_INT_EN_MSEE) ? 1 : 0);
301 printf("Memory Error Disable:\n");
302 printf(" Multiple-Bit Error Disable: %d\n",
303 (ddr->err_disable & ECC_ERROR_DISABLE_MBED) ? 1 : 0);
304 printf(" Sinle-Bit Error Disable: %d\n",
305 (ddr->err_disable & ECC_ERROR_DISABLE_SBED) ? 1 : 0);
306 printf(" Memory Select Error Disable: %d\n\n",
307 (ddr->err_disable & ECC_ERROR_DISABLE_MSED) ? 1 : 0);
309 /* Error injection */
310 printf("Memory Data Path Error Injection Mask High/Low: %08lx %08lx\n",
311 ddr->data_err_inject_hi, ddr->data_err_inject_lo);
313 printf("Memory Data Path Error Injection Mask ECC:\n");
314 printf(" ECC Mirror Byte: %d\n",
315 (ddr->ecc_err_inject & ECC_ERR_INJECT_EMB) ? 1 : 0);
316 printf(" ECC Injection Enable: %d\n",
317 (ddr->ecc_err_inject & ECC_ERR_INJECT_EIEN) ? 1 : 0);
318 printf(" ECC Error Injection Mask: 0x%02x\n\n",
319 ddr->ecc_err_inject & ECC_ERR_INJECT_EEIM);
321 /* SBE counter/threshold */
322 printf("Memory Single-Bit Error Management (0..255):\n");
323 printf(" Single-Bit Error Threshold: %d\n",
324 (ddr->err_sbe & ECC_ERROR_MAN_SBET) >> ECC_ERROR_MAN_SBET_SHIFT);
325 printf(" Single-Bit Error Counter: %d\n\n",
326 (ddr->err_sbe & ECC_ERROR_MAN_SBEC) >> ECC_ERROR_MAN_SBEC_SHIFT);
329 printf("Memory Error Detect:\n");
330 printf(" Multiple Memory Errors: %d\n",
331 (ddr->err_detect & ECC_ERROR_DETECT_MME) ? 1 : 0);
332 printf(" Multiple-Bit Error: %d\n",
333 (ddr->err_detect & ECC_ERROR_DETECT_MBE) ? 1 : 0);
334 printf(" Single-Bit Error: %d\n",
335 (ddr->err_detect & ECC_ERROR_DETECT_SBE) ? 1 : 0);
336 printf(" Memory Select Error: %d\n\n",
337 (ddr->err_detect & ECC_ERROR_DETECT_MSE) ? 1 : 0);
340 printf("Memory Error Address Capture: 0x%08lx\n", ddr->capture_address);
341 printf("Memory Data Path Read Capture High/Low: %08lx %08lx\n",
342 ddr->capture_data_hi, ddr->capture_data_lo);
343 printf("Memory Data Path Read Capture ECC: 0x%02x\n\n",
344 ddr->capture_ecc & CAPTURE_ECC_ECE);
346 printf("Memory Error Attributes Capture:\n");
347 printf(" Data Beat Number: %d\n",
348 (ddr->capture_attributes & ECC_CAPT_ATTR_BNUM) >>
349 ECC_CAPT_ATTR_BNUM_SHIFT);
350 printf(" Transaction Size: %d\n",
351 (ddr->capture_attributes & ECC_CAPT_ATTR_TSIZ) >>
352 ECC_CAPT_ATTR_TSIZ_SHIFT);
353 printf(" Transaction Source: %d\n",
354 (ddr->capture_attributes & ECC_CAPT_ATTR_TSRC) >>
355 ECC_CAPT_ATTR_TSRC_SHIFT);
356 printf(" Transaction Type: %d\n",
357 (ddr->capture_attributes & ECC_CAPT_ATTR_TTYP) >>
358 ECC_CAPT_ATTR_TTYP_SHIFT);
359 printf(" Error Information Valid: %d\n\n",
360 ddr->capture_attributes & ECC_CAPT_ATTR_VLD);
363 int do_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
365 volatile immap_t *immap = (immap_t *) CFG_IMMR;
366 volatile ddr83xx_t *ddr = &immap->ddr;
375 /* The pattern is written into memory to generate error */
376 pattern[0] = 0xfedcba98UL;
377 pattern[1] = 0x76543210UL;
379 /* After injecting error, re-initialize the memory with the value */
380 writeback[0] = 0x01234567UL;
381 writeback[1] = 0x89abcdefUL;
384 printf("Usage:\n%s\n", cmdtp->usage);
389 if (strcmp(argv[1], "status") == 0) {
392 } else if (strcmp(argv[1], "captureclear") == 0) {
393 ddr->capture_address = 0;
394 ddr->capture_data_hi = 0;
395 ddr->capture_data_lo = 0;
396 ddr->capture_ecc = 0;
397 ddr->capture_attributes = 0;
402 if (strcmp(argv[1], "sbecnt") == 0) {
403 val = simple_strtoul(argv[2], NULL, 10);
405 printf("Incorrect Counter value, "
406 "should be 0..255\n");
410 val = (val << ECC_ERROR_MAN_SBEC_SHIFT);
411 val |= (ddr->err_sbe & ECC_ERROR_MAN_SBET);
415 } else if (strcmp(argv[1], "sbethr") == 0) {
416 val = simple_strtoul(argv[2], NULL, 10);
418 printf("Incorrect Counter value, "
419 "should be 0..255\n");
423 val = (val << ECC_ERROR_MAN_SBET_SHIFT);
424 val |= (ddr->err_sbe & ECC_ERROR_MAN_SBEC);
428 } else if (strcmp(argv[1], "errdisable") == 0) {
429 val = ddr->err_disable;
431 if (strcmp(argv[2], "+sbe") == 0) {
432 val |= ECC_ERROR_DISABLE_SBED;
433 } else if (strcmp(argv[2], "+mbe") == 0) {
434 val |= ECC_ERROR_DISABLE_MBED;
435 } else if (strcmp(argv[2], "+mse") == 0) {
436 val |= ECC_ERROR_DISABLE_MSED;
437 } else if (strcmp(argv[2], "+all") == 0) {
438 val |= (ECC_ERROR_DISABLE_SBED |
439 ECC_ERROR_DISABLE_MBED |
440 ECC_ERROR_DISABLE_MSED);
441 } else if (strcmp(argv[2], "-sbe") == 0) {
442 val &= ~ECC_ERROR_DISABLE_SBED;
443 } else if (strcmp(argv[2], "-mbe") == 0) {
444 val &= ~ECC_ERROR_DISABLE_MBED;
445 } else if (strcmp(argv[2], "-mse") == 0) {
446 val &= ~ECC_ERROR_DISABLE_MSED;
447 } else if (strcmp(argv[2], "-all") == 0) {
448 val &= ~(ECC_ERROR_DISABLE_SBED |
449 ECC_ERROR_DISABLE_MBED |
450 ECC_ERROR_DISABLE_MSED);
452 printf("Incorrect err_disable field\n");
456 ddr->err_disable = val;
457 __asm__ __volatile__("sync");
458 __asm__ __volatile__("isync");
460 } else if (strcmp(argv[1], "errdetectclr") == 0) {
461 val = ddr->err_detect;
463 if (strcmp(argv[2], "mme") == 0) {
464 val |= ECC_ERROR_DETECT_MME;
465 } else if (strcmp(argv[2], "sbe") == 0) {
466 val |= ECC_ERROR_DETECT_SBE;
467 } else if (strcmp(argv[2], "mbe") == 0) {
468 val |= ECC_ERROR_DETECT_MBE;
469 } else if (strcmp(argv[2], "mse") == 0) {
470 val |= ECC_ERROR_DETECT_MSE;
471 } else if (strcmp(argv[2], "all") == 0) {
472 val |= (ECC_ERROR_DETECT_MME |
473 ECC_ERROR_DETECT_MBE |
474 ECC_ERROR_DETECT_SBE |
475 ECC_ERROR_DETECT_MSE);
477 printf("Incorrect err_detect field\n");
481 ddr->err_detect = val;
483 } else if (strcmp(argv[1], "injectdatahi") == 0) {
484 val = simple_strtoul(argv[2], NULL, 16);
486 ddr->data_err_inject_hi = val;
488 } else if (strcmp(argv[1], "injectdatalo") == 0) {
489 val = simple_strtoul(argv[2], NULL, 16);
491 ddr->data_err_inject_lo = val;
493 } else if (strcmp(argv[1], "injectecc") == 0) {
494 val = simple_strtoul(argv[2], NULL, 16);
496 printf("Incorrect ECC inject mask, "
497 "should be 0x00..0xff\n");
500 val |= (ddr->ecc_err_inject & ~ECC_ERR_INJECT_EEIM);
502 ddr->ecc_err_inject = val;
504 } else if (strcmp(argv[1], "inject") == 0) {
505 val = ddr->ecc_err_inject;
507 if (strcmp(argv[2], "en") == 0)
508 val |= ECC_ERR_INJECT_EIEN;
509 else if (strcmp(argv[2], "dis") == 0)
510 val &= ~ECC_ERR_INJECT_EIEN;
512 printf("Incorrect command\n");
514 ddr->ecc_err_inject = val;
515 __asm__ __volatile__("sync");
516 __asm__ __volatile__("isync");
518 } else if (strcmp(argv[1], "mirror") == 0) {
519 val = ddr->ecc_err_inject;
521 if (strcmp(argv[2], "en") == 0)
522 val |= ECC_ERR_INJECT_EMB;
523 else if (strcmp(argv[2], "dis") == 0)
524 val &= ~ECC_ERR_INJECT_EMB;
526 printf("Incorrect command\n");
528 ddr->ecc_err_inject = val;
533 if (strcmp(argv[1], "testdw") == 0) {
534 addr = (u64 *) simple_strtoul(argv[2], NULL, 16);
535 count = simple_strtoul(argv[3], NULL, 16);
537 if ((u32) addr % 8) {
538 printf("Address not alligned on "
539 "double word boundary\n");
542 disable_interrupts();
544 for (i = addr; i < addr + count; i++) {
547 ddr->ecc_err_inject |= ECC_ERR_INJECT_EIEN;
548 __asm__ __volatile__("sync");
549 __asm__ __volatile__("isync");
551 /* write memory location injecting errors */
552 ppcDWstore((u32 *) i, pattern);
553 __asm__ __volatile__("sync");
555 /* disable injects */
556 ddr->ecc_err_inject &= ~ECC_ERR_INJECT_EIEN;
557 __asm__ __volatile__("sync");
558 __asm__ __volatile__("isync");
560 /* read data, this generates ECC error */
561 ppcDWload((u32 *) i, ret);
562 __asm__ __volatile__("sync");
564 /* re-initialize memory, double word write the location again,
565 * generates new ECC code this time */
566 ppcDWstore((u32 *) i, writeback);
567 __asm__ __volatile__("sync");
572 if (strcmp(argv[1], "testword") == 0) {
573 addr = (u64 *) simple_strtoul(argv[2], NULL, 16);
574 count = simple_strtoul(argv[3], NULL, 16);
576 if ((u32) addr % 8) {
577 printf("Address not alligned on "
578 "double word boundary\n");
581 disable_interrupts();
583 for (i = addr; i < addr + count; i++) {
586 ddr->ecc_err_inject |= ECC_ERR_INJECT_EIEN;
587 __asm__ __volatile__("sync");
588 __asm__ __volatile__("isync");
590 /* write memory location injecting errors */
591 *(u32 *) i = 0xfedcba98UL;
592 __asm__ __volatile__("sync");
594 /* sub double word write,
595 * bus will read-modify-write,
596 * generates ECC error */
597 *((u32 *) i + 1) = 0x76543210UL;
598 __asm__ __volatile__("sync");
600 /* disable injects */
601 ddr->ecc_err_inject &= ~ECC_ERR_INJECT_EIEN;
602 __asm__ __volatile__("sync");
603 __asm__ __volatile__("isync");
605 /* re-initialize memory,
606 * double word write the location again,
607 * generates new ECC code this time */
608 ppcDWstore((u32 *) i, writeback);
609 __asm__ __volatile__("sync");
615 printf("Usage:\n%s\n", cmdtp->usage);
619 U_BOOT_CMD(ecc, 4, 0, do_ecc,
620 "ecc - support for DDR ECC features\n",
621 "status - print out status info\n"
622 "ecc captureclear - clear capture regs data\n"
623 "ecc sbecnt <val> - set Single-Bit Error counter\n"
624 "ecc sbethr <val> - set Single-Bit Threshold\n"
625 "ecc errdisable <flag> - clear/set disable Memory Error Disable, flag:\n"
626 " [-|+]sbe - Single-Bit Error\n"
627 " [-|+]mbe - Multiple-Bit Error\n"
628 " [-|+]mse - Memory Select Error\n"
629 " [-|+]all - all errors\n"
630 "ecc errdetectclr <flag> - clear Memory Error Detect, flag:\n"
631 " mme - Multiple Memory Errors\n"
632 " sbe - Single-Bit Error\n"
633 " mbe - Multiple-Bit Error\n"
634 " mse - Memory Select Error\n"
635 " all - all errors\n"
636 "ecc injectdatahi <hi> - set Memory Data Path Error Injection Mask High\n"
637 "ecc injectdatalo <lo> - set Memory Data Path Error Injection Mask Low\n"
638 "ecc injectecc <ecc> - set ECC Error Injection Mask\n"
639 "ecc inject <en|dis> - enable/disable error injection\n"
640 "ecc mirror <en|dis> - enable/disable mirror byte\n"
641 "ecc testdw <addr> <cnt> - test mem region with double word access:\n"
642 " - enables injects\n"
643 " - writes pattern injecting errors with double word access\n"
644 " - disables injects\n"
645 " - reads pattern back with double word access, generates error\n"
646 " - re-inits memory\n"
647 "ecc testword <addr> <cnt> - test mem region with word access:\n"
648 " - enables injects\n"
649 " - writes pattern injecting errors with word access\n"
650 " - writes pattern with word access, generates error\n"
651 " - disables injects\n" " - re-inits memory");
652 #endif /* if defined(CONFIG_DDR_ECC) && defined(CONFIG_DDR_ECC_CMD) */
654 #if defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP)
656 ft_board_setup(void *blob, bd_t *bd)
662 ft_pci_setup(blob, bd);
664 ft_cpu_setup(blob, bd);
666 p = ft_get_prop(blob, "/memory/reg", &len);
668 *p++ = cpu_to_be32(bd->bi_memstart);
669 *p = cpu_to_be32(bd->bi_memsize);