summaryrefslogtreecommitdiffstats
path: root/common/imx-bbu-nand-fcb.c
Commit message (Collapse)AuthorAgeFilesLines
* imx-bbu-nand-fcb: Split space for firmware in two equal regionsSascha Hauer2015-06-121-15/+33
| | | | | | | | | | | 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>
* imx-bbu-nand-fcb: Erase whole partitionSascha Hauer2015-06-121-3/+1
| | | | | | | | 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>
* imx-bbu-nand-fcb: Let DBBT start at page 1Sascha Hauer2015-06-121-10/+11
| | | | | | | | | | 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>
* imx-bbu-nand-fcb: make available for i.MX28 aswellSascha Hauer2015-06-121-22/+151
| | | | | | | | 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>
* imx-bbu-nand-fcb: Use barebox partition instead of whole deviceSascha Hauer2015-06-121-2/+2
| | | | | | | | | | 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>
* imx-bbu-nand-fcb: Fix debug messagesSascha Hauer2015-06-121-2/+2
| | | | | | We should print the block number before increasing it, not afterwards. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX6: bbu nand: Move to common placeSascha Hauer2015-06-121-0/+491
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>