diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-04 16:27:50 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-04 16:27:50 -0800 |
commit | 602d4a7e2f4b843d1a67375d4d7104073495b758 (patch) | |
tree | 0b9f184e54fa693c27bd5986c114bdcf6949f788 /arch/powerpc/platforms/chrp/nvram.c | |
parent | 0bbacc402e67abca8794a8401c1621dc0c0202e9 (diff) | |
parent | c51e3a417bb0f295e13a5bad86302b5212eafdf3 (diff) | |
download | kernel_samsung_smdk4412-602d4a7e2f4b843d1a67375d4d7104073495b758.zip kernel_samsung_smdk4412-602d4a7e2f4b843d1a67375d4d7104073495b758.tar.gz kernel_samsung_smdk4412-602d4a7e2f4b843d1a67375d4d7104073495b758.tar.bz2 |
Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc-merge
Diffstat (limited to 'arch/powerpc/platforms/chrp/nvram.c')
-rw-r--r-- | arch/powerpc/platforms/chrp/nvram.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/chrp/nvram.c b/arch/powerpc/platforms/chrp/nvram.c index 4ac7125..150f67d 100644 --- a/arch/powerpc/platforms/chrp/nvram.c +++ b/arch/powerpc/platforms/chrp/nvram.c @@ -17,6 +17,7 @@ #include <asm/uaccess.h> #include <asm/prom.h> #include <asm/machdep.h> +#include <asm/rtas.h> #include "chrp.h" static unsigned int nvram_size; @@ -25,7 +26,8 @@ static DEFINE_SPINLOCK(nvram_lock); static unsigned char chrp_nvram_read(int addr) { - unsigned long done, flags; + unsigned int done; + unsigned long flags; unsigned char ret; if (addr >= nvram_size) { @@ -34,7 +36,8 @@ static unsigned char chrp_nvram_read(int addr) return 0xff; } spin_lock_irqsave(&nvram_lock, flags); - if ((call_rtas("nvram-fetch", 3, 2, &done, addr, __pa(nvram_buf), 1) != 0) || 1 != done) + if ((rtas_call(rtas_token("nvram-fetch"), 3, 2, &done, addr, + __pa(nvram_buf), 1) != 0) || 1 != done) ret = 0xff; else ret = nvram_buf[0]; @@ -45,7 +48,8 @@ static unsigned char chrp_nvram_read(int addr) static void chrp_nvram_write(int addr, unsigned char val) { - unsigned long done, flags; + unsigned int done; + unsigned long flags; if (addr >= nvram_size) { printk(KERN_DEBUG "%s: write addr %d > nvram_size %u\n", @@ -54,7 +58,8 @@ static void chrp_nvram_write(int addr, unsigned char val) } spin_lock_irqsave(&nvram_lock, flags); nvram_buf[0] = val; - if ((call_rtas("nvram-store", 3, 2, &done, addr, __pa(nvram_buf), 1) != 0) || 1 != done) + if ((rtas_call(rtas_token("nvram-store"), 3, 2, &done, addr, + __pa(nvram_buf), 1) != 0) || 1 != done) printk(KERN_DEBUG "rtas IO error storing 0x%02x at %d", val, addr); spin_unlock_irqrestore(&nvram_lock, flags); } |