| #
70ad550d |
| 17-Oct-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
UPSTREAM: mtd: remove MTDDEBUG() and CONFIG_MTD_DEBUG
All users of this macro have been converted. Remove MTDDEBUG and related CONFIG options.
ubifs_dbg_msg_key() is kept. It is silent unless DEB
UPSTREAM: mtd: remove MTDDEBUG() and CONFIG_MTD_DEBUG
All users of this macro have been converted. Remove MTDDEBUG and related CONFIG options.
ubifs_dbg_msg_key() is kept. It is silent unless DEBUG is defined.
I am not touching scripts/config_whitelist.txt. The deprecated options will be dropped by the next resync.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> (cherry picked from commit 8b7f4b9cc1f31292e5690336f529eca493df3df5) Change-Id: Ib3182c305e6ce539ee6ac5b75e72600ef1fb0cac Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
show more ...
|
| #
301f8dd1 |
| 03-Feb-2020 |
Simon Glass <sjg@chromium.org> |
UPSTREAM: mtd: Rename free() to rfree()
This function name conflicts with our desire to #define free() to something else on sandbox. Since it deals with resources, rename it to rfree().
Change-Id:
UPSTREAM: mtd: Rename free() to rfree()
This function name conflicts with our desire to #define free() to something else on sandbox. Since it deals with resources, rename it to rfree().
Change-Id: I2718843dd4646b7450c36e84cc16e6440c718959 Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 8d38a8459b0de45f5ff41f3e11c278a5cf395fd0)
show more ...
|
| #
ef964b01 |
| 02-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
UPSTREAM: mtd: Don't stop MTD partition creation when it fails on one device
MTD partition creation code is a bit tricky. It tries to figure out when things have changed (either MTD dev list or mtdp
UPSTREAM: mtd: Don't stop MTD partition creation when it fails on one device
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") Change-Id: I789ff4aef0fa6e25a85e48ef7a98cfcead4b81bb Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Tested-by: Heiko Schocher <hs@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 4a5594fa20d0fa6479f477d2bd67967aca201c2f)
show more ...
|
| #
002d1762 |
| 02-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
UPSTREAM: mtd: Delete partitions attached to the device when a device is deleted
If we don't do that, partitions might still be exposed while the underlying device is gone.
Fixes: 2a74930da57f ("mt
UPSTREAM: mtd: Delete partitions attached to the device when a device is deleted
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") Change-Id: Ibf4a89f2caab24e6fdfb9c2dbd42fc4114b4bbe6 Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Tested-by: Heiko Schocher <hs@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit a02820fca90ce9ccf243b3fce59c04dabd5671a8)
show more ...
|
| #
90108c6c |
| 02-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
UPSTREAM: mtd: Add a function to report when the MTD dev list has been updated
We need to parse mtdparts/mtids again everytime a device has been added/removed from the MTD list, but there's currentl
UPSTREAM: mtd: Add a function to report when the MTD dev list has been updated
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 ->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.
Change-Id: If7edb8fde01051087b43eb16683aca6b991daace Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Tested-by: Heiko Schocher <hs@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 4c47fd0b6bce62162e11b8a22e2eaf0d8f6673b1)
show more ...
|
| #
c7314be4 |
| 29-Sep-2018 |
Miquel Raynal <miquel.raynal@bootlin.com> |
UPSTREAM: mtd: mtdpart: implement proper partition handling
Instead of collecting partitions in a flat list, create a hierarchy within the mtd_info structure: use a partitions list to keep track of
UPSTREAM: mtd: mtdpart: implement proper partition handling
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 <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> Change-Id: I87c81be7b75c7d71db5dce2fb4b0cfb1ec1a0fe2 Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 2a74930da57f6fbe3c24509f1d481f435acd2356)
show more ...
|
| #
50466819 |
| 29-Sep-2018 |
Miquel Raynal <miquel.raynal@bootlin.com> |
UPSTREAM: mtd: uboot: search for an equivalent MTD name with the mtdids
Using an MTD device (resp. partition) name in mtdparts is simple and straightforward. However, for a long time already, anothe
UPSTREAM: mtd: uboot: search for an equivalent MTD name with the mtdids
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.
Change-Id: I0fbf73baa9623bb933dd268d7a88dd2746a30d6d Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit ff4afa8a981e22eef670c7c857cb87983346cc2c)
show more ...
|
| #
ac199d13 |
| 16-Aug-2018 |
Miquel Raynal <miquel.raynal@bootlin.com> |
UPSTREAM: mtd: move definitions to enlarge their range
Some helpers might be useful in a future 'mtd' U-Boot command to parse MTD device list.
Change-Id: I127b2a919e781c749271caa8d2186a69edb70982 S
UPSTREAM: mtd: move definitions to enlarge their range
Some helpers might be useful in a future 'mtd' U-Boot command to parse MTD device list.
Change-Id: I127b2a919e781c749271caa8d2186a69edb70982 Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit d02f1d36ec6fe6bfadd77fa71b1df228010ddaa8)
show more ...
|
| #
86db6a45 |
| 16-Aug-2018 |
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> |
UPSTREAM: mtd: Uninline mtd_write_oob and move it to mtdcore.c
There's no reason for having mtd_write_oob inlined in mtd.h header. Move it to mtdcore.c where it belongs.
Change-Id: I1e06b1519126891
UPSTREAM: mtd: Uninline mtd_write_oob and move it to mtdcore.c
There's no reason for having mtd_write_oob inlined in mtd.h header. Move it to mtdcore.c where it belongs.
Change-Id: I1e06b151912689171ff9c66f95cba13f256d27a1 Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 5f50d82d8918b711717b4bbd96c6f348eb6e2a2c)
show more ...
|
| #
c44c4cce |
| 21-Nov-2017 |
Boris Brezillon <boris.brezillon@free-electrons.com> |
UPSTREAM: mtd: add mtd_ooblayout_xxx() helper functions
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
UPSTREAM: mtd: add mtd_ooblayout_xxx() helper functions
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.
Change-Id: I6248b25d56d8ac9074bfb8e76140a78f0803a433 Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Linux commit: 75eb2cec251fda33c9bb716ecc372819abb9278a] [masahiro: cherry-pick more code from adbbc3bc827eb1f43a932d783f09ba55c8ec8379] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 13f3b04f61aa6a0ec61bf01bb404f21c10b48bd0)
show more ...
|
| #
a9a4552a |
| 16-Sep-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
UPSTREAM: printk: collect printk stuff into <linux/printk.h> with loglevel support
When we import code from Linux, with regular re-sync planned, we want to use printk() and pr_*(). U-Boot does not
UPSTREAM: printk: collect printk stuff into <linux/printk.h> with loglevel support
When we import code from Linux, with regular re-sync planned, we want to use printk() and pr_*(). U-Boot does not support them in a clean way. So, people end up with local macros, or compat headers here and there, then we occasionally see build errors of definition conflicts.
We have include/linux/compat.h, but putting all sorts of unrelated things into a single header is just a temporal workaround. Hence this patch, to find the best home for all printk variants. If you want to use printk() and friends, please include <linux/printk.h>. This header is self-contained, and pulls in only a few headers.
When I was testing this clean-up, I noticed the image size exceeded its platform limit on some boards. This is because all pr_*() that were previously defined as no-op in include/linux/mtd/mtd.h (unless CONFIG_MTD_DEBUG is set), are now enabled.
To make such boards happy, this commit also implements CONFIG_LOGLEVEL. The concept is similar to the kernel parameter "loglevel". (Actually, the Kconfig help message was taken from kernel-paremeter.txt of Linux) Messages with a loglevel smaller than console loglevel will be printed.
The difference is the loglevel is build-time determined. To save the image size, lower priority pr_*() are compiled out. I set the default of CONFIG_LOGLEVEL to 6, i.e. pr_notice and higher priority messages are compiled in.
I adjusted CONFIG_LOGLEVEL to avoid build error for some boards.
Change-Id: I997d8bbeedd48777be87472df8ed126181fc4b8e Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> [trini: Add in SPL_LOGLEVEL that is the same as LOGLEVEL] Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit b44b30260ffa3dc82f4bb98b022483bb09e95353)
show more ...
|
| #
1221ce45 |
| 21-Sep-2016 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
treewide: replace #include <asm/errno.h> with <linux/errno.h>
Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have the same content. (both just wrap <asm-generic/errno.h>)
Replace
treewide: replace #include <asm/errno.h> with <linux/errno.h>
Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have the same content. (both just wrap <asm-generic/errno.h>)
Replace all include directives for <asm/errno.h> with <linux/errno.h>.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> [trini: Fixup include/clk.] Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|
| #
fd42e1b5 |
| 25-Jul-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-nand-flash
|
| #
59441ac3 |
| 29-Jun-2016 |
Steve Rae <steve.rae@raedomain.com> |
mtd: fix compiler warnings
- add missing declaration - update debug output format specifiers
Signed-off-by: Steve Rae <steve.rae@raedomain.com>
|
| #
dc557e9a |
| 18-Jun-2016 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
Signed-off-by: Stefano Babic <sbabic@denx.de>
|
| #
715b3a9b |
| 04-Jun-2016 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-nand-flash
|
| #
ceee07b6 |
| 30-May-2016 |
Scott Wood <oss@buserror.net> |
mtd: nand: Sync with Linux v4.6
Updates the NAND code to match Linux v4.6. The previous sync was from Linux v4.1 in commit d3963721d93fafa.
Note that none of the individual NAND drivers tracked Li
mtd: nand: Sync with Linux v4.6
Updates the NAND code to match Linux v4.6. The previous sync was from Linux v4.1 in commit d3963721d93fafa.
Note that none of the individual NAND drivers tracked Linux closely enough to be synced themselves, other than manually applying a few cross-tree changes.
Signed-off-by: Scott Wood <oss@buserror.net> Tested-by: Heiko Schocher <hs@denx.de>
show more ...
|
| #
78e9e71c |
| 23-Oct-2015 |
Tom Rini <trini@konsulko.com> |
include/linux/mtd: Update copyright notices
Condense these updates down to SPDX tags too while doing this. This is a port of a1452a3771c4eb85bd779790b040efdc36f4274e from the Linux Kernel.
Signed-
include/linux/mtd: Update copyright notices
Condense these updates down to SPDX tags too while doing this. This is a port of a1452a3771c4eb85bd779790b040efdc36f4274e from the Linux Kernel.
Signed-off-by: Tom Rini <trini@konsulko.com>
show more ...
|
| #
5f5620ab |
| 12-Nov-2015 |
Stefano Babic <sbabic@denx.de> |
Merge git://git.denx.de/u-boot
|
| #
d8587993 |
| 07-Nov-2015 |
Thomas Chou <thomas@wytron.com.tw> |
dm: implement a MTD uclass
Implement a Memory Technology Device (MTD) uclass. It should include most flash drivers in the future. Though no uclass ops are defined yet, the MTD ops could be used.
Th
dm: implement a MTD uclass
Implement a Memory Technology Device (MTD) uclass. It should include most flash drivers in the future. Though no uclass ops are defined yet, the MTD ops could be used.
The NAND flash driver is based on MTD. The CFI flash and SPI flash support MTD, too. It should make sense to convert them to MTD uclass.
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
show more ...
|
| #
e573bdb3 |
| 30-Oct-2015 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
0195a7bb |
| 22-Oct-2015 |
Heiko Schocher <hs@denx.de> |
ubi,ubifs: sync with linux v4.2
sync with linux v4.2
commit 64291f7db5bd8150a74ad2036f1037e6a0428df2 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sun Aug 30 11:34:09 2015 -0700
ubi,ubifs: sync with linux v4.2
sync with linux v4.2
commit 64291f7db5bd8150a74ad2036f1037e6a0428df2 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sun Aug 30 11:34:09 2015 -0700
Linux 4.2
This update is needed, as it turned out, that fastmap was in experimental/broken state in kernel v3.15, which was the last base for U-Boot.
Signed-off-by: Heiko Schocher <hs@denx.de> Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
show more ...
|
| #
ad608a21 |
| 26-Aug-2015 |
Tom Rini <trini@konsulko.com> |
Merge git://git.denx.de/u-boot-nand-flash
|
| #
2580a2a7 |
| 28-Apr-2015 |
Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> |
mtd: nand: Increase max sizes of OOB and Page size
Increase max sizes for OOB, Page size and eccpos to suit for Micron MT29F32G08 part
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
|
| #
86a720aa |
| 21-May-2014 |
Ezequiel Garcia <ezequiel.garcia@free-electrons.com> |
mtd: Introduce mtd_block_isreserved()
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 a
mtd: Introduce mtd_block_isreserved()
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 <ezequiel.garcia@free-electrons.com> Tested-by: Pekon Gupta <pekon@ti.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com> [scottwood: Cherry-picked from Linux 8471bb73ba10ed67] Signed-off-by: Scott Wood <scottwood@freescale.com>
show more ...
|