06 Feb, 2020

1 commit


18 Jan, 2020

1 commit


14 Nov, 2019

2 commits

  • The phandlep pointer returning the phandle to the caller is optional
    and if it is not set when calling fdtdec_add_reserved_memory() it is
    highly likely that the caller is not interested in a phandle to the
    created reserved-memory area and really just wants that area added.

    So just don't create a phandle in that case.

    Signed-off-by: Heiko Stuebner
    Reviewed-by: Simon Glass

    Heiko Stuebner
     
  • The change adding fdtdec_add_reserved_memory() already protected the added
    phandle against the phandlep being NULL - making the phandlep var optional.

    But in the early code checking for an already existing carveout this check
    was not done and thus the phandle assignment could run into trouble,
    so add a check there as well, which makes the function still return
    successfully if a matching region is found, even though no-one wants to
    work with the phandle.

    Fixes: c9222a08b3f7 ("fdtdec: Implement fdtdec_add_reserved_memory()")
    Signed-off-by: Heiko Stuebner
    Reviewed-by: Simon Glass

    Heiko Stuebner
     

08 Oct, 2019

1 commit


26 Aug, 2019

1 commit


06 Jun, 2019

1 commit

  • This function can be used to set the local MAC address for the default
    Ethernet interface in its device tree node. The default interface is
    identified by the "ethernet" alias.

    One case where this is useful is for devices that store their MAC
    address in a custom location. Once extracted, board code can store the
    MAC address in U-Boot's control DTB so that it will automatically be
    used by the Ethernet uclass.

    Signed-off-by: Thierry Reding
    Signed-off-by: Tom Warren

    Thierry Reding
     

22 May, 2019

1 commit


24 Apr, 2019

1 commit


12 Apr, 2019

5 commits


10 Apr, 2019

2 commits

  • Split fdtdec_setup_memory_banksize() into fdtdec_setup_memory_banksize_fdt(),
    which allows the caller to pass custom blob into the function and the
    original fdtdec_setup_memory_banksize(), which uses the gd->fdt_blob. This
    is useful when configuring the DRAM properties from a FDT blob fragment
    passed in by the firmware.

    Signed-off-by: Marek Vasut
    Cc: Nobuhiro Iwamatsu
    Cc: Simon Glass
    Cc: Tom Rini
    Reviewed-by: Simon Glass

    Marek Vasut
     
  • Split fdtdec_setup_mem_size_base() into fdtdec_setup_mem_size_base_fdt(),
    which allows the caller to pass custom blob into the function and the
    original fdtdec_setup_mem_size_base(), which uses the gd->fdt_blob. This
    is useful when configuring the DRAM properties from a FDT blob fragment
    passed in by the firmware.

    Signed-off-by: Marek Vasut
    Cc: Nobuhiro Iwamatsu
    Cc: Simon Glass
    Cc: Tom Rini
    Reviewed-by: Simon Glass

    Marek Vasut
     

12 Feb, 2019

1 commit


10 Feb, 2019

2 commits


08 Feb, 2019

1 commit


10 Dec, 2018

1 commit

  • In some cases it may be useful to be able to change the fdt we have been
    using and use another one instead. For example, the TI platforms uses an
    EEPROM to store board information and, based on the type of board,
    different dtbs are used by the SPL. When DM_I2C is used, a first dtb must
    be used before the I2C is initialized and only then the final dtb can be
    selected.
    To speed up the process and reduce memory usage, introduce a new function
    fdtdec_setup_best_match() that re-use the DTBs loaded in memory by
    fdtdec_setup() to select the best match.

    Signed-off-by: Jean-Jacques Hiblot
    Reviewed-by: Heiko Schocher

    Jean-Jacques Hiblot
     

21 Nov, 2018

1 commit

  • Commit 90c08fa038451d (fdt: Add device tree memory bindings) removed the
    prototype declaration of board_fdt_blob_setup(), most likely by mistake.
    This didn't break the build because the only file calling this function
    (lib/fdtdec.c) provides a local weak definition. Restore the
    declaration.

    Cc: Michael Pratt
    Signed-off-by: Baruch Siach
    Reviewed-by: Simon Glass

    Baruch Siach
     

09 Oct, 2018

1 commit


19 Jul, 2018

1 commit


11 Jul, 2018

1 commit

  • Add support for loading U-Boot on the Broadcom 7445 SoC. This port
    assumes Broadcom's BOLT bootloader is acting as the second stage
    bootloader, and U-Boot is acting as the third stage bootloader, loaded
    as an ELF program by BOLT.

    Signed-off-by: Thomas Fitzsimmons
    Cc: Stefan Roese
    Cc: Tom Rini
    Cc: Florian Fainelli

    Thomas Fitzsimmons
     

09 Jul, 2018

1 commit

  • Support a default memory bank, specified in reg, as well as
    board-specific memory banks in subtree board-id nodes.

    This allows memory information to be provided in the device tree,
    rather than hard-coded in, which will make it simpler to handle
    similar devices with different memory banks, as the board-id values
    or masks can be used to match devices.

    Signed-off-by: Michael Pratt
    Signed-off-by: Simon Glass
    Reviewed-by: Vadim Bendebury

    Michael Pratt
     

18 May, 2018

1 commit


08 May, 2018

1 commit


07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

05 Mar, 2018

1 commit

  • Thomas reported U-Boot failed to build host tools if libfdt-devel
    package is installed because tools include libfdt headers from
    /usr/include/ instead of using internal ones.

    This commit moves the header code:
    include/libfdt.h -> include/linux/libfdt.h
    include/libfdt_env.h -> include/linux/libfdt_env.h

    and replaces include directives:
    #include -> #include
    #include -> #include

    Reported-by: Thomas Petazzoni
    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

19 Feb, 2018

1 commit

  • To debug device tree issues involving 32- and 64-bit platforms, it is useful to
    have a generic 64-bit platform available.

    Add a version of the sandbox that uses 64-bit integers for its physical
    addresses as well as a modified device tree.

    Signed-off-by: Mario Six
    Added CONFIG_SYS_TEXT_BASE to configs/sandbox64_defconfig
    Signed-off-by: Simon Glass

    Mario Six
     

16 Jan, 2018

1 commit

  • Similar to CONFIG_OF_BOARD, but in this case the fdt is still built by
    u-boot build. This allows the board to patch the fdt, etc.

    In the specific case of dragonboard 410c, we pass the u-boot generated
    fdt to the previous stage of bootloader (by embedding it in the
    u-boot.img that is loaded by lk/aboot), which patches the fdt and passes
    it back to u-boot.

    Signed-off-by: Rob Clark
    [trini: Update board_fdt_blob_setup #if check]
    Signed-off-by: Tom Rini

    Rob Clark
     

26 Nov, 2017

1 commit


15 Sep, 2017

1 commit

  • When using 32-bit addresses dtoc works correctly. For 64-bit addresses it
    does not since it ignores the #address-cells and #size-cells properties.

    Update the tool to use fdt64_t as the element type for reg properties when
    either the address or size is larger than one cell. Use the correct value
    so that C code can obtain the information from the device tree easily.

    Alos create a new type, fdt_val_t, which is defined to either fdt32_t or
    fdt64_t depending on the word size of the machine. This type corresponds
    to fdt_addr_t and fdt_size_t. Unfortunately we cannot just use those types
    since they are defined to phys_addr_t and phys_size_t which use
    'unsigned long' in the 32-bit case, rather than 'unsigned int'.

    Add tests for the four combinations of address and size values (32/32,
    64/64, 32/64, 64/32). Also update existing uses for rk3399 and rk3368
    which now need to use the new fdt_val_t type.

    Signed-off-by: Simon Glass

    Suggested-by: Heiko Stuebner
    Reported-by: Kever Yang
    Reviewed-by: Philipp Tomsich
    Tested-by: Kever Yang

    Simon Glass
     

29 Jul, 2017

1 commit


01 Jun, 2017

2 commits


16 May, 2017

1 commit

  • Some DVI monitors don't show anything in HDMI mode since audio stream
    confuses them. To solve this situation, this commit adds HDMI flag in
    timing data and sets it accordingly during edid parsing.

    First existence of extension block is checked. If it exists and it is
    CEA861 extension, then data blocks are checked for presence of HDMI
    vendor specific data block. If it is present, HDMI flag is set.

    Signed-off-by: Jernej Skrabec
    Reviewed-by: Simon Glass

    Jernej Skrabec
     

10 May, 2017

1 commit

  • In some boards like the Raspberry Pi the initial bootloader will pass
    a DT to the kernel. When using U-Boot as such kernel, the board code in
    U-Boot should be able to provide U-Boot with this, already assembled
    device tree blob.

    This patch introduces a new config option CONFIG_OF_BOARD to use instead
    of CONFIG_OF_EMBED or CONFIG_OF_SEPARATE which will initialize the DT
    from a board-specific funtion instead of bundling one with U-Boot or as
    a separated file. This allows boards like the Raspberry Pi to reuse the
    device tree passed from the bootcode.bin and start.elf firmware
    files, including the run-time selected device tree overlays.

    Signed-off-by: Alex Deymo
    Reviewed-by: Simon Glass

    Alex Deymo
     

14 Apr, 2017

1 commit