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>
This commit is contained in:
Cédric Le Goater
2014-04-24 09:23:28 +02:00
committed by Benjamin Herrenschmidt
parent 163bed77b9
commit 926e6940f5
3 changed files with 18 additions and 13 deletions

View File

@@ -20,4 +20,7 @@ void of_console_init(void);
typedef u32 __be32;
#define cpu_to_be32(x) (x)
#define be32_to_cpu(x) (x)
#endif /* _PPC_BOOT_OF_H_ */