/*1* Copyright (C) NEC Electronics Corporation 2004-20062*3* This file is based on the arch/mips/ddb5xxx/common/prom.c4*5* Copyright 2001 MontaVista Software Inc.6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License as published by9* the Free Software Foundation; either version 2 of the License, or10* (at your option) any later version.11*12* This program is distributed in the hope that it will be useful,13* but WITHOUT ANY WARRANTY; without even the implied warranty of14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15* GNU General Public License for more details.16*17* You should have received a copy of the GNU General Public License18* along with this program; if not, write to the Free Software19* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA20*/21#include <linux/init.h>22#include <linux/mm.h>23#include <linux/sched.h>24#include <linux/bootmem.h>2526#include <asm/addrspace.h>27#include <asm/bootinfo.h>28#include <asm/emma/emma2rh.h>2930const char *get_system_type(void)31{32#ifdef CONFIG_NEC_MARKEINS33return "NEC EMMA2RH Mark-eins";34#else35#error Unknown NEC board36#endif37}3839/* [[email protected]] PMON passes arguments in C main() style */40void __init prom_init(void)41{42int argc = fw_arg0;43char **arg = (char **)fw_arg1;44int i;4546/* if user passes kernel args, ignore the default one */47if (argc > 1)48arcs_cmdline[0] = '\0';4950/* arg[0] is "g", the rest is boot parameters */51for (i = 1; i < argc; i++) {52if (strlen(arcs_cmdline) + strlen(arg[i] + 1)53>= sizeof(arcs_cmdline))54break;55strcat(arcs_cmdline, arg[i]);56strcat(arcs_cmdline, " ");57}5859#ifdef CONFIG_NEC_MARKEINS60add_memory_region(0, EMMA2RH_RAM_SIZE, BOOT_MEM_RAM);61#else62#error Unknown NEC board63#endif64}6566void __init prom_free_prom_memory(void)67{68}697071