4 * Generic PROM routines
6 * Copyright (C) 2007 OpenWrt.org
7 * Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org>
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License version 2 as published
11 * by the Free Software Foundation.
15 #include <linux/kernel.h>
16 #include <linux/init.h>
17 #include <linux/string.h>
19 #include <asm/bootinfo.h>
21 #include <prom/generic.h>
23 static int *_prom_argc;
24 static char **_prom_argv;
25 static char **_prom_envp;
27 char *generic_prom_getenv(char *envname)
33 for (env = _prom_envp; *env != NULL; env++) {
34 if (strcmp(envname, *env++) == 0) {
43 int generic_prom_present(void)
45 _prom_argc = (int *)fw_arg0;
46 _prom_argv = (char **)fw_arg1;
47 _prom_envp = (char **)fw_arg2;