[U-Boot-Users] Atmel DataFlash hooks.
Ulf Samuelsson
ulfs at atmel.com
Wed Jan 31 18:37:15 CET 2007
Grant Likely wrote:
> On 1/29/07, Wolfgang Denk <wd at denx.de> wrote:
>> In message <45BD6755.3000100 at comcast.net> you wrote:
>>> On the other hand, I do not think it less logical to require a
>>> write to flash to consist of a command different from cp, since in
>>> order for it to actually work, the user must have done all the
>>> right preparation.
>>
>> Call it historical reasons, then ;-)
>>
>>> takes no code at all. The only issue arises with cp/loadX. If we all
>>> agree there is no desire to interface anything that requires a
>>> routine to read data from it to the memory commands, then I have no
>>> desire to go there either. Presently, we have loadX commands that
>>> will work with
But we dont all agree,
I only see a bunch of non-data flash users that agree
that dataflash users do not need to do memory commands.
Memory commands are used to handle flash and DRAM.
The user today see no difference between dataflash and flash,
and use both kinds in the same way.
It is completely illogical then to claim that the memory
commands are useful for parallel flash and not for serial flash.
Please explain to me why the users should care about
that you do not like the internal implementation?
The idea that dataflash / mmc / sd could be used with a prefix,
also shows a total unwillingness.
A perfectly good implementation would let the memory commands
(after translation of environment variables)
send the parameters to a validation routine for each supported memory.
The validation routine would return an accept or reject.
If accepted, then for you would call a probe routine
for any memorty read, which would return a pointer to a valid block
of memory containint minimum n valid bytes.
The SDRAM/Flash would just return the passed parameters
while a serial flash memory /memor card/NAND flash etc
would first read a block into a buffer and then return
a pointer to the buffer.
With such a structure, it is up to the driver to select how to
handle memory addresses.
An MMC driver could validate "mmc:10000FFFF" (note > 4 GB address)
and a dataflash driver could check for addresses between
C0000000..DFFFFFFF like it does today.
At the intialization of u-boot, each flash driver registers
its access routines in a table.
Then no ifdefs would be needed and any memory can
be used as memory.
>> I do agree. Grant?
>
> Yes, I agree.
>
>>
>> [I really have to stop myself from writing "You can take this for
>> Granted" :-) ]
>
> :-P
Best Regards,
Ulf Samuelsson
ulf at atmel.com
GSM: +46 (706) 22 44 57
Tel: +46 (8) 441 54 22
Fax: +46 (8) 441 54 29
Mail: Box 2033 174 02 Sundbyberg
Visit: Kavallerivägen 24
174 58 Sundbyberg'
Sweden
More information about the U-Boot
mailing list