powerpc/nvram: Enable use Generic NVRAM driver for different size chips
Remove the reliance on a staticly defined NVRAM size, allowing platforms to support NVRAMs with sizes differing from the standard. A fall back value is provided for platforms not supporting this extension. Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:

committed by
Benjamin Herrenschmidt

parent
1d6ed32226
commit
d331d8305c
@@ -210,6 +210,14 @@ void nvram_write_byte(unsigned char val, int addr)
|
||||
}
|
||||
EXPORT_SYMBOL(nvram_write_byte);
|
||||
|
||||
ssize_t nvram_get_size(void)
|
||||
{
|
||||
if (ppc_md.nvram_size)
|
||||
return ppc_md.nvram_size();
|
||||
return -1;
|
||||
}
|
||||
EXPORT_SYMBOL(nvram_get_size);
|
||||
|
||||
void nvram_sync(void)
|
||||
{
|
||||
if (ppc_md.nvram_sync)
|
||||
|
Reference in New Issue
Block a user