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


20 Dec, 2016

1 commit

  • Add two functions for use by board implementations to decode the memory
    banks of the /memory node so as to populate the global data with
    ram_size and board info for memory banks.

    The fdtdec_setup_memory_size() function decodes the first memory bank
    and sets up the gd->ram_size with the size of the memory bank. This
    function should be called from the boards dram_init().

    The fdtdec_setup_memory_banksize() function decode the memory banks
    (up to the CONFIG_NR_DRAM_BANKS) and populates the base address and size
    into the gd->bd->bi_dram array of banks. This function should be called
    from the boards dram_init_banksize().

    Signed-off-by: Nathan Rossi
    Cc: Simon Glass
    Cc: Michal Simek
    Reviewed-by: Simon Glass
    Signed-off-by: Michal Simek

    Nathan Rossi
     

14 Sep, 2016

1 commit

  • This driver has not been converted to Driver Model, and it is an
    obstacle to migrate other block device drivers. Remove it for now.

    The UniPhier SoCs already use a DM-based EHCI driver, so now
    ARCH_UNIPHIER can select DM_USB.

    These two changes must be done atomically because removing the
    legacy driver causes a build error.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Marek Vasut

    Masahiro Yamada
     

12 Aug, 2016

1 commit

  • Some code may want to read reg values from DT, but from nodes that aren't
    associated with DM devices, so using dev_get_addr_index() isn't
    appropriate. In this case, fdtdec_get_addr_size_*() are the functions to
    use. However, "translation" (via the chain of ranges properties in parent
    nodes) may still be desirable. Add a function parameter to request that,
    and implement it. Update all call sites to default to the original
    behaviour.

    Signed-off-by: Stephen Warren
    Reviewed-by: Simon Glass
    Squashed in build fix from Stephen:
    Signed-off-by: Simon Glass

    Stephen Warren
     

25 Jul, 2016

1 commit


12 Jul, 2016

3 commits


06 Jul, 2016

1 commit


01 Jun, 2016

1 commit

  • Tegra186's MMC controller needs to be explicitly identified. Add another
    compatible value for it.

    Tegra186 will use an entirely different clock/reset control mechanism to
    existing chips, and will use standard clock/reset APIs rather than the
    existing Tegra-specific custom APIs. The driver support for that isn't
    ready yet, so simply disable all clock/reset usage if compiling for
    Tegra186. This must happen at compile time rather than run-time since the
    custom APIs won't even be compiled in on Tegra186. In the long term, the
    plan would be to convert the existing custom APIs to standard APIs and get
    rid of the ifdefs completely.

    The system's main eMMC will work without any clock/reset support, since
    the firmware will have already initialized the controller in order to
    load U-Boot. Hence the driver is useful even in this apparently crippled
    state.

    Signed-off-by: Stephen Warren
    Signed-off-by: Tom Warren

    Stephen Warren
     

06 May, 2016

1 commit


17 Mar, 2016

2 commits


17 Feb, 2016

1 commit

  • Adjust the driver to use driver model. The SOR becomes a bridge device. We
    use the normal simple_panel driver to handle the display itself. We also
    need to enable some options such as regulators, PWMs and DM_VIDEO itself.

    Signed-off-by: Simon Glass
    Acked-by: Anatolij Gustschin
    Signed-off-by: Tom Warren

    Simon Glass
     

06 Feb, 2016

1 commit


24 Jan, 2016

1 commit


21 Jan, 2016

1 commit


15 Jan, 2016

1 commit


13 Jan, 2016

2 commits

  • Use "intel,ivybridge-fsp" for Intel IvyBridge FSP compatible string.

    Signed-off-by: Bin Meng
    Acked-by: Simon Glass
    Tested-by: Simon Glass

    Bin Meng
     
  • Use the driver model version of the function to find the BAR. This updates
    the fdtdec function, of which ns16550 is the only user.

    The fdtdec_get_pci_bdf() function is dropped for several reasons:
    - with driver model we should use 'struct udevice *' rather than passing the
    device tree offset explicitly
    - there are no other users in the tree
    - the function parses for information which is already available in the PCI
    device structure (specifically struct pci_child_platdata which is available
    at dev_get_parent_platdata(dev)

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Bin Meng

    Simon Glass
     

20 Dec, 2015

1 commit


01 Dec, 2015

1 commit


20 Nov, 2015

1 commit


13 Nov, 2015

1 commit


05 Nov, 2015

2 commits


04 Nov, 2015

1 commit


15 Sep, 2015

1 commit

  • fdtdec_get_addr_size() hard-codes the number of cells used to represent
    an address or size in DT. This is incorrect in many cases depending on
    the DT binding for a particular node or property (e.g. it is incorrect
    for the "reg" property). In most cases, DT parsing code must use the
    properties #address-cells and #size-cells to parse addres properties.

    This change splits up the implementation of fdtdec_get_addr_size() so
    that the core logic can be used for both hard-coded and non-hard-coded
    cases. Various wrapper functions are implemented that support cases
    where hard-coded cell counts should or should not be used, and where
    the client does and doesn't know the parent node ID that contains the
    properties #address-cells and #size-cells.

    dev_get_addr() is updated to use the new functions.

    Core functionality in fdtdec_get_addr_size_fixed() is widely tested via
    fdtdec_get_addr_size(). I tested fdtdec_get_addr_size_auto_noparent() and
    dev_get_addr() by manually modifying the Tegra I2C driver to invoke them.

    Much of the core implementation of fdtdec_get_addr_size_fixed(),
    fdtdec_get_addr_size_auto_parent(), and
    fdtdec_get_addr_size_auto_noparent() comes from Thierry Reding's
    previous commit "fdt: Fix fdtdec_get_addr_size() for 64-bit".

    Based-on-work-by: Thierry Reding
    Cc: Thierry Reding
    Cc: Simon Glass
    Cc: Michal Suchanek
    Signed-off-by: Stephen Warren
    Acked-by: Simon Glass
    Dropped #define DEBUG at the top of fdtdec.c:
    Signed-off-by: Simon Glass

    Stephen Warren
     

04 Sep, 2015

1 commit

  • Rework the driver to probe the MMC controller from Device Tree
    and make it mandatory. There is no longer support for probing
    from the ancient qts-generated header files.

    This patch now also removes previous temporary workaround.

    Signed-off-by: Marek Vasut
    Cc: Dinh Nguyen
    Cc: Pantelis Antoniou
    Cc: Tom Rini

    Marek Vasut
     

31 Aug, 2015

1 commit