| dc6fa43f | 05-Feb-2019 |
Vignesh R <vigneshr@ti.com> |
UPSTREAM: mtd: spi: spi-nor-core: Add back U-Boot specific features
For legacy reasons, we will have to keep around U-Boot specific SPI_FLASH_BAR and SPI_TX_BYTE. Add them back to the new framework
UPSTREAM: mtd: spi: spi-nor-core: Add back U-Boot specific features
For legacy reasons, we will have to keep around U-Boot specific SPI_FLASH_BAR and SPI_TX_BYTE. Add them back to the new framework
Change-Id: I6888e49eeaeb89adca64cb8ca6683b27781bd7a8 Signed-off-by: Vignesh R <vigneshr@ti.com> Reviewed-by: Jagan Teki <jagan@openedev.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com> #zynq-microzed Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 8c927809ea960596345c33b02294af6e236d4ad4)
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 ...
|
| 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 ...
|
| 3de98b82 | 29-Sep-2018 |
Miquel Raynal <miquel.raynal@bootlin.com> |
UPSTREAM: mtd: mtdpart: add a generic mtdparts-like parser
The current parser is very specific to U-Boot mtdparts implementation. It does not use MTD structures like mtd_info and mtd_partition. Copy
UPSTREAM: mtd: mtdpart: add a generic mtdparts-like parser
The current parser is very specific to U-Boot mtdparts implementation. It does not use MTD structures like mtd_info and mtd_partition. Copy and adapt the current parser in drivers/mtd/mtd-uclass.c (to not break the current use of mtdparts.c itself) and write some kind of a wrapper around the current implementation to allow other commands to benefit from this parsing in a user-friendly way.
This new function will allocate an mtd_partition array for each successful call. This array must be freed after use by the caller. The given 'mtdparts' buffer pointer will be moved forward to the next MTD device (if any, it will point towards a '\0' character otherwise).
Change-Id: If785967e93395e883636695c669a52c60d2a043d 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> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 21cc1fb5af06e468c74ae601bac719d306523f9c)
show more ...
|
| ed13557f | 16-Aug-2018 |
Peter Pan <peterpandong@micron.com> |
UPSTREAM: mtd: spinand: Add initial support for Micron MT29F2G01ABAGD
Add a basic driver for Micron SPI NANDs. Only one device is supported right now, but the driver will be extended to support more
UPSTREAM: mtd: spinand: Add initial support for Micron MT29F2G01ABAGD
Add a basic driver for Micron SPI NANDs. Only one device is supported right now, but the driver will be extended to support more devices afterwards.
Change-Id: I00be31e80599565e8bd3c01e17177c6594f5b98b Signed-off-by: Peter Pan <peterpandong@micron.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 883d8778ae177172c0a53c018faa39e61f30dea3)
show more ...
|
| 749af7cd | 16-Aug-2018 |
Peter Pan <peterpandong@micron.com> |
UPSTREAM: mtd: nand: Add core infrastructure to support SPI NANDs
Add a SPI NAND framework based on the generic NAND framework and the spi-mem infrastructure.
In its current state, this framework s
UPSTREAM: mtd: nand: Add core infrastructure to support SPI NANDs
Add a SPI NAND framework based on the generic NAND framework and the spi-mem infrastructure.
In its current state, this framework supports the following features:
- single/dual/quad IO modes - on-die ECC
Change-Id: Ifdb3001b7570e0e034f7125c4b66053462f2aed2 Signed-off-by: Peter Pan <peterpandong@micron.com> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 0a6d6bae03864938f073cc114992c40f2338a155)
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 ...
|