[U-Boot-Users] [PATCH] DataFlash for AT91RM9200DK board

Wolfgang Denk wd at denx.de
Tue Jun 17 00:19:51 CEST 2003


in message <057001c32ffc$ef02fb80$91f59f0a at pc0752> you wrote:
> In that new patch (still applied on u-boot-0.3.0 version), we made the
> modifications concerning DataFlash support as you advise us to do below.
> It is now possible to boot Linux from DataFlash with Bootm command and to
> access DataFlash with cp, and md commands...


> Tell me if there is something wrong.

I've added your patches, but I had to clean up a  couple  of  compile
problems. Did you really run the MAKEALL script as required?

Please clean up ALL compiler warnings before submitting a patch!

Also, please do not use C++ comments, and use the Linux kernel coding
style for your sources.

Finally, I think there is a bug in your code. In "lib_arm/armlinux.c"
you write (cast by me to avoid compiler warnings):

    133         if (addr_dataflash(addr)){
    134                 read_dataflash(data, len, (char *)CFG_LOAD_ADDR);
    135                 data = CFG_LOAD_ADDR;
    136         }
    137 #endif

It is IMHO wrong to use a static, compile-time defined constant here;
shouldn't this be the variable load_addr instead?

The same comment applies to "common/cmd_bootm.c" 

Also,  should  "drivers/dataflash.c"  not  be  moved  into  the  at91
directory?  It  seems  it  can handle only at91 dataflash anyway? For
example, it calls a function AT91F_DataFlashWrite() which is  unknown
outside the cpu/at91rm9200/ tree...

Checked in locally now, will push to CVS later this night.

Please check out from CVS, and check carefully. If necessary,  submit
a patch against CVS then (especially for the CFG_LOAD_ADDR issue).

Best regards,

Wolfgang Denk

Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
grep me no patterns and I'll tell you no lines.

More information about the U-Boot mailing list