linux/arch/mips
Waldemar Brodkorb 121915c4ee MIPS: BCM47xx: Add NVRAM support devices
When trying to netboot a Linksys WRT54GS WLAN router, the bootup fails,
because of following error message:

...
[    0.424000] b44: b44.c:v2.0
[    0.424000] b44: Invalid MAC address found in EEPROM
[    0.432000] b44 ssb0:1: Problem fetching invariants of chip,aborting
[    0.436000] b44: probe of ssb0:1 failed with error -22
...

The router uses a CFE bootloader, but most of the needed environment
variables for network card initialization, are not available from CFE
via printenv and even though not via cfe_getenv().
The required environment variables are saved in a special partition
in flash memory. The attached patch implement nvram_getenv and enables
bootup via NFS root on my router.

Most of the patch is extracted from the OpenWrt subversion repository and
stripped down and cleaned up to just fix this issue.

[Ralf: sorted out header file inclusions.  Lots of unneded headers and such
that should have been included.]

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Reviewed-by: Phil Sutter <phil@nwl.cc>
To: linux-mips@linux-mips.org
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Patchwork: http://patchwork.linux-mips.org/patch/1359/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-07-05 17:17:32 +01:00
..
alchemy MIPS: Alchemy: sleepcode without compile-time cputype dependencies 2010-07-05 17:17:30 +01:00
ar7 MIPS: AR7: Use correct UART port type 2010-07-05 17:17:17 +01:00
bcm47xx MIPS: BCM47xx: Add NVRAM support devices 2010-07-05 17:17:32 +01:00
bcm63xx MIPS: BCM63xx: Avoid namespace clash on GPIO_DIR_{IN,OUT} 2010-05-21 21:31:22 +01:00
boot MIPS: Make the debugging of compressed kernel configurable 2010-02-27 12:53:24 +01:00
cavium-octeon MIPS: Octeon: Serial port fixes for OCTEON simulator. 2010-05-21 21:31:23 +01:00
cobalt MIPS: Cobalt: Fix theoretical port aliasing issue 2010-02-27 12:53:43 +01:00
configs MIPS: MTX-1: Update defconfig 2010-05-21 21:31:21 +01:00
dec MIPS: DEC: Convert KN01 lock to raw spinlock. 2010-02-27 12:53:36 +01:00
emma MIPS: Remove useless zero initializations. 2009-09-17 20:07:51 +02:00
fw MIPS: IP22: Remove an unused function 2009-12-17 01:56:56 +00:00
gt64120/wrppmc Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
include/asm MIPS: BCM47xx: Add NVRAM support devices 2010-07-05 17:17:32 +01:00
jazz MIPS: Fixup screen_info struct initializations 2010-04-30 20:52:42 +01:00
kernel MIPS: MT: Fix FPU affinity. 2010-07-05 17:17:32 +01:00
lasat Merge branch 'for-35' of git://repo.or.cz/linux-kbuild 2010-06-01 08:55:52 -07:00
lib MIPS: libgcc.h: Checkpatch cleanup 2010-04-12 17:26:15 +01:00
loongson MIPS: Loongson: Define rtc device on MC146818-equipped systems 2010-07-05 17:17:32 +01:00
math-emu MIPS: Restore signalling NaN behaviour for abs.[sd] 2010-07-05 17:17:24 +01:00
mipssim include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
mm MIPS: Check for accesses beyond the end of the PGD. 2010-04-30 20:52:48 +01:00
mti-malta include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nxp MIPS: PNX8550: Fix build error, broken by: 2010-04-30 20:52:39 +01:00
oprofile MIPS: Oprofile: Fixup of loongson2_exit() 2010-07-05 17:17:31 +01:00
pci MIPS: SB1250: Include correct header and fix a warning 2010-04-30 20:52:43 +01:00
pmc-sierra include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
power MIPS: Loongson: Change the Email address of Wu Zhangjin 2010-02-27 12:53:12 +01:00
powertv MIPS: Clean up tables for bootmem allocation 2010-05-21 21:31:17 +01:00
rb532 include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sgi-ip22 MIPS: die() does not call die notifier chain 2010-04-30 20:52:45 +01:00
sgi-ip27 include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sgi-ip32 include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sibyte Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2010-05-20 21:04:44 -07:00
sni MIPS: SNI: Convert sni_rm200_i8259A_lock to raw spinlock. 2010-02-27 12:53:39 +01:00
txx9 sysfs: add struct file* to bin_attr callbacks 2010-05-21 09:37:31 -07:00
vr41xx MIPS: VR41xx: Use strlcat() for the command line arguments 2010-01-12 18:19:30 +01:00
Kconfig MIPS: Loongson 2F: Add gpio/gpioilb support 2010-05-21 21:31:16 +01:00
Kconfig.debug MIPS: Crazy spinlock speed test. 2010-02-27 12:53:42 +01:00
Makefile MIPS: Loongson 2F: Enable fixups of the latest binutils 2010-04-30 20:52:56 +01:00