[U-Boot-Users] Regarding memory commands

S. Egbert s.egbert at sbcglobal.net
Thu Feb 9 09:53:29 CET 2006


Because it is essentially a file-store system and is not easily memory
mappable in a direct sense of a word, the current memory command sets
would not be easily extensible to cover this.

Closer examination of the U-boot cmd_nand.c shows that this is already
done (Thanks Wolfgang and gang!)

A snippet of the NAND usage is given below:

        "nand    - NAND sub-system\n",
        "info  - show available NAND devices\n"
        "nand device [dev] - show or set current device\n"
        "nand read[.jffs2[s]]  addr off size\n"
        "nand write[.jffs2] addr off size - read/write `size' bytes
starting\n"
        "    at offset `off' to/from memory address `addr'\n"
        "nand erase [clean] [off size] - erase `size' bytes from\n"
        "    offset `off' (entire device if not specified)\n"
        "nand bad - show bad blocks\n"
        "nand read.oob addr off size - read out-of-band data\n"
        "nand write.oob addr off size - read out-of-band data\n"


S. Egbert

Herekar, Aniruddha wrote:
> 
> As you said memory commands work in any memory region, is it only the
> internal flash memory or also external flash memory? By external memory
> I mean to say that the NOR or NAND memory is not in the processor chip
> (ARM). But NOR/NAND memories have separate chip and memory is mapped on
> to the ARM memory map.
> 
> I suppose NAND memory has different command set like nand info, etc.
> Then are these (mm, mw, md, etc) commands applicable for NAND memory
> also?
> 
> 
> Herekar, Aniruddha wrote:
> 
>> Does memory commands mm, mw, mn and tftp work only with RAM memory and
>> not flash (nor or nand) memory?
>> If so are there any other commands other than 'cp' that can be used to
>> write into flash (nor or nand) memory?
> 
> Basic memory commands (mm. mw) work in any memory region that the
> hardware supports.
> 
> You will have to be mindful of certain memory and interface devices
> using only 16-bit or 8-bit access in a 32-bit architecture.  Otherwise,
> such attempts to use 32-bit read/write will result in the most
> significant short-word or byte NOT to carry valid data value.
> 
> TFTP does work writing directly into unprotected FLASH region if the
> 
> CFG_DIRECT_FLASH_TFTP is defined in your include/configs/<board>.h file.
> 




More information about the U-Boot mailing list