<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/mtd/mtdcore.c, branch v2018.11-rc2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/drivers/mtd/mtdcore.c?h=v2018.11-rc2</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/drivers/mtd/mtdcore.c?h=v2018.11-rc2'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2018-10-02T16:42:32Z</updated>
<entry>
<title>mtd: mtdpart: implement proper partition handling</title>
<updated>2018-10-02T16:42:32Z</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2018-09-29T10:58:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/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: Fallback to -&gt;_read/write() when -&gt;_read/write_oob() is missing</title>
<updated>2018-09-20T14:40:49Z</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2018-08-16T15:30:02Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ca040d8512f4d93a7eb83f7b8fec8f4b8b1d3192'/>
<id>urn:sha1:ca040d8512f4d93a7eb83f7b8fec8f4b8b1d3192</id>
<content type='text'>
Some MTD sublayers/drivers are implementing -&gt;_read/write() and
not -&gt;_read/write_oob().

While for NAND devices both are usually valid, for NOR devices, using
the _oob variant has no real meaning. But, as the MTD layer is supposed
to hide as much as possible the flash complexity to the user, there is
no reason to error out while it is just a matter of rewritting things
internally.

Add a fallback on mtd-&gt;_read() (resp. mtd-&gt;_write()) when the user calls
mtd_read_oob() (resp. mtd_write_oob()) while mtd-&gt;_read_oob() (resp.
mtd-&gt;_write_oob) is not implemented. There is already a fallback on the
_oob variant if the former is used.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: Add sanity checks in mtd_write/read_oob()</title>
<updated>2018-09-20T14:40:49Z</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@free-electrons.com</email>
</author>
<published>2018-08-16T15:30:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8fad769f1eab88a2bcf0b714694158968f58715a'/>
<id>urn:sha1:8fad769f1eab88a2bcf0b714694158968f58715a</id>
<content type='text'>
Unlike what's done in mtd_read/write(), there are no checks to make sure
the parameters passed to mtd_read/write_oob() are consistent, which
forces implementers of -&gt;_read/write_oob() to do it, which in turn leads
to code duplication and possibly errors in the logic.

Do general sanity checks, like ops fields consistency and range checking.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Cc: Peter Pan &lt;peterpandong@micron.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
[Miquel: squashed the fix about the chip's size check]
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.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>
<email>ezequiel@vanguardiasur.com.ar</email>
</author>
<published>2018-08-16T15:30:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/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: Fallback to -&gt;_read/write_oob() when -&gt;_read/write() is missing</title>
<updated>2018-09-20T14:40:49Z</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@free-electrons.com</email>
</author>
<published>2018-08-16T15:29:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=596cf083da34c2007f8ec760c8b077f6f28ee655'/>
<id>urn:sha1:596cf083da34c2007f8ec760c8b077f6f28ee655</id>
<content type='text'>
Some MTD sublayers/drivers are implementing -&gt;_read/write_oob() and
provide dummy wrappers for their -&gt;_read/write() implementations.
Let the core handle this case instead of duplicating the logic.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Acked-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Acked-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@free-electrons.com&gt;
Tested-by: Ladislav Michl &lt;ladis@linux-mips.org&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>SPDX: Convert all of our single license tags to Linux Kernel style</title>
<updated>2018-05-07T13:34:12Z</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2018-05-06T21:58:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=83d290c56fab2d38cd1ab4c4cc7099559c1d5046'/>
<id>urn:sha1:83d290c56fab2d38cd1ab4c4cc7099559c1d5046</id>
<content type='text'>
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>mtd: add mtd_ooblayout_xxx() helper functions</title>
<updated>2017-11-28T15:28:58Z</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@free-electrons.com</email>
</author>
<published>2017-11-21T17:38:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=13f3b04f61aa6a0ec61bf01bb404f21c10b48bd0'/>
<id>urn:sha1:13f3b04f61aa6a0ec61bf01bb404f21c10b48bd0</id>
<content type='text'>
In order to make the ecclayout definition completely dynamic we need to
rework the way the OOB layout are defined and iterated.

Create a few mtd_ooblayout_xxx() helpers to ease OOB bytes manipulation
and hide ecclayout internals to their users.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
[Linux commit: 75eb2cec251fda33c9bb716ecc372819abb9278a]
[masahiro:
 cherry-pick more code from adbbc3bc827eb1f43a932d783f09ba55c8ec8379]
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>compat: Remove is_power_of_2() definition</title>
<updated>2015-11-05T21:46:59Z</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@freescale.com</email>
</author>
<published>2015-11-05T14:43:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f8fdb81f6cbf9387fee7a8ab82b315798a7038ba'/>
<id>urn:sha1:f8fdb81f6cbf9387fee7a8ab82b315798a7038ba</id>
<content type='text'>
Use the is_power_of_2() definition from log2.h to align with the
kernel implementation.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
Reviewed-by: Jagan Teki &lt;jteki@openedev.com&gt;
</content>
</entry>
<entry>
<title>mtd: Introduce mtd_block_isreserved()</title>
<updated>2015-08-26T03:53:57Z</updated>
<author>
<name>Ezequiel Garcia</name>
<email>ezequiel.garcia@free-electrons.com</email>
</author>
<published>2014-05-21T22:06:12Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=86a720aafce5b2571af66b8d7e04b144c05b1b8b'/>
<id>urn:sha1:86a720aafce5b2571af66b8d7e04b144c05b1b8b</id>
<content type='text'>
In addition to mtd_block_isbad(), which checks if a block is bad or
reserved, it's needed to check if a block is reserved only (but not
bad). This commit adds an MTD interface for it, in a similar fashion to
mtd_block_isbad().

While here, fix mtd_block_isbad() so the out-of-bounds checking is done
before the callback check.

Signed-off-by: Ezequiel Garcia &lt;ezequiel.garcia@free-electrons.com&gt;
Tested-by: Pekon Gupta &lt;pekon@ti.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
[scottwood: Cherry-picked from Linux 8471bb73ba10ed67]
Signed-off-by: Scott Wood &lt;scottwood@freescale.com&gt;
</content>
</entry>
<entry>
<title>mtdcore: Fix a build error with CONFIG_CMD_MTDPARTS_SPREAD</title>
<updated>2014-09-16T16:23:59Z</updated>
<author>
<name>maxin.john@enea.com</name>
<email>maxin.john@enea.com</email>
</author>
<published>2014-09-08T17:04:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5da163d665c6c1efef03fc9c6b5ff1d6fe91ad08'/>
<id>urn:sha1:5da163d665c6c1efef03fc9c6b5ff1d6fe91ad08</id>
<content type='text'>
This patch fixes the build error for CONFIG_CMD_MTDPARTS_SPREAD

Signed-off-by: Maxin B. John &lt;maxin.john@enea.com&gt;
</content>
</entry>
</feed>
