<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm63xx/u-boot/include/linux/mtd/mtd.h, branch master</title>
<subtitle>Broadcom-s U-Boot</subtitle>
<id>https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/atom?h=master</id>
<link rel='self' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/'/>
<updated>2019-04-12T05:28:21Z</updated>
<entry>
<title>mtd: fix mtd_oobavail() incoherent returned value</title>
<updated>2019-04-12T05:28:21Z</updated>
<author>
<name>Miquel Raynal</name>
</author>
<published>2018-11-18T20:11:46Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=a55036b2786919996db6dcffd5f0a86d1077184b'/>
<id>urn:sha1:a55036b2786919996db6dcffd5f0a86d1077184b</id>
<content type='text'>
mtd_oobavail() returns either mtd-&gt;oovabail or mtd-&gt;oobsize. Both
values are unsigned 32-bit entities, so there is no reason to pretend
returning a signed one.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: Don't stop MTD partition creation when it fails on one device</title>
<updated>2018-12-05T19:15:36Z</updated>
<author>
<name>Boris Brezillon</name>
</author>
<published>2018-12-02T09:54:30Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=4a5594fa20d0fa6479f477d2bd67967aca201c2f'/>
<id>urn:sha1:4a5594fa20d0fa6479f477d2bd67967aca201c2f</id>
<content type='text'>
MTD partition creation code is a bit tricky. It tries to figure out
when things have changed (either MTD dev list or mtdparts/mtdids vars)
and when that happens it first deletes all the partitions that had been
previously created and then creates the new ones based on the new
mtdparts/mtdids values.
But before deleting the old partitions, it ensures that none of the
currently registered parts are being used and bails out when that's
not the case. So, we end up in a situation where, if at least one MTD
dev has one of its partitions used by someone (UBI for instance), the
partitions update logic no longer works for other devs.

Rework the code to relax the logic and allow updates of MTD parts on
devices that are not being used (we still refuse to updates parts on
devices who have at least one of their partitions used by someone).

Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command")
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Tested-by: Heiko Schocher &lt;hs@denx.de&gt;
</content>
</entry>
<entry>
<title>mtd: Delete partitions attached to the device when a device is deleted</title>
<updated>2018-12-05T19:15:36Z</updated>
<author>
<name>Boris Brezillon</name>
</author>
<published>2018-12-02T09:54:24Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=a02820fca90ce9ccf243b3fce59c04dabd5671a8'/>
<id>urn:sha1:a02820fca90ce9ccf243b3fce59c04dabd5671a8</id>
<content type='text'>
If we don't do that, partitions might still be exposed while the
underlying device is gone.

Fixes: 2a74930da57f ("mtd: mtdpart: implement proper partition handling")
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Tested-by: Heiko Schocher &lt;hs@denx.de&gt;
</content>
</entry>
<entry>
<title>mtd: Add a function to report when the MTD dev list has been updated</title>
<updated>2018-12-05T19:15:36Z</updated>
<author>
<name>Boris Brezillon</name>
</author>
<published>2018-12-02T09:54:22Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=4c47fd0b6bce62162e11b8a22e2eaf0d8f6673b1'/>
<id>urn:sha1:4c47fd0b6bce62162e11b8a22e2eaf0d8f6673b1</id>
<content type='text'>
We need to parse mtdparts/mtids again everytime a device has been
added/removed from the MTD list, but there's currently no way to know
when such an update has been done.

Add an -&gt;updated field to the idr struct that we set to true every time
a device is added/removed and expose a function returning the value
of this field and resetting it to false.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Tested-by: Heiko Schocher &lt;hs@denx.de&gt;
</content>
</entry>
<entry>
<title>mtd: mtdpart: implement proper partition handling</title>
<updated>2018-10-02T16:42:32Z</updated>
<author>
<name>Miquel Raynal</name>
</author>
<published>2018-09-29T10:58:27Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=2a74930da57f6fbe3c24509f1d481f435acd2356'/>
<id>urn:sha1:2a74930da57f6fbe3c24509f1d481f435acd2356</id>
<content type='text'>
Instead of collecting partitions in a flat list, create a hierarchy
within the mtd_info structure: use a partitions list to keep track of
the partitions of an MTD device (which might be itself a partition of
another MTD device), a pointer to the parent device (NULL when the MTD
device is the root one, not a partition).

By also saving directly in mtd_info the offset of the partition, we
can get rid of the mtd_part structure.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: uboot: search for an equivalent MTD name with the mtdids</title>
<updated>2018-10-02T16:42:32Z</updated>
<author>
<name>Miquel Raynal</name>
</author>
<published>2018-09-29T10:58:26Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=ff4afa8a981e22eef670c7c857cb87983346cc2c'/>
<id>urn:sha1:ff4afa8a981e22eef670c7c857cb87983346cc2c</id>
<content type='text'>
Using an MTD device (resp. partition) name in mtdparts is simple and
straightforward. However, for a long time already, another name was
given in mtdparts to indicate a device (resp. partition) so the
"mtdids" environment variable was created to do the match.

Let's create a function that, from an MTD device (resp. partition)
name, search for the equivalent name in the "mtdparts" environment
variable thanks to the "mtdids" string.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: move definitions to enlarge their range</title>
<updated>2018-09-20T14:40:49Z</updated>
<author>
<name>Miquel Raynal</name>
</author>
<published>2018-08-16T15:30:05Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=d02f1d36ec6fe6bfadd77fa71b1df228010ddaa8'/>
<id>urn:sha1:d02f1d36ec6fe6bfadd77fa71b1df228010ddaa8</id>
<content type='text'>
Some helpers might be useful in a future 'mtd' U-Boot command to parse
MTD device list.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: add get/set of_node/flash_node helpers</title>
<updated>2018-09-20T14:40:49Z</updated>
<author>
<name>Brian Norris</name>
</author>
<published>2018-08-16T15:30:03Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=9bfc3fde9c64320f7165560a64888fad09bc0fee'/>
<id>urn:sha1:9bfc3fde9c64320f7165560a64888fad09bc0fee</id>
<content type='text'>
We are going to begin using the mtd-&gt;dev.of_node field for MTD device
nodes, so let's add helpers for it. Also, we'll be making some
conversions on spi_nor (and nand_chip eventually) too, so get that ready
with their own helpers.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Reviewed-by: Jagan Teki &lt;jagan@openedev.com&gt;
</content>
</entry>
<entry>
<title>mtd: Uninline mtd_write_oob and move it to mtdcore.c</title>
<updated>2018-09-20T14:40:49Z</updated>
<author>
<name>Ezequiel Garcia</name>
</author>
<published>2018-08-16T15:30:00Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=5f50d82d8918b711717b4bbd96c6f348eb6e2a2c'/>
<id>urn:sha1:5f50d82d8918b711717b4bbd96c6f348eb6e2a2c</id>
<content type='text'>
There's no reason for having mtd_write_oob inlined in mtd.h header.
Move it to mtdcore.c where it belongs.

Signed-off-by: Ezequiel Garcia &lt;ezequiel@vanguardiasur.com.ar&gt;
Acked-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: remove stale comment in mtd_oob_ops structure</title>
<updated>2018-07-24T13:25:23Z</updated>
<author>
<name>Miquel Raynal</name>
</author>
<published>2018-07-14T12:37:19Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/project/bcm63xx/u-boot/commit/?id=980f65dc6cfdf8c35475712a37f5f267a744b852'/>
<id>urn:sha1:980f65dc6cfdf8c35475712a37f5f267a744b852</id>
<content type='text'>
A comment in the kernel doc of the mtd_oob_ops structure tells that it
is not possible to write more than one page with OOB. This was
probably true at some time in the past but today it is entirely wrong.

As one can see for instance in the nand_do_write_ops() helper available
in the NAND core, this implementation called by mtd-&gt;_write_oob()
simply loops over the pages until everything has been written.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
</feed>
