Lines Matching refs:nand_dev

163 	uint32_t block_nb = page / spinand_dev.nand_dev->block_size;  in spi_nand_load_page()
164 uint32_t page_nb = page - (block_nb * spinand_dev.nand_dev->page_size); in spi_nand_load_page()
165 uint32_t nbpages_per_block = spinand_dev.nand_dev->block_size / in spi_nand_load_page()
166 spinand_dev.nand_dev->page_size; in spi_nand_load_page()
182 uint32_t nbpages_per_block = spinand_dev.nand_dev->block_size / in spi_nand_read_from_cache()
183 spinand_dev.nand_dev->page_size; in spi_nand_read_from_cache()
185 uint32_t page_sh = __builtin_ctz(spinand_dev.nand_dev->page_size) + 1U; in spi_nand_read_from_cache()
189 if ((spinand_dev.nand_dev->nb_planes > 1U) && ((block_nb % 2U) == 1U)) { in spi_nand_read_from_cache()
235 unsigned int nbpages_per_block = spinand_dev.nand_dev->block_size / in spi_nand_mtd_block_is_bad()
236 spinand_dev.nand_dev->page_size; in spi_nand_mtd_block_is_bad()
241 spinand_dev.nand_dev->page_size, in spi_nand_mtd_block_is_bad()
260 spinand_dev.nand_dev->page_size, true); in spi_nand_mtd_read_page()
268 spinand_dev.nand_dev = get_nand_device(); in spi_nand_init()
269 if (spinand_dev.nand_dev == NULL) { in spi_nand_init()
273 spinand_dev.nand_dev->mtd_block_is_bad = spi_nand_mtd_block_is_bad; in spi_nand_init()
274 spinand_dev.nand_dev->mtd_read_page = spi_nand_mtd_read_page; in spi_nand_init()
275 spinand_dev.nand_dev->nb_planes = 1; in spi_nand_init()
289 assert((spinand_dev.nand_dev->page_size != 0U) && in spi_nand_init()
290 (spinand_dev.nand_dev->block_size != 0U) && in spi_nand_init()
291 (spinand_dev.nand_dev->size != 0U)); in spi_nand_init()
316 spinand_dev.nand_dev->page_size, in spi_nand_init()
317 spinand_dev.nand_dev->block_size, in spi_nand_init()
318 spinand_dev.nand_dev->size); in spi_nand_init()
320 *size = spinand_dev.nand_dev->size; in spi_nand_init()
321 *erase_size = spinand_dev.nand_dev->block_size; in spi_nand_init()