2019-08-28 |
mtd: peb: Add function to write file
...
This adds a function to the mtd peb API to write a file spanning
multiple blocks to a mtd device. Bad blocks are automatically skipped
and before anything is done we check if the image will fit into the
remaining space (honouring bad blocks).
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 28 Aug 2019
|
2019-07-16 |
mtd: peb: Do not mark as bad in mtd_peb_torture()
...
Both the Kernel and mtd-utils have peb torture functions and both
do not mark the block as bad automatically. Instead, the caller
must mark the block as bad when -EIO is returned from the torture
function. Do the same in barebox. This is necessary as the UBI code
otherwise may mark a block as bad twice: Once indirectly in
mtd_peb_torture() and then directly afterwards.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 16 Jul 2019
|
2019-01-28 |
mtd: peb: Add function to skip bad blocks
...
This adds a function that given a pointer to a PEB number increases the
number until the corresponding PEB is good. It also checks for the PEB
number being inside the mtd device.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 28 Jan 2019
|
2017-06-13 |
Revert "globalvar: make globalvar functions more consistent"
...
This reverts commit 1b4a05c .
Sascha Hauer
committed
on 13 Jun 2017
|
2017-04-11 |
globalvar: make globalvar functions more consistent
...
Similar to the device parameter functions also make the globalvar
functions more consistent. This also adds support for readonly
globalvars and changes several existing globalvars which should
really be readonly to readonly.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 11 Apr 2017
|
2017-03-30 |
mtd: when creating bitflips the offset has to be page aligned
...
mtd_peb_create_bitflips() assumes the offset is page aligned. Enforce
this and in the nand_bitlfip command print a warning if it's not
aligned.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 30 Mar 2017
|
mtd: create bitflips in the correct page
...
In mtd_peb_create_bitflips() buf always points to the first page in a
block. If we want to create bitflips in other pages we have to add the
offset into the block.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 30 Mar 2017
|
2017-01-10 |
mtd: peb: Fix format specifier
...
The correct format specifier for size_t is %zu. Use it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 10 Jan 2017
|
mtd: peb: fix usage of uninitialized variable
...
'read' is used in an error message but never assigned a value to. Remove
the variable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 10 Jan 2017
|
2016-04-06 |
commands: Create nand_bitflip command
...
This adds a command to flip bits in a Nand flash. This is useful for
testing purposes to check if flipped bits are corrected and if the
driver returns the correct number of bitflips.
The command writes a configurable number of bitflips to a single Nand
page. If the -r option is not given the results are reproducible, so
calling the same command twice will revert the bitflips.
The command uses the raw read/write Nand operations which are probably
less tested than the regular read/write operations, so the command may
produce surprising results.
As of writing the command has been tested with the GPMI Nand driver and
the imx-nand driver with fixes posted.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 6 Apr 2016
|
mtd: Introduce mtd-peb API
...
Code which properly wants to handle Nand flash has to work
in a block based way since blocks are the entities that are erased or
may become bad. The regular mtd API works based on offsets in the device
which introduces unhandy 64bit arithmetics and the requirement to align
buffers to blocks.
This introduces the mtd peb API (PEB for physical Erase Block) which
allows the users to work in a block oriented way. The API is heavily
inspired by the UBI IO layer and in fact can replace parts thereof
later.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 6 Apr 2016
|