mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] arm: mxs: bcb: fix usage of second bootstream
Date: Mon, 3 Sep 2012 09:42:30 +0200	[thread overview]
Message-ID: <20120903074230.GY26594@pengutronix.de> (raw)
In-Reply-To: <1346428827-20293-1-git-send-email-w.sang@pengutronix.de>

On Fri, Aug 31, 2012 at 06:00:27PM +0200, Wolfram Sang wrote:
> 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>

Applied, thanks

Sascha

> ---
>  arch/arm/mach-mxs/bcb.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-mxs/bcb.c b/arch/arm/mach-mxs/bcb.c
> index d0a3ddc..af51d24 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;
>  	}
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2012-09-03  7:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-31 16:00 Wolfram Sang
2012-09-03  7:42 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120903074230.GY26594@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=w.sang@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox