linux/arch/mips/include/asm
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
..
dec MIPS: Make various locks static. 2010-02-27 12:53:30 +01:00
emma MIPS: Eleminate filenames from comments 2009-08-03 17:52:40 +01:00
fw
ip32
lasat MIPS: Lasat: Fix compilation 2009-09-17 20:07:42 +02:00
mach-ar7 MIPS: AR7, BCM63xx: fix gpio_to_irq() return value 2010-07-05 17:17:26 +01:00
mach-au1x00 MIPS: Alchemy: sleepcode without compile-time cputype dependencies 2010-07-05 17:17:30 +01:00
mach-bcm47xx MIPS: BCM47xx: Add NVRAM support devices 2010-07-05 17:17:32 +01:00
mach-bcm63xx MIPS: AR7, BCM63xx: fix gpio_to_irq() return value 2010-07-05 17:17:26 +01:00
mach-cavium-octeon MIPS: Enable Read Inhibit/eXecute Inhibit for Octeon+ CPUs 2010-02-27 12:53:26 +01:00
mach-cobalt Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
mach-db1x00 MIPS: Alchemy: Extended DB1200 board support. 2010-02-27 12:53:00 +01:00
mach-dec
mach-emma2rh
mach-generic MIPS: Pass struct device to plat_dma_addr_to_phys() 2009-06-17 11:06:24 +01:00
mach-ip22
mach-ip27 MIPS: cpumask_of_node() should handle -1 as a node 2010-01-12 18:19:37 +01:00
mach-ip28
mach-ip32 MIPS: Pass struct device to plat_dma_addr_to_phys() 2009-06-17 11:06:24 +01:00
mach-jazz MIPS: Pass struct device to plat_dma_addr_to_phys() 2009-06-17 11:06:24 +01:00
mach-lasat
mach-loongson MIPS: Loongson 2F: Add gpio/gpioilb support 2010-05-21 21:31:16 +01:00
mach-malta MIPS: Malta: Remove pointless use use of CONFIG_CPU_HAS_LLSC 2009-09-17 20:07:49 +02:00
mach-mipssim
mach-pb1x00 MIPS: Alchemy: devboards: wire up new PCMCIA driver. 2010-02-27 12:52:51 +01:00
mach-pnx833x MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
mach-pnx8550
mach-powertv MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
mach-rc32434 MIPS: RB532: Cleanup cpu-features-overrides 2009-06-17 11:06:26 +01:00
mach-rm
mach-sibyte MIPS: Sibyte: Apply M3 workaround only on affected chip types and versions. 2010-04-12 17:26:19 +01:00
mach-tx39xx
mach-tx49xx
mach-vr41xx
mach-wrppmc
mach-yosemite
mips-boards MIPS: Bonito64: Make Loongson independent from Bonito64 code. 2009-12-17 01:57:06 +00:00
octeon MIPS: Cleanup switches with cases that can be merged 2010-02-27 12:53:14 +01:00
pci
pmc-sierra/msp71xx MIPS: msp71xx: remove unused prom_getcmdline() 2010-02-27 12:53:15 +01:00
sgi tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
sibyte MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
sn MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
txx9 MIPS: TXx9: Remove forced serial console setting 2010-02-27 12:53:22 +01:00
vr41xx Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
xtalk
abi.h MIPS: Move signal trampolines off of the stack. 2010-04-12 17:26:15 +01:00
addrspace.h
amon.h MIPS: CMP: activate CMP support 2009-07-03 15:45:26 +01:00
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
asm.h
asmmacro-32.h
asmmacro-64.h
asmmacro.h
atomic.h atomic_t: Cast to volatile when accessing atomic variables 2010-05-17 07:57:27 -07:00
auxvec.h
barrier.h MIPS: Optimize spinlocks. 2010-02-27 12:53:42 +01:00
bcache.h
bitops.h MIPS: New macro smp_mb__before_llsc. 2010-02-27 12:53:06 +01:00
bitsperlong.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
bootinfo.h MIPS: Lemote 2F: Add Lynloong support 2009-12-17 01:57:18 +00:00
branch.h
break.h
bug.h MIPS: Convert BUG() to use unreachable() 2009-12-05 09:10:12 -08:00
bugs.h MIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users. 2009-06-24 18:34:39 +01:00
byteorder.h
cache.h
cachectl.h
cacheflush.h block: add helpers to run flush_dcache_page() against a bio and a request's pages 2009-11-26 09:16:19 +01:00
cacheops.h
cevt-r4k.h
checksum.h
clock.h MIPS: Loongson 2F: Add CPU frequency scaling support 2009-12-17 01:57:20 +00:00
cmp.h
cmpxchg.h MIPS: cmpxchg.h: Fix excessive indentation. 2010-04-30 20:52:41 +01:00
compat-signal.h
compat.h improve sys_newuname() for compat architectures 2010-03-12 15:52:32 -08:00
compiler.h
cop2.h MIPS: Modularize COP2 handling 2009-12-17 01:57:30 +00:00
cpu-features.h MIPS: Implement Read Inhibit/eXecute Inhibit 2010-02-27 12:53:26 +01:00
cpu-info.h MIPS: 64-bit: Detect virtual memory size 2010-02-02 19:56:23 +01:00
cpu.h MIPS: Give Octeon+ CPUs their own cputype. 2010-02-27 12:53:26 +01:00
cputime.h
current.h MIPS: Use generic current.h 2010-02-27 12:53:27 +01:00
debug.h
delay.h MIPS: Fix potencial build error in <asm/delay.h> 2009-09-17 20:07:41 +02:00
device.h MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
div64.h
dma-mapping.h MIPS: Add DMA declare coherent memory support 2009-11-13 18:10:37 +01:00
dma.h
ds1287.h Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
dsp.h
edac.h
elf.h MIPS: Preliminary VDSO 2010-04-12 17:26:14 +01:00
emergency-restart.h
errno.h
fb.h
fcntl.h fix up O_SYNC comments 2009-12-17 11:03:24 -05:00
fixmap.h MIPS: Fix machine check exception in kmap_coherent() 2009-11-02 12:00:04 +01:00
floppy.h
fpregdef.h
fpu_emulator.h MIPS: Fix build breakage if CONFIG_DEBUG_FS is enabled. 2010-04-12 17:26:08 +01:00
fpu.h MIPS: Cleanup signal code initialization 2009-12-17 01:57:32 +00:00
ftrace.h MIPS: Loongson: Change the Email address of Wu Zhangjin 2010-02-27 12:53:12 +01:00
futex.h
gcmpregs.h MIPS: GIC: Random fixes and enhancements. 2009-11-02 12:00:06 +01:00
gic.h MIPS: GIC: Random fixes and enhancements. 2009-11-02 12:00:06 +01:00
gpio.h
gt64120.h
hardirq.h MIPS: Convert to asm-generic/hardirq.h 2009-09-17 20:07:48 +02:00
hazards.h
highmem.h
hugetlb.h MIPS: Add support files for hugetlbfs. 2009-06-17 11:06:30 +01:00
hw_irq.h
i8253.h i8253: Convert i8253_lock to raw_spinlock 2010-03-02 10:28:38 +01:00
i8259.h MIPS: i8259: Convert IRQ controller lock to raw spinlock. 2010-02-27 12:53:38 +01:00
ide.h
inst.h
io.h MIPS: add readl/write_be accessors 2010-02-27 12:53:12 +01:00
ioctl.h MIPS: ioctl.h: Cleanup. 2009-06-17 11:06:28 +01:00
ioctls.h
ipcbuf.h
irq_cpu.h
irq_gt641xx.h Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
irq_regs.h
irq.h MIPS: PowerTV: Fix support for timer interrupts with > 64 external IRQs 2010-01-28 00:03:31 +01:00
irqflags.h
isadep.h
jazz.h
jazzdma.h
Kbuild
kdebug.h
kexec.h
kgdb.h mips,kgdb: kdb low level trap catch and stack trace 2010-05-20 21:04:26 -05:00
kmap_types.h kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
kspd.h
linkage.h
local.h local_t: Remove cpu_local_xx macros 2010-01-05 15:34:49 +09:00
m48t37.h
mc146818-time.h
mc146818rtc.h
mips_mt.h
mipsmtregs.h
mipsprom.h
mipsregs.h MIPS FPU emulator: allow Cause bits of FCSR to be writeable by ctc1 2010-05-15 21:59:53 +01:00
mman.h MIPS: Add missing definition for MADV_HWPOISON. 2009-12-01 16:21:25 +00:00
mmu_context.h MIPS: Preliminary VDSO 2010-04-12 17:26:14 +01:00
mmu.h MIPS: Preliminary VDSO 2010-04-12 17:26:14 +01:00
mmzone.h
module.h
msc01_ic.h MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
msgbuf.h
mutex.h
nile4.h MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
paccess.h
page.h MIPS: make CAC_ADDR and UNCAC_ADDR account for PHYS_OFFSET 2010-04-12 17:26:13 +01:00
param.h MIPS: Simplify param.h by using <asm-generic/param.h> 2010-02-27 12:53:04 +01:00
parport.h MIPS: Use generic parport.h 2010-02-27 12:53:27 +01:00
pci.h pci-dma: add linux/pci-dma.h to linux/pci.h 2010-03-12 15:52:42 -08:00
percpu.h
pgalloc.h MIPS: Two-level pagetables for 64-bit kernels with 64KB pages. 2010-02-27 12:53:03 +01:00
pgtable-32.h MIPS: Implement Read Inhibit/eXecute Inhibit 2010-02-27 12:53:26 +01:00
pgtable-64.h MIPS: Don't vmap things at address zero. 2010-04-30 20:52:41 +01:00
pgtable-bits.h MIPS: Implement Read Inhibit/eXecute Inhibit 2010-02-27 12:53:26 +01:00
pgtable.h Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2010-03-01 09:15:15 -08:00
pmon.h
poll.h
posix_types.h
prefetch.h
processor.h MIPS: Use GCC __builtin_prefetch() to implement prefetch(). 2010-05-21 21:31:23 +01:00
ptrace.h MIPS: die() does not call die notifier chain 2010-04-30 20:52:45 +01:00
r4k-timer.h
r4kcache.h MIPS: Support 64-byte D-cache line size 2009-06-17 11:06:24 +01:00
reboot.h
reg.h MIPS: 64-bit: Fix o32 core dump 2009-07-03 15:45:27 +01:00
regdef.h
resource.h
rm9k-ocd.h
rtlx.h
scatterlist.h mips: use use asm-generic/scatterlist.h 2010-05-27 09:12:55 -07:00
seccomp.h
sections.h
segment.h
sembuf.h
serial.h MIPS: Use generic serial.h 2010-02-27 12:53:27 +01:00
setup.h MIPS: Extend COMMAND_LINE_SIZE 2009-11-02 12:00:01 +01:00
sgialib.h MIPS: ARC: Cleanup unused definitions from sgialib.h 2010-02-27 12:53:45 +01:00
sgiarcs.h
sgidefs.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h asm-generic: rename termios.h, signal.h and mman.h 2009-06-11 21:01:52 +02:00
sim.h
smp-ops.h cpumask: arch_send_call_function_ipi_mask: mips 2009-09-24 09:34:45 +09:30
smp.h MIPS: SMP: Inline arch_send_call_function_{single_ipi,ipi_mask} 2009-09-30 21:47:00 +02:00
smtc_ipi.h MIPS: SMTC: Avoid queing multiple reschedule IPIs 2009-11-02 12:00:06 +01:00
smtc_proc.h
smtc.h
smvp.h
sni.h
socket.h net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
sockios.h
sparsemem.h MIPS: Nuke trailing blank lines 2010-02-27 12:53:14 +01:00
spinlock_types.h MIPS: Optimize spinlocks. 2010-02-27 12:53:42 +01:00
spinlock.h MIPS: Optimize spinlocks. 2010-02-27 12:53:42 +01:00
spram.h MIPS: SPRAM: Clean up support code a little 2009-11-02 12:00:05 +01:00
stackframe.h MIPS: Loongson-2F: Use CONFIG_CPU_JUMP_WORKAROUNDS to control workarounds. 2010-04-30 20:52:58 +01:00
stacktrace.h
stat.h
statfs.h
string.h
suspend.h MIPS: Add hibernation support 2009-06-17 11:06:31 +01:00
swab.h MIPS: Define __arch_swab64 for all mips r2 cpus 2009-07-03 15:45:25 +01:00
sysmips.h
system.h MIPS: New macro smp_mb__before_llsc. 2010-02-27 12:53:06 +01:00
termbits.h
termios.h
thread_info.h add descriptive comment for TIF_MEMDIE task flag declaration. 2010-05-14 11:13:27 +02:00
time.h mips: Use generic mult/shift factor calculation for clocks 2009-11-13 20:46:24 +01:00
timex.h
titan_dep.h
tlb.h
tlbdebug.h
tlbflush.h
topology.h
traps.h
txx9irq.h
txx9pio.h
txx9tmr.h
types.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
uaccess.h
uasm.h MIPS: Add uasm_i_dsrl_safe() and uasm_i_dsll_safe() to uasm. 2010-04-30 20:52:45 +01:00
ucontext.h MIPS: Use generic ucontext.h 2010-02-27 12:53:27 +01:00
unaligned.h MIPS: Avoid spurious make includecheck message 2009-09-30 21:47:02 +02:00
unistd.h Add generic sys_olduname() 2010-03-12 15:52:32 -08:00
user.h
vdso.h MIPS: Preliminary VDSO 2010-04-12 17:26:14 +01:00
vga.h
vpe.h
war.h
watch.h
wbflush.h
xor.h