2016-04-08 |
imx-bbu-nand-fcb: When writing firmware return new bad blocks
...
Positive return values of imx_bbu_write_firmware() so far indicate
the last block that has been written to. This value is unused, so
return values > 0 to indicate if there are new bad blocks. This
information can be used in the next step to know if the DBBT has
to be rewritten.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Apr 2016
|
imx-bbu-nand-fcb: Only write FCBs/DBBTs when necessary
...
Instead of writing the FCBs/DBBTs on every update write them
only if they have changed or if a block needs cleanup (returns
-EUCLEAN)
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Apr 2016
|
imx-bbu-nand-fcb: erase on demand
...
Instead of erasing the whole partition on update entry, erase the areas
separately when we actually want to write them. This is done as a step
towards robust update.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Apr 2016
|
imx-bbu-nand-fcb: factor out a fcb write function
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Apr 2016
|
imx-bbu-nand-fcb: Use mtd-peb API to write firmware
...
With this patch we verify the firmware written to the NAND and thus
can react on write failures. We torture the block and if it went
bad we mark it as bad.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Apr 2016
|
imx-bbu-nand-fcb: factor out layout functions
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Apr 2016
|
2016-03-04 |
imx-bbu-nand-fcb: Remove double write of first fcb
...
The first FCB page was written twice. One time is enough, drop the
second write.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 4 Mar 2016
|
imx-bbu-nand-fcb: optimize check for bad block loop
...
The argument passed to dbbt_data_create() contains the number of blocks,
not the last block. This means we can exit the loop with '<' instead of
'<='
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 4 Mar 2016
|
2015-06-12 |
imx-bbu-nand-fcb: Split space for firmware in two equal regions
...
We used to write the second firmware right after the first
firmware. However, splitting the available space into two
equal regions has advantages: When we update barebox the next
time the generated FCB/DBBT blocks will be the same as with the
last update, so in case of power failure it is more likely that
we have valid data in one of the FCB/DBBT areas.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 12 Jun 2015
|
imx-bbu-nand-fcb: Erase whole partition
...
Now that we use a partition for the bootloader instead of
the whole NAND device we can erase it completely instead of
hardcoded 2MB.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 12 Jun 2015
|
imx-bbu-nand-fcb: Let DBBT start at page 1
...
We used to put the FCB in the first two NAND blocks and the DBBT
in the third and fourth block. It's much more space efficient to
put the FCB and DBBT together into the same eraseblock in different
pages. This way we can store four FCBs and four DBBTs instead of
two only.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 12 Jun 2015
|
imx-bbu-nand-fcb: make available for i.MX28 aswell
...
The code can be used with slight modifications on i.MX28 aswell.
Add a i.MX28 registration function and move the differences to
function callbacks.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 12 Jun 2015
|
imx-bbu-nand-fcb: Use barebox partition instead of whole device
...
We used to use nand0 device for storing barebox and made the assumption
that there is enough space at the beginning of the first device. Instead,
use the barebox partition directly. This requires that the partition
where barebox should be stored is named 'barebox', that is the case for
all boards currently.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 12 Jun 2015
|
imx-bbu-nand-fcb: Fix debug messages
...
We should print the block number before increasing it, not afterwards.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 12 Jun 2015
|
ARM: i.MX6: bbu nand: Move to common place
...
The code can be used on i.MX28 aswell, so move it to a common place.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 12 Jun 2015
|