summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-03-11 10:49:50 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-03-11 10:49:50 +0100
commit251ae23e9fa0a5ab88823e63bb18b89706b7ea87 (patch)
tree2c14c5b8fca7ab31335980ad359c56fc5fdb4cb2 /common
parent034d4ddcb6dfc7f72cb5076807e93a7bb7e4636b (diff)
parenta1d621cbe3cc9ad7e8bdf35f51cbe61e5182ca1d (diff)
downloadbarebox-251ae23e9fa0a5ab88823e63bb18b89706b7ea87.tar.gz
barebox-251ae23e9fa0a5ab88823e63bb18b89706b7ea87.tar.xz
Merge branch 'for-next/mtd'
Diffstat (limited to 'common')
-rw-r--r--common/imx-bbu-nand-fcb.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/common/imx-bbu-nand-fcb.c b/common/imx-bbu-nand-fcb.c
index 22031f5b7f..3eb9e9b169 100644
--- a/common/imx-bbu-nand-fcb.c
+++ b/common/imx-bbu-nand-fcb.c
@@ -337,14 +337,14 @@ static int imx_bbu_write_firmware(struct mtd_info *mtd, unsigned block,
return block;
}
-static int dbbt_data_create(struct mtd_info *mtd, void *buf, int block_last)
+static int dbbt_data_create(struct mtd_info *mtd, void *buf, int num_blocks)
{
int n;
int n_bad_blocks = 0;
uint32_t *bb = buf + 0x8;
uint32_t *n_bad_blocksp = buf + 0x4;
- for (n = 0; n <= block_last; n++) {
+ for (n = 0; n < num_blocks; n++) {
loff_t offset = n * mtd->erasesize;
if (mtd_block_isbad(mtd, offset)) {
n_bad_blocks++;
@@ -461,10 +461,6 @@ static int imx_bbu_nand_update(struct bbu_handler *handler, struct bbu_data *dat
*/
memset(fcb_raw_page + mtd->writesize, 0xFF, 2);
- ret = raw_write_page(mtd, fcb_raw_page, mtd->erasesize);
- if (ret)
- goto out;
-
dbbt->Checksum = 0;
dbbt->FingerPrint = 0x54424244;
dbbt->Version = 0x01000000;