diff options
author | Cédric Le Goater <clg@fr.ibm.com> | 2014-04-24 09:23:28 +0200 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-04-28 17:35:35 +1000 |
commit | 926e6940f54313813d177b5cfb9ec31a441cd259 (patch) | |
tree | 018b48b91e6556ef7dc184ae1545d050e57719a6 /arch/powerpc/boot/ofconsole.c | |
parent | 163bed77b97c2f1e941641f81566da8ea647deda (diff) | |
download | linux-926e6940f54313813d177b5cfb9ec31a441cd259.tar.bz2 |
powerpc/boot: Add byteswapping routines in oflib
Values will need to be byte-swapped when calling prom (big endian) from
a little endian boot wrapper.
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/boot/ofconsole.c')
-rw-r--r-- | arch/powerpc/boot/ofconsole.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/boot/ofconsole.c b/arch/powerpc/boot/ofconsole.c index ce0e02424453..8b754702460a 100644 --- a/arch/powerpc/boot/ofconsole.c +++ b/arch/powerpc/boot/ofconsole.c @@ -18,7 +18,7 @@ #include "of.h" -static void *of_stdout_handle; +static unsigned int of_stdout_handle; static int of_console_open(void) { @@ -27,8 +27,10 @@ static int of_console_open(void) if (((devp = of_finddevice("/chosen")) != NULL) && (of_getprop(devp, "stdout", &of_stdout_handle, sizeof(of_stdout_handle)) - == sizeof(of_stdout_handle))) + == sizeof(of_stdout_handle))) { + of_stdout_handle = be32_to_cpu(of_stdout_handle); return 0; + } return -1; } |