[U-Boot-Users] Regarding memory commands

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?
With regards and thanks
Aniruddha Herekar

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.

In message 2195AF8E2250C54D8D8A726C8AE84A3331C2C8@dbde01.ent.ti.com you wrote:
Does memory commands mm, mw, mn and tftp work only with RAM memory and not flash (nor or nand) memory?
The commands have usually no idea what sort of memeory (if any) is attached to the addresses you pass. [Exception is cp and - epending on the configuration - tftp which recognize NOR flash areas and use flash write code then.]
If so are there any other commands other than 'cp' that can be used to write into flash (nor or nand) memory?
cp is the only regular command to write to NOR flash. It cannot be used for NAND, though. NAND has it's own interface, the nand command.
Best regards,
Wolfgang Denk
participants (3)
-
Herekar, Aniruddha
-
S. Egbert
-
Wolfgang Denk