Changeset 5f5f681 in rtems
- Timestamp:
- Dec 10, 2009, 7:20:06 AM (10 years ago)
- Branches:
- 4.10, 4.11, master
- Children:
- e8cf7b5
- Parents:
- c9ece2e
- Location:
- tools/cpu/nios2
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/cpu/nios2/bridges.c
rc9ece2e r5f5f681 13 13 14 14 /* This part of the program builds a list with pairs of bus 15 master port names (each is "device name/master port name"). 15 master port names (each is "device name/master port name"). 16 16 It is then possible to find if a given master is actually 17 17 available under a different master port name through bridges. … … 22 22 tristate_bridge_0 itself is slave of cpu0/data_master, the 23 23 bridge information would be stored as this bus_bridge_pair: 24 mastered_by = "cpu0/data_master" and 24 mastered_by = "cpu0/data_master" and 25 25 bridges_to = "tristate_bridge_0/tristate_master". 26 26 That allows to deduce that SRAM is actually mastered by … … 37 37 38 38 int is_bridged( 39 char *cpu_master, 40 char *dev_master, 39 char *cpu_master, 40 char *dev_master, 41 41 bus_bridge_pair *bridges) 42 42 { … … 48 48 for(bbp = bridges; bbp != NULL; bbp=bbp->next) 49 49 { 50 if(strcmp(cpu_master, bbp->mastered_by) == 0 && 50 if(strcmp(cpu_master, bbp->mastered_by) == 0 && 51 51 is_bridged(bbp->bridges_to, dev_master, bridges)) 52 52 { -
tools/cpu/nios2/bridges.h
rc9ece2e r5f5f681 23 23 24 24 int is_bridged( 25 char *cpu_master, 26 char *dev_master, 25 char *cpu_master, 26 char *dev_master, 27 27 bus_bridge_pair *bridges); 28 28 -
tools/cpu/nios2/clocks.c
rc9ece2e r5f5f681 52 52 struct ptf named = { item, 0, 0, 0, 0 }; 53 53 struct ptf_item clk_cfg = { 2, &all, &named }; 54 54 55 55 clocks = NULL; 56 56 ptf_match(sopc, &clk_spec, add_clock_spec, &clocks); -
tools/cpu/nios2/devices.c
rc9ece2e r5f5f681 66 66 67 67 device_desc *find_devices( 68 struct ptf *ptf, 69 struct ptf *cfg, 70 struct ptf *cpu, 68 struct ptf *ptf, 69 struct ptf *cfg, 70 struct ptf *cpu, 71 71 bus_bridge_pair *bridges) 72 72 { -
tools/cpu/nios2/devices.h
rc9ece2e r5f5f681 15 15 #include "bridges.h" 16 16 17 typedef struct dev_descr 17 typedef struct dev_descr 18 18 { 19 19 int slaves; … … 25 25 26 26 device_desc *find_devices( 27 struct ptf *ptf, 28 struct ptf *cfg, 29 struct ptf *cpu, 27 struct ptf *ptf, 28 struct ptf *cfg, 29 struct ptf *cpu, 30 30 bus_bridge_pair *bridges); 31 31 -
tools/cpu/nios2/linkcmds.c
rc9ece2e r5f5f681 113 113 fprintf(file, " %s : ORIGIN = 0x%08X, LENGTH = 0x%08X\n", tmd->dev->cfgname, tmd->base, tmd->size); 114 114 } 115 115 116 116 117 117 fprintf(file, "}\n\n"); … … 120 120 } 121 121 122 122 -
tools/cpu/nios2/memory.c
rc9ece2e r5f5f681 73 73 tmd->dev = dd; 74 74 75 if(memory == NULL) 75 if(memory == NULL) 76 76 { 77 77 tmd->next = NULL; … … 80 80 else 81 81 { 82 if(tmd->size > memory->size) 82 if(tmd->size > memory->size) 83 83 { 84 84 tmd->next = memory; … … 102 102 } 103 103 104 104 -
tools/cpu/nios2/nios2gen.c
rc9ece2e r5f5f681 183 183 break; 184 184 185 case 'L': /* Do not output linker script */ 185 case 'L': /* Do not output linker script */ 186 186 output_linkcmds = 0; 187 187 break; … … 242 242 return -1; 243 243 }; 244 244 245 245 if(verbose) printf("Successfully read config PTF file %s.\n", argv[optind]); 246 246 … … 291 291 fprintf(stderr, "The available CPUs are named as follows:\n"); 292 292 ptf_match(sopc, &class_spec, printf_ptf_value, " %s\n"); 293 return -1; 293 return -1; 294 294 }; 295 295 … … 297 297 { 298 298 fprintf(stderr, "There is no NIOS2 cpu in the system.\n"); 299 return -1; 299 return -1; 300 300 } 301 301 }; 302 302 303 303 if(verbose) 304 { 304 { 305 305 printf("Using NIOS II CPU '%s'.\n", cpu->value); 306 306 printf("Only modules mastered by this CPU are considered now.\n"); … … 383 383 384 384 memory = find_memory(devices); 385 385 386 386 if(verbose) 387 387 { -
tools/cpu/nios2/output.c
rc9ece2e r5f5f681 92 92 else 93 93 { 94 fprintf(dinfo->file, "#define %s_%s %s\n", 94 fprintf(dinfo->file, "#define %s_%s %s\n", 95 95 dinfo->dev->cfgname, dinfo->orig_value, 96 96 pi->item[pi->level]->value); … … 110 110 f = ptf_find(pi->item[pi->level]->sub, &fi, item, 0, 0); 111 111 112 while(f != NULL) 112 while(f != NULL) 113 113 { 114 114 dinfo->orig_value = f->value; … … 193 193 } 194 194 195 195 -
tools/cpu/nios2/ptf.c
rc9ece2e r5f5f681 53 53 more_section_name_chars, 54 54 more_item_value_chars, 55 } expectation; 55 } expectation; 56 56 }; 57 57 … … 241 241 242 242 if(is_not_quoted && c == '}') 243 { 243 { 244 244 parser_event = section_closed; 245 245 } … … 470 470 f = fopen(filename, "r"); 471 471 if(f == NULL) 472 { 472 { 473 473 perror(filename); 474 474 return NULL; … … 687 687 if(strcmp(leaf->value, value) == 0) return 0; /* got it */ 688 688 } 689 } 689 } 690 690 else if(leaf->name != NULL) 691 691 { … … 713 713 714 714 struct ptf *ptf_find( 715 struct ptf *tree, 715 struct ptf *tree, 716 716 struct ptf_item *item, 717 717 ptf_item_type ttype, … … 765 765 int ptf_match( 766 766 struct ptf *const ptf, 767 struct ptf_item *const match, 768 const ptf_match_action action, 767 struct ptf_item *const match, 768 const ptf_match_action action, 769 769 void *arg) 770 770 { … … 789 789 790 790 if(mtype == p->type && 791 (mname==NULL || p->name==NULL || strcmp(mname, p->name)==0) && 791 (mname==NULL || p->name==NULL || strcmp(mname, p->name)==0) && 792 792 (mvalue==NULL || p->value==NULL || strcmp(mvalue, p->value)==0)) 793 793 { -
tools/cpu/nios2/ptf.h
rc9ece2e r5f5f681 47 47 48 48 struct ptf *ptf_find( 49 struct ptf *tree, 50 struct ptf_item *item, 49 struct ptf *tree, 50 struct ptf_item *item, 51 51 ptf_item_type ttype, 52 char *name, 52 char *name, 53 53 char *value); 54 54 55 55 struct ptf *ptf_next( 56 struct ptf_item *item, 56 struct ptf_item *item, 57 57 ptf_item_type ttype, 58 char *name, 58 char *name, 59 59 char *value); 60 60 61 61 int ptf_match( 62 62 struct ptf *const ptf, 63 struct ptf_item *const match, 64 const ptf_match_action action, 63 struct ptf_item *const match, 64 const ptf_match_action action, 65 65 void *arg); 66 66
Note: See TracChangeset
for help on using the changeset viewer.