Comments

I have been looking for a way to access the nvram on our board and expose it
to userspace. The board has a 128kB nvram, the mmio_nvram driver seemed to be
a capable of mapping this device.
generic_nvram seemed initially to be the correct way of exposing the driver
to userspace, however it was hard-coded to assume an nvram of 8kB. The
mmio_nvram driver also didn't provide the functions expected by
generic_nvram.
The patch below extends generic_nvram and mmio_nvram. I realise this is
really not ready yet (I dread to think how this patch could break other's
builds), however I am interested in knowing if this is the correct approach
to take or whether I am missing a much more suitable one.
Martyn
---
arch/powerpc/boot/dts/gef_sbc610.dts | 6 +++++
arch/powerpc/configs/86xx/gef_sbc610_defconfig | 4 ++-
arch/powerpc/include/asm/nvram.h | 3 ++
arch/powerpc/kernel/setup_32.c | 8 ++++++
arch/powerpc/platforms/86xx/Kconfig | 1 +
arch/powerpc/platforms/86xx/gef_sbc610.c | 5 ++++
arch/powerpc/sysdev/mmio_nvram.c | 32 ++++++++++++++++++++++++
drivers/char/generic_nvram.c | 24 ++++++++++++++----
8 files changed, 75 insertions(+), 8 deletions(-)