Kan bin

Bad block table not found for chip 0!

Discussion created by Kan bin on Aug 12, 2013
Latest reply on Sep 25, 2013 by Kan bin

hi :

when I transplant the uboot I got a problem witch are signed with the red color :

 

U-Boot 1.3.0 (Aug 12 2013 - 02:17:44) MPC83XX

Reset Status:

 

CPU:   e300c3, MPC8313E, Rev: 21 at 333.333 MHz, CSB:  166 MHz

Board: Freescale MPC8313ERDB

I2C:   ready

DRAM:  128 MB

FLASH:  8 MB

NAND:  Bad block table not found for chip 0

Bad block table not found for chip 0

No space left to write bad block table

128 MiB

*** Warning - bad CRC, using default environment

In:    serial

Out:   serial

Err:   serial

Net:   TSEC0, TSEC1, ax88796b [PRIME]

=>

 

In fact , my nand size is 4GiByte,,I have chagned the codes as following:

1、 /uboot/include/configs/MPC8313ERDB.h

#define CFG_NAND_OR_PRELIM    (0xFFFF8000            /* length 32K */ \

                             | OR_FCM_PGS              /*add by me for large page&block*/ \

                              | OR_FCM_CSCT \

                              | OR_FCM_CST \

                              | OR_FCM_CHT \

                              | OR_FCM_SCY_1 \

                              | OR_FCM_TRLX \

                              | OR_FCM_EHTR )

 

#define CFG_NAND_PAGE_SIZE      (8192)           /* NAND chip page size(Byte) changed by asky */

#define CFG_NAND_BLOCK_SIZE     (1024 << 10)      /* NAND chip block size chaned by asky*/

 

2、/uboot/board/freescale/mpc8313erdb/nand_ids.h

{"NAND 4GiB 3,3V 8-bit",        0x68, 8192, 4096, 0,NAND_SAMSUNG_LP_OPTIONS | NAND_NO_AUTOINCR},          //add by asky

 

3、/uboot/board/freescale/mpc8313erdb/nand.c

        else if(mtd->oobblock == 8192) {                                                                                             //add by asky                                                                                         

                lbc->bank[fcm->bank].or |= OR_FCM_PGS;

                /* adjust ecc setup if needed */

                if ((lbc->bank[fcm->bank].br & BR_DECC) == BR_DECC_CHK_GEN) {

                        mtd->eccsize = 8192;

                        mtd->oobavail -= 9;

                        this->eccmode = NAND_ECC_HW12_2048;

                        this->eccsize = 8192;

                        this->eccbytes += 9;

                        this->eccsteps = 1;

                        this->autooob = (fcm->fmr & FMR_ECCM) ?

                                        &fcm_oob_lp_eccm1 : &fcm_oob_lp_eccm0;

                        memcpy(&mtd->oobinfo, this->autooob,

                                        sizeof(mtd->oobinfo));

                }

        }

 

Are these enough ?anyone can help me ?

Outcomes