summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mxs
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2012-08-31 18:00:27 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-09-03 09:42:18 +0200
commit8822e01b9b8ce534897f85adede794ee991ac86b (patch)
tree2819d17e4f5a6b38bb5201cf1748c562d49d3257 /arch/arm/mach-mxs
parentf64bd3d932ec033f02715a5e92b57f52821a4b06 (diff)
downloadbarebox-8822e01b9b8ce534897f85adede794ee991ac86b.tar.gz
barebox-8822e01b9b8ce534897f85adede794ee991ac86b.tar.xz
arm: mxs: bcb: fix usage of second bootstream
If a second bootstream was used, there was a sanity check which was not only wrong (using erasesize instead of writesize) but also superfluous (we got the block from an existing cdev, so it must be in the flash range). Simply remove it to make bcb work as expected. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mxs')
-rw-r--r--arch/arm/mach-mxs/bcb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-mxs/bcb.c b/arch/arm/mach-mxs/bcb.c
index d0a3ddc8d3..af51d24b03 100644
--- a/arch/arm/mach-mxs/bcb.c
+++ b/arch/arm/mach-mxs/bcb.c
@@ -236,7 +236,7 @@ static struct mx28_fcb *create_fcb(struct mtd_info *mtd, void *buf, unsigned fw1
fcb->fw1_start_page = fw1_start_block / mtd->writesize;
fcb->fw1_sectors = DIV_ROUND_UP(fw_size, mtd->writesize);
- if (fw2_start_block != 0 && fw2_start_block < mtd->size / mtd->erasesize) {
+ if (fw2_start_block) {
fcb->fw2_start_page = fw2_start_block / mtd->writesize;
fcb->fw2_sectors = fcb->fw1_sectors;
}