Home
last modified time | relevance | path

Searched +full:wear +full:- +full:leveling (Results 1 – 17 of 17) sorted by relevance

/linux/drivers/mtd/ubi/
H A Dwl.c1 // SPDX-License-Identifier: GPL-2.0-or-later
9 * UBI wear-leveling sub-system.
11 * This sub-system is responsible for wear-leveling. It works in terms of
13 * eraseblocks, volumes, etc. From this sub-system's perspective all physical
14 * eraseblocks are of two types - used and free. Used physical eraseblocks are
21 * When physical eraseblocks are returned to the WL sub-system by means of the
23 * done asynchronously in context of the per-UBI device background thread,
24 * which is also managed by the WL sub-system.
26 * The wear-leveling is ensured by means of moving the contents of used
30 * If the WL sub-system fails to erase a physical eraseblock, it marks it as
[all …]
H A Dfastmap-wl.c1 // SPDX-License-Identifier: GPL-2.0-only
9 * update_fastmap_work_fn - calls ubi_update_fastmap from a work queue
17 spin_lock(&ubi->wl_lock); in update_fastmap_work_fn()
18 ubi->fm_work_scheduled = 0; in update_fastmap_work_fn()
19 spin_unlock(&ubi->wl_lock); in update_fastmap_work_fn()
23 * find_anchor_wl_entry - find wear-leveling entry to used as anchor PEB.
24 * @root: the RB-tree where to look for
33 if (e->pnum < UBI_FM_MAX_START && e->ec < max_ec) { in find_anchor_wl_entry()
35 max_ec = e->ec; in find_anchor_wl_entry()
45 wl_tree_add(e, &ubi->free); in return_unused_peb()
[all …]
H A Dubi-media.h1 /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
10 * This file defines the layout of UBI headers and all the other UBI on-flash
47 * @UBI_VTBL_AUTORESIZE_FLG: auto-resize this volume
51 * check. Main use-case for this flag is
52 * boot-time reduction
55 * table. UBI automatically re-sizes the volume which has this flag and makes
66 * The auto-resize feature is useful for device production purposes. For
75 * which will store the root file system) is marked as "auto-resizable", and
79 * eraseblock handling, and then re-sizes the volume, not vice-versa. This
92 * @UBI_COMPAT_RO: attach this device in read-only mode
[all …]
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
3 tristate "Enable UBI - Unsorted block images"
6 UBI is a software layer above MTD layer which admits use of LVM-like
8 flash chips like wear and bad blocks and provides some other useful
10 (www.linux-mtd.infradead.org).
15 int "UBI wear-leveling threshold"
22 wear leveling by means of moving data from eraseblock with low erase
26 other flashes which have eraseblock life-cycle 100000 or more.
28 life-cycle less than 10000, the threshold should be lessened (e.g.,
44 as "1024 * (1 - MinNVB / MaxNVB)", which gives 20 for most NANDs
[all …]
H A Dubi.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
31 #include "ubi-media.h"
57 * This marker in the EBA table means that the LEB is um-mapped.
60 #define UBI_LEB_UNMAPPED -1
64 * returning error. The below constant defines how many times UBI re-tries.
70 * number of (global) erase cycles PEBs are protected from the wear-leveling
76 #define UBI_UNKNOWN -1
89 * Error codes returned by the I/O sub-system.
99 * UBI_IO_BITFLIPS: bit-flips were detected and corrected
101 * Note, it is probably better to have bit-flip and ebadmsg as flags which can
[all …]
H A Ddebug.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
20 __func__, __LINE__, current->pid); \
29 pr_debug("UBI DBG " type " (pid %d): " fmt "\n", current->pid, \
34 /* Messages from the eraseblock association sub-system */
36 /* Messages from the wear-leveling sub-system */
38 /* Messages from the input/output sub-system */
56 * The following function is a legacy implementation of UBI fault-injection
64 if (ubi->dbg.emulate_bitflips) in ubi_dbg_bitflip()
71 if (ubi->dbg.emulate_io_failures) in ubi_dbg_write_failure()
78 if (ubi->dbg.emulate_io_failures) in ubi_dbg_erase_failure()
[all …]
H A Dattach.c1 // SPDX-License-Identifier: GPL-2.0-or-later
9 * UBI attaching sub-system.
11 * This sub-system is responsible for attaching MTD devices and it also
16 * objects which are kept in volume RB-tree with root at the @volumes field.
17 * The RB-tree is indexed by the volume ID.
20 * objects are kept in per-volume RB-trees with the root at the corresponding
21 * &struct ubi_ainf_volume object. To put it differently, we keep an RB-tree of
22 * per-volume objects and each of these objects is the root of RB-tree of
23 * per-LEB objects.
32 * UBI protects EC and VID headers with CRC-32 checksums, so it can detect
[all …]
H A Dbuild.c1 // SPDX-License-Identifier: GPL-2.0-or-later
38 /* Maximum number of comma-separated items in the 'mtd=' parameter */
51 * struct mtd_dev_param - MTD device parameter description data structure.
57 * @enable_fm: enable fastmap when value is non-zero
58 * @need_resv_pool: reserve pool->max_size pebs when value is none-zero
75 /* UBI module parameter to enable fastmap automatically on non-fastmap images */
80 /* Slab cache for wear-leveling entries */
96 /* Protects @ubi_devices, @ubi->ref_count and @ubi->is_dead */
150 * ubi_volume_notify - send a volume change notification.
156 * change event (creation, removal, re-sizing, re-naming, updating). Returns
[all …]
/linux/Documentation/devicetree/bindings/mtd/partitions/
H A Dlinux,ubi.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
12 physical flash device and spreads the I/O load (i.e wear-leveling)
16 - Daniel Golle <daniel@makrotopia.org>
19 - $ref: partition.yaml#
30 "^ubi-volume-.*$":
31 $ref: /schemas/mtd/partitions/ubi-volume.yaml#
36 - compatible
41 - |
[all …]
/linux/Documentation/filesystems/
H A Dubifs.rst1 .. SPDX-License-Identifier: GPL-2.0
10 UBIFS file-system stands for UBI File System. UBI stands for "Unsorted
13 is completely different to any traditional file-system in Linux, like
14 Ext2, XFS, JFS, etc. UBIFS represents a separate class of file-systems
16 file-system of this class is JFFS2.
24 2 MTD devices support 3 main operations - read from some offset within an
26 eraseblock. Block devices support 2 main operations - read a whole
29 re-write its contents. Blocks may be just re-written.
30 4 Eraseblocks become worn out after some number of erase cycles -
31 typically 100K-1G for SLC NAND and NOR flashes, and 1K-10K for MLC
[all …]
/linux/drivers/mtd/
H A DKconfig65 This allows you to mount read-only file systems (such as cramfs)
81 is part of the PCMCIA specification. It uses a kind of pseudo-
83 512-byte sectors, on top of which you put a 'normal' file system.
87 legal - in the USA you are only permitted to use this on PCMCIA
98 used on M-Systems' DiskOnChip devices. It uses a kind of pseudo-
100 512-byte sectors, on top of which you put a 'normal' file system.
104 legal - in the USA you are only permitted to use this on DiskOnChip
122 Layer which is used on M-Systems' newer DiskOnChip devices. It
123 uses a kind of pseudo-file system on a flash device to emulate
124 a block device with 512-byte sectors, on top of which you put
[all …]
H A Dmtdswap.c1 // SPDX-License-Identifier: GPL-2.0-only
4 * Turns an MTD device into a swap device with block wear leveling
11 * support and lock-less operation written by Adrian Hunter.
43 * Wear level cost amortization. We want to do wear leveling on the background
46 * on the biggest wear difference rather than the biggest dirtiness.
59 #define BLOCK_ERROR (UINT_MAX - 1)
60 #define BLOCK_MAX (UINT_MAX - 2)
80 rb)->erase_count)
82 rb)->erase_count)
153 * page from the current block and is then pre-empted by the GC
[all …]
H A Dnftlmount.c1 // SPDX-License-Identifier: GPL-2.0-or-later
7 * Copyright © 1999-2010 David Woodhouse <dwmw2@infradead.org>
31 struct NFTLMediaHeader *mh = &nftl->MediaHdr; in find_boot_record()
32 struct mtd_info *mtd = nftl->mbd.mtd; in find_boot_record()
40 nftl->EraseSize if there were any point in doing so. */ in find_boot_record()
41 nftl->EraseSize = nftl->mbd.mtd->erasesize; in find_boot_record()
42 nftl->nb_blocks = (u32)nftl->mbd.mtd->size / nftl->EraseSize; in find_boot_record()
44 nftl->MediaUnit = BLOCK_NIL; in find_boot_record()
45 nftl->SpareMediaUnit = BLOCK_NIL; in find_boot_record()
48 for (block = 0; block < nftl->nb_blocks; block++) { in find_boot_record()
[all …]
/linux/drivers/mtd/parsers/
H A Dsharpslpart.c2 * sharpslpart.c - MTD partition parser for NAND flash using the SHARP FTL
10 * linux/include/asm-arm/sharp_nand_logical.h
57 * struct sharpsl_ftl - Sharp FTL Logical Table
59 * @log2phy: the logical-to-physical table
61 * Structure containing the logical-to-physical translation table
89 freebytes |= BIT(i - 8); in sharpsl_nand_check_ooblayout()
95 return -ENOTSUPP; in sharpsl_nand_check_ooblayout()
104 ops.ooblen = mtd->oobsize; in sharpsl_nand_read_oob()
108 if (ret != 0 || mtd->oobsize != ops.oobretlen) in sharpsl_nand_read_oob()
109 return -1; in sharpsl_nand_read_oob()
[all …]
/linux/drivers/mtd/nand/spi/
H A Dwinbond.c1 // SPDX-License-Identifier: GPL-2.0
94 return -ERANGE; in w25m02gv_ooblayout_ecc()
96 region->offset = (16 * section) + 8; in w25m02gv_ooblayout_ecc()
97 region->length = 8; in w25m02gv_ooblayout_ecc()
106 return -ERANGE; in w25m02gv_ooblayout_free()
108 region->offset = (16 * section) + 2; in w25m02gv_ooblayout_free()
109 region->length = 6; in w25m02gv_ooblayout_free()
126 spinand->scratchbuf, in w25m02gv_select_target()
129 *spinand->scratchbuf = target; in w25m02gv_select_target()
130 return spi_mem_exec_op(spinand->spimem, &op); in w25m02gv_select_target()
[all …]
H A Dcore.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2016-2017 Micron Technology, Inc.
10 #define pr_fmt(fmt) "spi-nand: " fmt
21 #include <linux/spi/spi-mem.h>
26 spinand->scratchbuf); in spinand_read_reg_op()
29 ret = spi_mem_exec_op(spinand->spimem, &op); in spinand_read_reg_op()
33 *val = *spinand->scratchbuf; in spinand_read_reg_op()
40 spinand->scratchbuf); in spinand_write_reg_op()
42 *spinand->scratchbuf = val; in spinand_write_reg_op()
43 return spi_mem_exec_op(spinand->spimem, &op); in spinand_write_reg_op()
[all …]
/linux/drivers/mtd/devices/
H A Ddocg3.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Handles the M-Systems DiskOnChip G3 chip
32 * As no specification is available from M-Systems/Sandisk, this drivers lacks
34 * - IPL write
40 * - a 1 byte Hamming code stored in the OOB for each page
41 * - a 7 bytes BCH code stored in the OOB for each page
43 * - BCH is in GF(2^14)
44 * - BCH is over data of 520 bytes (512 page + 7 page_info bytes
46 * - BCH can correct up to 4 bits (t = 4)
47 * - BCH syndroms are calculated in hardware, and checked in hardware as well
[all …]