• Home
  • Raw
  • Download

Lines Matching refs:ftl

166 static int sharpsl_nand_init_ftl(struct mtd_info *mtd, struct sharpsl_ftl *ftl)  in sharpsl_nand_init_ftl()  argument
180 ftl->logmax = ((phymax * 95) / 100) - 1; in sharpsl_nand_init_ftl()
182 ftl->log2phy = kmalloc_array(ftl->logmax, sizeof(*ftl->log2phy), in sharpsl_nand_init_ftl()
184 if (!ftl->log2phy) { in sharpsl_nand_init_ftl()
190 for (i = 0; i < ftl->logmax; i++) in sharpsl_nand_init_ftl()
191 ftl->log2phy[i] = UINT_MAX; in sharpsl_nand_init_ftl()
207 if (log_num > 0 && log_num < ftl->logmax) { in sharpsl_nand_init_ftl()
208 if (ftl->log2phy[log_num] == UINT_MAX) in sharpsl_nand_init_ftl()
209 ftl->log2phy[log_num] = block_num; in sharpsl_nand_init_ftl()
214 phymax, ftl->logmax, phymax - ftl->logmax); in sharpsl_nand_init_ftl()
222 static void sharpsl_nand_cleanup_ftl(struct sharpsl_ftl *ftl) in sharpsl_nand_cleanup_ftl() argument
224 kfree(ftl->log2phy); in sharpsl_nand_cleanup_ftl()
231 struct sharpsl_ftl *ftl) in sharpsl_nand_read_laddr() argument
243 if (len <= 0 || log_num >= ftl->logmax || final_log_num > log_num) in sharpsl_nand_read_laddr()
246 block_num = ftl->log2phy[log_num]; in sharpsl_nand_read_laddr()
293 struct sharpsl_ftl *ftl) in sharpsl_nand_read_partinfo() argument
297 ret = sharpsl_nand_read_laddr(master, from, len, buf, ftl); in sharpsl_nand_read_partinfo()
329 struct sharpsl_ftl ftl; in sharpsl_parse_mtd_partitions() local
340 err = sharpsl_nand_init_ftl(master, &ftl); in sharpsl_parse_mtd_partitions()
348 sizeof(buf), buf, &ftl); in sharpsl_parse_mtd_partitions()
354 sizeof(buf), buf, &ftl); in sharpsl_parse_mtd_partitions()
358 sharpsl_nand_cleanup_ftl(&ftl); in sharpsl_parse_mtd_partitions()