From: Konstantin Kletschke <lists@ku-gbr.de>
To: linux-mtd@lists.infradead.org
Subject: Re: Intel flash that powers up locked
Date: Thu, 2 Jun 2005 13:52:39 +0200 [thread overview]
Message-ID: <20050602115239.GB442@synertronixx3> (raw)
In-Reply-To: <1117709167.20785.86.camel@tglx.tec.linutronix.de>
Am 2005-06-02 12:46 +0200 schrieb Thomas Gleixner:
> Maybe it helps if you read the code of the invoked function
> (cfi_varsize_frob).
Ok, I took a closer look into cfi_varsize_frob() trying to understand,
if ofs should be 0 (beginning of partition) or address (physical address
of beginning of partition).
What I found out is, that mtd->numeraseregions contains 0 which is the
problem and causes the Oops regardless with which ofs the funtion is
called.
Creating 5 MTD partitions on "scb9328_flash":
0x00000000-0x00020000 : "U-boot"
0x00020000-0x00040000 : "U-boot_env"
cfi_intelext_unlock: lock status before, ofs=0x00000000, len=0x00020000
KONSTI mtd->numeraseregions: 0x0
KONSTI first: 0xffffffff
KONSTI adr: 0x0
Is the output of
int cfi_varsize_frob(struct mtd_info *mtd, varsize_frob_t frob,
loff_t ofs, size_t len, void *thunk)
{
...
i = 0;
printk("KONSTI mtd->numeraseregions: 0x%x\n", mtd->numeraseregions);
while (i < mtd->numeraseregions && ofs >= regions[i].offset)
i++;
i--;
// if (ofs & (regions[i].erasesize-1))
// return -EINVAL;
/* Remember the erase region we start on */
first = i;
printk("KONSTI first: 0x%x\n", first);
The while loop is not entered because 0 is NOT < 0 and 0 is
decremented by one.
Acessing regions[-1].erasesize gives the Oops, is that correct?
So why is mtd->numeraseregions 0 in my setup and what should be in it (I
mean in speaking words).
regards, Konsti
--
GPG KeyID EF62FCEF
Fingerprint: 13C9 B16B 9844 EC15 CC2E A080 1E69 3FDA EF62 FCEF
next prev parent reply other threads:[~2005-06-02 11:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-01 13:41 Intel flash that powers up locked Konstantin Kletschke
2005-06-02 4:15 ` Ratan Panneerselvam
2005-06-02 10:19 ` Konstantin Kletschke
2005-06-02 10:46 ` Thomas Gleixner
2005-06-02 11:52 ` Konstantin Kletschke [this message]
2005-06-02 23:31 ` Todd Poynor
2005-06-23 15:35 ` Konstantin Kletschke
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=20050602115239.GB442@synertronixx3 \
--to=lists@ku-gbr.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox