1. 13 Nov, 2011 2 commits
  2. 18 Oct, 2011 1 commit
  3. 17 Oct, 2011 1 commit
  4. 15 Oct, 2011 2 commits
    • Timur Tabi's avatar
      fdt: update fdt_alloc_phandle to use fdt_get_phandle · 50bf17bd
      Timur Tabi authored
      The device tree compiler, dtc, can use "phandle" and/or "linux,phandle"
      properties to specify the phandle for any node.  By default, it uses
      both, but "linux,phandle" is deprecated.  One day, we'd like to stop using
      "linux,phandle", but U-boot needs to support both properties equally
      first.
      
      fdt_alloc_phandle() generates a unique phandle, but it was only checking
      the "linux,phandle" properties.  Instead, we use fdt_get_phandle(),
      which checks both properties automatically.  This ensures that we
      support dtbs that only use "phandle".
      
      The side-effect is that fdt_alloc_phandle() now takes twice as long, since
      it has to check for two properties instead of one in each node that it
      searches.
      Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
      50bf17bd
    • Timur Tabi's avatar
      fdt: check for fdt errors in fdt_create_phandle · 3c927ccc
      Timur Tabi authored
      fdt_create_phandle() was ignoring errors from fdt_set_phandle().  If an
      error occurs, print an error message and return 0, which is an invalid
      phandle.  We also need to change the return type for fdt_create_phandle()
      to indicate that it cannot return an error code.
      Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
      3c927ccc
  5. 30 Sep, 2011 2 commits
  6. 15 Jul, 2011 2 commits
    • Gerald Van Baren's avatar
      fdt: introduce fdt_create_phandle() · a8d2a75d
      Gerald Van Baren authored
      The ePAPR specification says that phandle properties should be called
      "phandle", and not "linux,phandle".  To facilitate the migration from
      "linux,phandle" to "phandle", introduce function fdt_create_phandle(),
      which creates a phandle in a given node.  For now, we create both the
      "phandle" and "linux,phandle" properties.  A later version of this
      function will remove support for "linux,phandle".
      Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
      a8d2a75d
    • Timur Tabi's avatar
      fdt: introduce fdt_verify_alias_address() and fdt_get_base_address() · bb682001
      Timur Tabi authored
      Introduce two functions, fdt_verify_alias_address() and
      fdt_get_base_address(), which can be used to verify the physical address
      of a device in a device tree.
      
      fdt_get_base_address() returns the base address of an SOC or PCI node.
      
      fdt_verify_alias_address() prints a message if the address of a node
      specified by an alias does not match the given physical address.
      Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
      bb682001
  7. 26 Apr, 2011 1 commit
  8. 18 Apr, 2011 1 commit
  9. 28 Nov, 2010 1 commit
    • Dirk Behme's avatar
      Fix compiler warning in fdt_support.c · 71ae5f7a
      Dirk Behme authored
      Fix compiler warning
      
      fdt_support.c: In function 'of_bus_default_count_cells':
      fdt_support.c:957: warning: passing argument 1 of '__swab32p' discards qualifiers from pointer target type
      fdt_support.c:965: warning: passing argument 1 of '__swab32p' discards qualifiers from pointer target type
      
      be32_to_cpup() expects an 'u32 *' while prop is 'const u32 *'.
      Signed-off-by: default avatarDirk Behme <dirk.behme@googlemail.com>
      71ae5f7a
  10. 20 Oct, 2010 1 commit
    • Wolfgang Denk's avatar
      common/fdt_support.c: Fix compile warnings · 70994c79
      Wolfgang Denk authored
      Commit a6bd9e83 "FDT: Add fixup support for multiple banks of memory"
      removed code but forgot to remove the variables used by it, resulting
      in warnings:
      
      fdt_support.c: In function 'fdt_fixup_memory_banks':
      fdt_support.c:399: warning: unused variable 'sizecell'
      fdt_support.c:399: warning: unused variable 'addrcell'
      
      Remove the declarations, too.
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      70994c79
  11. 18 Oct, 2010 1 commit
  12. 13 Oct, 2010 1 commit
  13. 12 Oct, 2010 1 commit
    • Anatolij Gustschin's avatar
      fdt_support: support adding EDID property to FDT display nodes · beca5a5f
      Anatolij Gustschin authored
      Boards can pass display timing info for drivers using EDID
      block. Provide common function to add board specific EDID
      data to the device tree. Subsequent patch makes use of this
      functionality.
      
      Detailed timing descriptor data from EDID is used for
      programming the display controller. This is currently
      implemented on the Linux side by the fsl-diu-fb frame
      buffer driver and it is documented there in
      Documentation/powerpc/dts-bindings/fsl/diu.txt.
      Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
      Acked-by: default avatarDetlev Zundel <dzu@denx.de>
      Cc: Gerald Van Baren <vanbaren@cideas.com>
      beca5a5f
  14. 04 Oct, 2010 1 commit
  15. 23 Sep, 2010 1 commit
    • Stefan Roese's avatar
      ppc4xx/fdt/flash: Change fdt_fixup_nor_flash_node() to not rely on cs size · 8a805df1
      Stefan Roese authored
      This patch changes the behaviour of the fdt_fixup_nor_flash_node()
      function. Now it doesn't patch the size of the "reg" property with the
      chip-select size, but with the size returned from the new function
      flash_get_bank_size(). This function will return per weak default the
      flash size of the bank (bank = chip-select numer) detected by the flash
      driver. If this does not fit your needs, this function may be overridden
      by a board specific one.
      
      For this the parameters needed to be changed. So I intentionally squashed
      the PPC4xx stuff using this routine into this patch. Otherwise it would
      not be git-bisectable anymore.
      
      The board specific function for the AMCC/APM Ebony eval board is now
      included in this patch version.
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Tested-by: default avatarDetlev Zundel <dzu@denx.de>
      Cc: Gerald Van Baren <vanbaren@cideas.com>
      Cc: Wolfgang Denk <wd@denx.de>
      8a805df1
  16. 20 Aug, 2010 1 commit
  17. 08 Aug, 2010 1 commit
    • Feng Wang's avatar
      fdt: Fix bug in size calculation in fdt_resize() with initrd use · 3840ebfa
      Feng Wang authored
      Original bug description from Feng (fdt_resize() bug caused "WARNING:
      could not set linux, initrd-start FDT_ERR_NOSPACE."):
      
      What I got is an error: "WARNING: could not set linux,initrd-start
      FDT_ERR_NOSPACE." after loading Device Tree blob. This in turn caused
      linux to miss init part.
      
      After some digging, I found out the reason for this error, it is caused
      by fdt_resize().
      
      FDT blob got resized after filling in all board specific information of
      PowerPC. (in boot_body_linux()). It reduced blob size with only extra
      space for two fdt_reserve_entry, one for fdt itself, and one for initrd.
      Then it's aligned to a 0x1000 page boundary. However, later in
      fdt_initrd(), it could add two more properties, initrd-start AND
      initrd-end, each one needs at least two fdt_reserve_entry sizes done by
      _fdt_add_property() (name and value). Thus, the two fdt_reserve_entry
      extra space is not sufficient.
      
      So for some specific fdt size which is just under the page boundary
      after resizing, this will cause an error of FDT_ERR_NOSPACE in
      fdt_initrd() when setting those two properties, and failed to pass
      initrd information to linux.
      
      My fix is in fdt_resize(), leave at least 4 fdt_reserve_entry for
      initrd. So instead of 2*sizeof(struct fdt_reserve_entry) for
      actual_totalsize, use 5*sizeof(struc fdt_reserve_entry).
      
      Stefan: I got this same error on katmai, when trying to boot with
      initrd (run flash_self). This patch fixes this issue.
      Signed-off-by: default avatarFeng Wang <fwang02@harris.com>
      Tested-by: default avatarStefan Roese <sr@denx.de>
      Cc: Jerry Van Baren <gvb.uboot@gmail.com>
      Acked-by: default avatarGerald Van Baren <vanbaren@cideas.com>
      3840ebfa
  18. 26 Jul, 2010 1 commit
  19. 20 Jul, 2010 2 commits
  20. 16 Jul, 2010 1 commit
  21. 30 May, 2010 1 commit
  22. 07 Apr, 2010 1 commit
  23. 21 Mar, 2010 1 commit
  24. 27 Oct, 2009 1 commit
  25. 24 Oct, 2009 1 commit
  26. 23 Oct, 2009 1 commit
  27. 09 Aug, 2009 1 commit
  28. 12 Jun, 2009 1 commit
  29. 07 Feb, 2009 1 commit
  30. 17 Jan, 2009 1 commit
    • Peter Korsgaard's avatar
      fdt_resize(): fix actualsize calculations with unaligned blobs · c088a108
      Peter Korsgaard authored
      The code in fdt_resize() to extend the fdt size to end on a page boundary
      is wrong for fdt's not located at an address aligned on a page boundary.
      What's even worse, the code would make actualsize shrink rather than grow
      if (blob & 0xfff) was bigger than the amount of padding added by ALIGN(),
      causing fdt_add_mem_rsv to fail.
      
      Fix it by aligning end address (blob + size) to a page boundary instead.
      For aligned fdt's this is equivalent to what we had before.
      Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
      c088a108
  31. 31 Oct, 2008 1 commit
  32. 24 Oct, 2008 2 commits
  33. 13 Sep, 2008 1 commit
  34. 26 Aug, 2008 1 commit
    • Kumar Gala's avatar
      fdt: refactor initrd related code · 2a1a2cb6
      Kumar Gala authored
      Created a new fdt_initrd() to deal with setting the initrd properties
      in the device tree and fixing up the mem reserve.  We can use this
      both in the choosen node handling and lets us remove some duplicated
      code when we fixup the initrd info in bootm on PPC.
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      2a1a2cb6