All of lore.kernel.org
 help / color / mirror / Atom feed
From: Deepak Saxena <dsaxena@plexity.net>
To: linux-mtd@lists.infradead.org
Subject: RedBoot partition not @ end of flash...
Date: Tue, 2 May 2006 01:50:45 -0700	[thread overview]
Message-ID: <20060502085045.GA15204@plexity.net> (raw)


I've got a board with a 32MiB flash (128K SectorSize) with the redboot table
only covering the first (32MiB - SectorSize) and the rest setup as OTP from
what I understand. What is the proper way to deal with this? What I'm doing 
right now is a heinous hack:

        ixp425_mtd->size -= ixp425_mtd->erasesize;
        /* Try to parse RedBoot partitions */
        npart = parse_mtd_partitions(ixp425_mtd, probes, &parsed_parts, 0);
        if (npart > 0) {
                res = add_mtd_partitions(ixp425_mtd, parsed_parts, npart);
        } else {
                printk("IXP425 Flash: Using static MTD partitions.\n");
                res = add_mtd_partitions(ixp425_mtd, ixp425_partitions,
                                         NB_OF(ixp425_partitions));
        }
        ixp425_mtd->size += ixp425_mtd->erasesize;

I tried setting the window size to (32MiB - SectorSize) before probing
but that failed miserably. One other thought I had was to create a
static partition map dividing the flash and then parse partitions
on the first region. Can the code handle recursive parsing?

I doubt I'm the first one to deal with this...

Tnx,
~Deepak

-- 
Deepak Saxena - dsaxena@plexity.net - http://www.plexity.net

I am not a consumer. My existence on this planet is not defined by my
relationship to a producer of goods.  I was not put on this planet to
consume goods from a company for their profit. - Michael W.

             reply	other threads:[~2006-05-02  8:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-02  8:50 Deepak Saxena [this message]
2006-05-02 12:56 ` RedBoot partition not @ end of flash David Vrabel

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=20060502085045.GA15204@plexity.net \
    --to=dsaxena@plexity.net \
    --cc=linux-mtd@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.