From 926e6940f54313813d177b5cfb9ec31a441cd259 Mon Sep 17 00:00:00 2001 From: Cédric Le Goater Date: Thu, 24 Apr 2014 09:23:28 +0200 Subject: powerpc/boot: Add byteswapping routines in oflib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/boot/of.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/powerpc/boot/of.h') diff --git a/arch/powerpc/boot/of.h b/arch/powerpc/boot/of.h index 5da03d9b9463..40d95bf7402b 100644 --- a/arch/powerpc/boot/of.h +++ b/arch/powerpc/boot/of.h @@ -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_ */ -- cgit v1.2.3