Fix merge problems
[platform/kernel/u-boot.git] / board / ids8247 / ids8247.c
index b05424d..065014a 100644 (file)
@@ -276,7 +276,7 @@ static long int try_init (volatile memctl8260_t * memctl, ulong sdmr,
        return (size);
 }
 
-long int initdram (int board_type)
+phys_size_t initdram (int board_type)
 {
        volatile immap_t *immap = (immap_t *) CFG_IMMR;
        volatile memctl8260_t *memctl = &immap->im_memctl;
@@ -321,7 +321,7 @@ nand_init (void)
        printf ("%4lu MB\n", totlen >>20);
 }
 
-#endif /* CFG_CMD_NAND */
+#endif /* CONFIG_CMD_NAND */
 
 #if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
 /*
@@ -329,25 +329,14 @@ nand_init (void)
  */
 void ft_blob_update(void *blob, bd_t *bd)
 {
-       int ret, nodeoffset = 0;
-       ulong memory_data[2] = {0};
-
-       memory_data[0] = cpu_to_be32(bd->bi_memstart);
-       memory_data[1] = cpu_to_be32(bd->bi_memsize);
-
-       nodeoffset = fdt_find_node_by_path (blob, "/memory");
-       if (nodeoffset >= 0) {
-               ret = fdt_setprop(blob, nodeoffset, "reg", memory_data,
-                                       sizeof(memory_data));
-       if (ret < 0)
-               printf("ft_blob_update): cannot set /memory/reg "
+       int ret;
+
+       ret = fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
+
+       if (ret < 0) {
+               printf("ft_blob_update(): cannot set /memory/reg "
                        "property err:%s\n", fdt_strerror(ret));
        }
-       else {
-               /* memory node is required in dts */
-               printf("ft_blob_update(): cannot find /memory node "
-               "err:%s\n", fdt_strerror(nodeoffset));
-       }
 }
 
 void ft_board_setup(void *blob, bd_t *bd)