| #
b97f5950 |
| 17-Aug-2022 |
Jon Lin <jon.lin@rock-chips.com> |
mtd: Add spi nor probe to mtd_probe_devices
Change-Id: I92a9e231568114b62b68cf8b0b1a4d1b0e5d9c54 Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
|
| #
a62211b4 |
| 23-Jan-2019 |
Patrice Chotard <patrice.chotard@st.com> |
UPSTREAM: mtd: Fix get_mtdparts()
When ENV_IS_IN_UBI is enable, get_mtdparts is called before relocation.
During first get_mtdparts() call, mtdparts is not available in environment, it can be retri
UPSTREAM: mtd: Fix get_mtdparts()
When ENV_IS_IN_UBI is enable, get_mtdparts is called before relocation.
During first get_mtdparts() call, mtdparts is not available in environment, it can be retrieved by calling board_mtdparts_default(), but following env_set() do nothing as we are before relocation. Finally mtdparts is still not available in environment.
At second get_mtdparts() call, use_defaults is false, but mtdparts is still not in environment and is NULL.
Remove use_defaults bool, only mtdparts criteria is useful.
Fixes: commit 5ffcd50612f6 ("mtd: Use default mtdparts/mtids when not defined in the environment")
Change-Id: I5e789575c70c88fce758f36343baca7625afd297 Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit e6b7afe737f95f61f347a340acdda1a48d29ed50)
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 ...
|
| #
a38bf0a9 |
| 02-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
UPSTREAM: mtd: Make sure we don't parse MTD partitions belonging to another dev
The mtdparts variable might contain partition definitions for several MTD devices. Each partition layout is separated
UPSTREAM: mtd: Make sure we don't parse MTD partitions belonging to another dev
The mtdparts variable might contain partition definitions for several MTD devices. Each partition layout is separated by a ';', so let's make sure we don't pick a wrong name when mtdparts is malformed.
Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command") Change-Id: I3d2678fb7b20da5705f4f94be8c454363cc2ecf1 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 2428d9160b80375870c1fff6cbb0214639628282)
show more ...
|
| #
7a13c786 |
| 02-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
UPSTREAM: mtd: Make sure the name passed in mtdparts fits in mtd_name[]
The local mtd_name[] variable is limited in size. Return an error if the name passed in mtdparts does not fit in this local va
UPSTREAM: mtd: Make sure the name passed in mtdparts fits in mtd_name[]
The local mtd_name[] variable is limited in size. Return an error if the name passed in mtdparts does not fit in this local var.
Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command") Change-Id: I42886a7579c0550a2bf1913cf390a19d9b21e825 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 772aa9799353d1d6bd6d9e2682945d4d7122539a)
show more ...
|
| #
e3112a2c |
| 02-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
UPSTREAM: mtd: Be more strict on the "mtdparts=" prefix check
strstr() does not guarantee that the string we're searching for is placed at the beginning. Use strncmp() instead.
Fixes: 5db66b3aee6f
UPSTREAM: mtd: Be more strict on the "mtdparts=" prefix check
strstr() does not guarantee that the string we're searching for is placed at the beginning. Use strncmp() instead.
Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command") Change-Id: Ia8da418501df1067f702fcd7b428cc3acde5b4e5 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 429e048e4190b68b078c37c0012c59804e32818b)
show more ...
|
| #
4ac4e964 |
| 02-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
UPSTREAM: mtd: Use get_mtdids() instead of env_get("mtdids") in mtd_search_alternate_name()
The environment is not guaranteed to contain a valid mtdids variable when called from mtd_search_alternate
UPSTREAM: mtd: Use get_mtdids() instead of env_get("mtdids") in mtd_search_alternate_name()
The environment is not guaranteed to contain a valid mtdids variable when called from mtd_search_alternate_name(). Call get_mtdids() instead of env_get("mtdids").
Fixes: ff4afa8a981e ("mtd: uboot: search for an equivalent MTD name with the mtdids") Change-Id: I6a0147009b60dd3c03799981971975fb40ce1283 Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Tested-by: Heiko Schocher <hs@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 96b06434e56ce5dca391e8417d293132ff7164e0)
show more ...
|
| #
4c33ae3b |
| 02-Dec-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
UPSTREAM: mtd: Parse mtdparts/mtdids again when the MTD list has been updated
Updates to the MTD device list should trigger a new parsing of the mtdids/mtdparts vars even if those vars haven't chang
UPSTREAM: mtd: Parse mtdparts/mtdids again when the MTD list has been updated
Updates to the MTD device list should trigger a new parsing of the mtdids/mtdparts vars even if those vars haven't changed.
Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command") Change-Id: I02c0e18d9ac70ab3b36f865d85746c8cf69c4d23 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 779c9c0565a44e7dc5f72919d88f67fb7e280880)
show more ...
|
| #
b95c8f6c |
| 13-Nov-2018 |
Boris Brezillon <boris.brezillon@bootlin.com> |
UPSTREAM: mtd: Use default mtdparts/mtids when not defined in the environment
U-boot provides a mean to define default values for mtdids and mtdparts when they're not defined in the environment. Pat
UPSTREAM: mtd: Use default mtdparts/mtids when not defined in the environment
U-boot provides a mean to define default values for mtdids and mtdparts when they're not defined in the environment. Patch mtd_probe_devices() to use those default values when env_get("mtdparts") or env_get("mtdids") return NULL.
This implementation is based on the logic found in cmd/mtdparts.c.
Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command") Change-Id: Ic10873631a58981860f95584efc0b0b03b753a98 Reported-by: Stefan Roese <sr@denx.de> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Tested-by: Stefan Roese <sr@denx.de> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Jagan Teki <jagan@openedev.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 5ffcd50612f6e716ea9479bea0edfdc89f7a0f0b)
show more ...
|
| #
4696f08f |
| 08-Oct-2018 |
Adam Ford <aford173@gmail.com> |
UPSTREAM: mtd: uboot: Fix hanging during mtd list command
Some boards (like omap3_logic) hang when trying to access address 0. This happens when executing the new 'mtd list' command. This patch enha
UPSTREAM: mtd: uboot: Fix hanging during mtd list command
Some boards (like omap3_logic) hang when trying to access address 0. This happens when executing the new 'mtd list' command. This patch enhances the checks for conditions that would preclude mtd_probe_devices() from operating.
Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command") Suggested-by: Boris Brezillon <boris.brezillon@bootlin.com> Change-Id: I89cc935188ab9b4c380fbf09cf24386c0b5d6e6c Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit c8602061a7b27fe874a454b0ec65f1e45621adbb)
show more ...
|
| #
f87151b3 |
| 29-Sep-2018 |
Miquel Raynal <miquel.raynal@bootlin.com> |
UPSTREAM: cmd: mtd: add 'mtd' command
There should not be a 'nand' command, a 'sf' command and certainly not a new 'spi-nand' command. Write a 'mtd' command instead to manage all MTD devices/partiti
UPSTREAM: cmd: mtd: add 'mtd' command
There should not be a 'nand' command, a 'sf' command and certainly not a new 'spi-nand' command. Write a 'mtd' command instead to manage all MTD devices/partitions at once. This should be the preferred way to access any MTD device.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> Change-Id: I68bcf4f0126c3a9d6ae0481dafcfcaab0506bd3f Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 5db66b3aee6f2c057706d8715f7e5c472e82f047)
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 ...
|
| #
10b69712 |
| 15-Oct-2015 |
Maxime Ripard <maxime.ripard@free-electrons.com> |
mtd: uboot: Add meaningful error message
The current error message in get_part if CONFIG_MTDPARTS is disabled is "offset is not a number" which is confusing and doesn't help at all.
Change that for
mtd: uboot: Add meaningful error message
The current error message in get_part if CONFIG_MTDPARTS is disabled is "offset is not a number" which is confusing and doesn't help at all.
Change that for something that might give a hint on what's going on.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|
| #
f448c5d3 |
| 17-Jul-2015 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
f18d1116 |
| 01-Jul-2015 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
mtd: fix false positive "Offset exceeds device limit" error
Since commit 09c3280754f8 (mtd, nand: Move common functions from cmd_nand.c to common place), NAND commands would not work at all on large
mtd: fix false positive "Offset exceeds device limit" error
Since commit 09c3280754f8 (mtd, nand: Move common functions from cmd_nand.c to common place), NAND commands would not work at all on large devices.
=> nand read 80000000 10000 10000
NAND read: Offset exceeds device limit => nand erase 100000 100000
NAND erase: Offset exceeds device limit
The type of the "size" of "struct mtd_info" is uint64_t, while mtd_arg_off_size() and mtd_arg_off() treat chipsize as int type. The chipsize is wrapped around if the argument is given with 2GB or larger.
Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| #
1254ff97 |
| 10-Jul-2015 |
Stefano Babic <sbabic@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
6f43ba70 |
| 07-Jul-2015 |
Albert ARIBAUD <albert.u.boot@aribaud.net> |
Merge branch 'u-boot/master' into 'u-boot-arm/master'
|
| #
09c32807 |
| 27-Apr-2015 |
Heiko Schocher <hs@denx.de> |
mtd, nand: Move common functions from cmd_nand.c to common place
Move common functions from cmd_nand.c (for calculating offset and size from cmdline paramter) to common place, so they could used fro
mtd, nand: Move common functions from cmd_nand.c to common place
Move common functions from cmd_nand.c (for calculating offset and size from cmdline paramter) to common place, so they could used from other commands which use mtd partitions.
For onenand the arg_off_size() is left in common/cmd_onenand.c. It should use now the common arg_off() function, but as I could not test onenand I let it there ...
Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Scott Wood <scottwood@freescale.com> Reviewed-by: Jagannadh Teki <jteki@openedev.com>
show more ...
|