aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/ar7/prom.c
diff options
context:
space:
mode:
authorAlexander Clouter <alex@digriz.org.uk>2010-01-31 14:38:19 -0500
committerRalf Baechle <ralf@linux-mips.org>2010-02-27 06:53:21 -0500
commit4d1da8c2961da46abd85a71d20f2b169bf80618e (patch)
treeaed10645023213f8f6d3e9334c6c93b1cfed6c72 /arch/mips/ar7/prom.c
parent10229f3761fdc1050f972bf3a4c4623bde20002f (diff)
MIPS: AR7: Whitespace hacking
[Ralf: Fixed up reject and Wu's complaints about comment style.] Signed-off-by: Alexander Clouter <alex@digriz.org.uk> To: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/921/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/ar7/prom.c')
-rw-r--r--arch/mips/ar7/prom.c48
1 files changed, 25 insertions, 23 deletions
diff --git a/arch/mips/ar7/prom.c b/arch/mips/ar7/prom.c
index b7bccf7b194e..52385790e5c1 100644
--- a/arch/mips/ar7/prom.c
+++ b/arch/mips/ar7/prom.c
@@ -32,8 +32,8 @@
32#define MAX_ENTRY 80 32#define MAX_ENTRY 80
33 33
34struct env_var { 34struct env_var {
35 char *name; 35 char *name;
36 char *value; 36 char *value;
37}; 37};
38 38
39static struct env_var adam2_env[MAX_ENTRY]; 39static struct env_var adam2_env[MAX_ENTRY];
@@ -41,6 +41,7 @@ static struct env_var adam2_env[MAX_ENTRY];
41char *prom_getenv(const char *name) 41char *prom_getenv(const char *name)
42{ 42{
43 int i; 43 int i;
44
44 for (i = 0; (i < MAX_ENTRY) && adam2_env[i].name; i++) 45 for (i = 0; (i < MAX_ENTRY) && adam2_env[i].name; i++)
45 if (!strcmp(name, adam2_env[i].name)) 46 if (!strcmp(name, adam2_env[i].name))
46 return adam2_env[i].value; 47 return adam2_env[i].value;
@@ -61,38 +62,38 @@ static void __init ar7_init_cmdline(int argc, char *argv[])
61} 62}
62 63
63struct psbl_rec { 64struct psbl_rec {
64 u32 psbl_size; 65 u32 psbl_size;
65 u32 env_base; 66 u32 env_base;
66 u32 env_size; 67 u32 env_size;
67 u32 ffs_base; 68 u32 ffs_base;
68 u32 ffs_size; 69 u32 ffs_size;
69}; 70};
70 71
71static __initdata char psp_env_version[] = "TIENV0.8"; 72static __initdata char psp_env_version[] = "TIENV0.8";
72 73
73struct psp_env_chunk { 74struct psp_env_chunk {
74 u8 num; 75 u8 num;
75 u8 ctrl; 76 u8 ctrl;
76 u16 csum; 77 u16 csum;
77 u8 len; 78 u8 len;
78 char data[11]; 79 char data[11];
79} __attribute__ ((packed)); 80} __attribute__ ((packed));
80 81
81struct psp_var_map_entry { 82struct psp_var_map_entry {
82 u8 num; 83 u8 num;
83 char *value; 84 char *value;
84}; 85};
85 86
86static struct psp_var_map_entry psp_var_map[] = { 87static struct psp_var_map_entry psp_var_map[] = {
87 { 1, "cpufrequency" }, 88 { 1, "cpufrequency" },
88 { 2, "memsize" }, 89 { 2, "memsize" },
89 { 3, "flashsize" }, 90 { 3, "flashsize" },
90 { 4, "modetty0" }, 91 { 4, "modetty0" },
91 { 5, "modetty1" }, 92 { 5, "modetty1" },
92 { 8, "maca" }, 93 { 8, "maca" },
93 { 9, "macb" }, 94 { 9, "macb" },
94 { 28, "sysfrequency" }, 95 { 28, "sysfrequency" },
95 { 38, "mipsfrequency" }, 96 { 38, "mipsfrequency" },
96}; 97};
97 98
98/* 99/*
@@ -139,6 +140,7 @@ static char * __init lookup_psp_var_map(u8 num)
139static void __init add_adam2_var(char *name, char *value) 140static void __init add_adam2_var(char *name, char *value)
140{ 141{
141 int i; 142 int i;
143
142 for (i = 0; i < MAX_ENTRY; i++) { 144 for (i = 0; i < MAX_ENTRY; i++) {
143 if (!adam2_env[i].name) { 145 if (!adam2_env[i].name) {
144 adam2_env[i].name = name; 146 adam2_env[i].name = name;