Lines Matching refs:nand_writesize
35 static uint32_t nand_writesize = 2048; variable
215 ecc_strength = mx28_nand_get_ecc_strength(nand_writesize, nand_oobsize); in mx28_nand_mark_byte_offset()
216 return mx28_nand_get_mark_offset(nand_writesize, ecc_strength) >> 3; in mx28_nand_mark_byte_offset()
222 ecc_strength = mx28_nand_get_ecc_strength(nand_writesize, nand_oobsize); in mx28_nand_mark_bit_offset()
223 return mx28_nand_get_mark_offset(nand_writesize, ecc_strength) & 0x7; in mx28_nand_mark_bit_offset()
246 fcb = malloc(nand_writesize); in mx28_nand_get_fcb()
252 memset(fcb, 0, nand_writesize); in mx28_nand_get_fcb()
266 fcb->page_data_size = nand_writesize; in mx28_nand_get_fcb()
267 fcb->total_page_size = nand_writesize + nand_oobsize; in mx28_nand_get_fcb()
268 fcb->sectors_per_block = nand_erasesize / nand_writesize; in mx28_nand_get_fcb()
270 fcb->num_ecc_blocks_per_page = (nand_writesize / 512) - 1; in mx28_nand_get_fcb()
275 nand_writesize, nand_oobsize) >> 1; in mx28_nand_get_fcb()
277 nand_writesize, nand_oobsize) >> 1; in mx28_nand_get_fcb()
288 fcb->bb_marker_physical_offset = nand_writesize; in mx28_nand_get_fcb()
290 stride_size_bytes = STRIDE_PAGES * nand_writesize; in mx28_nand_get_fcb()
293 bootstream_size_pages = (size + (nand_writesize - 1)) / in mx28_nand_get_fcb()
294 nand_writesize; in mx28_nand_get_fcb()
296 fw1_start_page = 2 * bcb_size_bytes / nand_writesize; in mx28_nand_get_fcb()
298 nand_writesize; in mx28_nand_get_fcb()
318 dbbt = malloc(nand_writesize); in mx28_nand_get_dbbt()
324 memset(dbbt, 0, nand_writesize); in mx28_nand_get_dbbt()
361 block = malloc(nand_writesize + nand_oobsize); in mx28_nand_fcb_block()
367 memset(block, 0, nand_writesize + nand_oobsize); in mx28_nand_fcb_block()
397 offset = i * nand_writesize; in mx28_nand_write_fcb()
398 memcpy(buf + offset, fcbblock, nand_writesize + nand_oobsize); in mx28_nand_write_fcb()
400 buf[offset + nand_writesize] = 0xff; in mx28_nand_write_fcb()
413 offset = i * nand_writesize; in mx28_nand_write_dbbt()
430 offset1 = fcb->firmware1_starting_sector * nand_writesize; in mx28_nand_write_firmware()
431 offset2 = fcb->firmware2_starting_sector * nand_writesize; in mx28_nand_write_firmware()
474 size = nand_writesize * 512 + 2 * MAX_BOOTSTREAM_SIZE; in mx28_create_nand_image()
620 nand_writesize = tmp; in parse_ops()