From mboxrd@z Thu Jan 1 00:00:00 1970 From: KylongMu Date: Tue, 9 May 2006 22:45:20 +0800 Subject: [U-Boot-Users] AT91RM9200 Dataflash op error with U-Boot1.1.4 In-Reply-To: <20060509125601.CBCD289174@sc8-sf-spam1.sourceforge.net> Message-ID: <006f01c67377$34cf2150$b7899d0a@first> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > On Tue, May 09, 2006 at 07:11:52PM +0800, KylongMu wrote: > > Dear Groups: > > My board contains: AT91RM9200 DataFlash:AT45DB642 (without nand > > flash) > ... > > U-Boot> erase c0020000 c0027fff > > Error: start address not on sector boundary > > U-Boot> > > > -------------------------------------------------------------------------- > -- > > > > Does anybody know how to solve with this? > > Thanks a lot! > > Perhaps, this patch will help you: > > --- u-boot-1.1.3/common/cmd_mem.c 2005-09-14 22:45:12.000000000 +0400 > +++ u-boot-1.1.3-new/common/cmd_mem.c 2005-09-14 22:47:03.000000000 +0400 > @@ -423,7 +423,7 @@ > /* check if we are copying to Flash */ > if ( (addr2info(dest) != NULL) > #ifdef CONFIG_HAS_DATAFLASH > - && (!addr_dataflash(addr)) > + && (!addr_dataflash(addr)) && (!addr_dataflash(dest)) > #endif > ) { > int rc; > > If it will not solve the problem, try this: > > --- u-boot-1.1.4/common/flash.c 2005-08-14 03:53:35.000000000 +0400 > +++ u-boot-1.1.4-new/common/flash.c 2005-09-15 01:15:58.000000000 +0400 > @@ -105,6 +105,8 @@ > int i; > > for (i=0, info=&flash_info[0]; i + if (info->size == 0) > + continue; > if (info->flash_id != FLASH_UNKNOWN && > addr >= info->start[0] && > /* WARNING - The '- 1' is needed if the flash > > -- > With best regards, > Andrey Vasilyev Dear Andrey, Thanks for your answer. I patched these two files one by one, or both of them, but all failed, and the error is still. Thanks a lot! KylongMu