23 #include <linux/string.h>
24 #include <linux/kernel.h>
26 #include <asm/bootinfo.h>
29 #include <asm/cacheflush.h>
30 #include <asm/smp-ops.h>
31 #include <asm/traps.h>
48 #define prom_envp(index) ((char *)(long)_prom_envp[(index)])
52 static int mips_revision_corid;
87 static inline unsigned char str2hexnum(
unsigned char c)
89 if (c >=
'0' && c <=
'9')
91 if (c >=
'a' && c <=
'f')
96 static inline void str2eaddr(
unsigned char *
ea,
unsigned char *
str)
100 for (i = 0; i < 6; i++) {
103 if((*str ==
'.') || (*str ==
':'))
117 printk(
"ethaddr not set in boot prom\n");
124 printk(
"get_ethernet_addr: ");
126 printk(
"%02x:", (
unsigned char)*(ethernet_addr+i));
127 printk(
"%02x\n", *(ethernet_addr+i));
133 #ifdef CONFIG_SERIAL_8250_CONSOLE
134 static void __init console_config(
void)
136 char console_string[40];
144 while (*s >=
'0' && *s <=
'9')
145 baud = baud*10 + *s++ -
'0';
147 if (*s) parity = *s++;
151 if (*s ==
'h') flow =
'r';
155 if (parity !=
'n' && parity !=
'o' && parity !=
'e')
161 sprintf(console_string,
" console=ttyS0,%d%c%c%c", baud, parity,
bits, flow);
163 pr_info(
"Config serial console:%s\n", console_string);
168 static void __init mips_nmi_setup(
void)
176 memcpy(base, &except_vec_nmi, 0x80);
180 static void __init mips_ejtag_setup(
void)
188 memcpy(base, &except_vec_ejtag_debug, 0x80);
220 switch (mips_revision_corid) {
262 #ifdef CONFIG_CPU_LITTLE_ENDIAN
271 if ((start & map) != 0) {
293 #ifdef CONFIG_CPU_LITTLE_ENDIAN
316 #ifdef CONFIG_CPU_LITTLE_ENDIAN
330 MSC01_PCI_CFG_MAXRTRY_MSK)
331 data = (data & ~(MSC01_PCI_CFG_MAXRTRY_MSK <<
333 ((MSC01_PCI_CFG_MAXRTRY_MSK - 1) <<
346 goto mips_pci_controller;
358 #ifdef CONFIG_SERIAL_8250_CONSOLE
363 if (!register_cmp_smp_ops())
366 if (!register_vsmp_smp_ops())
369 #ifdef CONFIG_MIPS_MT_SMTC