]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
fdt_support: Move of_read_number to fdt_support.h
authorArnab Basu <arnab.basu@freescale.com>
Mon, 8 Sep 2014 19:19:58 +0000 (12:19 -0700)
committerYork Sun <yorksun@freescale.com>
Thu, 25 Sep 2014 15:36:19 +0000 (08:36 -0700)
This is being done so that it can be used outside 'fdt_support.c'. Making
life more convenient when reading device node properties that can be 32
or 64 bits long.

Signed-off-by: Arnab Basu <arnab.basu@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>
common/fdt_support.c
include/fdt_support.h

index 784a570a818bd94fdb8dd086a4020f5652c91c00..7ec7d4fc59396ed64212d38a82d6df2866be0411 100644 (file)
@@ -930,15 +930,6 @@ void fdt_del_node_and_alias(void *blob, const char *alias)
        fdt_delprop(blob, off, alias);
 }
 
-/* Helper to read a big number; size is in cells (not bytes) */
-static inline u64 of_read_number(const fdt32_t *cell, int size)
-{
-       u64 r = 0;
-       while (size--)
-               r = (r << 32) | fdt32_to_cpu(*(cell++));
-       return r;
-}
-
 #define PRu64  "%llx"
 
 /* Max address size we deal with */
index 1bda686a0b944c4b213f395fcb915bc4d25abedb..649fbd6cc57b3fff95268719c038dbe06d74c15d 100644 (file)
@@ -133,6 +133,15 @@ static inline int fdt_status_fail_by_alias(void *fdt, const char *alias)
        return fdt_set_status_by_alias(fdt, alias, FDT_STATUS_FAIL, 0);
 }
 
+/* Helper to read a big number; size is in cells (not bytes) */
+static inline u64 of_read_number(const fdt32_t *cell, int size)
+{
+       u64 r = 0;
+       while (size--)
+               r = (r << 32) | fdt32_to_cpu(*(cell++));
+       return r;
+}
+
 #endif /* ifdef CONFIG_OF_LIBFDT */
 
 #ifdef USE_HOSTCC