latest u-boot (1.3.2-rc2) and dataflash vs CFG_NO_FLASH
Hi, again,
OK, I've got a NAND flash, SPI Dataflash, and no "real" flash (NOR, I suppose).
If I try to copy from Ram to dataflash, u-boot says "Copy to Flash..." and the CPU pukes; it's detecting what it thinks is flash.
If I #define CFG_NO_FLASH, other stuff breaks. If I fix that by changing include/flash.h to remove the #ifndef CFG_NO_FLASH, then everything compiles, but on the link, all of the flash stuff that I DO need (flash_info, flash_erase, etc) isn't defined because of CFG_NO_FLASH.
Has this been fixed ANYWHERE in someone's branch?
Wolfgang, I know you don't really care much about non-memory flash "devices" but is there some vision as to where all this is supposed to go?
Thanks in advance,
Matt Gessner
mgessner at avidyne.com
Avidyne Corp
Safety Systems Group
Columbus, OH
Quoted 2 lines
If I try to copy from Ram to dataflash, u-boot says "Copy to Flash..." and the CPU pukes; it's detecting what it thinks is flash.
This simple patch (for old 1.3.0) fixed this problem for me on DataFlash only system.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: common-copy_to_dataflash.patch
Type: text/x-patch
Size: 396 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20080229/2172c454/attachment.bin
Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 3 lines
If I try to copy from Ram to dataflash, u-boot says "Copy to Flash..." and the CPU pukes; it's detecting what it thinks is flash.
This simple patch (for old 1.3.0) fixed this problem for me on DataFlash only system.
Could you please submit this as a regular patch, i. e. inline instead of attachment, with a proper patch description (Subject line) and your Signed-off-by: line? Thanks in advance.
Best regards,
Wolfgang Denk
Signature · 6 lines
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
"Do we define evil as the absence of goodness? It seems only logical
that shit happens--we discover this by the process of elimination."
-- Larry WallPATCH 1/1 fix copy from ram to dataflash
If I try to "cp.b <ram> <dataflash>", u-boot selects normal flash routines instead of dataflash. This is because it checks "if source address is not dataflash" instead of target address.
common/cmd_mem.c renamed from common/cmd_mem.c.foo +1 -1
@@ -417,7 +417,7 @@ int do_mem_cp ( cmd_tbl_t *cmdtp, int fl/* check if we are copying to Flash */ if ( (addr2info (dest) !=NULL ) #ifdef CONFIG_HAS_DATAFLASH - && (!addr_dataflash (addr)) + && (!addr_dataflash (dest)) #endif ) {int rc;
Wolfgang Denk
AppliedPATCH 1/1 fix copy from ram to dataflash
Quoted 5 lines · In message <[email protected]> you wrote:
If I try to "cp.b <ram> <dataflash>", u-boot selects normal flash routines instead of dataflash. This is because it checks "if source address is not dataflash" instead of target address.
Signed-off-by Kim B. Heino <[email protected]>
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
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 There's an old proverb that says just about whatever you want it to.
Thanks; I did something similar to this in my u-boot 1.2.0.
I sort of thought that this was an issue that was being hashed out a while back because of the conflict over all of the different devices vs flash memory.
I guess not.
Is there an effort under way to clean up or standardize all these things? Or was it deemed to be not useful enough?
Regards,
Matt
Quoted 9 lines
-----Original Message-----
From: Kim B. Heino [mailto:Kim.Heino at bluegiga.com]
Sent: Friday, February 29, 2008 12:54 AM
To: Matt Gessner
Cc: U-Boot-Users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] latest u-boot (1.3.2-rc2) and dataflash vsCFG_NO_FLASHQuoted 1 line
If I try to copy from Ram to dataflash, u-boot says "Copy to
Flash..."
Quoted 3 lines
Quoted 1 line
and the CPU pukes; it's detecting what it thinks is flash.
This simple patch (for old 1.3.0) fixed this problem for me on
DataFlash
Quoted 1 line
only system.
Dear Matt,
Quoted 9 lines · in message <[email protected]>…
If I try to copy from Ram to dataflash, u-boot says "Copy to Flash..." and the CPU pukes; it's detecting what it thinks is flash.
If I #define
CFG_NO_FLASH, other stuff breaks. If I fix that by changinginclude/flash.hto remove the #ifndefCFG_NO_FLASH, then everything compiles, but on the link, all of the flash stuff that I DO need (flash_info,flash_erase, etc) isn't defined because ofCFG_NO_FLASH.
The current dataflash implementation really needs to be cleaned up.
Quoted 5 lines
Has this been fixed ANYWHERE in someone's branch?
Wolfgang, I know you don't really care much about non-memory flash "devices" but is there some vision as to where all this is supposed to go?
It's not exactly correct that I don't care. The situation is that we have no such hardware in our lab. That means I cannot even test it.
The "vision" is to add some proper device interface (similar to and/or unified with NAND, for example). But AFAIK no such work has been started yet.
Best regards,
Wolfgang Denk
Signature · 4 lines
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 Minds are like parachutes - they only function when open.