Lines Matching refs:offs

214 static int nand_load_page(const struct nfc_config *conf, u32 offs)  in nand_load_page()  argument
216 int page = offs / conf->page_size; in nand_load_page()
254 static int nand_read_page(const struct nfc_config *conf, u32 offs, in nand_read_page() argument
260 int page = offs / conf->page_size; in nand_read_page()
264 if (offs % conf->page_size || len % conf->ecc_size || in nand_read_page()
367 static int nand_detect_ecc_config(struct nfc_config *conf, u32 offs, in nand_detect_ecc_config() argument
372 int page = offs / conf->page_size; in nand_detect_ecc_config()
400 ret = nand_read_page(conf, offs, dest, conf->ecc_size); in nand_detect_ecc_config()
417 if (!nand_read_page(conf, offs, dest, in nand_detect_ecc_config()
440 static int nand_detect_config(struct nfc_config *conf, u32 offs, void *dest) in nand_detect_config() argument
460 if (nand_load_page(conf, offs)) in nand_detect_config()
463 if (!nand_detect_ecc_config(conf, offs, dest)) { in nand_detect_config()
473 static int nand_read_buffer(struct nfc_config *conf, uint32_t offs, in nand_read_buffer() argument
479 page = offs / conf->page_size; in nand_read_buffer()
484 if (nand_load_page(conf, offs)) in nand_read_buffer()
487 ret = nand_read_page(conf, offs, dest, conf->page_size); in nand_read_buffer()
510 if (nand_read_page(conf, offs, dest, conf->page_size)) in nand_read_buffer()
517 offs += conf->page_size; in nand_read_buffer()
524 int nand_spl_load_image(uint32_t offs, unsigned int size, void *dest) in nand_spl_load_image() argument
529 ret = nand_detect_config(&conf, offs, dest); in nand_spl_load_image()
533 return nand_read_buffer(&conf, offs, size, dest); in nand_spl_load_image()