All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Gambier <a.gambier@ftemaximal.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] Can't erase or read NOR using mtd part-id
Date: Thu, 10 Feb 2011 09:15:09 +0100	[thread overview]
Message-ID: <4D539E8D.40104@ftemaximal.fr> (raw)
In-Reply-To: <20110209185044.494BF14B9A38@gemini.denx.de>

Dear Wolfgang,

Thanks for this explanation.

Best regards
Alex

On 02/09/2011 07:50 PM, Wolfgang Denk wrote:
> Dear Alexandre Gambier,
>
> In message<4D52B843.5010004@ftemaximal.fr>  you wrote:
>> I'm using u-boot to boot a Linux-based device.
>> I created some MTD partitions for my NOR and NAND flashes.
>>
>> Here is the configuration:
>>
>> device nor0<NOR>, # parts = 4
>>    #: name                        size            offset          mask_flags
>>    0: U-Boot              0x00080000      0x00000000      0
>>    1: Environment         0x00020000      0x00080000      0
>>    2: Kernel              0x00400000      0x000a0000      0
>>    3: FreeNOR             0x00360000      0x004a0000      0
>>
> ...
>> When I want to erase the U-Boot partition I can't use the command `erase
>> U-Boot`, the following error occurs : "incorrect device type in U-Boot".
>> I must use the command `erase 1:0-7`.
>>
>> Is-it normal ?
> There are many ways to specify a flash area. When referring to MTD
> partitions, the synatx is "<device name>,<partition number>", i. e.
> for the partition named "U-Boot" above you use
>
> 	erase nor0,0
>
> So yes, the behaviour is normal.
>
>> My second question is when I try to read the Environment partition with
>> the command `md.b Environment 128` I get the following dump (which is
>> not correct).
>>
>> 0000000e: 0e 40 ff e0 18 40 c0 cb 18 40 18 40 0c cb 03 61
>> . at ...@... at .@...a
> ...
>
> Only very few commands (and only flash related ones) accept MTD
> partition specifications for addresses.  "md" does not. What happpens
> here is that the argument "Environment" gets parsed as a hex number.
> Only the first character, 'E', can successfully be converted, then the
> conversion stops (without error message).  Then you get the dump
> starting at 0x0000000E.
>
>> Is-it normal as well ?
> Yes, it is.
>
> Best regards,
>
> Wolfgang Denk
>

      reply	other threads:[~2011-02-10  8:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-09 15:52 [U-Boot] Can't erase or read NOR using mtd part-id Alexandre Gambier
2011-02-09 16:10 ` Alexander Stein
2011-02-09 16:16   ` Alexandre Gambier
2011-02-09 16:43     ` Alexander Stein
2011-02-09 18:50 ` Wolfgang Denk
2011-02-10  8:15   ` Alexandre Gambier [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=4D539E8D.40104@ftemaximal.fr \
    --to=a.gambier@ftemaximal.fr \
    --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 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.