* [U-Boot] What is CONFIG_HAS_DATAFLASH?
@ 2010-03-05 17:15 Timur Tabi
2010-03-05 19:17 ` Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Timur Tabi @ 2010-03-05 17:15 UTC (permalink / raw)
To: u-boot
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.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] What is CONFIG_HAS_DATAFLASH?
2010-03-05 17:15 [U-Boot] What is CONFIG_HAS_DATAFLASH? Timur Tabi
@ 2010-03-05 19:17 ` Wolfgang Denk
2010-03-05 19:23 ` Timur Tabi
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2010-03-05 19:17 UTC (permalink / raw)
To: u-boot
Dear Timur Tabi,
In message <ed82fe3e1003050915r6e677102mb47a448293e62067@mail.gmail.com> you wrote:
> Can someone tell me what CONFIG_HAS_DATAFLASH does?
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.]
> 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.
> 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.
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
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] What is CONFIG_HAS_DATAFLASH?
2010-03-05 19:17 ` Wolfgang Denk
@ 2010-03-05 19:23 ` Timur Tabi
2010-03-05 20:43 ` Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Timur Tabi @ 2010-03-05 19:23 UTC (permalink / raw)
To: u-boot
Wolfgang Denk wrote:
> Dear Timur Tabi,
>
> In message <ed82fe3e1003050915r6e677102mb47a448293e62067@mail.gmail.com> you wrote:
>> Can someone tell me what CONFIG_HAS_DATAFLASH does?
>
> 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.
>> 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.
>> 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.
>
> Did you? I don't see any CONFIG_HAS_DATAFLASH anywhere in cmd_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.
> 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.
Fair enough, but I was hoping there'd be an easy way to get md to work.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] What is CONFIG_HAS_DATAFLASH?
2010-03-05 19:23 ` Timur Tabi
@ 2010-03-05 20:43 ` Wolfgang Denk
2010-03-05 20:46 ` Timur Tabi
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2010-03-05 20:43 UTC (permalink / raw)
To: u-boot
Dear Timur Tabi,
In message <4B915A1F.90206@freescale.com> you wrote:
>
> 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.
Hm... What exactly don't you understand here?
> >> 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.
> >
> > Did you? I don't see any CONFIG_HAS_DATAFLASH anywhere in cmd_mem.c
...
> I'm not imagining things.
You are right. I was grepping for CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
instead :-(
> 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
--
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!
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] What is CONFIG_HAS_DATAFLASH?
2010-03-05 20:43 ` Wolfgang Denk
@ 2010-03-05 20:46 ` Timur Tabi
2010-03-08 16:02 ` Detlev Zundel
0 siblings, 1 reply; 6+ messages in thread
From: Timur Tabi @ 2010-03-05 20:46 UTC (permalink / raw)
To: u-boot
Wolfgang Denk wrote:
>> 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.
> 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.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] What is CONFIG_HAS_DATAFLASH?
2010-03-05 20:46 ` Timur Tabi
@ 2010-03-08 16:02 ` Detlev Zundel
0 siblings, 0 replies; 6+ messages in thread
From: Detlev Zundel @ 2010-03-08 16:02 UTC (permalink / raw)
To: u-boot
Hi Timur,
> Wolfgang Denk wrote:
>
>>> 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.
>> 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
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-03-08 16:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-05 17:15 [U-Boot] What is CONFIG_HAS_DATAFLASH? Timur Tabi
2010-03-05 19:17 ` Wolfgang Denk
2010-03-05 19:23 ` Timur Tabi
2010-03-05 20:43 ` Wolfgang Denk
2010-03-05 20:46 ` Timur Tabi
2010-03-08 16:02 ` Detlev Zundel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox