All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] how to configure u-boot to tell me more about NAND flash?
@ 2013-02-05 13:37 Robert P. J. Day
  2013-02-05 14:05 ` Eric Bénard
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Robert P. J. Day @ 2013-02-05 13:37 UTC (permalink / raw)
  To: u-boot

   a few basic questions about a board i don't have access to right  
this minute but did yesterday and will later today.  it's an AM1808  
experimenter kit lookalike except that it has (allegedly) had its NOR  
flash replaced with 2G of NAND flash, and i want to figure out what i  
can add to the current u-boot da850evm configuration to let me poke  
around and get all the info i can on that flash because there seems to  
be something strange about the current setup.

   first, when i let the board boot fully into linux, "dmesg" told me this:

"NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron NAND 512MiB  
3,3V 8-bit)"

   that appears to tell me 512M of NAND flash, not 2G.  i asked  
someone who was initially adamant that there was 2G but promised to  
check with the H/W folks to make absolutely sure.  is there a possible  
reason why 2G would show up only as 512M in dmesg?  (not really a  
u-boot question, just wondering.)

   next, the u-boot that was on the board didn't have the "flinfo"  
command so i created my own board based on the da850evm version that  
was currently being used, defined CONFIG_CMD_FLASH, rebuilt,  
reflashed, came up to u-boot so first check for flash (oh, u-boot  
version is 2010.12, so i can do some substantial upgrading later):

rday > nand info

Device 0: nand0, sector size 128 KiB
rday >

   ok, that looks good, at least u-boot sees a NAND device.  but now:

rday > flinfo
rday >

   should "flinfo" not tell me about my flash? do i need another  
config setting for this micron flash chip (whose identity is still a  
bit of a mystery)?

   finally, i ran "mtdparts" to get:

rday > mtdparts
mtdids not defined, no default present
rday >

so i guess i'll add mtdids in later when i get my hands on the board again.

   main question -- should flinfo not tell me about my flash?  what  
might this configuration be missing?  i should have access to the  
board in an hour or two.  thanks.

rday

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] how to configure u-boot to tell me more about NAND flash?
  2013-02-05 13:37 [U-Boot] how to configure u-boot to tell me more about NAND flash? Robert P. J. Day
@ 2013-02-05 14:05 ` Eric Bénard
  2013-02-05 14:09   ` Robert P. J. Day
  2013-02-05 15:48 ` Wolfgang Denk
  2013-02-05 17:50 ` [U-Boot] how to configure u-boot to tell me more about NAND flash? Scott Wood
  2 siblings, 1 reply; 10+ messages in thread
From: Eric Bénard @ 2013-02-05 14:05 UTC (permalink / raw)
  To: u-boot

Hi Robert,

Le Tue, 05 Feb 2013 08:37:20 -0500,
"Robert P. J. Day" <rpjday@crashcourse.ca> a ?crit :
>    main question -- should flinfo not tell me about my flash?  what  
> might this configuration be missing?  i should have access to the  
> board in an hour or two.  thanks.
> 
you can read : doc/README.nand
which contains quite a lot of details on how the nand flash are handled
in u-boot and how to use the nand commands.

Eric

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] how to configure u-boot to tell me more about NAND flash?
  2013-02-05 14:05 ` Eric Bénard
@ 2013-02-05 14:09   ` Robert P. J. Day
  0 siblings, 0 replies; 10+ messages in thread
From: Robert P. J. Day @ 2013-02-05 14:09 UTC (permalink / raw)
  To: u-boot

Quoting Eric B?nard <eric@eukrea.com>:

> Hi Robert,
>
> Le Tue, 05 Feb 2013 08:37:20 -0500,
> "Robert P. J. Day" <rpjday@crashcourse.ca> a ?crit :
>>    main question -- should flinfo not tell me about my flash?  what
>> might this configuration be missing?  i should have access to the
>> board in an hour or two.  thanks.
>>
> you can read : doc/README.nand
> which contains quite a lot of details on how the nand flash are handled
> in u-boot and how to use the nand commands.

   *sigh* ... i totally forgot about the doc/ directory.  thanks.

rday

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] how to configure u-boot to tell me more about NAND flash?
  2013-02-05 13:37 [U-Boot] how to configure u-boot to tell me more about NAND flash? Robert P. J. Day
  2013-02-05 14:05 ` Eric Bénard
@ 2013-02-05 15:48 ` Wolfgang Denk
  2013-02-07  8:01   ` [U-Boot] [U-boot]-gdwarf option TigerLiu at viatech.com.cn
  2013-02-05 17:50 ` [U-Boot] how to configure u-boot to tell me more about NAND flash? Scott Wood
  2 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Denk @ 2013-02-05 15:48 UTC (permalink / raw)
  To: u-boot

Dear Robert,

In message <20130205083720.16752bc01ocd9qf4@crashcourse.ca> you wrote:
>
> experimenter kit lookalike except that it has (allegedly) had its NOR  
> flash replaced with 2G of NAND flash,...
...
> rday > flinfo
> rday >
> 
>    should "flinfo" not tell me about my flash? do i need another  
> config setting for this micron flash chip (whose identity is still a  
> bit of a mystery)?

flinfo tells you every detail about the (NOR) flash it finds on your
board...

Sorry, flinfo is for NOR only.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Confound these ancestors.... They've stolen our best ideas!"
- Ben Jonson

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] how to configure u-boot to tell me more about NAND flash?
  2013-02-05 13:37 [U-Boot] how to configure u-boot to tell me more about NAND flash? Robert P. J. Day
  2013-02-05 14:05 ` Eric Bénard
  2013-02-05 15:48 ` Wolfgang Denk
@ 2013-02-05 17:50 ` Scott Wood
  2013-02-05 17:59   ` Robert P. J. Day
  2 siblings, 1 reply; 10+ messages in thread
From: Scott Wood @ 2013-02-05 17:50 UTC (permalink / raw)
  To: u-boot

On 02/05/2013 07:37:20 AM, Robert P. J. Day wrote:
>   a few basic questions about a board i don't have access to right  
> this minute but did yesterday and will later today.  it's an AM1808  
> experimenter kit lookalike except that it has (allegedly) had its NOR  
> flash replaced with 2G of NAND flash, and i want to figure out what i  
> can add to the current u-boot da850evm configuration to let me poke  
> around and get all the info i can on that flash because there seems  
> to be something strange about the current setup.
> 
>   first, when i let the board boot fully into linux, "dmesg" told me  
> this:
> 
> "NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron NAND  
> 512MiB 3,3V 8-bit)"
> 
>   that appears to tell me 512M of NAND flash, not 2G.  i asked  
> someone who was initially adamant that there was 2G but promised to  
> check with the H/W folks to make absolutely sure.  is there a  
> possible reason why 2G would show up only as 512M in dmesg?  (not  
> really a u-boot question, just wondering.)

Is it possible you have 4 chips, each of which are 512 MiB?

If that's not it, probably the ID table is wrong.  Maybe they're using  
the same ID for multiple sizes now (it's not exactly a large  
numberspace), and expecting you to use ONFI or other ID bytes to  
determine the actual size.

What does U-Boot print on boot, regarding NAND?

-Scott

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] how to configure u-boot to tell me more about NAND flash?
  2013-02-05 17:50 ` [U-Boot] how to configure u-boot to tell me more about NAND flash? Scott Wood
@ 2013-02-05 17:59   ` Robert P. J. Day
  0 siblings, 0 replies; 10+ messages in thread
From: Robert P. J. Day @ 2013-02-05 17:59 UTC (permalink / raw)
  To: u-boot

Quoting Scott Wood <scottwood@freescale.com>:

> On 02/05/2013 07:37:20 AM, Robert P. J. Day wrote:
>>   a few basic questions about a board i don't have access to right
>> this minute but did yesterday and will later today.  it's an AM1808
>> experimenter kit lookalike except that it has (allegedly) had its NOR
>> flash replaced with 2G of NAND flash, and i want to figure out what i
>> can add to the current u-boot da850evm configuration to let me poke
>> around and get all the info i can on that flash because there seems
>> to be something strange about the current setup.
>>
>>   first, when i let the board boot fully into linux, "dmesg" told me
>> this:
>>
>> "NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron NAND
>> 512MiB 3,3V 8-bit)"
>>
>>   that appears to tell me 512M of NAND flash, not 2G.  i asked
>> someone who was initially adamant that there was 2G but promised to
>> check with the H/W folks to make absolutely sure.  is there a
>> possible reason why 2G would show up only as 512M in dmesg?  (not
>> really a u-boot question, just wondering.)
>
> Is it possible you have 4 chips, each of which are 512 MiB?

   false alarm ... i got bad initial info and the board really does have
exactly 512M of NAND.  whew ... wasn't looking forward to trying
to debug that.

rday

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [U-boot]-gdwarf option
  2013-02-05 15:48 ` Wolfgang Denk
@ 2013-02-07  8:01   ` TigerLiu at viatech.com.cn
  2013-02-07  9:20     ` Wolfgang Denk
  2013-02-11 19:43     ` Scott Wood
  0 siblings, 2 replies; 10+ messages in thread
From: TigerLiu at viatech.com.cn @ 2013-02-07  8:01 UTC (permalink / raw)
  To: u-boot

Hi, experts:
I have a JTAG debugger.
Its manual suggested user should add "-gdwarf-2" option in the arm gcc
compiler.
Because it could produce debugging information.

But I searched the whole uboot source package, could not find
"-gdwarf-2" option in config.mk or other files.

Why?

Best wishes,

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [U-boot]-gdwarf option
  2013-02-07  8:01   ` [U-Boot] [U-boot]-gdwarf option TigerLiu at viatech.com.cn
@ 2013-02-07  9:20     ` Wolfgang Denk
  2013-02-11 19:43     ` Scott Wood
  1 sibling, 0 replies; 10+ messages in thread
From: Wolfgang Denk @ 2013-02-07  9:20 UTC (permalink / raw)
  To: u-boot

Dear TigerLiu at viatech.com.cn,

In message <FE7ADED5C2218B4786C09CD97DC4C49F74C908@exchbj02.viatech.com.bj> you wrote:
>
> I have a JTAG debugger.

Congrats.

> Its manual suggested user should add "-gdwarf-2" option in the arm gcc
> compiler.
> Because it could produce debugging information.

Ah, so it is not a BDI3000... Well, good luck.

> But I searched the whole uboot source package, could not find
> "-gdwarf-2" option in config.mk or other files.
> 
> Why?

Because what may be needed ith your tools (and tool chain?) may not be
needed for everybody else?

Feel free to supply your own debug flags on the command line, i. e.
try something as   make DBGFLAGS="-gdwarf-2"

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The universe is all a spin-off of the Big Bang.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [U-boot]-gdwarf option
  2013-02-07  8:01   ` [U-Boot] [U-boot]-gdwarf option TigerLiu at viatech.com.cn
  2013-02-07  9:20     ` Wolfgang Denk
@ 2013-02-11 19:43     ` Scott Wood
  2013-02-12 17:02       ` Tom Rini
  1 sibling, 1 reply; 10+ messages in thread
From: Scott Wood @ 2013-02-11 19:43 UTC (permalink / raw)
  To: u-boot

On 02/07/2013 02:01:05 AM, TigerLiu at viatech.com.cn wrote:
> Hi, experts:
> I have a JTAG debugger.
> Its manual suggested user should add "-gdwarf-2" option in the arm gcc
> compiler.
> Because it could produce debugging information.
> 
> But I searched the whole uboot source package, could not find
> "-gdwarf-2" option in config.mk or other files.
> 
> Why?

I think it's already the default with most toolchains.  Do you see any  
difference in the output when supplying that flag?

-Scott

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [U-boot]-gdwarf option
  2013-02-11 19:43     ` Scott Wood
@ 2013-02-12 17:02       ` Tom Rini
  0 siblings, 0 replies; 10+ messages in thread
From: Tom Rini @ 2013-02-12 17:02 UTC (permalink / raw)
  To: u-boot

On Mon, Feb 11, 2013 at 01:43:32PM -0600, Scott Wood wrote:

> On 02/07/2013 02:01:05 AM, TigerLiu at viatech.com.cn wrote:
> >Hi, experts:
> >I have a JTAG debugger.
> >Its manual suggested user should add "-gdwarf-2" option in the arm gcc
> >compiler.
> >Because it could produce debugging information.
> >
> >But I searched the whole uboot source package, could not find
> >"-gdwarf-2" option in config.mk or other files.
> >
> >Why?
> 
> I think it's already the default with most toolchains.  Do you see
> any difference in the output when supplying that flag?

Indeed.  For most common values of gcc versions, using -g will pick the
"best" choice for debug information and this will be DWARF2 information
already.  There is no need to specify -gdwarf-2 (or similar).

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130212/4d24f0a9/attachment.pgp>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-02-12 17:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-05 13:37 [U-Boot] how to configure u-boot to tell me more about NAND flash? Robert P. J. Day
2013-02-05 14:05 ` Eric Bénard
2013-02-05 14:09   ` Robert P. J. Day
2013-02-05 15:48 ` Wolfgang Denk
2013-02-07  8:01   ` [U-Boot] [U-boot]-gdwarf option TigerLiu at viatech.com.cn
2013-02-07  9:20     ` Wolfgang Denk
2013-02-11 19:43     ` Scott Wood
2013-02-12 17:02       ` Tom Rini
2013-02-05 17:50 ` [U-Boot] how to configure u-boot to tell me more about NAND flash? Scott Wood
2013-02-05 17:59   ` Robert P. J. Day

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.