1 --- a/arch/mips/bcm47xx/nvram.c
2 +++ b/arch/mips/bcm47xx/nvram.c
3 @@ -199,3 +199,30 @@ int nvram_getenv(char *name, char *val,
4 return NVRAM_ERR_ENVNOTFOUND;
6 EXPORT_SYMBOL(nvram_getenv);
8 +char *nvram_get(const char *name)
10 + char *var, *value, *end, *eq;
18 + /* Look for name=value and return value */
19 + var = &nvram_buf[sizeof(struct nvram_header)];
20 + end = nvram_buf + sizeof(nvram_buf) - 2;
21 + end[0] = end[1] = '\0';
22 + for (; *var; var = value + strlen(value) + 1) {
23 + eq = strchr(var, '=');
27 + if ((eq - var) == strlen(name) && strncmp(var, name, (eq - var)) == 0)
33 +EXPORT_SYMBOL(nvram_get);
34 --- a/arch/mips/bcm47xx/setup.c
35 +++ b/arch/mips/bcm47xx/setup.c
36 @@ -468,3 +468,20 @@ static int __init bcm47xx_register_flash
39 fs_initcall(bcm47xx_register_flash);
41 +static int __init bcm47xx_register_gpiodev(void)
43 + static struct resource res = {
44 + .start = 0xFFFFFFFF,
46 + struct platform_device *pdev;
48 + pdev = platform_device_register_simple("GPIODEV", 0, &res, 1);
50 + printk(KERN_ERR "bcm47xx: GPIODEV init failed\n");
56 +device_initcall(bcm47xx_register_gpiodev);