[U-Boot] no flush_cache() call at the end of do_fat_fsload?

Hi all,
Maybe a stupid question, but does anyone no why there is no call to flush_cache() at the end of do_fat_fsload()? I haven't tried it on the latest u-boot, but I had an issue the other day where I was trying to load a VxWorks image from a Compact Flash card on a MPC8572-based board. The same image booted fine with tftpboot, but when I loaded the image off of the CF card using the fatload command, the image didn't boot. I confirmed that image was copied faithfully into DRAM. I then noticed that the tftpload command (netboot_common) has a call to flush_cache() after the download to memory completes, so I added the following to the end of do_fat_fsload():
...
/* flush cache */ flush_cache(offset, size);
return 0; }
Then the image booted...
Thanks, Scott
___________________________________________________________________
Scott N. Coulter Senior Software Engineer
Cyclone Microsystems 370 James Street Phone: 203.786.5536 ext. 118 New Haven, CT 06513-3051 Email: scott.coulter@cyclone.com U.S.A. Web: http://www.cyclone.com ___________________________________________________________________

Hi Scott,
On Thursday 29 January 2009, Scott Coulter wrote:
Maybe a stupid question, but does anyone no why there is no call to flush_cache() at the end of do_fat_fsload()?
A bug perhaps?
I haven't tried it on the latest u-boot, but I had an issue the other day where I was trying to load a VxWorks image from a Compact Flash card on a MPC8572-based board. The same image booted fine with tftpboot, but when I loaded the image off of the CF card using the fatload command, the image didn't boot. I confirmed that image was copied faithfully into DRAM. I then noticed that the tftpload command (netboot_common) has a call to flush_cache() after the download to memory completes, so I added the following to the end of do_fat_fsload():
...
/* flush cache */ flush_cache(offset, size);
return 0; }
Then the image booted...
Makes perfect sense. Best would be if you could send a proper patch to fix this.
Thanks.
Best regards, Stefan
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de =====================================================================
participants (2)
-
Scott Coulter
-
Stefan Roese