What is CONFIG_HAS_DATAFLASH?
Can someone tell me what CONFIG_HAS_DATAFLASH does?
The reason I ask is that I'm trying to use CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS, but I noticed that the "md" command does not use the flash_readX primitives when I ask it to display memory from a flash address. In examining do_mem_md(), I noticed CONFIG_HAS_DATAFLASH.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Dear Timur Tabi,
Quoted 1 line · In message <[email protected]> you…
Can someone tell me what
CONFIG_HAS_DATAFLASHdoes?
I know this sounds like an act of darin, but how about having a look at the README ?
[And I really wonder why you did not find the documentation there.]
Quoted 2 lines
The reason I ask is that I'm trying to use
CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS, but I noticed that the "md"
Why would you want to do that? This is only needed in very special situations which involve a state of hardware that can be best described as broken.
Quoted 3 lines
command does not use the
flash_readXprimitives when I ask it to display memory from a flash address. In examiningdo_mem_md(), I noticedCONFIG_HAS_DATAFLASH.
Did you? I don't see any CONFIG_HAS_DATAFLASH anywhere in cmd_mem.c And this is expected - the "md" command is, as the name suggests, intended for Memory Dumps. "Memory" is defined as something that can be read by just putting the address on the address bus and reading the corresponding data from the data bus, without need for any additional code or access protocols. On hardware where CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS is needed, you cannot really apply the term "memory" to such a flash device - it is a storage device, but not more.
Best regards,
Wolfgang Denk
Signature · 5 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 Each honest calling, each walk of life, has its own elite, its own aristocracy based on excellence of performance. - James Bryant Conant
Quoted 9 lines · Wolfgang Denk
Dear Timur Tabi,
Quoted 1 line · In message <[email protected]> you…
Can someone tell me what
CONFIG_HAS_DATAFLASHdoes?I know this sounds like an act of darin, but how about having a look at the README ?
[And I really wonder why you did not find the documentation there.]
CONFIG_HAS_DATAFLASH
Defining this option enables DataFlash features and allows to read/write in Dataflash via the standard commands cp, md...
This doesn't tell me anything.
Quoted 6 lines
Quoted 2 lines
The reason I ask is that I'm trying to use
CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS, but I noticed that the "md"Why would you want to do that? This is only needed in very special situations which involve a state of hardware that can be best described as broken.
You're right. The board I need to support is broken, IMHO. Fortunately, CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS provides a reasonably elegant fix.
Quoted 5 lines
Quoted 3 lines
command does not use the
flash_readXprimitives when I ask it to display memory from a flash address. In examiningdo_mem_md(), I noticedCONFIG_HAS_DATAFLASH.Did you? I don't see any
CONFIG_HAS_DATAFLASHanywhere incmd_mem.c
int do_mem_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
ulong addr, length;
#if defined(CONFIG_HAS_DATAFLASH)
ulong nbytes, linebytes;#endif
I'm not imagining things.
Quoted 8 lines
And this is expected - the "md" command is, as the name suggests, intended for Memory Dumps. "Memory" is defined as something that can be read by just putting the address on the address bus and reading the corresponding data from the data bus, without need for any additional code or access protocols. On hardware where
CONFIG_CFI_FLASH_USE_WEAK_ACCESSORSis needed, you cannot really apply the term "memory" to such a flash device - it is a storage device, but not more.
Fair enough, but I was hoping there'd be an easy way to get md to work.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Dear Timur Tabi,
Quoted 8 lines · In message <[email protected]> you wrote:
CONFIG_HAS_DATAFLASHDefining this option enables DataFlash features and allows to read/write in Dataflash via the standard commands cp, md...
This doesn't tell me anything.
Hm... What exactly don't you understand here?
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
command does not use the
flash_readXprimitives when I ask it to display memory from a flash address. In examiningdo_mem_md(), I noticedCONFIG_HAS_DATAFLASH.Did you? I don't see any
CONFIG_HAS_DATAFLASHanywhere incmd_mem.c
...
Quoted 1 line
I'm not imagining things.
You are right. I was grepping for CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS instead :-(
Quoted 1 line
Fair enough, but I was hoping there'd be an easy way to get md to work.
Why are plain simple memory accesses not possible on your hardware? Which architecture / CPU is this?
Best regards,
Wolfgang Denk
Signature · 5 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 Some people march to the beat of a different drummer. And some people tango!
Quoted 3 lines · Wolfgang Denk
Quoted 1 line
This doesn't tell me anything.
Hm... What exactly don't you understand here?
Well, I was just wondering what the connection is between DataFlash (which is some flash technology that I don't know much about) and the md command.
Quoted 2 lines
Why are plain simple memory accesses not possible on your hardware? Which architecture / CPU is this?
Because on this one chip I'm working on, the designers decided to mux the LBC address lines with the video signal from the on-board display driver. No, I'm not kidding about that. That means that when you're using the video display, you can't access flash. CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS will allow the saveenv command to continue working under this situation.
Signature · 2 lines
Timur Tabi Linux kernel developer at Freescale
Hi Timur,
Quoted 9 lines
Quoted 3 lines · Wolfgang Denk
Quoted 1 line
This doesn't tell me anything.
Hm... What exactly don't you understand here?
Well, I was just wondering what the connection is between DataFlash (which is some flash technology that I don't know much about) and the md command.
A google hit (second one for me) tells more:
http://www.atmel.com/products/dataflash/default.asp
"... sequential access families ideal for program code, data storage, Serial EEPROM replacement, and the next generation PC Bios Market".
So it does not fit the "put address on a-bus, get contents on d-bus" model.
Quoted 7 lines
Quoted 2 lines
Why are plain simple memory accesses not possible on your hardware? Which architecture / CPU is this?
Because on this one chip I'm working on, the designers decided to mux the LBC address lines with the video signal from the on-board display driver. No, I'm not kidding about that. That means that when you're using the video display, you can't access flash.
Wow, I knew h/w designers are creative, but _that_ creative ;)
Cheers
Detlev
Signature · 7 lines
I have always observed that the pretensions of all people are in exact inverse ratio to their merits; this is one of the axioms of morals. -- Joseph Lagrange -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de