[MIPS] ARC: Get rid of mips_machgroup
[linux-2.6/sactl.git] / arch / mips / emma2rh / common / prom.c
blob0f791eb6bb66c64a3acc37d279a3b2d0cab5d77a
1 /*
2 * arch/mips/emma2rh/common/prom.c
3 * This file is prom file.
5 * Copyright (C) NEC Electronics Corporation 2004-2006
7 * This file is based on the arch/mips/ddb5xxx/common/prom.c
9 * Copyright 2001 MontaVista Software Inc.
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include <linux/init.h>
26 #include <linux/mm.h>
27 #include <linux/sched.h>
28 #include <linux/bootmem.h>
30 #include <asm/addrspace.h>
31 #include <asm/bootinfo.h>
32 #include <asm/emma2rh/emma2rh.h>
33 #include <asm/debug.h>
35 const char *get_system_type(void)
37 switch (mips_machtype) {
38 case MACH_NEC_MARKEINS:
39 return "NEC EMMA2RH Mark-eins";
40 default:
41 return "Unknown NEC board";
45 /* [jsun@junsun.net] PMON passes arguments in C main() style */
46 void __init prom_init(void)
48 int argc = fw_arg0;
49 char **arg = (char **)fw_arg1;
50 int i;
52 /* if user passes kernel args, ignore the default one */
53 if (argc > 1)
54 arcs_cmdline[0] = '\0';
56 /* arg[0] is "g", the rest is boot parameters */
57 for (i = 1; i < argc; i++) {
58 if (strlen(arcs_cmdline) + strlen(arg[i] + 1)
59 >= sizeof(arcs_cmdline))
60 break;
61 strcat(arcs_cmdline, arg[i]);
62 strcat(arcs_cmdline, " ");
65 #if defined(CONFIG_MARKEINS)
66 mips_machtype = MACH_NEC_MARKEINS;
67 add_memory_region(0, EMMA2RH_RAM_SIZE, BOOT_MEM_RAM);
68 #endif
72 void __init prom_free_prom_memory(void)