Lines Matching refs:nand_dev

30 static int get_data_from_otp(struct nand_device *nand_dev, bool is_slc)  in get_data_from_otp()  argument
78 nand_dev->buswidth = NAND_BUS_WIDTH_16; in get_data_from_otp()
80 nand_dev->buswidth = NAND_BUS_WIDTH_8; in get_data_from_otp()
85 nand_dev->page_size = 0x800U; in get_data_from_otp()
89 nand_dev->page_size = 0x1000U; in get_data_from_otp()
93 nand_dev->page_size = 0x2000U; in get_data_from_otp()
103 nand_dev->block_size = 64U * nand_dev->page_size; in get_data_from_otp()
107 nand_dev->block_size = 128U * nand_dev->page_size; in get_data_from_otp()
111 nand_dev->block_size = 256U * nand_dev->page_size; in get_data_from_otp()
119 nand_dev->size = ((nand_param & NAND_BLOCK_NB_MASK) >> in get_data_from_otp()
121 NAND_BLOCK_NB_UNIT * nand_dev->block_size; in get_data_from_otp()
128 nand_dev->ecc.max_bit_corr = 1U; in get_data_from_otp()
132 nand_dev->ecc.max_bit_corr = 4U; in get_data_from_otp()
136 nand_dev->ecc.max_bit_corr = 8U; in get_data_from_otp()
140 nand_dev->ecc.mode = NAND_ECC_ONDIE; in get_data_from_otp()
144 if (nand_dev->ecc.max_bit_corr == 0U) { in get_data_from_otp()
152 nand_dev->nb_planes = 2U; in get_data_from_otp()
154 nand_dev->nb_planes = 1U; in get_data_from_otp()
158 VERBOSE("OTP: Block %u Page %u Size %llu\n", nand_dev->block_size, in get_data_from_otp()
159 nand_dev->page_size, nand_dev->size); in get_data_from_otp()
168 device->nand_dev->ecc.mode = NAND_ECC_HW; in plat_get_raw_nand_data()
169 device->nand_dev->ecc.size = SZ_512; in plat_get_raw_nand_data()
171 return get_data_from_otp(device->nand_dev, true); in plat_get_raw_nand_data()
188 return get_data_from_otp(device->nand_dev, false); in plat_get_spi_nand_data()