* [U-Boot-Users] AT91RM9200 Dataflash op error with U-Boot1.1.4
[not found] <20060508171505.09348FE89@sc8-sf-spam2.sourceforge.net>
@ 2006-05-09 11:11 ` KylongMu
2006-05-09 11:32 ` Andrey P. Vasilyev
0 siblings, 1 reply; 4+ messages in thread
From: KylongMu @ 2006-05-09 11:11 UTC (permalink / raw)
To: u-boot
Dear Groups:
My board contains: AT91RM9200 DataFlash:AT45DB642 (without nand
flash)
Crosstool: ELDK4.0 for arm
UBoot: Get from www.denx.de with git, and update to most recent
code.
UBoot Config file: at91rm9200dk_config
At fist, I compiled the uboot with at91rm9200dk config, but it halt
after boot and without prompt. It's work after I add some definition in the
file include/configs/at91rm9200dk.h like this:
----------------------------------------------------------------------------
#define CONFIG_ENV_OVERWRITE
#define CONFIG_SKIP_LOWLEVEL_INIT
#define CFG_ENV_IS_IN_DATAFLASH
----------------------------------------------------------------------------
I think this is very confuse for a uboot user, it waste me many time
to find out the correct way to make it work, I think it should be with a
simple define to make sure if you boot from dataflash.
The good message is my board can show uboot prompt now, the bad
message is when I try to erase the DataFlash, it shows error like this:
----------------------------------------------------------------------------
*--------------------------------------*
DataFlash[15Mhz]:AT45DB642
Nb pages: 8192
Page Size: 1056
Size= 8650752 bytes
Logical address: 0xC0000000
*--------------------------------------*
1: Download Dataflash [addr]
2: Read Dataflash [addr]
3: Start UBOOT [C0008000 => 20000000]
*--------------------------------------*
Enter:
Load UBOOT from dataflash[c0008000] to SDRAM[21f00000]
PLLA[180MHz], MCK[60Mhz] ==> Start UBOOT
U-Boot 1.1.4 (May 8 2006 - 20:12:59)
DRAM: 64 MB
Atmel: Flash: 0 kB
DataFlash:AT45DB642
Nb pages: 8192
Page Size: 1056
Size= 8650752 bytes
Logical address: 0xC0000000
Area 0: C0000000 to C0007FFF (RO)
Area 1: C0008000 to C001FFFF (RO)
Area 2: C0020000 to C0027FFF
Area 3: C0028000 to C083FFFF
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
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!
KylongMu
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] AT91RM9200 Dataflash op error with U-Boot1.1.4
2006-05-09 11:11 ` KylongMu
@ 2006-05-09 11:32 ` Andrey P. Vasilyev
0 siblings, 0 replies; 4+ messages in thread
From: Andrey P. Vasilyev @ 2006-05-09 11:32 UTC (permalink / raw)
To: u-boot
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<CFG_MAX_FLASH_BANKS; ++i, ++info) {
+ 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] AT91RM9200 Dataflash op error with U-Boot1.1.4
[not found] <20060509125601.CBCD289174@sc8-sf-spam1.sourceforge.net>
@ 2006-05-09 14:45 ` KylongMu
2006-05-09 16:22 ` Andrey P. Vasilyev
0 siblings, 1 reply; 4+ messages in thread
From: KylongMu @ 2006-05-09 14:45 UTC (permalink / raw)
To: u-boot
> 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<CFG_MAX_FLASH_BANKS; ++i, ++info)
{
> + 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot-Users] AT91RM9200 Dataflash op error with U-Boot1.1.4
2006-05-09 14:45 ` [U-Boot-Users] AT91RM9200 Dataflash op error with U-Boot1.1.4 KylongMu
@ 2006-05-09 16:22 ` Andrey P. Vasilyev
0 siblings, 0 replies; 4+ messages in thread
From: Andrey P. Vasilyev @ 2006-05-09 16:22 UTC (permalink / raw)
To: u-boot
On Tue, May 09, 2006 at 10:45:20PM +0800, KylongMu wrote:
> > 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>
> >
> > Perhaps, this patch will help you:
...
> > If it will not solve the problem, try this:
...
>
> 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!
Oops... My mistake. I've replied without carefully reading your
question...
Right answer (I hope): you dont need to erase dataflash. AFAIK,
dataflash erasing is performed by driver when you write into dataflash.
So, for example, to download binary into c0042000 dataflash "virtual"
address, you can use simple "cp" command, without issuing "erase"
command first, like this:
loadb 21000000
<sending image 0x12345 bytes long by kermit>
cp.b 21000000 c0042000 12345
--
With best regards,
Andrey Vasilyev
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-05-09 16:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20060509125601.CBCD289174@sc8-sf-spam1.sourceforge.net>
2006-05-09 14:45 ` [U-Boot-Users] AT91RM9200 Dataflash op error with U-Boot1.1.4 KylongMu
2006-05-09 16:22 ` Andrey P. Vasilyev
[not found] <20060508171505.09348FE89@sc8-sf-spam2.sourceforge.net>
2006-05-09 11:11 ` KylongMu
2006-05-09 11:32 ` Andrey P. Vasilyev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox