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

2 commits


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
     

22 Jan, 2018

2 commits


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
     

30 Nov, 2017

3 commits

  • Tom Rini
     
  • Building spl with CONFIG_OF_EMBED enabled results in an error message
    on my board: "SPL image too big". This is because the fdtgrep build
    step is only executed for CONFIG_OF_SEPARATE.

    Fix this by moving the fdtgrep build step ('cmd_fdtgreo') from
    scripts/Makefile.spl to dts/Makefile so that the reduced dtb is
    available for all kinds of spl builds.

    The resulting variable name for the embedded device tree blob changes,
    too, which is why common.h and fdtdec.c have tiny changes.

    Signed-off-by: Simon Goldschmidt
    Reviewed-by: Simon Glass

    Goldschmidt Simon
     
  • It is legal to have multiple /memory nodes in a device tree . Currently,
    fdtdec_setup_memory_size() only supports parsing the first node . This
    patch extends the function such that if a particular /memory node does
    no longer have further "reg" entries and CONFIG_NR_DRAM_BANKS still
    allows for more DRAM banks, the code moves on to the next memory node
    and checks it's "reg"s. This makes it possible to handle both systems
    with single memory node with multiple entries and systems with multiple
    memory nodes with single entry.

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

    Marek Vasut
     

26 Nov, 2017

1 commit


06 Oct, 2017

3 commits


16 Aug, 2017

1 commit


29 Jul, 2017

1 commit


11 Jul, 2017

1 commit


03 Jun, 2017

1 commit


01 Jun, 2017

2 commits


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