<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/env/mtd.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>env: mtd: initialize saved_buf pointer</title>
<updated>2025-08-01T23:58:59+00:00</updated>
<author>
<name>Shiji Yang</name>
<email>yangshiji66@outlook.com</email>
</author>
<published>2025-07-25T00:20:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7e842bd33154946052068195df3446635236d3d9'/>
<id>7e842bd33154946052068195df3446635236d3d9</id>
<content type='text'>
When sect_size is greater than the CONFIG_ENV_SIZE, this wild
pointer will cause CPU halt or system crash.

Fixes: 03fb08d4aef8 ("env: Introduce support for MTD")
Signed-off-by: Shiji Yang &lt;yangshiji66@outlook.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When sect_size is greater than the CONFIG_ENV_SIZE, this wild
pointer will cause CPU halt or system crash.

Fixes: 03fb08d4aef8 ("env: Introduce support for MTD")
Signed-off-by: Shiji Yang &lt;yangshiji66@outlook.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: mtd: add the missing put_mtd_device()</title>
<updated>2025-08-01T23:58:58+00:00</updated>
<author>
<name>Shiji Yang</name>
<email>yangshiji66@outlook.com</email>
</author>
<published>2025-07-25T00:20:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=39ae954b04ef2fc4a8c14410379b663deb391fde'/>
<id>39ae954b04ef2fc4a8c14410379b663deb391fde</id>
<content type='text'>
The mtd device is got in setup_mtd_device(), we must put the mtd
device before exiting the function to update the mtd use count.
This patch fixes the following env error:

&gt; Removing MTD device #2 (u-boot-env) with use count 1
&gt; Error when deleting partition "u-boot-env" (-16)

Fixes: 03fb08d4aef8 ("env: Introduce support for MTD")
Signed-off-by: Shiji Yang &lt;yangshiji66@outlook.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The mtd device is got in setup_mtd_device(), we must put the mtd
device before exiting the function to update the mtd use count.
This patch fixes the following env error:

&gt; Removing MTD device #2 (u-boot-env) with use count 1
&gt; Error when deleting partition "u-boot-env" (-16)

Fixes: 03fb08d4aef8 ("env: Introduce support for MTD")
Signed-off-by: Shiji Yang &lt;yangshiji66@outlook.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: mtd: fix usability with NAND flashes</title>
<updated>2025-05-23T14:00:51+00:00</updated>
<author>
<name>Weijie Gao</name>
<email>weijie.gao@mediatek.com</email>
</author>
<published>2025-05-06T07:15:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7c52bca8121fdd967edf24402590b8aacf4fd23a'/>
<id>7c52bca8121fdd967edf24402590b8aacf4fd23a</id>
<content type='text'>
1. As this is for MTD-based devices, the Kconfig dependency should be MTD
   instead of only spi-nor flashes
2. Initialize saved_buf to avoid crash on free()
3. Remaining size should be set correctly to write_size

Fixes: 03fb08d4aef (env: Introduce support for MTD)
Signed-off-by: Weijie Gao &lt;weijie.gao@mediatek.com&gt;
Reviewed-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. As this is for MTD-based devices, the Kconfig dependency should be MTD
   instead of only spi-nor flashes
2. Initialize saved_buf to avoid crash on free()
3. Remaining size should be set correctly to write_size

Fixes: 03fb08d4aef (env: Introduce support for MTD)
Signed-off-by: Weijie Gao &lt;weijie.gao@mediatek.com&gt;
Reviewed-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>env: Introduce support for MTD</title>
<updated>2025-05-05T20:16:59+00:00</updated>
<author>
<name>Christian Marangi</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2025-04-07T18:59:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=03fb08d4aef8c342b583e148d1b5c4d289c5572f'/>
<id>03fb08d4aef8c342b583e148d1b5c4d289c5572f</id>
<content type='text'>
Introduce support for env in generic MTD. Currently we only support SPI
flash based on the lagacy sf cmd that assume SPI flash are always NOR.
This is not the case as to SPI controller also NAND can be attached.

To support also these flash scenario, add support for storing and
reading ENV from generic MTD device by adding an env driver that
base entirely on the MTD api.

Introduce a new kconfig CONFIG_ENV_IS_IN_MTD and
CONFIG_ENV_MTD_DEV to define the name of the MTD device as exposed
by mtd list.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce support for env in generic MTD. Currently we only support SPI
flash based on the lagacy sf cmd that assume SPI flash are always NOR.
This is not the case as to SPI controller also NAND can be attached.

To support also these flash scenario, add support for storing and
reading ENV from generic MTD device by adding an env driver that
base entirely on the MTD api.

Introduce a new kconfig CONFIG_ENV_IS_IN_MTD and
CONFIG_ENV_MTD_DEV to define the name of the MTD device as exposed
by mtd list.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
