[Crosstoolchain-logs] [device-tree-compiler] 12/198: libfdt: Add fdt16_to_cpu utility function

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:06:48 UTC 2016


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch upstream/1.4.x
in repository device-tree-compiler.

commit 2cd4c8d27d6b5ea83723754da4eba5d51aa71b95
Author: Anton Staaf <robotboy at chromium.org>
Date:   Tue Oct 11 10:22:27 2011 -0700

    libfdt: Add fdt16_to_cpu utility function
    
    This utility routine will be used in the variable size cell literal
    append code.  It is a straightforward adaptation of the fdt32_to_cpu
    function.
    
    Signed-off-by: Anton Staaf <robotboy at chromium.org>
    Acked-by: David Gibson <david at gibson.dropbear.id.au>
---
 libfdt/libfdt_env.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libfdt/libfdt_env.h b/libfdt/libfdt_env.h
index 449bf60..da952e7 100644
--- a/libfdt/libfdt_env.h
+++ b/libfdt/libfdt_env.h
@@ -6,6 +6,12 @@
 #include <string.h>
 
 #define _B(n)	((unsigned long long)((uint8_t *)&x)[n])
+static inline uint16_t fdt16_to_cpu(uint16_t x)
+{
+	return (_B(0) << 8) | _B(1);
+}
+#define cpu_to_fdt16(x) fdt16_to_cpu(x)
+
 static inline uint32_t fdt32_to_cpu(uint32_t x)
 {
 	return (_B(0) << 24) | (_B(1) << 16) | (_B(2) << 8) | _B(3);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list