summaryrefslogtreecommitdiff
path: root/bsd/drm_os_freebsd.h
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2003-04-27 00:43:14 +0000
committerEric Anholt <anholt@freebsd.org>2003-04-27 00:43:14 +0000
commit22b9b720d572ba6fec288e2a13537aec069cec7f (patch)
tree23a98811df1f2bf92ad51f8ffe3ef6f54362e4a7 /bsd/drm_os_freebsd.h
parent9828bd24c8f7b9d115acf94e422fa34ec8627b92 (diff)
Use real endian conversion functions.
Diffstat (limited to 'bsd/drm_os_freebsd.h')
-rw-r--r--bsd/drm_os_freebsd.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/bsd/drm_os_freebsd.h b/bsd/drm_os_freebsd.h
index b9869c9f..52f7aa2a 100644
--- a/bsd/drm_os_freebsd.h
+++ b/bsd/drm_os_freebsd.h
@@ -27,6 +27,7 @@
#include <machine/pmap.h>
#include <machine/bus.h>
#include <machine/resource.h>
+#include <sys/endian.h>
#include <sys/mman.h>
#include <sys/rman.h>
#include <sys/memrange.h>
@@ -240,7 +241,8 @@ typedef struct drm_chipinfo
char *name;
} drm_chipinfo_t;
-#define cpu_to_le32(x) (x) /* FIXME */
+#define cpu_to_le32(x) htole32(x)
+#define le32_to_cpu(x) le32toh(x)
typedef unsigned long dma_addr_t;
typedef u_int32_t atomic_t;