Commit 562f39df authored by Dmitry Konyshev's avatar Dmitry Konyshev

RM1349 Don't use OOB to store NAND BBT in the fsl_nfc driver

parent 05ff4de5
......@@ -74,29 +74,6 @@ int fsl_nfc_chip;
static int get_status;
static int get_id;
static u8 bbt_pattern[] = {'B', 'b', 't', '0' };
static u8 mirror_pattern[] = {'1', 't', 'b', 'B' };
static struct nand_bbt_descr bbt_main_descr = {
.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE |
NAND_BBT_2BIT | NAND_BBT_VERSION,
.offs = 11,
.len = 4,
.veroffs = 15,
.maxblocks = 4,
.pattern = bbt_pattern,
};
static struct nand_bbt_descr bbt_mirror_descr = {
.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE |
NAND_BBT_2BIT | NAND_BBT_VERSION,
.offs = 11,
.len = 4,
.veroffs = 15,
.maxblocks = 4,
.pattern = mirror_pattern,
};
static struct nand_ecclayout fsl_nfc_ecc45 = {
.eccbytes = 45,
.eccpos = {16, 17, 20, 21, 22, 23,
......@@ -685,7 +662,8 @@ int board_nand_init(struct nand_chip *chip)
chip->read_buf = fsl_nfc_read_buf;
chip->write_buf = fsl_nfc_write_buf;
chip->verify_buf = fsl_nfc_verify_buf;
chip->options = NAND_NO_AUTOINCR | NAND_USE_FLASH_BBT | NAND_CACHEPRG;
chip->options = NAND_NO_AUTOINCR | NAND_USE_FLASH_BBT | NAND_CACHEPRG |
NAND_USE_FLASH_BBT_NO_OOB;
#ifndef CONFIG_NAND_FSL_NFC_BUSWIDTH_8
chip->options |= NAND_BUSWIDTH_16;
#endif
......@@ -728,10 +706,6 @@ int board_nand_init(struct nand_chip *chip)
CONFIG_ECC_MODE_MASK,
CONFIG_ECC_MODE_SHIFT, ECC_BYPASS);
}
chip->bbt_td = &bbt_main_descr;
chip->bbt_md = &bbt_mirror_descr;
bbt_main_descr.pattern = bbt_pattern;
bbt_mirror_descr.pattern = mirror_pattern;
/* SET SECTOR SIZE */
nfc_write(mtd, NFC_SECTOR_SIZE, PAGE_2K | PAGE_64);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment