Lines Matching refs:rnand

302 	struct rnand_chip *rnand = to_rnand(chip);  in rnandc_select_target()  local
304 unsigned int cs = rnand->sels[die_nr].cs; in rnandc_select_target()
306 if (chip == rnandc->selected_chip && die_nr == rnand->selected_die) in rnandc_select_target()
311 writel_relaxed(rnand->control, rnandc->regs + CONTROL_REG); in rnandc_select_target()
312 writel_relaxed(rnand->ecc_ctrl, rnandc->regs + ECC_CTRL_REG); in rnandc_select_target()
313 writel_relaxed(rnand->timings_asyn, rnandc->regs + TIMINGS_ASYN_REG); in rnandc_select_target()
314 writel_relaxed(rnand->tim_seq0, rnandc->regs + TIM_SEQ0_REG); in rnandc_select_target()
315 writel_relaxed(rnand->tim_seq1, rnandc->regs + TIM_SEQ1_REG); in rnandc_select_target()
316 writel_relaxed(rnand->tim_gen_seq0, rnandc->regs + TIM_GEN_SEQ0_REG); in rnandc_select_target()
317 writel_relaxed(rnand->tim_gen_seq1, rnandc->regs + TIM_GEN_SEQ1_REG); in rnandc_select_target()
318 writel_relaxed(rnand->tim_gen_seq2, rnandc->regs + TIM_GEN_SEQ2_REG); in rnandc_select_target()
319 writel_relaxed(rnand->tim_gen_seq3, rnandc->regs + TIM_GEN_SEQ3_REG); in rnandc_select_target()
322 rnand->selected_die = die_nr; in rnandc_select_target()
357 struct rnand_chip *rnand = to_rnand(chip); in rnandc_wait_end_of_op() local
358 unsigned int cs = to_rnandc_cs(rnand); in rnandc_wait_end_of_op()
379 struct rnand_chip *rnand = to_rnand(chip); in rnandc_wait_end_of_io() local
380 unsigned int cs = to_rnandc_cs(rnand); in rnandc_wait_end_of_io()
404 struct rnand_chip *rnand = to_rnand(chip); in rnandc_read_page_hw_ecc() local
405 unsigned int cs = to_rnandc_cs(rnand); in rnandc_read_page_hw_ecc()
492 struct rnand_chip *rnand = to_rnand(chip); in rnandc_read_subpage_hw_ecc() local
493 unsigned int cs = to_rnandc_cs(rnand); in rnandc_read_subpage_hw_ecc()
584 struct rnand_chip *rnand = to_rnand(chip); in rnandc_write_page_hw_ecc() local
585 unsigned int cs = to_rnandc_cs(rnand); in rnandc_write_page_hw_ecc()
892 struct rnand_chip *rnand = to_rnand(chip); in rnandc_setup_interface() local
910 rnand->timings_asyn = in rnandc_setup_interface()
913 rnand->tim_seq0 = in rnandc_setup_interface()
918 rnand->tim_seq1 = in rnandc_setup_interface()
935 rnand->tim_gen_seq0 = in rnandc_setup_interface()
947 rnand->tim_gen_seq1 = in rnandc_setup_interface()
959 rnand->tim_gen_seq2 = in rnandc_setup_interface()
966 rnand->tim_gen_seq3 = in rnandc_setup_interface()
1009 struct rnand_chip *rnand = to_rnand(chip); in rnandc_hw_ecc_controller_init() local
1020 rnand->control |= CONTROL_ECC_BLOCK_SIZE_256; in rnandc_hw_ecc_controller_init()
1023 rnand->control |= CONTROL_ECC_BLOCK_SIZE_512; in rnandc_hw_ecc_controller_init()
1026 rnand->control |= CONTROL_ECC_BLOCK_SIZE_1024; in rnandc_hw_ecc_controller_init()
1036 rnand->ecc_ctrl |= ECC_CTRL_CAP_2B; in rnandc_hw_ecc_controller_init()
1040 rnand->ecc_ctrl |= ECC_CTRL_CAP_4B; in rnandc_hw_ecc_controller_init()
1044 rnand->ecc_ctrl |= ECC_CTRL_CAP_8B; in rnandc_hw_ecc_controller_init()
1048 rnand->ecc_ctrl |= ECC_CTRL_CAP_16B; in rnandc_hw_ecc_controller_init()
1052 rnand->ecc_ctrl |= ECC_CTRL_CAP_24B; in rnandc_hw_ecc_controller_init()
1056 rnand->ecc_ctrl |= ECC_CTRL_CAP_32B; in rnandc_hw_ecc_controller_init()
1063 rnand->ecc_ctrl |= ECC_CTRL_ERR_THRESHOLD(chip->ecc.strength); in rnandc_hw_ecc_controller_init()
1113 struct rnand_chip *rnand = to_rnand(chip); in rnandc_attach_chip() local
1128 rnand->control |= CONTROL_CHECK_RB_LINE | CONTROL_INT_EN; in rnandc_attach_chip()
1132 rnand->control |= CONTROL_BLOCK_SIZE_32P; in rnandc_attach_chip()
1135 rnand->control |= CONTROL_BLOCK_SIZE_64P; in rnandc_attach_chip()
1138 rnand->control |= CONTROL_BLOCK_SIZE_128P; in rnandc_attach_chip()
1141 rnand->control |= CONTROL_BLOCK_SIZE_256P; in rnandc_attach_chip()
1157 rnand->selected_die = -1; in rnandc_attach_chip()
1200 struct rnand_chip *rnand; in rnandc_chip_init() local
1214 rnand = devm_kzalloc(rnandc->dev, struct_size(rnand, sels, nsels), in rnandc_chip_init()
1216 if (!rnand) in rnandc_chip_init()
1219 rnand->nsels = nsels; in rnandc_chip_init()
1220 rnand->selected_die = -1; in rnandc_chip_init()
1243 rnand->sels[i].cs = cs; in rnandc_chip_init()
1246 chip = &rnand->chip; in rnandc_chip_init()
1257 ret = nand_scan(chip, rnand->nsels); in rnandc_chip_init()
1273 list_add_tail(&rnand->node, &rnandc->chips); in rnandc_chip_init()