void __init plat_mem_setup(void) { if (fw_arg0 != -2) panic("device tree not present"); if (fw_arg1 >= CKSEG0) __dt_setup_arch((void *)fw_arg1); else __dt_setup_arch(phys_to_virt(fw_arg1)); strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE); plat_setup_iocoherency(); }
void __init rt2880_setup(void) { #ifdef CONFIG_KGDB int rs_putDebugChar(char); char rs_getDebugChar(void); int saa9730_putDebugChar(char); char saa9730_getDebugChar(void); extern int (*generic_putDebugChar)(char); extern char (*generic_getDebugChar)(void); #endif char *argptr; iomem_resource.start = 0; iomem_resource.end= ~0; ioport_resource.start= 0; ioport_resource.end = ~0; #ifdef CONFIG_SERIAL_CONSOLE argptr = prom_getcmdline(); if ((argptr = strstr(argptr, "console=ttyS")) == NULL) { int i = 0; char *s = prom_getenv("modetty0"); while(s[i] >= '0' && s[i] <= '9') i++; strcpy(serial_console, "ttyS0,"); strncpy(serial_console + 6, s, i); prom_printf("Config serial console: %s\n", serial_console); console_setup(serial_console, NULL); } #endif #ifdef CONFIG_KGDB argptr = prom_getcmdline(); if ((argptr = strstr(argptr, "kgdb=ttyS")) != NULL) { int line; argptr += strlen("kgdb=ttyS"); if (*argptr != '0' && *argptr != '1') printk("KGDB: Uknown serial line /dev/ttyS%c, " "falling back to /dev/ttyS1\n", *argptr); line = *argptr == '0' ? 0 : 1; printk("KGDB: Using serial line /dev/ttyS%d for session\n", line ? 1 : 0); if(line == 0) { rs_kgdb_hook(line); generic_putDebugChar = rs_putDebugChar; generic_getDebugChar = rs_getDebugChar; } else { saa9730_kgdb_hook(); generic_putDebugChar = saa9730_putDebugChar; generic_getDebugChar = saa9730_getDebugChar; } prom_printf("KGDB: Using serial line /dev/ttyS%d for session, " "please connect your debugger\n", line ? 1 : 0); remote_debug = 1; /* Breakpoints and stuff are in surfboard_irq_setup() */ } #endif argptr = prom_getcmdline(); if ((argptr = strstr(argptr, "nofpu")) != NULL) cpu_data[0].options &= ~MIPS_CPU_FPU; //rtc_ops = &no_rtc_ops; //board_time_init = mips_time_init; //board_timer_setup = mips_timer_setup; plat_setup_iocoherency(); mips_reboot_setup(); set_reset_flag(); }