]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: BCM47xx: Add NVRAM support devices
authorWaldemar Brodkorb <mips@waldemar-brodkorb.de>
Tue, 8 Jun 2010 17:06:01 +0000 (19:06 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 5 Jul 2010 16:17:32 +0000 (17:17 +0100)
commitc94c9cdb2f22bdd699405221061b4239085b7721
tree76c12b34f0b97fbdc2ba627b6cc58327847a90d8
parent2de857d4621db8b1aa6b845ce2aab61669ab6e29
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>
arch/mips/bcm47xx/Makefile
arch/mips/bcm47xx/nvram.c [new file with mode: 0644]
arch/mips/bcm47xx/setup.c
arch/mips/include/asm/mach-bcm47xx/nvram.h [new file with mode: 0644]