Commit a156c7ba authored by Finn Thain's avatar Finn Thain Committed by Greg Kroah-Hartman

powerpc: Replace nvram_* extern declarations with standard header

Remove the nvram_read_byte() and nvram_write_byte() declarations in
powerpc/include/asm/nvram.h and use the cross-platform static functions
in linux/nvram.h instead.
Tested-by: default avatarStan Johnson <userm57@yahoo.com>
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a084dbf6
...@@ -98,10 +98,4 @@ extern int nvram_write_os_partition(struct nvram_os_partition *part, ...@@ -98,10 +98,4 @@ extern int nvram_write_os_partition(struct nvram_os_partition *part,
unsigned int err_type, unsigned int err_type,
unsigned int error_log_cnt); unsigned int error_log_cnt);
/* Determine NVRAM size */
extern ssize_t nvram_get_size(void);
/* Normal access to NVRAM */
extern unsigned char nvram_read_byte(int i);
extern void nvram_write_byte(unsigned char c, int i);
#endif /* _ASM_POWERPC_NVRAM_H */ #endif /* _ASM_POWERPC_NVRAM_H */
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/console.h> #include <linux/console.h>
#include <linux/memblock.h> #include <linux/memblock.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/nvram.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h> #include <asm/prom.h>
...@@ -149,30 +150,6 @@ __setup("l3cr=", ppc_setup_l3cr); ...@@ -149,30 +150,6 @@ __setup("l3cr=", ppc_setup_l3cr);
#ifdef CONFIG_GENERIC_NVRAM #ifdef CONFIG_GENERIC_NVRAM
/* Generic nvram hooks used by drivers/char/gen_nvram.c */
unsigned char nvram_read_byte(int addr)
{
if (ppc_md.nvram_read_val)
return ppc_md.nvram_read_val(addr);
return 0xff;
}
EXPORT_SYMBOL(nvram_read_byte);
void nvram_write_byte(unsigned char val, int addr)
{
if (ppc_md.nvram_write_val)
ppc_md.nvram_write_val(addr, val);
}
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) void nvram_sync(void)
{ {
if (ppc_md.nvram_sync) if (ppc_md.nvram_sync)
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/fcntl.h> #include <linux/fcntl.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/nvram.h>
#include <linux/pagemap.h> #include <linux/pagemap.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <asm/nvram.h> #include <asm/nvram.h>
......
...@@ -111,12 +111,12 @@ ...@@ -111,12 +111,12 @@
#include "matroxfb_g450.h" #include "matroxfb_g450.h"
#include <linux/matroxfb.h> #include <linux/matroxfb.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/nvram.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#ifdef CONFIG_PPC_PMAC #ifdef CONFIG_PPC_PMAC
#include <asm/machdep.h> #include <asm/machdep.h>
unsigned char nvram_read_byte(int);
static int default_vmode = VMODE_NVRAM; static int default_vmode = VMODE_NVRAM;
static int default_cmode = CMODE_NVRAM; static int default_cmode = CMODE_NVRAM;
#endif #endif
......
...@@ -15,8 +15,11 @@ extern const struct nvram_ops arch_nvram_ops; ...@@ -15,8 +15,11 @@ extern const struct nvram_ops arch_nvram_ops;
static inline ssize_t nvram_get_size(void) static inline ssize_t nvram_get_size(void)
{ {
#ifdef CONFIG_PPC
#else
if (arch_nvram_ops.get_size) if (arch_nvram_ops.get_size)
return arch_nvram_ops.get_size(); return arch_nvram_ops.get_size();
#endif
return -ENODEV; return -ENODEV;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment