[U-Boot-Users] dataflash problem

zoldnap at freemail.hu zoldnap at freemail.hu
Mon Oct 10 03:27:15 CEST 2005


Hi,

thank you for your answer!

in the last few hours I've managed to track down that the error is not
in
the address range checking, but in at45.c : AT91F_DataFlashRead
function.
Within that, the AT91F_DataFlashWaitReady function is timeouting
resulting that cmd_mem.c:do_mem_cmd continues execution at line 167,
where it attemts to read non-existing memory..

I dont really know why is this timeout occuring, since I've written
some codes which run natively (without Linux) on the board, and I
can access the DataFlash without problems.

regards,
Zoli

> Absence of NAND flash uncovers an issue with flash address
> ranges checking.
> The problem can be bypassed with either of two methods:
> 
> First: hack address ranges checking in common/flash.c:
> 
> --- u-boot-1.1.3/common/flash.c	2005-08-14 03:53:35.000000000 +0400
> +++ u-boot-1.1.3-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
> 
> 
> Second: disable NAND flash by setting CFG_MAX_FLASH_BANKS to 0 in board
> config.
> 
> I'm not sure it is right solution, but it at least looks as working
> for me :)
> 
-- 
zoldnap at freemail.hu <zoldnap at freemail.hu>





More information about the U-Boot mailing list