summaryrefslogtreecommitdiffstats
path: root/tools/cpu/nios2
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2009-12-10 07:20:06 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2009-12-10 07:20:06 +0000
commit5f5f681b69f255f6b94e54fa73978e5f9644108c (patch)
tree4f06c116d69c70cf2578829e844f44025882775c /tools/cpu/nios2
parentc9ece2e49c625d2485e98d16d4d967f289da5ced (diff)
downloadrtems-5f5f681b69f255f6b94e54fa73978e5f9644108c.tar.bz2
Whitespace removal.
Diffstat (limited to '')
-rw-r--r--tools/cpu/nios2/bridges.c10
-rw-r--r--tools/cpu/nios2/bridges.h4
-rw-r--r--tools/cpu/nios2/clocks.c2
-rw-r--r--tools/cpu/nios2/devices.c6
-rw-r--r--tools/cpu/nios2/devices.h8
-rw-r--r--tools/cpu/nios2/linkcmds.c4
-rw-r--r--tools/cpu/nios2/memory.c6
-rw-r--r--tools/cpu/nios2/nios2gen.c12
-rw-r--r--tools/cpu/nios2/output.c6
-rw-r--r--tools/cpu/nios2/ptf.c16
-rw-r--r--tools/cpu/nios2/ptf.h14
11 files changed, 44 insertions, 44 deletions
diff --git a/tools/cpu/nios2/bridges.c b/tools/cpu/nios2/bridges.c
index e5f36e07c4..be5e889b5e 100644
--- a/tools/cpu/nios2/bridges.c
+++ b/tools/cpu/nios2/bridges.c
@@ -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 */
diff --git a/tools/cpu/nios2/bridges.h b/tools/cpu/nios2/bridges.h
index 1d348dc2f2..02d983871d 100644
--- a/tools/cpu/nios2/bridges.h
+++ b/tools/cpu/nios2/bridges.h
@@ -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
diff --git a/tools/cpu/nios2/clocks.c b/tools/cpu/nios2/clocks.c
index 2c72770798..5a3293ef29 100644
--- a/tools/cpu/nios2/clocks.c
+++ b/tools/cpu/nios2/clocks.c
@@ -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);
diff --git a/tools/cpu/nios2/devices.c b/tools/cpu/nios2/devices.c
index 112191f487..054d1cc29f 100644
--- a/tools/cpu/nios2/devices.c
+++ b/tools/cpu/nios2/devices.c
@@ -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 };
diff --git a/tools/cpu/nios2/devices.h b/tools/cpu/nios2/devices.h
index 11164c5245..5e62ea2c00 100644
--- a/tools/cpu/nios2/devices.h
+++ b/tools/cpu/nios2/devices.h
@@ -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
diff --git a/tools/cpu/nios2/linkcmds.c b/tools/cpu/nios2/linkcmds.c
index 46e0c05755..28a71cbbc0 100644
--- a/tools/cpu/nios2/linkcmds.c
+++ b/tools/cpu/nios2/linkcmds.c
@@ -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);
}
-
+
diff --git a/tools/cpu/nios2/memory.c b/tools/cpu/nios2/memory.c
index 0c35953354..c697e15430 100644
--- a/tools/cpu/nios2/memory.c
+++ b/tools/cpu/nios2/memory.c
@@ -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;
}
-
+
diff --git a/tools/cpu/nios2/nios2gen.c b/tools/cpu/nios2/nios2gen.c
index a62f0e3120..9c36a48a99 100644
--- a/tools/cpu/nios2/nios2gen.c
+++ b/tools/cpu/nios2/nios2gen.c
@@ -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)
diff --git a/tools/cpu/nios2/output.c b/tools/cpu/nios2/output.c
index d9f368d05c..bd4a30b0fe 100644
--- a/tools/cpu/nios2/output.c
+++ b/tools/cpu/nios2/output.c
@@ -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);
}
-
+
diff --git a/tools/cpu/nios2/ptf.c b/tools/cpu/nios2/ptf.c
index 6f8943d0b3..db62e557b7 100644
--- a/tools/cpu/nios2/ptf.c
+++ b/tools/cpu/nios2/ptf.c
@@ -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;
diff --git a/tools/cpu/nios2/ptf.h b/tools/cpu/nios2/ptf.h
index 3683b98163..c847cf3b1f 100644
--- a/tools/cpu/nios2/ptf.h
+++ b/tools/cpu/nios2/ptf.h
@@ -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 *);