summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-05-23 15:01:49 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-05-23 15:01:58 +0200
commit873e840c6870f6bf7d49278e7a4de0d1b772940b (patch)
treed3971a0839cd6e4434a374c8aa8d12ff087ab314 /common
parentc422b154a770b683b341f6ab2973aa20f3588ef3 (diff)
downloadbarebox-873e840c6870f6bf7d49278e7a4de0d1b772940b.tar.gz
barebox-873e840c6870f6bf7d49278e7a4de0d1b772940b.tar.xz
imx-bbu-nand-fcb: print page numbers instead of block numbers
The whole file uses NAND page numbers, so for clarity print the message about where the new firmware is written to with page numbers aswell. Also refer to the slot the firmware is written into. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/imx-bbu-nand-fcb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/imx-bbu-nand-fcb.c b/common/imx-bbu-nand-fcb.c
index a29a1bf91a..874d55ba56 100644
--- a/common/imx-bbu-nand-fcb.c
+++ b/common/imx-bbu-nand-fcb.c
@@ -606,9 +606,10 @@ static int imx_bbu_write_firmware(struct mtd_info *mtd, unsigned num, void *buf,
int ret, i, newbadblock = 0;
int num_blocks = imx_bbu_firmware_max_blocks(mtd);
int block = imx_bbu_firmware_start_block(mtd, num);
+ int page = block * mtd->erasesize / mtd->writesize;
- pr_info("writing firmware %d to block %d (ofs 0x%08x)\n",
- num, block, block * mtd->erasesize);
+ pr_info("writing firmware to slot %d on pages %d-%d\n",
+ num, page, page + len / mtd->writesize);
for (i = 0; i < num_blocks; i++) {
if (mtd_peb_is_bad(mtd, block + i))