When selected, nor flash can be accessed only when it is enabled.
/Common/board_r.c 364 line:
Initr_flash ()
Flash_size = flash_init ();
/Drivers/MTD/cfi_flash.c
To enable debugging, define this
# Define debug
Flash_init ()
Debug ("JEDEC Probe: Id % x \ n ",
Info-> manufacturer_id,
Info-> device_id,
Info-> device_id2 );
If (jedec_flash_match (Info, info-> Start [0])
Break;
/Drivers/MTD/jedec_flash.c
Add static const struct amd_flash_info jedec_table []
1 {2. mfr_id = (2010) mx_manufact, // manufacturer ID 3. dev_id = am29lv160db, // device ID 2249 4. name = "MX 29lv160db", // enter the name at will. uaddr = {6 [1] = mtd_uaddr_0x0555_0x02aa/* x16 */7}, 8. devsize = size_2mib, // Nor flash size 9. sorted set = cfi_cmdset_amd_legacy, // The default value is 10. numeraseregions = 4, // four erased blocks, each of which is 11. regions = {12 eraseinfo (16*1024, 1), 13 eraseinfo (8*1024, 2), 14 eraseinfo (32*1024, 1), 15 eraseinfo (64*1024, 31), 16} 17 },
An error occurred while writing
Error: Too embedded flash sectors
Smdk2440.h
# Define config_sys_max_flash_sect (19) to a relatively large value 35: 1 + 2 + 1 + 31
Enable debugging and output information
After compilation is successful, the debugging information is removed.
U-boot-2016 with 3rd shift value for S3C2440-Support for nor flash Recognition