FreeCalypso > hg > freecalypso-sw
comparison loadtools/flash.h @ 55:278052b6afda
loadtools: started laying the foundation for flash support
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 23 Jun 2013 20:13:59 +0000 |
parents | |
children | 99c234bf6a9b |
comparison
equal
deleted
inserted
replaced
54:50b652bc3a4f | 55:278052b6afda |
---|---|
1 /* this header file contains definitions for fc-loadtool flash support */ | |
2 | |
3 /* | |
4 * The following structures represent an "abstract" | |
5 * description of flash devices. | |
6 * | |
7 * A "region" is a consecutive group of erase units of the same size. | |
8 */ | |
9 | |
10 struct flash_region_desc { | |
11 uint32_t sector_size; | |
12 unsigned nsectors; | |
13 }; | |
14 | |
15 struct flash_bank_desc { | |
16 struct flash_region_desc *regions; | |
17 uint32_t prog_base_mask; | |
18 }; | |
19 | |
20 struct flash_device_desc { | |
21 char *name; | |
22 struct flash_bank_desc *bank_desc; | |
23 unsigned nbanks; | |
24 }; | |
25 | |
26 /* the following structures describe flash banks as accessible to us */ | |
27 | |
28 struct sector_info { | |
29 uint32_t start; | |
30 uint32_t size; | |
31 }; | |
32 | |
33 struct flash_bank_info { | |
34 uint32_t base_addr; | |
35 uint32_t total_size; | |
36 struct flash_bank_desc *bank_desc; | |
37 struct sector_info *sectors; | |
38 unsigned nsectors; | |
39 }; |