aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/kernel')
-rw-r--r--arch/cris/kernel/crisksyms.c21
-rw-r--r--arch/cris/kernel/setup.c26
2 files changed, 19 insertions, 28 deletions
diff --git a/arch/cris/kernel/crisksyms.c b/arch/cris/kernel/crisksyms.c
index 7141bbecd7e4..85833d704ebb 100644
--- a/arch/cris/kernel/crisksyms.c
+++ b/arch/cris/kernel/crisksyms.c
@@ -27,13 +27,13 @@ extern void __Udiv(void);
27extern void __Umod(void); 27extern void __Umod(void);
28extern void __Div(void); 28extern void __Div(void);
29extern void __Mod(void); 29extern void __Mod(void);
30extern void __ashldi3(void);
30extern void __ashrdi3(void); 31extern void __ashrdi3(void);
31extern void iounmap(void *addr); 32extern void __lshrdi3(void);
33extern void iounmap(volatile void * __iomem);
32 34
33/* Platform dependent support */ 35/* Platform dependent support */
34EXPORT_SYMBOL(dump_thread); 36EXPORT_SYMBOL(dump_thread);
35EXPORT_SYMBOL(enable_irq);
36EXPORT_SYMBOL(disable_irq);
37EXPORT_SYMBOL(kernel_thread); 37EXPORT_SYMBOL(kernel_thread);
38EXPORT_SYMBOL(get_cmos_time); 38EXPORT_SYMBOL(get_cmos_time);
39EXPORT_SYMBOL(loops_per_usec); 39EXPORT_SYMBOL(loops_per_usec);
@@ -57,7 +57,9 @@ EXPORT_SYMBOL(__Udiv);
57EXPORT_SYMBOL(__Umod); 57EXPORT_SYMBOL(__Umod);
58EXPORT_SYMBOL(__Div); 58EXPORT_SYMBOL(__Div);
59EXPORT_SYMBOL(__Mod); 59EXPORT_SYMBOL(__Mod);
60EXPORT_SYMBOL(__ashldi3);
60EXPORT_SYMBOL(__ashrdi3); 61EXPORT_SYMBOL(__ashrdi3);
62EXPORT_SYMBOL(__lshrdi3);
61 63
62/* Memory functions */ 64/* Memory functions */
63EXPORT_SYMBOL(__ioremap); 65EXPORT_SYMBOL(__ioremap);
@@ -69,23 +71,10 @@ EXPORT_SYMBOL(__down);
69EXPORT_SYMBOL(__down_interruptible); 71EXPORT_SYMBOL(__down_interruptible);
70EXPORT_SYMBOL(__down_trylock); 72EXPORT_SYMBOL(__down_trylock);
71 73
72/* Export shadow registers for the CPU I/O pins */
73EXPORT_SYMBOL(genconfig_shadow);
74EXPORT_SYMBOL(port_pa_data_shadow);
75EXPORT_SYMBOL(port_pa_dir_shadow);
76EXPORT_SYMBOL(port_pb_data_shadow);
77EXPORT_SYMBOL(port_pb_dir_shadow);
78EXPORT_SYMBOL(port_pb_config_shadow);
79EXPORT_SYMBOL(port_g_data_shadow);
80
81/* Userspace access functions */ 74/* Userspace access functions */
82EXPORT_SYMBOL(__copy_user_zeroing); 75EXPORT_SYMBOL(__copy_user_zeroing);
83EXPORT_SYMBOL(__copy_user); 76EXPORT_SYMBOL(__copy_user);
84 77
85/* Cache flush functions */
86EXPORT_SYMBOL(flush_etrax_cache);
87EXPORT_SYMBOL(prepare_rx_descriptor);
88
89#undef memcpy 78#undef memcpy
90#undef memset 79#undef memset
91extern void * memset(void *, int, __kernel_size_t); 80extern void * memset(void *, int, __kernel_size_t);
diff --git a/arch/cris/kernel/setup.c b/arch/cris/kernel/setup.c
index 6ec2671078bf..d11206e467ab 100644
--- a/arch/cris/kernel/setup.c
+++ b/arch/cris/kernel/setup.c
@@ -17,6 +17,7 @@
17#include <asm/pgtable.h> 17#include <asm/pgtable.h>
18#include <linux/seq_file.h> 18#include <linux/seq_file.h>
19#include <linux/tty.h> 19#include <linux/tty.h>
20#include <linux/utsname.h>
20 21
21#include <asm/setup.h> 22#include <asm/setup.h>
22 23
@@ -29,7 +30,7 @@ struct screen_info screen_info;
29extern int root_mountflags; 30extern int root_mountflags;
30extern char _etext, _edata, _end; 31extern char _etext, _edata, _end;
31 32
32static char command_line[COMMAND_LINE_SIZE] = { 0, }; 33char cris_command_line[COMMAND_LINE_SIZE] = { 0, };
33 34
34extern const unsigned long text_start, edata; /* set by the linker script */ 35extern const unsigned long text_start, edata; /* set by the linker script */
35extern unsigned long dram_start, dram_end; 36extern unsigned long dram_start, dram_end;
@@ -147,34 +148,35 @@ setup_arch(char **cmdline_p)
147 148
148 paging_init(); 149 paging_init();
149 150
150 /* We don't use a command line yet, so just re-initialize it without 151 *cmdline_p = cris_command_line;
151 saving anything that might be there. */
152
153 *cmdline_p = command_line;
154 152
155#ifdef CONFIG_ETRAX_CMDLINE 153#ifdef CONFIG_ETRAX_CMDLINE
156 strlcpy(command_line, CONFIG_ETRAX_CMDLINE, COMMAND_LINE_SIZE); 154 if (!strcmp(cris_command_line, "")) {
157 command_line[COMMAND_LINE_SIZE - 1] = '\0'; 155 strlcpy(cris_command_line, CONFIG_ETRAX_CMDLINE, COMMAND_LINE_SIZE);
156 cris_command_line[COMMAND_LINE_SIZE - 1] = '\0';
157 }
158#endif
158 159
159 /* Save command line for future references. */ 160 /* Save command line for future references. */
160 memcpy(saved_command_line, command_line, COMMAND_LINE_SIZE); 161 memcpy(saved_command_line, cris_command_line, COMMAND_LINE_SIZE);
161 saved_command_line[COMMAND_LINE_SIZE - 1] = '\0'; 162 saved_command_line[COMMAND_LINE_SIZE - 1] = '\0';
162#endif
163 163
164 /* give credit for the CRIS port */ 164 /* give credit for the CRIS port */
165 show_etrax_copyright(); 165 show_etrax_copyright();
166
167 /* Setup utsname */
168 strcpy(system_utsname.machine, cris_machine_name);
166} 169}
167 170
168static void *c_start(struct seq_file *m, loff_t *pos) 171static void *c_start(struct seq_file *m, loff_t *pos)
169{ 172{
170 /* We only got one CPU... */ 173 return *pos < NR_CPUS ? (void *)(int)(*pos + 1): NULL;
171 return *pos < 1 ? (void *)1 : NULL;
172} 174}
173 175
174static void *c_next(struct seq_file *m, void *v, loff_t *pos) 176static void *c_next(struct seq_file *m, void *v, loff_t *pos)
175{ 177{
176 ++*pos; 178 ++*pos;
177 return NULL; 179 return c_start(m, pos);
178} 180}
179 181
180static void c_stop(struct seq_file *m, void *v) 182static void c_stop(struct seq_file *m, void *v)