[U-Boot] U-boot 1.3.3: Error: start address not on sector boundary

I'm running this on a Coldfire (MCF5484) processor for Linux 2.6.25. I've got 64MB of Intel P33 flash. I have two chips that have their chip selects tied together to give me 32 bit read/write.
flinfo shows:
Bank # 1: CFI conformant FLASH (32 x 16) Size: 64 MB in 259 SectorsEC0000 Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x22 Erase timeout: 4096 ms, write timeout: 1 ms Buffer write timeout: 2 ms, buffer size: 64 bytes addr_first: 0xfc002000 Sector Start Addresses:0 FC000000 RO FC010000 RO FC020000 RO FC030000 RO FC040000 RO FC080000 RO FC0C0000 RO FC100000 RO FC140000 RO FC180000 RO FC1C0000 RO FC200000 FC240000 FC280000 FC2C0000 FC300000 FC340000 FC380000 FC3C0000 FC400000 etc....
Got CS0 set as:
#define CFG_CS0_BASE 0xFC000000 #define CFG_CS0_MASK (((CFG_BOOTSZ << 20) - 1) & 0xFFFF0001) #define CFG_CS0_CTRL 0x00002500
This chips first four sectors are 32K (the rest are 128K). The CFG_ENV_SECT_SIZE is set to 0x2000. However if I change it to 32K I get errors. On top of that the sector boundaries look fine in flinfo. I put in some debug to see more about the error and I get:
-> save Saving Environment to Flash... addr_first: 0xfc002000 info->start[0]: 0xfc000000 b_end: 0xffffffff Error: start address not on sector boundary
Not sure what to do with this. Any help appreciated.

James,
Please do not use CFG_BOOTSZ for flash size.
Since you have two 32MB flash chips tie to one chip select to use as one for 32-bit access (addr&data). The sectors listing will become 64KB, 64KB, 64KB, 64KB, 256KB... from 32KB, 32KB, 32KB, 32KB, 128KB... (one upper 16-bit data for flash 1 and one lower 16-bit data for flash 2) Based on your information provided, your environment data is assigned to first sector at offset 0x2000. Your environment data has to assigned to one of the 64KB sector, last 64KB sector will be the perfect choice.
U-boot 1.3.3: #define CFG_ENV_OFFSET 0x30000 /* must be sector aligned */ #define CFG_ENV_SIZE 0x2000 #define CFG_ENV_SECTOR_SIZE 0x10000
U-boot v2008.10: #define CONFIG_ENV_OFFSET 0x30000 #define CONFIG_ENV_SIZE 0x2000 #define CONFIG_ENV_SECTOR_SIZE 0x10000
I'm confused. Are you saying I need to apply these 19 patches to
address the problem I'm having? The 19 patches are for next u-boot release.
Regards, TsiChung
participants (2)
-
jkimble@one.net
-
Liew Tsi Chung