aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Le Goater <clg@fr.ibm.com>2014-04-24 03:23:27 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-04-28 03:35:31 -0400
commit163bed77b97c2f1e941641f81566da8ea647deda (patch)
treefd20c6414bc54bad5b2be577c53e3537bf6ecaa5
parentfed23ed7ebf0fbea17ad8fed207ff35a747fecaf (diff)
powerpc/boot: Use prom_arg_t in oflib
This patch updates the wrapper code to converge with the kernel code in prom_init. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/boot/oflib.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c
index c3288a3446b3..3b0c9458504f 100644
--- a/arch/powerpc/boot/oflib.c
+++ b/arch/powerpc/boot/oflib.c
@@ -16,6 +16,8 @@
16 16
17#include "of.h" 17#include "of.h"
18 18
19typedef u32 prom_arg_t;
20
19/* The following structure is used to communicate with open firmware. 21/* The following structure is used to communicate with open firmware.
20 * All arguments in and out are in big endian format. */ 22 * All arguments in and out are in big endian format. */
21struct prom_args { 23struct prom_args {
@@ -46,7 +48,7 @@ int of_call_prom(const char *service, int nargs, int nret, ...)
46 48
47 va_start(list, nret); 49 va_start(list, nret);
48 for (i = 0; i < nargs; i++) 50 for (i = 0; i < nargs; i++)
49 args.args[i] = va_arg(list, unsigned int); 51 args.args[i] = va_arg(list, prom_arg_t);
50 va_end(list); 52 va_end(list);
51 53
52 for (i = 0; i < nret; i++) 54 for (i = 0; i < nret; i++)
@@ -59,7 +61,7 @@ int of_call_prom(const char *service, int nargs, int nret, ...)
59} 61}
60 62
61static int of_call_prom_ret(const char *service, int nargs, int nret, 63static int of_call_prom_ret(const char *service, int nargs, int nret,
62 unsigned int *rets, ...) 64 prom_arg_t *rets, ...)
63{ 65{
64 int i; 66 int i;
65 struct prom_args args; 67 struct prom_args args;
@@ -71,7 +73,7 @@ static int of_call_prom_ret(const char *service, int nargs, int nret,
71 73
72 va_start(list, rets); 74 va_start(list, rets);
73 for (i = 0; i < nargs; i++) 75 for (i = 0; i < nargs; i++)
74 args.args[i] = va_arg(list, unsigned int); 76 args.args[i] = va_arg(list, prom_arg_t);
75 va_end(list); 77 va_end(list);
76 78
77 for (i = 0; i < nret; i++) 79 for (i = 0; i < nret; i++)
@@ -148,7 +150,7 @@ static int check_of_version(void)
148void *of_claim(unsigned long virt, unsigned long size, unsigned long align) 150void *of_claim(unsigned long virt, unsigned long size, unsigned long align)
149{ 151{
150 int ret; 152 int ret;
151 unsigned int result; 153 prom_arg_t result;
152 154
153 if (need_map < 0) 155 if (need_map < 0)
154 need_map = check_of_version(); 156 need_map = check_of_version();