21 #include <linux/kernel.h>
24 #include <linux/module.h>
25 #include <linux/string.h>
27 #include <asm/bootinfo.h>
45 for (i = 0; (i <
MAX_ENTRY) && adam2_env[i].name; i++)
46 if (!
strcmp(name, adam2_env[i].name))
47 return adam2_env[i].
value;
53 static void __init ar7_init_cmdline(
int argc,
char *argv[])
57 for (i = 1; i <
argc; i++) {
72 static const char psp_env_version[]
__initconst =
"TIENV0.8";
88 { 1,
"cpufrequency" },
95 { 28,
"sysfrequency" },
96 { 38,
"mipsfrequency" },
125 #define PSP_ENV_SIZE 4096
134 if (psp_var_map[i].num == num)
135 return psp_var_map[
i].
value;
145 if (!adam2_env[i].name) {
146 adam2_env[
i].name =
name;
147 adam2_env[
i].value =
value;
149 }
else if (!
strcmp(adam2_env[i].name, name)) {
150 adam2_env[
i].value =
value;
156 static int __init parse_psp_env(
void *psp_env_base)
167 if ((chunks[i].num == 0xff) || ((i + chunks[i].
len) > n))
169 value = chunks[
i].
data;
171 name = lookup_psp_var_map(chunks[i].num);
174 value +=
strlen(name) + 1;
177 add_adam2_var(name, value);
189 if (
strcmp(psp_env, psp_env_version) == 0) {
190 parse_psp_env(psp_env);
198 static void __init console_config(
void)
200 #ifdef CONFIG_SERIAL_8250_CONSOLE
201 char console_string[40];
229 if (parity !=
'n' && parity !=
'o' && parity !=
'e')
235 sprintf(console_string,
" console=ttyS0,%d%c%c%c", baud,
238 sprintf(console_string,
" console=ttyS0,%d%c%c", baud, parity,
253 #define PORT(offset) (KSEG1ADDR(AR7_REGS_UART0 + (offset * 4)))
254 static inline unsigned int serial_in(
int offset)
259 static inline void serial_out(
int offset,
int value)