]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
Merge branch 'master' of git://git.denx.de/u-boot-dm
authorTom Rini <trini@ti.com>
Sat, 13 Sep 2014 20:32:52 +0000 (16:32 -0400)
committerTom Rini <trini@ti.com>
Sat, 13 Sep 2014 20:32:52 +0000 (16:32 -0400)
1  2 
common/board_r.c
include/fdtdec.h
lib/fdtdec.c

diff --combined common/board_r.c
index 551429c8431fe5a0ab0d322b0e68872a3e0d7963,6ac2b7e1601ec5e54230596a1114ca0262dfc063..231c6d67115e871eb10c5619fc5227e413a1ea53
@@@ -715,6 -715,15 +715,15 @@@ init_fnc_t init_sequence_r[] = 
        /* TODO: could x86/PPC have this also perhaps? */
  #ifdef CONFIG_ARM
        initr_caches,
+ #endif
+       initr_reloc_global_data,
+       initr_barrier,
+       initr_malloc,
+       bootstage_relocate,
+ #ifdef CONFIG_DM
+       initr_dm,
+ #endif
+ #ifdef CONFIG_ARM
        board_init,     /* Setup chipselects */
  #endif
        /*
  #ifdef CONFIG_CLOCKS
        set_cpu_clk_info, /* Setup clock information */
  #endif
-       initr_reloc_global_data,
+       stdio_init_tables,
        initr_serial,
        initr_announce,
        INIT_FUNC_WATCHDOG_RESET
  #endif
  #ifdef CONFIG_WINBOND_83C553
        initr_w83c553f,
- #endif
-       initr_barrier,
-       initr_malloc,
-       bootstage_relocate,
- #ifdef CONFIG_DM
-       initr_dm,
  #endif
  #ifdef CONFIG_ARCH_EARLY_INIT_R
        arch_early_init_r,
         */
        initr_pci,
  #endif
-       stdio_init,
+       stdio_add_devices,
        initr_jumptable,
  #ifdef CONFIG_API
        initr_api,
@@@ -912,7 -915,7 +915,7 @@@ void board_init_r(gd_t *new_gd, ulong d
        int i;
  #endif
  
 -#ifndef CONFIG_X86
 +#if !defined(CONFIG_X86) && !defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
        gd = new_gd;
  #endif
  
diff --combined include/fdtdec.h
index 5f88938c83b246d6eb86e7b250678b00674fd6bf,4f5aafb516d71b29101516b92c875e86012d1c69..2590d3071fd0353eb7e96f667e74bb089c3a476a
@@@ -94,8 -94,6 +94,8 @@@ enum fdt_compat_id 
        COMPAT_SANDBOX_LCD_SDL,         /* Sandbox LCD emulation with SDL */
        COMPAT_TI_TPS65090,             /* Texas Instrument TPS65090 */
        COMPAT_NXP_PTN3460,             /* NXP PTN3460 DP/LVDS bridge */
 +      COMPAT_SAMSUNG_EXYNOS_SYSMMU,   /* Exynos sysmmu */
 +      COMPAT_PARADE_PS8625,           /* Parade PS8622 EDP->LVDS bridge */
  
        COMPAT_COUNT,
  };
@@@ -376,6 -374,18 +376,18 @@@ int fdtdec_get_alias_seq(const void *bl
   */
  int fdtdec_get_alias_node(const void *blob, const char *name);
  
+ /**
+  * Get the offset of the given chosen node
+  *
+  * This looks up a property in /chosen containing the path to another node,
+  * then finds the offset of that node.
+  *
+  * @param blob                Device tree blob (if NULL, then error is returned)
+  * @param name                Property name, e.g. "stdout-path"
+  * @return Node offset referred to by that chosen node, or -ve FDT_ERR_...
+  */
+ int fdtdec_get_chosen_node(const void *blob, const char *name);
  /*
   * Get the name for a compatible ID
   *
diff --combined lib/fdtdec.c
index c2f36452539f0401f586fe459a294fb10dbc854a,2b08be2405055863f4a1ace791eccbd32e125cb4..06d4542029623cb7d84f764c57fb805bc84f5cd6
@@@ -70,8 -70,6 +70,8 @@@ static const char * const compat_names[
        COMPAT(SANDBOX_LCD_SDL, "sandbox,lcd-sdl"),
        COMPAT(TI_TPS65090, "ti,tps65090"),
        COMPAT(COMPAT_NXP_PTN3460, "nxp,ptn3460"),
 +      COMPAT(SAMSUNG_EXYNOS_SYSMMU, "samsung,sysmmu-v3.3"),
 +      COMPAT(PARADE_PS8625, "parade,ps8625"),
  };
  
  const char *fdtdec_get_compatible(enum fdt_compat_id id)
@@@ -382,6 -380,21 +382,21 @@@ int fdtdec_get_alias_node(const void *b
        return fdt_path_offset(blob, prop);
  }
  
+ int fdtdec_get_chosen_node(const void *blob, const char *name)
+ {
+       const char *prop;
+       int chosen_node;
+       int len;
+       if (!blob)
+               return -FDT_ERR_NOTFOUND;
+       chosen_node = fdt_path_offset(blob, "/chosen");
+       prop = fdt_getprop(blob, chosen_node, name, &len);
+       if (!prop)
+               return -FDT_ERR_NOTFOUND;
+       return fdt_path_offset(blob, prop);
+ }
  int fdtdec_check_fdt(void)
  {
        /*