configs: Migrate CONFIG_FMAN_ENET and some related options to Kconfig
[platform/kernel/u-boot.git] / include / fdtdec.h
index 266c582..fa8e34f 100644 (file)
 typedef phys_addr_t fdt_addr_t;
 typedef phys_size_t fdt_size_t;
 
-static inline fdt32_t fdt_addr_unpack(fdt_addr_t addr, fdt32_t *upper)
-{
-       if (upper)
-#ifdef CONFIG_PHYS_64BIT
-               *upper = addr >> 32;
-#else
-               *upper = 0;
-#endif
-
-       return addr;
-}
-
-static inline fdt32_t fdt_size_unpack(fdt_size_t size, fdt32_t *upper)
-{
-       if (upper)
-#ifdef CONFIG_PHYS_64BIT
-               *upper = size >> 32;
-#else
-               *upper = 0;
-#endif
-
-       return size;
-}
-
 #ifdef CONFIG_PHYS_64BIT
 #define FDT_ADDR_T_NONE (-1U)
 #define fdt_addr_to_cpu(reg) be64_to_cpu(reg)
@@ -1029,7 +1005,10 @@ int fdtdec_setup_memory_banksize(void);
  * @param phandle      phandle to set for the given node
  * @return 0 on success or a negative error code on failure
  */
-int fdtdec_set_phandle(void *blob, int node, uint32_t phandle);
+static inline int fdtdec_set_phandle(void *blob, int node, uint32_t phandle)
+{
+       return fdt_setprop_u32(blob, node, "phandle", phandle);
+}
 
 /**
  * fdtdec_add_reserved_memory() - add or find a reserved-memory node