~ubuntu-branches/ubuntu/wily/qemu-kvm-spice/wily

« back to all changes in this revision

Viewing changes to kvm/libfdt/libfdt_env.h

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-10-19 10:44:56 UTC
  • Revision ID: james.westby@ubuntu.com-20111019104456-xgvskumk3sxi97f4
Tags: upstream-0.15.0+noroms
ImportĀ upstreamĀ versionĀ 0.15.0+noroms

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _LIBFDT_ENV_H
 
2
#define _LIBFDT_ENV_H
 
3
 
 
4
#include <stddef.h>
 
5
#include <stdint.h>
 
6
#include <string.h>
 
7
#include <endian.h>
 
8
#include <byteswap.h>
 
9
 
 
10
#if __BYTE_ORDER == __BIG_ENDIAN
 
11
#define fdt32_to_cpu(x)         (x)
 
12
#define cpu_to_fdt32(x)         (x)
 
13
#define fdt64_to_cpu(x)         (x)
 
14
#define cpu_to_fdt64(x)         (x)
 
15
#else
 
16
#define fdt32_to_cpu(x)         (bswap_32((x)))
 
17
#define cpu_to_fdt32(x)         (bswap_32((x)))
 
18
#define fdt64_to_cpu(x)         (bswap_64((x)))
 
19
#define cpu_to_fdt64(x)         (bswap_64((x)))
 
20
#endif
 
21
 
 
22
#endif /* _LIBFDT_ENV_H */