Lines Matching refs:nand
401 struct nand_chip *nand; in fsmc_nand_switch_ecc() local
412 nand = mtd_to_nand(mtd); in fsmc_nand_switch_ecc()
416 nand->ecc.mode = NAND_ECC_HW; in fsmc_nand_switch_ecc()
417 nand->ecc.bytes = 3; in fsmc_nand_switch_ecc()
418 nand->ecc.strength = 1; in fsmc_nand_switch_ecc()
419 nand->ecc.layout = &fsmc_ecc1_layout; in fsmc_nand_switch_ecc()
420 nand->ecc.calculate = fsmc_read_hwecc; in fsmc_nand_switch_ecc()
421 nand->ecc.correct = nand_correct_data; in fsmc_nand_switch_ecc()
427 nand->ecc.mode = NAND_ECC_SOFT_BCH; in fsmc_nand_switch_ecc()
428 nand->ecc.strength = 4; in fsmc_nand_switch_ecc()
429 nand->ecc.layout = NULL; in fsmc_nand_switch_ecc()
441 int fsmc_nand_init(struct nand_chip *nand) in fsmc_nand_init() argument
468 nand->options = 0; in fsmc_nand_init()
470 nand->options |= NAND_BUSWIDTH_16; in fsmc_nand_init()
472 nand->ecc.mode = NAND_ECC_HW; in fsmc_nand_init()
473 nand->ecc.size = 512; in fsmc_nand_init()
474 nand->ecc.calculate = fsmc_read_hwecc; in fsmc_nand_init()
475 nand->ecc.hwctl = fsmc_enable_hwecc; in fsmc_nand_init()
476 nand->cmd_ctrl = fsmc_nand_hwcontrol; in fsmc_nand_init()
477 nand->IO_ADDR_R = nand->IO_ADDR_W = in fsmc_nand_init()
479 nand->badblockbits = 7; in fsmc_nand_init()
481 mtd = nand_to_mtd(nand); in fsmc_nand_init()
485 nand->ecc.bytes = 13; in fsmc_nand_init()
486 nand->ecc.strength = 8; in fsmc_nand_init()
487 nand->ecc.correct = fsmc_bch8_correct_data; in fsmc_nand_init()
488 nand->ecc.read_page = fsmc_read_page_hwecc; in fsmc_nand_init()
490 nand->ecc.layout = &fsmc_ecc4_sp_layout; in fsmc_nand_init()
493 nand->ecc.layout = &fsmc_ecc4_224_layout; in fsmc_nand_init()
495 nand->ecc.layout = &fsmc_ecc4_lp_layout; in fsmc_nand_init()
500 nand->ecc.bytes = 3; in fsmc_nand_init()
501 nand->ecc.strength = 1; in fsmc_nand_init()
502 nand->ecc.layout = &fsmc_ecc1_layout; in fsmc_nand_init()
503 nand->ecc.correct = nand_correct_data; in fsmc_nand_init()