~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/mips/pnx833x/common/prom.c

Version: ~ [ linux-5.11 ] ~ [ linux-5.10.17 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.99 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.176 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.221 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.257 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.257 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  *  prom.c:
  3  *
  4  *  Copyright 2008 NXP Semiconductors
  5  *        Chris Steel <chris.steel@nxp.com>
  6  *    Daniel Laird <daniel.j.laird@nxp.com>
  7  *
  8  *  Based on software written by:
  9  *      Nikita Youshchenko <yoush@debian.org>, based on PNX8550 code.
 10  *
 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.
 15  *
 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.
 20  *
 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., 675 Mass Ave, Cambridge, MA 02139, USA.
 24  */
 25 #include <linux/init.h>
 26 #include <asm/bootinfo.h>
 27 #include <linux/string.h>
 28 
 29 void __init prom_init_cmdline(void)
 30 {
 31         int argc = fw_arg0;
 32         char **argv = (char **)fw_arg1;
 33         char *c = &(arcs_cmdline[0]);
 34         int i;
 35 
 36         for (i = 1; i < argc; i++) {
 37                 strcpy(c, argv[i]);
 38                 c += strlen(argv[i]);
 39                 if (i < argc-1)
 40                         *c++ = ' ';
 41         }
 42         *c = 0;
 43 }
 44 
 45 char __init *prom_getenv(char *envname)
 46 {
 47         extern char **prom_envp;
 48         char **env = prom_envp;
 49         int i;
 50 
 51         i = strlen(envname);
 52 
 53         while (*env) {
 54                 if (strncmp(envname, *env, i) == 0 && *(*env+i) == '=')
 55                         return *env + i + 1;
 56                 env++;
 57         }
 58 
 59         return 0;
 60 }
 61 
 62 void __init prom_free_prom_memory(void)
 63 {
 64 }
 65 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp