public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] latest u-boot (1.3.2-rc2) and dataflash vs CFG_NO_FLASH
@ 2008-02-28 22:30 Matt Gessner
  2008-02-29  5:54 ` Kim B. Heino
  2008-03-02 21:07 ` Wolfgang Denk
  0 siblings, 2 replies; 7+ messages in thread
From: Matt Gessner @ 2008-02-28 22:30 UTC (permalink / raw)
  To: u-boot

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

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

* [U-Boot-Users] latest u-boot (1.3.2-rc2) and dataflash vs CFG_NO_FLASH
  2008-02-28 22:30 [U-Boot-Users] latest u-boot (1.3.2-rc2) and dataflash vs CFG_NO_FLASH Matt Gessner
@ 2008-02-29  5:54 ` Kim B. Heino
  2008-02-29 11:19   ` Wolfgang Denk
  2008-02-29 13:46   ` [U-Boot-Users] latest u-boot (1.3.2-rc2) and dataflash vs CFG_NO_FLASH Matt Gessner
  2008-03-02 21:07 ` Wolfgang Denk
  1 sibling, 2 replies; 7+ messages in thread
From: Kim B. Heino @ 2008-02-29  5:54 UTC (permalink / raw)
  To: u-boot

> 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 

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

* [U-Boot-Users] latest u-boot (1.3.2-rc2) and dataflash vs CFG_NO_FLASH
  2008-02-29  5:54 ` Kim B. Heino
@ 2008-02-29 11:19   ` Wolfgang Denk
  2008-03-03  8:39     ` [U-Boot-Users] [PATCH] fix copy from ram to dataflash Kim B. Heino
  2008-02-29 13:46   ` [U-Boot-Users] latest u-boot (1.3.2-rc2) and dataflash vs CFG_NO_FLASH Matt Gessner
  1 sibling, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2008-02-29 11:19 UTC (permalink / raw)
  To: u-boot

In message <47C79DFB.3050808@bluegiga.com> you wrote:
>
> > 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

-- 
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 Wall

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

* [U-Boot-Users] latest u-boot (1.3.2-rc2) and dataflash vs CFG_NO_FLASH
  2008-02-29  5:54 ` Kim B. Heino
  2008-02-29 11:19   ` Wolfgang Denk
@ 2008-02-29 13:46   ` Matt Gessner
  1 sibling, 0 replies; 7+ messages in thread
From: Matt Gessner @ 2008-02-29 13:46 UTC (permalink / raw)
  To: u-boot

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 

> -----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 vs
> CFG_NO_FLASH
> 
> > 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.

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

* [U-Boot-Users] latest u-boot (1.3.2-rc2) and dataflash vs CFG_NO_FLASH
  2008-02-28 22:30 [U-Boot-Users] latest u-boot (1.3.2-rc2) and dataflash vs CFG_NO_FLASH Matt Gessner
  2008-02-29  5:54 ` Kim B. Heino
@ 2008-03-02 21:07 ` Wolfgang Denk
  1 sibling, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2008-03-02 21:07 UTC (permalink / raw)
  To: u-boot

Dear Matt,

in message <4697729899C81C4388059CC380C71745011BABED@xchg-lma-01.Avidyne.com> you wrote:
> 
> 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.

The current dataflash implementation really needs to be cleaned up.

> 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

-- 
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.

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

* [U-Boot-Users] [PATCH] fix copy from ram to dataflash
  2008-02-29 11:19   ` Wolfgang Denk
@ 2008-03-03  8:39     ` Kim B. Heino
  2008-03-03 20:48       ` Wolfgang Denk
  0 siblings, 1 reply; 7+ messages in thread
From: Kim B. Heino @ 2008-03-03  8:39 UTC (permalink / raw)
  To: u-boot

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 <Kim.Heino@bluegiga.com>


--- u-boot-1.3.2-rc3/common/cmd_mem.c.foo	2008-03-03 10:17:50.000000000 +0200
+++ u-boot-1.3.2-rc3/common/cmd_mem.c	2008-03-03 10:18:19.000000000 +0200
@@ -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;

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

* [U-Boot-Users] [PATCH] fix copy from ram to dataflash
  2008-03-03  8:39     ` [U-Boot-Users] [PATCH] fix copy from ram to dataflash Kim B. Heino
@ 2008-03-03 20:48       ` Wolfgang Denk
  0 siblings, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2008-03-03 20:48 UTC (permalink / raw)
  To: u-boot

In message <47CBB931.6070604@bluegiga.com> 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 <Kim.Heino@bluegiga.com>

Applied, thanks.

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
There's an old proverb that says just about whatever you want it to.

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

end of thread, other threads:[~2008-03-03 20:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-28 22:30 [U-Boot-Users] latest u-boot (1.3.2-rc2) and dataflash vs CFG_NO_FLASH Matt Gessner
2008-02-29  5:54 ` Kim B. Heino
2008-02-29 11:19   ` Wolfgang Denk
2008-03-03  8:39     ` [U-Boot-Users] [PATCH] fix copy from ram to dataflash Kim B. Heino
2008-03-03 20:48       ` Wolfgang Denk
2008-02-29 13:46   ` [U-Boot-Users] latest u-boot (1.3.2-rc2) and dataflash vs CFG_NO_FLASH Matt Gessner
2008-03-02 21:07 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox