/*1* prom.c:2*3* Copyright 2008 NXP Semiconductors4* Chris Steel <[email protected]>5* Daniel Laird <[email protected]>6*7* Based on software written by:8* Nikita Youshchenko <[email protected]>, based on PNX8550 code.9*10* This program is free software; you can redistribute it and/or modify11* it under the terms of the GNU General Public License as published by12* the Free Software Foundation; either version 2 of the License, or13* (at your option) any later version.14*15* This program is distributed in the hope that it will be useful,16* but WITHOUT ANY WARRANTY; without even the implied warranty of17* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the18* GNU General Public License for more details.19*20* You should have received a copy of the GNU General Public License21* along with this program; if not, write to the Free Software22* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.23*/24#include <linux/init.h>25#include <asm/bootinfo.h>26#include <linux/string.h>2728void __init prom_init_cmdline(void)29{30int argc = fw_arg0;31char **argv = (char **)fw_arg1;32char *c = &(arcs_cmdline[0]);33int i;3435for (i = 1; i < argc; i++) {36strcpy(c, argv[i]);37c += strlen(argv[i]);38if (i < argc-1)39*c++ = ' ';40}41*c = 0;42}4344char __init *prom_getenv(char *envname)45{46extern char **prom_envp;47char **env = prom_envp;48int i;4950i = strlen(envname);5152while (*env) {53if (strncmp(envname, *env, i) == 0 && *(*env+i) == '=')54return *env + i + 1;55env++;56}5758return 0;59}6061void __init prom_free_prom_memory(void)62{63}646566