diff options
author | Cédric Le Goater <clg@fr.ibm.com> | 2014-04-24 03:23:31 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-04-28 03:35:47 -0400 |
commit | 6413010936bac13a965792fa0d0140bdd3b85f3c (patch) | |
tree | 4e65f9a37dcf19a08e62ba9a0efb8b93f600615e | |
parent | 034e55e6c2f8e2a9ea37901ea87bac8a08464441 (diff) |
powerpc/boot: Define typedef ihandle as u32
This makes ihandle 64bit friendly.
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/of.h | 2 | ||||
-rw-r--r-- | arch/powerpc/boot/oflib.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/arch/powerpc/boot/of.h b/arch/powerpc/boot/of.h index 504a0a31b685..e1ef620082f7 100644 --- a/arch/powerpc/boot/of.h +++ b/arch/powerpc/boot/of.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _PPC_BOOT_OF_H_ | 2 | #define _PPC_BOOT_OF_H_ |
3 | 3 | ||
4 | typedef void *phandle; | 4 | typedef void *phandle; |
5 | typedef void *ihandle; | 5 | typedef u32 ihandle; |
6 | 6 | ||
7 | void of_init(void *promptr); | 7 | void of_init(void *promptr); |
8 | int of_call_prom(const char *service, int nargs, int nret, ...); | 8 | int of_call_prom(const char *service, int nargs, int nret, ...); |
diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c index 329437d0e943..956443fb9f65 100644 --- a/arch/powerpc/boot/oflib.c +++ b/arch/powerpc/boot/oflib.c | |||
@@ -106,7 +106,7 @@ static int string_match(const char *s1, const char *s2) | |||
106 | */ | 106 | */ |
107 | static int need_map = -1; | 107 | static int need_map = -1; |
108 | static ihandle chosen_mmu; | 108 | static ihandle chosen_mmu; |
109 | static phandle memory; | 109 | static ihandle memory; |
110 | 110 | ||
111 | static int check_of_version(void) | 111 | static int check_of_version(void) |
112 | { | 112 | { |
@@ -135,10 +135,10 @@ static int check_of_version(void) | |||
135 | printf("no mmu\n"); | 135 | printf("no mmu\n"); |
136 | return 0; | 136 | return 0; |
137 | } | 137 | } |
138 | memory = (ihandle) of_call_prom("open", 1, 1, "/memory"); | 138 | memory = of_call_prom("open", 1, 1, "/memory"); |
139 | if (memory == (ihandle) -1) { | 139 | if (memory == PROM_ERROR) { |
140 | memory = (ihandle) of_call_prom("open", 1, 1, "/memory@0"); | 140 | memory = of_call_prom("open", 1, 1, "/memory@0"); |
141 | if (memory == (ihandle) -1) { | 141 | if (memory == PROM_ERROR) { |
142 | printf("no memory node\n"); | 142 | printf("no memory node\n"); |
143 | return 0; | 143 | return 0; |
144 | } | 144 | } |