[U-Boot-Users] FLASH: flash_init function returns size correctly ?

Lucas Cyrulski cyrulo at gmail.com
Wed May 16 21:34:21 CEST 2007


I'm still working to get ATMEL flash working with u-boot, my target
board is at91rm9200ek. My u-boot source code version is 1.1.6.

There is a function in flash.c file in u-boot/board/atmel/at91rm9200ek:

ulong flash_init( void)

it calculates flash size and stores it in flash_info.size field and
then returns this value. But it is not a physical size of flash (
2Mbits x 16bits organisation = 32Mbits), only a size that this flash
takes in address memory space which is 2Mbits. Is this correct ??

I'm concerned about that because when I worked with this source code,
I encountered many errors. It seemed like a person who wrote it did
not even try to check if it works on hardware. I'm wondering if it is
another mistake or it is how u-boot gets info about flash size on

Thanks for any replies and regards

More information about the U-Boot mailing list