This is the mail archive of the ecos-devel@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Strata flash's MAX_FLASH_BLOCKS define problem


Hello,

1. In flash_unlock_block.c under the devs/flash/intel/strata/current/src directory, MAX_FLASH_BLOCKS is defined to be 128. But for the 28F256L18 part (16bit width, 32MByte size), the maximum number of blocks should be doubled. I ran into a problem that Redboot crashed and caused reboot while doing "fis init". I was able to trace down to this define. After making it 256, it seems to be working fine.

A quick fix can just double the value. But a better way to fix this would require this define to be moved into individual platform's directory to be more flexible. For example, move this define to assabet_strataflash.inl for the Assabet board. Any idea?

2. How can I make the Redboot use the last 128 KB block. After the Redboot boots, it always shows:

    FLASH: 0xa0000000 - 0xa1fe0000, 255 blocks of 0x00020000 bytes each.

Somehow the last 128KB from 0xa1fe0000 to 0xa2000000 is ignored. This is because in the strata.c, the number of blocks is obtained via:
        num_regions = _si(qp->num_regions)+1;

According to 28F256L18's data sheet, it returns 254 which leaves the num_regions to be 255, i.e. the number of blocks. If I change the above line to:
        num_regions = _si(qp->num_regions)+2;

Redboot can locate the last 128KB block (4 smaller blocks actually) and seems to be working okay. Is this the right way to do?

Thanks a lot,

Kevin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]