<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/mtd/ubi/Kconfig, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-02-25T21:42:23Z</updated>
<entry>
<title>mtd: ubi: provide NVMEM layer over UBI volumes</title>
<updated>2024-02-25T21:42:23Z</updated>
<author>
<name>Daniel Golle</name>
<email>daniel@makrotopia.org</email>
</author>
<published>2023-12-19T02:33:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3ce485803da1b79b2692b6d0c2792829292ad838'/>
<id>urn:sha1:3ce485803da1b79b2692b6d0c2792829292ad838</id>
<content type='text'>
In an ideal world we would like UBI to be used where ever possible on a
NAND chip. And with UBI support in ARM Trusted Firmware and U-Boot it
is possible to achieve an (almost-)all-UBI flash layout. Hence the need
for a way to also use UBI volumes to store board-level constants, such
as MAC addresses and calibration data of wireless interfaces.

Add UBI volume NVMEM driver module exposing UBI volumes as NVMEM
providers. Allow UBI devices to have a "volumes" firmware subnode with
volumes which may be compatible with "nvmem-cells".
Access to UBI volumes via the NVMEM interface at this point is
read-only, and it is slow, opening and closing the UBI volume for each
access due to limitations of the NVMEM provider API.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>ubi: Use the fault injection framework to enhance the fault injection capability</title>
<updated>2024-01-06T22:38:55Z</updated>
<author>
<name>ZhaoLong Wang</name>
<email>wangzhaolong1@huawei.com</email>
</author>
<published>2023-12-26T01:01:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6931fb44858c3b9da9f35fdc8d9cbeef0b4b50a3'/>
<id>urn:sha1:6931fb44858c3b9da9f35fdc8d9cbeef0b4b50a3</id>
<content type='text'>
To make debug parameters configurable at run time, use the
fault injection framework to reconstruct the debugfs interface,
and retain the legacy fault injection interface.

Now, the file emulate_failures and fault_attr files control whether
to enable fault emmulation.

The file emulate_failures receives a mask that controls type and
process of fault injection. Generally, for ease of use, you can
directly enter a mask with all 1s.

echo 0xffff &gt; /sys/kernel/debug/ubi/ubi0/emulate_failures

And you need to configure other fault-injection capabilities for
testing purpose:

echo 100 &gt; /sys/kernel/debug/ubi/fault_inject/emulate_power_cut/probability
echo 15 &gt; /sys/kernel/debug/ubi/fault_inject/emulate_power_cut/space
echo 2 &gt; /sys/kernel/debug/ubi/fault_inject/emulate_power_cut/verbose
echo -1 &gt; /sys/kernel/debug/ubi/fault_inject/emulate_power_cut/times

The CONFIG_MTD_UBI_FAULT_INJECTION to enable the Fault Injection is
added to kconfig.

Signed-off-by: ZhaoLong Wang &lt;wangzhaolong1@huawei.com&gt;
Reviewed-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>treewide: Add SPDX license identifier - Makefile/Kconfig</title>
<updated>2019-05-21T08:50:46Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-19T12:07:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ec8f24b7faaf3d4799a7c3f4c1b87f6b02778ad1'/>
<id>urn:sha1:ec8f24b7faaf3d4799a7c3f4c1b87f6b02778ad1</id>
<content type='text'>
Add SPDX license identifiers to all Make/Kconfig files which:

 - Have no license information of any form

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>UBI: Fix typos</title>
<updated>2017-03-24T14:33:32Z</updated>
<author>
<name>Andrew F. Davis</name>
<email>afd@ti.com</email>
</author>
<published>2017-01-05T20:44:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2fae13124faadf08e597924b7d0e6c8a9a12681e'/>
<id>urn:sha1:2fae13124faadf08e597924b7d0e6c8a9a12681e</id>
<content type='text'>
Signed-off-by: Andrew F. Davis &lt;afd@ti.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>UBI: block: Add CONFIG_BLOCK dependency</title>
<updated>2014-03-04T12:49:53Z</updated>
<author>
<name>Ezequiel Garcia</name>
<email>ezequiel.garcia@free-electrons.com</email>
</author>
<published>2014-03-03T16:42:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=22d3ee5c48cbae136cb44aa812c562117ff6df29'/>
<id>urn:sha1:22d3ee5c48cbae136cb44aa812c562117ff6df29</id>
<content type='text'>
The UBI block driver depends on the block infrastructure. Add the
proper dependency and fix a build error when CONFIG_BLOCK is not selected.

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Ezequiel Garcia &lt;ezequiel.garcia@free-electrons.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: R/O block driver on top of UBI volumes</title>
<updated>2014-02-28T14:29:48Z</updated>
<author>
<name>Ezequiel Garcia</name>
<email>ezequiel.garcia@free-electrons.com</email>
</author>
<published>2014-02-25T16:25:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9d54c8a33eec78289b1b3f6e10874719c27ce0a7'/>
<id>urn:sha1:9d54c8a33eec78289b1b3f6e10874719c27ce0a7</id>
<content type='text'>
This commit introduces read-only block device emulation on top of UBI volumes.

Given UBI takes care of wear leveling and bad block management it's possible
to add a thin layer to enable block device access to UBI volumes.
This allows to use a block-oriented filesystem on a flash device.

The UBI block devices are meant to be used in conjunction with any
regular, block-oriented file system (e.g. ext4), although it's primarily
targeted at read-only file systems, such as squashfs.

Block devices are created upon user request through new ioctls:
UBI_IOCVOLATTBLK to attach and UBI_IOCVOLDETBLK to detach.
Also, a new UBI module parameter is added 'ubi.block'. This parameter is
needed in order to attach a block device on boot-up time, allowing to
mount the rootfs on a ubiblock device.
For instance, you could have these kernel parameters:

  ubi.mtd=5 ubi.block=0,0 root=/dev/ubiblock0_0

Or, if you compile ubi as a module:

  $ modprobe ubi mtd=/dev/mtd5 block=/dev/ubi0_0

Artem: amend commentaries and massage the patch a little bit.

Signed-off-by: Ezequiel Garcia &lt;ezequiel.garcia@free-electrons.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: Wire-up fastmap</title>
<updated>2012-10-03T13:39:37Z</updated>
<author>
<name>Richard Weinberger</name>
<email>richard@nod.at</email>
</author>
<published>2012-09-26T15:51:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=76ac66e469f084d41742ba08923de76fbdc7dce3'/>
<id>urn:sha1:76ac66e469f084d41742ba08923de76fbdc7dce3</id>
<content type='text'>
Make fastmap known to Kconfig, UBI Makefile and MAINTAINERS.

Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: add max_beb_per1024 to attach ioctl</title>
<updated>2012-09-04T06:39:01Z</updated>
<author>
<name>Richard Genoud</name>
<email>richard.genoud@gmail.com</email>
</author>
<published>2012-08-20T16:00:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=db7e21c21f293d52f5363fe8d9ee91d6bd0a503a'/>
<id>urn:sha1:db7e21c21f293d52f5363fe8d9ee91d6bd0a503a</id>
<content type='text'>
This patch provides a possibility to set the "maximum expected number of
bad blocks per 1024 blocks" (max_beb_per1024) for each mtd device using
the UBI_IOCATT ioctl.

Signed-off-by: Richard Genoud &lt;richard.genoud@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: allow specifying bad PEBs limit using module parameter</title>
<updated>2012-09-04T06:39:01Z</updated>
<author>
<name>Richard Genoud</name>
<email>richard.genoud@gmail.com</email>
</author>
<published>2012-08-20T16:00:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=edac493dfb48fe46d43fe6afabb8cfb2d1d4c048'/>
<id>urn:sha1:edac493dfb48fe46d43fe6afabb8cfb2d1d4c048</id>
<content type='text'>
This patch provides the possibility to adjust the "maximum expected number of
bad blocks per 1024 blocks" (max_beb_per1024) for each mtd device.

The majority of NAND devices have their max_beb_per1024 equal to 20, but
sometimes it's more.
Now, we can adjust that via a kernel parameter:
ubi.mtd=&lt;name|num|path&gt;[,&lt;vid_hdr_offs&gt;[,max_beb_per1024]]

Signed-off-by: Richard Genoud &lt;richard.genoud@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: use the whole MTD device size to get bad_peb_limit</title>
<updated>2012-09-04T06:39:00Z</updated>
<author>
<name>Richard Genoud</name>
<email>richard.genoud@gmail.com</email>
</author>
<published>2012-07-10T16:23:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ba4087e956d336488c6df9dfca65d1e70cf480f1'/>
<id>urn:sha1:ba4087e956d336488c6df9dfca65d1e70cf480f1</id>
<content type='text'>
On NAND flash devices, UBI reserves some physical erase blocks (PEB) for
bad block handling. Today, the number of reserved PEB can only be set as a
percentage of the total number of PEB in each MTD partition. For example, for a
NAND flash with 128KiB PEB, 2 MTD partition of 20MiB (mtd0) and 100MiB (mtd1)
and 2% reserved PEB:
 - the UBI device on mtd0 will have 2 PEB reserved
 - the UBI device on mtd1 will have 16 PEB reserved

The problem with this behaviour is that NAND flash manufacturers give a
minimum number of valid block (NVB) during the endurance life of the
device, e.g.:

Parameter             Symbol    Min    Max    Unit      Notes
--------------------------------------------------------------
Valid block number     NVB     1004    1024   Blocks     1

From this number we can deduce the maximum number of bad PEB that a device will
contain during its endurance life: a 128MiB NAND flash (1024 PEB) will not have
less than 20 bad blocks during the flash endurance life.

But the manufacturer doesn't tell where those bad block will appear. He doesn't
say either if they will be equally disposed on the whole device (and I'm pretty
sure they won't). So, according to the datasheets, we should reserve the
maximum number of bad PEB for each UBI device (worst case scenario: 20 bad
blocks appears on the smallest MTD partition).

So this patch make UBI use the whole MTD device size to calculate the maximum
bad expected eraseblocks.

The Kconfig option is in per1024 blocks, thus it can have a default value of 20
which is *very* common for NAND devices.

Signed-off-by: Richard Genoud &lt;richard.genoud@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
</feed>
