06 Feb, 2020

2 commits


18 Jan, 2020

2 commits


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
     

28 Oct, 2019

1 commit


08 Oct, 2019

1 commit


03 Oct, 2019

1 commit

  • This reads the low cell of the PCI address from the wrong cell. Fix it.
    Also fix the function that this code came from.

    Fixes: 9e51204527 (dm: core: Add operations on device tree references)
    Fixes: 4ea5243a3a (fdt: fix fdtdec_get_pci_addr() for CONFIG_PHYS_64BIT)
    Signed-off-by: Simon Glass
    Tested-by: Stephen Warren
    Reviewed-by: Bin Meng

    Simon Glass
     

26 Aug, 2019

1 commit


12 Aug, 2019

2 commits


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


14 Apr, 2019

1 commit


12 Apr, 2019

4 commits


10 Apr, 2019

4 commits

  • Add required Kconfig symbols, Makefile bits and macro fixes in a
    few places to support LZO and DT compression in U-Boot. This can
    save a lot of space with multi-DTB fitImages.

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

    Signed-off-by: Marek Vasut

    Marek Vasut
     
  • Allow enabling both LZO and GZIP DT compression in SPL and fix a
    bug where if the GZIP decompression failed, the LZO decompression
    would not even be attempted.

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

    Marek Vasut
     
  • 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


15 Jan, 2019

1 commit


13 Dec, 2018

1 commit

  • Building U-Boot with CONFIG_PCI and CONFIG_DM_PCI enabled, but
    CONFIG_SPL_PCI_SUPPORT disabled, results in following linker
    error:

    lib/built-in.o: In function `fdtdec_get_pci_bar32':
    lib/fdtdec.c:305: undefined reference to `dm_pci_read_bar32'
    fdtdec.c:305:(.text.fdtdec_get_pci_bar32+0x24): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `dm_pci_read_bar32'

    This is because reference to dm_pci_read_bar32() remains in lib/fdtdec.c
    while SPL build does not descend into drivers/pci directory in
    drivers/Makefile if CONFIG_SPL_PCI_SUPPORT is not enabled.

    Fix this by applying appropriate #define guards in lib/fdtdec.c.
    It looks like ns16550.c has the same problem, so fixed that too.

    To simplify this, CONFIG_SPL_PCI_SUPPORT is renamed to CONFIG_SPL_PCI
    (enables use of CONFIG_IS_ENABLED() macro).

    Suggested-by: Vignesh R
    Signed-off-by: Sekhar Nori
    Reviewed-by: Lokesh Vutla
    Reviewed-by: Tom Rini

    Sekhar Nori
     

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
     

03 Dec, 2018

1 commit

  • The sandbox uses a virtual address space that is neither the physical nor
    the virtual address space of the operating system. All address used on the
    command line live in this address space. So also the environment variable
    ${fdtcontroladdr} has to be in this address space.

    Commands like bootefi and booti receive the fdt address as parameter.
    Without the patch ${fdtcontroladdr} cannot be used as parameter value on
    the sandbox.

    Signed-off-by: Heinrich Schuchardt
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     

21 Nov, 2018

1 commit

  • When U-Boot proper is compiled with CONFIG_MULTI_DTB_FIT and tries
    to call uncompress_blob(), it fails with -ENOTSUPP. This is because
    the full implementation of this function which includes compression
    is available only in SPL. In U-Boot proper or if the compression is
    not enabled, the blob is not compressed and thus can be passed to
    locate_dtb_in_fit() in fdtdec_setup() without any changes. Pass the
    blob without any changes if compression is not enabled instead of
    failing.

    Signed-off-by: Marek Vasut
    Cc: Michal Simek
    Cc: Tom Rini
    Reviewed-by: Simon Glass

    Marek Vasut
     

16 Oct, 2018

1 commit


09 Oct, 2018

1 commit


30 Sep, 2018

1 commit


11 Sep, 2018

1 commit

  • In int-ll64.h, we always use the following typedefs:

    typedef unsigned int u32;
    typedef unsigned long uintptr_t;
    typedef unsigned long long u64;

    This does not need to match to the compiler's .
    Do not include it.

    The use of PRI* makes the code super-ugly. You can simply use
    "l" for printing uintptr_t, "ll" for u64, and no modifier for u32.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

10 Sep, 2018

1 commit

  • The get_next_memory_node() always sets mem to -1 , which is incorrect,
    because then every iteration of memory bank parsing will start from the
    first memory bank instead of the previous one.

    On systems with 1 memory bank defined in DT and CONFIG_NR_DRAM_BANKS=4 ,
    like ie. r8a77965-salvator-x , this will result in U-Boot incorrectly
    reporting four identical memory banks with the same memory configuration.

    Fix this by setting mem to startoffset value, which restores the behavior
    before the fixed patch was applied.

    Signed-off-by: Marek Vasut
    Cc: Jens Wiklander
    Cc: Simon Glass
    Cc: Tom Rini
    Fixes: 452bc121027d ("fdt: fix fdtdec_setup_memory_banksize()")
    Tested-by: Michal Simek [on ZynqMP}

    Marek Vasut
     

27 Jul, 2018

1 commit

  • Prior to this patch is fdtdec_setup_memory_banksize() incorrectly
    ignoring the "status" field. This patch fixes that by testing the status
    with fdtdec_get_is_enabled() before using a memory node.

    Signed-off-by: Jens Wiklander
    Reviewed-by: Simon Glass

    Jens Wiklander
     

19 Jul, 2018

1 commit