24 Jul, 2013

1 commit


15 May, 2013

1 commit

  • This seems to be a common function for several architectures, so create
    a common function rather than duplicating the code in each arch.

    Also make an attempt to avoid introducing #ifdefs in the new code, partly
    by removing useless #ifdefs around function declarations in the image.h
    header.

    Signed-off-by: Simon Glass

    Simon Glass
     

09 Feb, 2013

1 commit

  • The libfdt.h file is the definition file for libfdt. It is unnecessary
    to include other fdt header files (the necessary ones are pulled in
    by libfdt.h).

    Signed-off-by: Gerald Van Baren
    Acked-by: Simon Glass
    Acked-by: Stefan Roese

    Gerald Van Baren
     

08 Feb, 2013

2 commits

  • trivial:

    fdt_support.c:89:64: warning: Using plain integer as NULL pointer
    fdt_support.c:325:65: warning: Using plain integer as NULL pointer
    fdt_support.c:352:65: warning: Using plain integer as NULL pointer

    For the following bad constant expression, We hardcode the max. number of
    memory banks to four for the foreseeable future, and add an error with
    instructions on what to do once it's exceeded:

    fdt_support.c:397:22: error: bad constant expression

    For the rest below, sparse found a couple of wrong endian conversions
    in of_bus_default_translate() and fdt_get_base_address(), but
    otherwise the rest is mostly annotation fixes:

    fdt_support.c:64:24: warning: cast to restricted __be32
    fdt_support.c:192:21: warning: incorrect type in assignment (different base types)
    fdt_support.c:192:21: expected unsigned int [unsigned] [usertype] tmp
    fdt_support.c:192:21: got restricted __be32 [usertype]
    fdt_support.c:201:21: warning: incorrect type in assignment (different base types)
    fdt_support.c:201:21: expected unsigned int [unsigned] [addressable] [usertype] tmp
    fdt_support.c:201:21: got restricted __be32 [usertype]
    fdt_support.c:304:13: warning: incorrect type in assignment (different base types)
    fdt_support.c:304:13: expected unsigned int [unsigned] [usertype] val
    fdt_support.c:304:13: got restricted __be32 [usertype]
    fdt_support.c:333:13: warning: incorrect type in assignment (different base types)
    fdt_support.c:333:13: expected unsigned int [unsigned] [usertype] val
    fdt_support.c:333:13: got restricted __be32 [usertype]
    fdt_support.c:359:13: warning: incorrect type in assignment (different base types)
    fdt_support.c:359:13: expected unsigned int [unsigned] [usertype] val
    fdt_support.c:359:13: got restricted __be32 [usertype]
    fdt_support.c:373:21: warning: cast to restricted __be32
    fdt_support.c:963:48: warning: incorrect type in argument 1 (different base types)
    fdt_support.c:963:48: expected restricted __be32 const [usertype] *p
    fdt_support.c:963:48: got unsigned int [usertype] *
    fdt_support.c:971:48: warning: incorrect type in argument 1 (different base types)
    fdt_support.c:971:48: expected restricted __be32 const [usertype] *p
    fdt_support.c:971:48: got unsigned int [usertype] *
    fdt_support.c:984:29: warning: incorrect type in argument 1 (different base types)
    fdt_support.c:984:29: expected restricted __be32 const [usertype] *cell
    fdt_support.c:984:29: got unsigned int [usertype] *addr
    fdt_support.c:996:32: warning: incorrect type in argument 1 (different base types)
    fdt_support.c:996:32: expected restricted __be32 const [usertype] *cell
    fdt_support.c:996:32: got unsigned int [usertype] *addr
    fdt_support.c:1041:41: warning: incorrect type in argument 1 (different base types)
    fdt_support.c:1041:41: expected restricted __be32 const [usertype] *cell
    fdt_support.c:1041:41: got unsigned int [usertype] *addr
    fdt_support.c:1053:41: warning: incorrect type in argument 2 (different base types)
    fdt_support.c:1053:41: expected restricted __be32 const [usertype] *range
    fdt_support.c:1053:41: got unsigned int const [usertype] *[assigned] ranges
    fdt_support.c:1064:53: warning: incorrect type in argument 2 (different base types)
    fdt_support.c:1064:53: expected restricted __be32 const [usertype] *addr
    fdt_support.c:1064:53: got unsigned int [usertype] *addr
    fdt_support.c:1110:50: warning: incorrect type in argument 2 (different base types)
    fdt_support.c:1110:50: expected restricted __be32 const [usertype] *addr
    fdt_support.c:1110:50: got unsigned int *
    fdt_support.c:1121:49: warning: incorrect type in argument 1 (different base types)
    fdt_support.c:1121:49: expected restricted __be32 const [usertype] *cell
    fdt_support.c:1121:49: got unsigned int *
    fdt_support.c:1147:60: warning: incorrect type in argument 2 (different base types)
    fdt_support.c:1147:60: expected restricted __be32 const [usertype] *addr
    fdt_support.c:1147:60: got unsigned int *
    fdt_support.c:1081:5: warning: symbol '__of_translate_address' was not declared. Should it be static?
    fdt_support.c:1154:5: error: symbol 'fdt_translate_address' redeclared with different type (originally declared at include/fdt_support.h:95) - incompatible argument 3 (different base types)
    fdt_support.c: In function 'fdt_node_offset_by_compat_reg':
    fdt_support.c:1173:17: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]

    See also linux kernel commit 0131d897 "of/address: use proper
    endianess in get_flags".

    Signed-off-by: Kim Phillips
    Cc: Jerry Van Baren

    Kim Phillips
     
  • and, if including libfdt.h which includes libfdt_env.h in
    the correct order, don't include fdt.h before libfdt.h.

    this is needed to get the fdt type definitions set from
    the project environment before fdt.h uses them.

    Signed-off-by: Kim Phillips
    Cc: Jerry Van Baren

    Kim Phillips
     

16 Feb, 2012

1 commit


14 Nov, 2011

1 commit


18 Oct, 2011

1 commit

  • Add common function fdt_set_node_status() to assist in various locations
    that we set a nodes status. This function utilizes the status values
    that are part of the EPAPR spec (on power.org).

    fdt_set_status_by_alias() is based on fdt_set_node_status() but uses an
    alias string to identify the node to update.

    We also add some shortcut functions to help the common cases of setting
    "okay" and "disabled":

    fdt_status_okay()
    fdt_status_disabled()
    fdt_status_okay_by_alias()
    fdt_status_disabled_by_alias()

    Finally, we fixup the corenet_ds ethernet code which previously had
    a function by the same name that can be replaced with the new helpers.

    Signed-off-by: Shengzhou Liu
    Signed-off-by: Kumar Gala
    Acked-by: Gerald Van Baren

    Shengzhou Liu
     

15 Oct, 2011

2 commits


30 Sep, 2011

2 commits


15 Jul, 2011

3 commits

  • 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: Timur Tabi

    Gerald Van Baren
     
  • Add a prototype for fdt_increase_size() so that anyone can call it.

    Signed-off-by: Timur Tabi

    Timur Tabi
     
  • 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: Timur Tabi

    Timur Tabi
     

19 Oct, 2010

1 commit


13 Oct, 2010

1 commit

  • 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: Anatolij Gustschin
    Acked-by: Detlev Zundel
    Cc: Gerald Van Baren

    Anatolij Gustschin
     

23 Sep, 2010

1 commit

  • 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: Stefan Roese
    Tested-by: Detlev Zundel
    Cc: Gerald Van Baren
    Cc: Wolfgang Denk

    Stefan Roese
     

27 Jul, 2010

1 commit

  • If we are creating reference (handles) to nodes in a device tree we need
    to first create a new phandle in node and this needs a new phandle
    value. So we search through the whole dtb to find the max phandle value
    and return the next greater value for a new phandle allocation.

    Signed-off-by: Kumar Gala
    Acked-by: Gerald Van Baren

    Kumar Gala
     

20 Jul, 2010

2 commits

  • Given a compatible string and physical address try and find a node that
    matches. This is useful when we want to find a specific device node to
    update (for example if we have multiple PCI nodes we can use the
    physical address to distinguish them when trying to update the device
    tree).

    Signed-off-by: Kumar Gala
    Acked-by: Gerald Van Baren

    Kumar Gala
     
  • This code is extracted out of the Linux Kernel code from
    arch/powerpc/kernel/prom_parse.c.

    We maintain some of the same structure to support multiple bus types even
    though we only have one in the current code. In the future we might want
    to translate across a PCI bus and thus it will be easier to add that
    functionality back in.

    Signed-off-by: Kumar Gala
    Acked-by: Gerald Van Baren

    Kumar Gala
     

16 Jul, 2010

1 commit


07 Apr, 2010

1 commit


22 Mar, 2010

1 commit


23 Oct, 2009

1 commit


13 Jun, 2009

1 commit


25 Oct, 2008

2 commits


13 Sep, 2008

1 commit

  • Commit 2a1a2cb6 didnt remove the dummy mem reservation in fdt_chosen,
    and this stopped Linux from booting with a Ramdisk. This patch fixes
    this, by deleting the useless dummy mem reservation.

    When booting with a Ramdisk, a fix offset FDT_RAMDISK_OVERHEAD is now
    added to of_size, so we dont need anymore a dummy mem reservation.

    I measured the value of FDT_RAMDISK_OVERHEAD on a MPC8270 based
    system (=0x44 bytes) and rounded it up to 0x80).

    Signed-off-by: Heiko Schocher
    Acked-by: Kumar Gala

    Heiko Schocher
     

27 Aug, 2008

3 commits


21 Aug, 2008

1 commit


15 Jul, 2008

1 commit


26 Mar, 2008

2 commits


10 Jan, 2008

1 commit

  • Define the layout of a binary blob that contains a QE firmware and instructions
    on how to upload it. Add function qe_upload_firmware() to parse the blob and
    perform the actual upload. Add command-line command "qe fw" to take a firmware
    blob in memory and upload it. Update ft_cpu_setup() on 85xx to create the
    'firmware' device tree node if U-Boot has uploaded a firmware. Fully define
    'struct rsp' in immap_qe.h to include the actual RISC Special Registers.

    Signed-off-by: Timur Tabi

    Timur Tabi
     

09 Jan, 2008

1 commit


08 Dec, 2007

1 commit


22 Nov, 2007

1 commit

  • Added the following fdt fixup helpers:
    * do_fixup_by_prop{_u32} - Find matching nodes by property name/value
    * do_fixup_by_compat{_u32} - Find matching nodes by compat

    The _u32 variants work the same only the property they are setting
    is know to be a 32-bit integer instead of a byte buffer.

    Signed-off-by: Kumar Gala

    Kumar Gala