Home
last modified time | relevance | path

Searched refs:ubi (Results 1 – 25 of 90) sorted by relevance

1234

/u-boot/drivers/mtd/ubi/
A Dbuild.c389 ubi = ubi_get_device(ubi->ubi_num); in dev_attribute_show()
459 ubi->dev.devt = ubi->cdev.dev; in ubi_sysfs_init()
679 ubi->peb_count = mtd_div_by_eb(ubi->mtd->size, ubi->mtd); in io_init()
680 ubi->flash_size = ubi->mtd->size; in io_init()
746 ubi->leb_start = ALIGN(ubi->leb_start, ubi->min_io_size); in io_init()
789 ubi->leb_size = ubi->peb_size - ubi->leb_start; in io_init()
1039 ubi->peb_size, ubi->peb_size >> 10, ubi->leb_size); in ubi_attach_mtd_dev()
1041 ubi->min_io_size, ubi->max_write_size, ubi->hdrs_min_io_size); in ubi_attach_mtd_dev()
1043 ubi->vid_hdr_offset, ubi->vid_hdr_aloffset, ubi->leb_start); in ubi_attach_mtd_dev()
1045 ubi->good_peb_count, ubi->bad_peb_count, ubi->corr_peb_count); in ubi_attach_mtd_dev()
[all …]
A Dwl.c881 ubi->move_from = ubi->move_to = NULL;
931 ubi->move_from = ubi->move_to = NULL;
951 ubi->move_from = ubi->move_to = NULL;
1537 ubi->used = ubi->erroneous = ubi->free = ubi->scrub = RB_ROOT;
1656 tree_destroy(ubi, &ubi->used);
1657 tree_destroy(ubi, &ubi->free);
1658 tree_destroy(ubi, &ubi->scrub);
1690 tree_destroy(ubi, &ubi->used);
1691 tree_destroy(ubi, &ubi->erroneous);
1692 tree_destroy(ubi, &ubi->free);
[all …]
A Dfastmap-wl.c92 if (!ubi->free.rb_node || (ubi->free_count - ubi->beb_rsvd_pebs < 1)) in ubi_wl_get_fm_peb()
98 e = find_mean_wl_entry(ubi, &ubi->free); in ubi_wl_get_fm_peb()
103 self_check_in_wl_tree(ubi, e, &ubi->free); in ubi_wl_get_fm_peb()
149 (ubi->free_count - ubi->beb_rsvd_pebs < 5)) in ubi_refill_pools()
152 e = find_wl_entry(ubi, &ubi->free, WL_FREE_MAX_DIFF); in ubi_refill_pools()
153 self_check_in_wl_tree(ubi, e, &ubi->free); in ubi_refill_pools()
185 while (!ubi->free.rb_node && ubi->works_count) { in produce_free_peb()
248 prot_queue_add(ubi, ubi->lookuptbl[ret]); in ubi_wl_get_peb()
368 return_unused_pool_pebs(ubi, &ubi->fm_pool); in ubi_fastmap_close()
369 return_unused_pool_pebs(ubi, &ubi->fm_wl_pool); in ubi_fastmap_close()
[all …]
A Dio.c384 err = ubi_self_check_all_ff(ubi, pnum, 0, ubi->peb_size); in do_sync_erase()
423 err = ubi_io_read(ubi, ubi->peb_buf, pnum, 0, ubi->peb_size); in torture_peb()
427 err = ubi_check_pattern(ubi->peb_buf, 0xFF, ubi->peb_size); in torture_peb()
436 memset(ubi->peb_buf, patterns[i], ubi->peb_size); in torture_peb()
437 err = ubi_io_write(ubi, ubi->peb_buf, pnum, 0, ubi->peb_size); in torture_peb()
441 memset(ubi->peb_buf, ~patterns[i], ubi->peb_size); in torture_peb()
442 err = ubi_io_read(ubi, ubi->peb_buf, pnum, 0, ubi->peb_size); in torture_peb()
544 ubi_dump_flash(ubi, pnum, 0, ubi->peb_size); in nor_erase_prepare()
1012 read_err = ubi_io_read(ubi, p, pnum, ubi->vid_hdr_aloffset, in ubi_io_read_vid_hdr()
1112 err = ubi_io_write(ubi, p, pnum, ubi->vid_hdr_aloffset, in ubi_io_write_vid_hdr()
[all …]
A Deba.c324 if (ubi->ro_mode) in ubi_eba_unmap_leb()
595 err = ubi_io_read_data(ubi, ubi->peb_buf, pnum, 0, offset); in recover_peb()
663 if (ubi->ro_mode) in ubi_eba_write_leb()
1152 ubi_calc_data_len(ubi, ubi->peb_buf, data_size); in ubi_eba_copy_leb()
1208 err = ubi_io_read_data(ubi, ubi->peb_buf, to, 0, aldata_size); in ubi_eba_copy_leb()
1277 ubi->beb_rsvd_pebs, ubi->beb_rsvd_level); in print_rsvd_warning()
1452 if (ubi->avail_pebs < ubi->beb_rsvd_level) { in ubi_eba_init()
1454 ubi->beb_rsvd_pebs = ubi->avail_pebs; in ubi_eba_init()
1457 ubi->beb_rsvd_pebs = ubi->beb_rsvd_level; in ubi_eba_init()
1459 ubi->avail_pebs -= ubi->beb_rsvd_pebs; in ubi_eba_init()
[all …]
A Dvtbl.c579 vol->ubi = ubi;
645 ubi->volumes[vol_id2idx(ubi, vol->vol_id)] = vol;
648 vol->ubi = ubi;
791 ubi->vtbl_slots = ubi->leb_size / UBI_VTBL_RECORD_SIZE;
795 ubi->vtbl_size = ubi->vtbl_slots * UBI_VTBL_RECORD_SIZE;
796 ubi->vtbl_size = ALIGN(ubi->vtbl_size, ubi->min_io_size);
809 ubi->vtbl = create_empty_lvol(ubi, ai);
824 ubi->vtbl = process_lvol(ubi, ai, av);
829 ubi->avail_pebs = ubi->good_peb_count - ubi->corr_peb_count;
835 err = init_volumes(ubi, ai, ubi->vtbl);
[all …]
A Dvmt.c70 ubi = ubi_get_device(vol->ubi->ubi_num); in vol_attribute_show()
71 if (!ubi) in vol_attribute_show()
77 ubi_put_device(ubi); in vol_attribute_show()
115 ubi_put_device(ubi); in vol_attribute_show()
160 if (ubi->ro_mode) in ubi_create_volume()
217 ubi->avail_pebs); in ubi_create_volume()
234 vol->ubi = ubi; in ubi_create_volume()
366 struct ubi_device *ubi = vol->ubi; in ubi_remove_volume() local
373 if (ubi->ro_mode) in ubi_remove_volume()
438 struct ubi_device *ubi = vol->ubi; in ubi_resize_volume() local
[all …]
A Dmisc.c37 length = ALIGN(i + 1, ubi->min_io_size); in ubi_calc_data_len()
97 int need = ubi->beb_rsvd_level - ubi->beb_rsvd_pebs; in ubi_update_reserved()
99 if (need <= 0 || ubi->avail_pebs == 0) in ubi_update_reserved()
102 need = min_t(int, need, ubi->avail_pebs); in ubi_update_reserved()
103 ubi->avail_pebs -= need; in ubi_update_reserved()
104 ubi->rsvd_pebs += need; in ubi_update_reserved()
105 ubi->beb_rsvd_pebs += need; in ubi_update_reserved()
120 ubi->beb_rsvd_level = ubi->bad_peb_limit - ubi->bad_peb_count; in ubi_calculate_reserved()
121 if (ubi->beb_rsvd_level < 0) { in ubi_calculate_reserved()
122 ubi->beb_rsvd_level = 0; in ubi_calculate_reserved()
[all …]
A Dubi.h45 #define ubi_msg(ubi, fmt, ...) argument
48 ubi->ubi_num, ##__VA_ARGS__)
53 ubi->ubi_num, __func__, ##__VA_ARGS__)
317 struct ubi_device *ubi; member
838 #define ubi_create_gluebi(ubi, vol) 0 argument
1058 kfree(p - ubi->vid_hdr_shift); in ubi_free_vid_hdr()
1070 return ubi_io_read(ubi, buf, pnum, offset + ubi->leb_start, len); in ubi_io_read_data()
1082 return ubi_io_write(ubi, buf, pnum, offset + ubi->leb_start, len); in ubi_io_write_data()
1091 if (!ubi->ro_mode) { in ubi_ro_mode()
1092 ubi->ro_mode = 1; in ubi_ro_mode()
[all …]
A Dkapi.c61 if (!ubi) in ubi_get_device_info()
142 if (!ubi) in ubi_open_volume()
335 struct ubi_device *ubi = vol->ubi; in ubi_close_volume() local
379 struct ubi_device *ubi = vol->ubi; in leb_read_sanity_check() local
433 struct ubi_device *ubi = vol->ubi; in ubi_leb_read() local
473 struct ubi_device *ubi = vol->ubi; in ubi_leb_read_sg() local
525 struct ubi_device *ubi = vol->ubi; in ubi_leb_write() local
570 struct ubi_device *ubi = vol->ubi; in ubi_leb_change() local
610 struct ubi_device *ubi = vol->ubi; in ubi_leb_erase() local
671 struct ubi_device *ubi = vol->ubi; in ubi_leb_unmap() local
[all …]
A Dfastmap.c895 memset(ubi->fm_buf, 0, ubi->fm_size); in ubi_scan_fastmap()
1021 ret = ubi_io_read(ubi, ubi->fm_buf + (ubi->leb_size * i), pnum, in ubi_scan_fastmap()
1022 ubi->leb_start, ubi->leb_size); in ubi_scan_fastmap()
1074 ubi->fm_pool.max_size = ubi->fm->max_pool_size; in ubi_scan_fastmap()
1075 ubi->fm_wl_pool.max_size = ubi->fm->max_wl_pool_size; in ubi_scan_fastmap()
1127 memset(ubi->fm_buf, 0, ubi->fm_size); in ubi_write_fastmap()
1179 set_seen(ubi, ubi->fm_pool.pebs[i], seen_pebs); in ubi_write_fastmap()
1190 set_seen(ubi, ubi->fm_wl_pool.pebs[i], seen_pebs); in ubi_write_fastmap()
1336 new_fm->e[i]->pnum, ubi->leb_start, ubi->leb_size); in ubi_write_fastmap()
1508 if (ubi->ro_mode || ubi->fm_disabled) { in ubi_update_fastmap()
[all …]
A Ddebug.h66 int ubi_debugfs_init_dev(struct ubi_device *ubi);
67 void ubi_debugfs_exit_dev(struct ubi_device *ubi);
78 return ubi->dbg.disable_bgt; in ubi_dbg_is_bgt_disabled()
89 if (ubi->dbg.emulate_bitflips) in ubi_dbg_is_bitflip()
103 if (ubi->dbg.emulate_io_failures) in ubi_dbg_is_write_failure()
117 if (ubi->dbg.emulate_io_failures) in ubi_dbg_is_erase_failure()
124 return ubi->dbg.chk_io; in ubi_dbg_chk_io()
129 return ubi->dbg.chk_gen; in ubi_dbg_chk_gen()
134 return ubi->dbg.chk_fastmap; in ubi_dbg_chk_fastmap()
139 ubi->dbg.chk_fastmap = 1; in ubi_enable_dbg_chk_fastmap()
[all …]
A Dattach.c398 err = ubi_io_read_data(ubi, ubi->peb_buf, pnum, 0, len); in ubi_compare_lebs()
768 memset(ubi->peb_buf, 0x00, ubi->leb_size); in check_corruption()
770 err = ubi_io_read(ubi, ubi->peb_buf, pnum, ubi->leb_start, in check_corruption()
771 ubi->leb_size); in check_corruption()
787 if (ubi_check_pattern(ubi->peb_buf, 0xFF, ubi->leb_size)) in check_corruption()
795 pnum, ubi->leb_start, ubi->leb_size); in check_corruption()
797 ubi->peb_buf, ubi->leb_size, 1); in check_corruption()
1440 ubi->good_peb_count = ubi->peb_count - ubi->bad_peb_count; in ubi_attach()
1459 if (ubi->fm && ubi_dbg_chk_fastmap(ubi)) { in ubi_attach()
1486 ubi_wl_close(ubi); in ubi_attach()
[all …]
A Dwl.h8 void update_fastmap_work_fn(struct ubi_device *ubi);
11 static struct ubi_wl_entry *get_peb_for_wl(struct ubi_device *ubi);
12 static void ubi_fastmap_close(struct ubi_device *ubi);
13 static inline void ubi_fastmap_init(struct ubi_device *ubi, int *count) in ubi_fastmap_init() argument
16 *count += (ubi->fm_size / ubi->leb_size) * 2; in ubi_fastmap_init()
18 INIT_WORK(&ubi->fm_work, update_fastmap_work_fn); in ubi_fastmap_init()
21 static struct ubi_wl_entry *may_reserve_for_fm(struct ubi_device *ubi,
25 static struct ubi_wl_entry *get_peb_for_wl(struct ubi_device *ubi);
26 static inline void ubi_fastmap_close(struct ubi_device *ubi) { } in ubi_fastmap_close() argument
27 static inline void ubi_fastmap_init(struct ubi_device *ubi, int *count) { } in ubi_fastmap_init() argument
[all …]
A Dupd.c62 vtbl_rec = ubi->vtbl[vol->vol_id]; in set_update_marker()
65 mutex_lock(&ubi->device_mutex); in set_update_marker()
68 mutex_unlock(&ubi->device_mutex); in set_update_marker()
90 vtbl_rec = ubi->vtbl[vol->vol_id]; in clear_update_marker()
105 mutex_lock(&ubi->device_mutex); in clear_update_marker()
108 mutex_unlock(&ubi->device_mutex); in clear_update_marker()
131 vol->upd_buf = vmalloc(ubi->leb_size); in ubi_start_update()
135 err = set_update_marker(ubi, vol); in ubi_start_update()
141 err = ubi_eba_unmap_leb(ubi, vol, i); in ubi_start_update()
286 if (ubi->ro_mode) in ubi_more_update_data()
[all …]
A Ddebug.c264 if (!ubi) in dfs_file_read()
266 d = &ubi->dbg; in dfs_file_read()
311 ubi_put_device(ubi); in dfs_file_read()
328 if (!ubi) in dfs_file_write()
330 d = &ubi->dbg; in dfs_file_write()
378 ubi_put_device(ubi); in dfs_file_write()
410 ubi->ubi_num); in ubi_debugfs_init_dev()
523 ubi->dbg.power_cut_counter = ubi->dbg.power_cut_min; in ubi_dbg_power_cut()
525 if (ubi->dbg.power_cut_max > ubi->dbg.power_cut_min) { in ubi_dbg_power_cut()
526 range = ubi->dbg.power_cut_max - ubi->dbg.power_cut_min; in ubi_dbg_power_cut()
[all …]
/u-boot/drivers/mtd/ubispl/
A Dubispl.c43 return ubi->read(pnum + ubi->peb_offset, from, len, buf); in ubi_io_read()
215 err = ubi_io_read(ubi, &ubi->vtbl, pnum, ubi->leb_start, in ubi_read_volume_table()
222 if (!vtbl_check(ubi, ubi->vtbl)) { in ubi_read_volume_table()
488 memset(ubi->fm_used, 0, sizeof(ubi->fm_used)); in ubi_attach_fastmap()
808 ret = ubi_io_read(ubi, ubi->fm_buf + (ubi->leb_size * i), pnum, in ubi_scan_fastmap()
809 ubi->leb_start, ubi->leb_size); in ubi_scan_fastmap()
840 ubi->fm_pool.max_size = ubi->fm->max_pool_size; in ubi_scan_fastmap()
843 ubi->fsize_mb, ubi->peb_count); in ubi_scan_fastmap()
895 memset(ubi->volinfo, 0, sizeof(ubi->volinfo)); in ipl_scan()
1069 struct ubi_scan_info *ubi = info->ubi; in ubispl_load_volumes() local
[all …]
A DMakefile1 obj-y += ubispl.o ../ubi/crc32.o
/u-boot/cmd/
A Dubi.c46 if (!ubi->volumes[i]) in display_volume_info()
57 ubi->peb_size, ubi->peb_size >> 10); in display_ubi_info()
63 ubi->vid_hdr_offset, ubi->vid_hdr_aloffset); in display_ubi_info()
74 ubi_msg("max/mean erase counter: %d/%d", ubi->max_ec, ubi->mean_ec); in display_ubi_info()
235 i = ubi->beb_rsvd_level - ubi->beb_rsvd_pebs; in ubi_remove_vol()
237 i = ubi->avail_pebs >= i ? i : ubi->avail_pebs; in ubi_remove_vol()
501 if (ubi) in ubi_detach()
504 ubi = NULL; in ubi_detach()
553 if (!ubi) { in do_ubi()
559 ubi->ubi_num, ubi->ubi_name, ubi->mtd->name); in do_ubi()
[all …]
/u-boot/doc/
A DREADME.ubi8 => help ubi
9 ubi - ubi commands
12 ubi part [part] [offset]
14 ubi info [l[ayout]] - Display volume and ubi layout information
50 => ubi part root
77 ubi info Display volume and ubi layout information
87 => ubi create testvol
90 => ubi info l
121 => ubi info
143 => ubi read 900000 testvol 80000
[all …]
/u-boot/doc/device-tree-bindings/misc/
A Dfs_loader.txt11 - mdtpart: which partition of ubi the image loading from, this property is
12 required for ubi and mounting.
13 - ubivol: which volume of ubi the image loading from, this property is required
14 for ubi and mounting.
17 ubi in device tree source as shown in below:
20 sata and ubi as shown in below:
42 Example for ubi:
/u-boot/drivers/dfu/
A Ddfu_nand.c68 if (dfu->data.nand.ubi) in nand_block_op()
152 if (dfu->data.nand.ubi) { in dfu_flush_medium_nand()
191 if (dfu->data.nand.ubi) in dfu_polltimeout_nand()
202 dfu->data.nand.ubi = 0; in dfu_fill_entity_nand()
236 dfu->data.nand.ubi = 1; in dfu_fill_entity_nand()
/u-boot/configs/
A Dgardena-smart-gateway-at91sam_defconfig26 …env_redundant),256k(env),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=6 root=ubi0:roo…
50 …EFAULT="nand0:1536k(uboot),1024k(unused),512k(dtb_old),4608k(kernel_old),86528k(ubi),-(rootfs_old)"
57 CONFIG_ENV_UBI_PART="ubi"
/u-boot/test/
A Dnokia_rx51_test.sh126 cat > ubi.ini << EOF
128 mode=ubi
151 /usr/sbin/ubinize -o ubi.img -p 128KiB -m 2048 -s 512 ubi.ini
211 ./qflasher -v -x xloader-qemu.bin -s secondary-qemu.bin -k combined.bin -r ubi.img -m rx51 -o mtd_r…
215 ./qflasher -v -x xloader-qemu.bin -s secondary-qemu.bin -k u-boot.bin -r ubi.img -m rx51 -o mtd_emm…
221 ./qflasher -v -x xloader-qemu.bin -s secondary-qemu.bin -k combined_hack.bin -r ubi.img -m rx51 -p …
/u-boot/include/
A Dubispl.h62 struct ubi_scan_info *ubi; member

Completed in 69 milliseconds

1234