1 --- a/arch/mips/bcm47xx/nvram.c
2 +++ b/arch/mips/bcm47xx/nvram.c
3 @@ -92,3 +92,30 @@ int nvram_getenv(char *name, char *val,
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 @@ -238,3 +238,20 @@ void __init plat_mem_setup(void)
37 _machine_halt = bcm47xx_machine_halt;
38 pm_power_off = bcm47xx_machine_halt;
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);