public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mark Jackson <mpfj-list@mimc.co.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] Fix JFFS2 NOR sector size routine
Date: Wed, 11 Mar 2009 09:54:20 +0000	[thread overview]
Message-ID: <49B78A4C.204@mimc.co.uk> (raw)

This patch fixes the JFFS2 scanning code when not using
CONFIG_JFFS2_CMDLINE.

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
---
  common/cmd_jffs2.c |    7 ++++++-
  1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c
index d0a7cea..2f3b3a9 100644
--- a/common/cmd_jffs2.c
+++ b/common/cmd_jffs2.c
@@ -1814,7 +1814,12 @@ static inline u32 get_part_sector_size_nor(struct
mtdids *id, struct part_info *
  	flash = &flash_info[id->num];

  	start_phys = flash->start[0] + part->offset;
-	end_phys = start_phys + part->size;
+
+	if (part->size == SIZE_REMAINING) {
+		end_phys = start_phys + flash->size;
+	} else {
+		end_phys = start_phys + part->size;
+	}

  	for (i = 0; i < flash->sector_count; i++) {
  		if (flash->start[i] >= end_phys)

             reply	other threads:[~2009-03-11  9:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-11  9:54 Mark Jackson [this message]
2009-03-11 18:29 ` [U-Boot] [PATCH 1/1] Fix JFFS2 NOR sector size routine Scott Wood
2009-03-12  9:12   ` Mark Jackson

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=49B78A4C.204@mimc.co.uk \
    --to=mpfj-list@mimc.co.uk \
    --cc=u-boot@lists.denx.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