mirror of
https://github.com/t-crest/rtems.git
synced 2025-12-05 15:15:48 +00:00
Whitespace removal.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
/* Find bus bridges */
|
||||
|
||||
/* This part of the program builds a list with pairs of bus
|
||||
master port names (each is "device name/master port name").
|
||||
master port names (each is "device name/master port name").
|
||||
It is then possible to find if a given master is actually
|
||||
available under a different master port name through bridges.
|
||||
*/
|
||||
@@ -21,7 +21,7 @@
|
||||
tristate_bridge_0/tristate_master, and
|
||||
tristate_bridge_0 itself is slave of cpu0/data_master, the
|
||||
bridge information would be stored as this bus_bridge_pair:
|
||||
mastered_by = "cpu0/data_master" and
|
||||
mastered_by = "cpu0/data_master" and
|
||||
bridges_to = "tristate_bridge_0/tristate_master".
|
||||
That allows to deduce that SRAM is actually mastered by
|
||||
cpu0/data_master. If there were any address or bus width
|
||||
@@ -36,8 +36,8 @@
|
||||
#include "bridges.h"
|
||||
|
||||
int is_bridged(
|
||||
char *cpu_master,
|
||||
char *dev_master,
|
||||
char *cpu_master,
|
||||
char *dev_master,
|
||||
bus_bridge_pair *bridges)
|
||||
{
|
||||
char *curr_master;
|
||||
@@ -47,7 +47,7 @@ int is_bridged(
|
||||
|
||||
for(bbp = bridges; bbp != NULL; bbp=bbp->next)
|
||||
{
|
||||
if(strcmp(cpu_master, bbp->mastered_by) == 0 &&
|
||||
if(strcmp(cpu_master, bbp->mastered_by) == 0 &&
|
||||
is_bridged(bbp->bridges_to, dev_master, bridges))
|
||||
{
|
||||
return 1; /* cpu masters dev via bridge */
|
||||
|
||||
@@ -22,8 +22,8 @@ bus_bridge_pair;
|
||||
bus_bridge_pair *find_bridges(struct ptf *p);
|
||||
|
||||
int is_bridged(
|
||||
char *cpu_master,
|
||||
char *dev_master,
|
||||
char *cpu_master,
|
||||
char *dev_master,
|
||||
bus_bridge_pair *bridges);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -51,7 +51,7 @@ clock_desc *find_clocks( struct ptf *sopc, struct ptf *cfg )
|
||||
|
||||
struct ptf named = { item, 0, 0, 0, 0 };
|
||||
struct ptf_item clk_cfg = { 2, &all, &named };
|
||||
|
||||
|
||||
clocks = NULL;
|
||||
ptf_match(sopc, &clk_spec, add_clock_spec, &clocks);
|
||||
|
||||
|
||||
@@ -65,9 +65,9 @@ void set_dev_cfgname(struct ptf_item *pi, void *arg)
|
||||
|
||||
|
||||
device_desc *find_devices(
|
||||
struct ptf *ptf,
|
||||
struct ptf *cfg,
|
||||
struct ptf *cpu,
|
||||
struct ptf *ptf,
|
||||
struct ptf *cfg,
|
||||
struct ptf *cpu,
|
||||
bus_bridge_pair *bridges)
|
||||
{
|
||||
struct ptf system = { section, "SYSTEM", 0, 0, 0 };
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "ptf.h"
|
||||
#include "bridges.h"
|
||||
|
||||
typedef struct dev_descr
|
||||
typedef struct dev_descr
|
||||
{
|
||||
int slaves;
|
||||
char *cfgname;
|
||||
@@ -24,9 +24,9 @@ typedef struct dev_descr
|
||||
device_desc;
|
||||
|
||||
device_desc *find_devices(
|
||||
struct ptf *ptf,
|
||||
struct ptf *cfg,
|
||||
struct ptf *cpu,
|
||||
struct ptf *ptf,
|
||||
struct ptf *cfg,
|
||||
struct ptf *cpu,
|
||||
bus_bridge_pair *bridges);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -112,11 +112,11 @@ void fwrite_linkcmds_file(FILE *file, struct ptf *cfg, struct ptf *cpu, device_d
|
||||
{
|
||||
fprintf(file, " %s : ORIGIN = 0x%08X, LENGTH = 0x%08X\n", tmd->dev->cfgname, tmd->base, tmd->size);
|
||||
}
|
||||
|
||||
|
||||
|
||||
fprintf(file, "}\n\n");
|
||||
|
||||
ptf_match(cfg, &maliepil, fwrite_value, file);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -72,14 +72,14 @@ memory_desc *find_memory(device_desc *devices)
|
||||
{
|
||||
tmd->dev = dd;
|
||||
|
||||
if(memory == NULL)
|
||||
if(memory == NULL)
|
||||
{
|
||||
tmd->next = NULL;
|
||||
memory = tmd;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(tmd->size > memory->size)
|
||||
if(tmd->size > memory->size)
|
||||
{
|
||||
tmd->next = memory;
|
||||
memory = tmd;
|
||||
@@ -101,4 +101,4 @@ memory_desc *find_memory(device_desc *devices)
|
||||
return memory;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ int main(int argc, char *argv[])
|
||||
output_order--;
|
||||
break;
|
||||
|
||||
case 'L': /* Do not output linker script */
|
||||
case 'L': /* Do not output linker script */
|
||||
output_linkcmds = 0;
|
||||
break;
|
||||
|
||||
@@ -241,7 +241,7 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "Couldn't parse '%s'.\n", argv[optind]);
|
||||
return -1;
|
||||
};
|
||||
|
||||
|
||||
if(verbose) printf("Successfully read config PTF file %s.\n", argv[optind]);
|
||||
|
||||
cfg = ptf_concat(cfg, morecfg);
|
||||
@@ -290,18 +290,18 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "you want to use with this BSP in your config file.\n");
|
||||
fprintf(stderr, "The available CPUs are named as follows:\n");
|
||||
ptf_match(sopc, &class_spec, printf_ptf_value, " %s\n");
|
||||
return -1;
|
||||
return -1;
|
||||
};
|
||||
|
||||
if(cpu_count == 0)
|
||||
{
|
||||
fprintf(stderr, "There is no NIOS2 cpu in the system.\n");
|
||||
return -1;
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
|
||||
if(verbose)
|
||||
{
|
||||
{
|
||||
printf("Using NIOS II CPU '%s'.\n", cpu->value);
|
||||
printf("Only modules mastered by this CPU are considered now.\n");
|
||||
};
|
||||
@@ -382,7 +382,7 @@ int main(int argc, char *argv[])
|
||||
if(verbose) printf("Looking for memory...\n");
|
||||
|
||||
memory = find_memory(devices);
|
||||
|
||||
|
||||
if(verbose)
|
||||
{
|
||||
if(memory)
|
||||
|
||||
@@ -91,7 +91,7 @@ void fwrite_devhead_line(struct ptf_item *pi, void *arg)
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(dinfo->file, "#define %s_%s %s\n",
|
||||
fprintf(dinfo->file, "#define %s_%s %s\n",
|
||||
dinfo->dev->cfgname, dinfo->orig_value,
|
||||
pi->item[pi->level]->value);
|
||||
};
|
||||
@@ -109,7 +109,7 @@ void fwrite_device_header(struct ptf_item *pi, void *arg)
|
||||
|
||||
f = ptf_find(pi->item[pi->level]->sub, &fi, item, 0, 0);
|
||||
|
||||
while(f != NULL)
|
||||
while(f != NULL)
|
||||
{
|
||||
dinfo->orig_value = f->value;
|
||||
if(f->name && strncmp(f->name, "N2G_DEFINE_", 11)==0)
|
||||
@@ -192,4 +192,4 @@ void fwrite_header_file( FILE *file, struct ptf *cfg, device_desc *devices, cloc
|
||||
ptf_match(cfg, &matchepilog, fwrite_value, file);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ struct ptf_parser_state
|
||||
whitespace_before_item_value,
|
||||
more_section_name_chars,
|
||||
more_item_value_chars,
|
||||
} expectation;
|
||||
} expectation;
|
||||
};
|
||||
|
||||
/***************************************************************************/
|
||||
@@ -240,7 +240,7 @@ void parse_char(struct ptf_parser_state *state, int c)
|
||||
#endif
|
||||
|
||||
if(is_not_quoted && c == '}')
|
||||
{
|
||||
{
|
||||
parser_event = section_closed;
|
||||
}
|
||||
else if(is_no_space)
|
||||
@@ -469,7 +469,7 @@ struct ptf *ptf_parse_file(char *filename)
|
||||
|
||||
f = fopen(filename, "r");
|
||||
if(f == NULL)
|
||||
{
|
||||
{
|
||||
perror(filename);
|
||||
return NULL;
|
||||
};
|
||||
@@ -686,7 +686,7 @@ int ptf_advance_until(
|
||||
{
|
||||
if(strcmp(leaf->value, value) == 0) return 0; /* got it */
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(leaf->name != NULL)
|
||||
{
|
||||
if(strcmp(leaf->name, name) == 0)
|
||||
@@ -712,7 +712,7 @@ int ptf_advance_until(
|
||||
/***************************************************************************/
|
||||
|
||||
struct ptf *ptf_find(
|
||||
struct ptf *tree,
|
||||
struct ptf *tree,
|
||||
struct ptf_item *item,
|
||||
ptf_item_type ttype,
|
||||
char *name,
|
||||
@@ -764,8 +764,8 @@ struct ptf *ptf_next(
|
||||
|
||||
int ptf_match(
|
||||
struct ptf *const ptf,
|
||||
struct ptf_item *const match,
|
||||
const ptf_match_action action,
|
||||
struct ptf_item *const match,
|
||||
const ptf_match_action action,
|
||||
void *arg)
|
||||
{
|
||||
int count;
|
||||
@@ -788,7 +788,7 @@ int ptf_match(
|
||||
#endif
|
||||
|
||||
if(mtype == p->type &&
|
||||
(mname==NULL || p->name==NULL || strcmp(mname, p->name)==0) &&
|
||||
(mname==NULL || p->name==NULL || strcmp(mname, p->name)==0) &&
|
||||
(mvalue==NULL || p->value==NULL || strcmp(mvalue, p->value)==0))
|
||||
{
|
||||
pi.item[pi.level] = p;
|
||||
|
||||
@@ -46,22 +46,22 @@ void ptf_printf(FILE *s, struct ptf *tree, char *prefix);
|
||||
void ptf_dump_ptf_item(FILE *s, struct ptf_item *pi);
|
||||
|
||||
struct ptf *ptf_find(
|
||||
struct ptf *tree,
|
||||
struct ptf_item *item,
|
||||
struct ptf *tree,
|
||||
struct ptf_item *item,
|
||||
ptf_item_type ttype,
|
||||
char *name,
|
||||
char *name,
|
||||
char *value);
|
||||
|
||||
struct ptf *ptf_next(
|
||||
struct ptf_item *item,
|
||||
struct ptf_item *item,
|
||||
ptf_item_type ttype,
|
||||
char *name,
|
||||
char *name,
|
||||
char *value);
|
||||
|
||||
int ptf_match(
|
||||
struct ptf *const ptf,
|
||||
struct ptf_item *const match,
|
||||
const ptf_match_action action,
|
||||
struct ptf_item *const match,
|
||||
const ptf_match_action action,
|
||||
void *arg);
|
||||
|
||||
char *ptf_defused_name(char *);
|
||||
|
||||
Reference in New Issue
Block a user