08 Dec, 2017

7 commits


30 Nov, 2017

1 commit


28 Nov, 2017

2 commits


26 Nov, 2017

9 commits

  • When usb_hub_reset_devices is called, it should be passed both an
    indicator which hub it should operate on and what port number (local
    to that hub) should be reset.

    Previously, the usb_hub.c code did not include such context and
    always started resets from port number 1, performing multiple
    reset-requests for the same devices:

    /*
    * Reset any devices that may be in a bad state when applying
    * the power. This is a __weak function. Resetting of the devices
    * should occur in the board file of the device.
    */
    for (i = 0; i < dev->maxchild; i++)
    usb_hub_reset_devices(i + 1);

    This adds an additional 'hub' parameter to usb_hub_reset_devices
    that provides the context to fully qualify the port-number in.

    Existing implementations are changed to accept and ignore the new
    parameter.

    Signed-off-by: Philipp Tomsich
    Tested-by: Jakob Unterwurzacher

    Philipp Tomsich
     
  • A minor code-size increase from the changes for tracking the os-type
    of FIT images and from infrastructure for recording the loadables into
    the the loaded FDT, broke the builds for sun50i and some OMAP2+ devices.

    This change adds a new config option (enabled by default for
    MACH_SUN50I, MACH_SUN50I_H5 and ARCH_OMAP2PLUS) that does skips these
    processing steps (bringing code size down to below the limit
    again). The os-type is not evaluated, but assumed to be IH_OS_UBOOT
    (i.e. taking the code-paths intended for backward-compatibility).

    Note that enabling this config option precludes any useful downstream
    processing, such as utilising a special calling convention for ATF or
    OPTEE, based on the os-type of the loadables.

    Signed-off-by: Philipp Tomsich

    Philipp Tomsich
     
  • The SPL_ATF_TEXT_BASE configuration item has become obsolete.
    Remove it from Kconfig.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • Having CONFIG_SPL_ATF seems more natural.
    Rename it, while it it is easy and there's few boards that use it
    (only RK3399 and RK3368 boards).

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • This adds a new interface spl_invoke_atf() that takes a spl_image_info
    argument and then derives the necessary parameters for the ATF entry.
    Based on the additional information recorded (into /fit-images) from
    the FIT loadables, we can now easily locate the next boot stage.

    We now pass a pointer to a FDT as the platform-specific parameter
    pointer to ATF (so we don't run into the future headache of every
    board/platform defining their own proprietary tag-structure), as
    FDT access is already available in ATF.

    With the necessary infrastructure in place, we can now update the
    support for the ARM Trusted Firmware to dispatch into the
    spl_invoke_atf function only if a IH_OS_ARM_TRUSTED_FIRMWARE image is
    loaded.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • If a FDT was loaded (e.g. to append it to U-Boot image), we store it's
    address and record information for all loadables into this FDT. This
    allows us to easily keep track of images for multiple privilege levels
    (e.g. with ATF) or of firmware images preloaded into temporary
    locations (e.g. PMU firmware that may overlap the SPL stage).

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • During the loading of more complex FIT images (e.g. when the invoked
    next stage needs to find additional firmware for a power-management
    core... or if there are multiple images for different privilege levels
    started in parallel), it is helpful to create a record of what images
    are loaded where: if a FDT is loaded for one of the next stages, it
    can be used to convey the status and location of loadables.

    This adds a fdt_record_loadable() function that can be invoked to
    record the status of each loadable below the /fit-images path.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • To better support bootin through an ATF or OPTEE, we need to
    streamline some of the logic for when the FDT is appended to an image:
    depending on the image type, we'd like to append the FDT not at all
    (the case for the OS boot), to the 'firmware' image (if it is a
    U-Boot) or to one of the loadables (if the 'firmware' is an ATF, an
    OPTEE, or some other image-type and U-Boot is listed in the
    loadabled).

    To achieve this goal, we drop the os_boot flag and track the type of
    image loaded. If it is of type IH_OS_U_BOOT, we append the FDT.

    Signed-off-by: Philipp Tomsich
    Acked-by: York Sun
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • To boot on ARMv8 systems with ARM Trusted Firmware, we need to
    assemble an ATF-specific parameter structure and also provide the
    address of the images started by ATF (e.g. BL3-3, which may be the
    full U-Boot).

    To allow us to identify an ARM Trusted Firmware contained in a FIT
    image, this adds the necessary definitions.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     

21 Nov, 2017

2 commits


20 Nov, 2017

1 commit


18 Nov, 2017

1 commit

  • We first introduce CONFIG_USE_BOOTCOMMAND, similar to
    CONFIG_USE_BOOTARGS. We then migrate CONFIG_BOOTCOMMAND for most
    CONFIG_DISTRO_DEFAULT users. In some cases platforms have a complex
    scheme around this usage, and these have been defered for the moment so
    that platform maintainers can work on a migration plan.

    Signed-off-by: Tom Rini
    Reviewed-by: Lukasz Majewski

    Tom Rini
     

17 Nov, 2017

1 commit

  • The maximum length of the name of the image is
    obviously not sizeof(), which is just the
    length of a pointer, but IH_NMLEN.

    fixes: 62cf11c0921a90c6bd62344f4bc069668e6c698c
    ("SPL: Limit image name print length")

    Signed-off-by: André Draszik
    Acked-by: Simon Glass

    André Draszik
     

13 Nov, 2017

1 commit

  • This reverts commit c61d0009feb966e0e93254a8c435a1889085e6b8.

    A tbs2910 board user reported a very slow console frambuffer as
    regression in current u-boot. I could bisect this down to the
    above mentioned commit.

    This revert brings back the fast framebuffer console (one
    cache flush per string in puts(), not after each char).

    Reported-by: Uwe Scheffler
    Signed-off-by: Soeren Moch
    Tested-by: Uwe Scheffler
    Reviewed-by: Simon Glass

    Soeren Moch
     

07 Nov, 2017

1 commit


06 Nov, 2017

2 commits


16 Oct, 2017

2 commits


13 Oct, 2017

1 commit


09 Oct, 2017

1 commit

  • Commit 15eb1d43bf47 ("spl: reorder the assignment of board info to
    global data") intended to move assignment of board info earlier,
    into board_init_r(). However, function preload_console_init() is
    called either from spl_board_init() or from board_init_f(). For the
    latter case, the board info assignment is much earlier than proposed
    board_init_r(). Create a new function to fill gd->bd and call this
    function when needed.

    Signed-off-by: York Sun
    CC: Lokesh Vutla
    CC: Ravi Babu
    CC: Lukasz Majewski
    CC: Tom Rini
    Reviewed-by: Simon Glass

    York Sun
     

06 Oct, 2017

4 commits


05 Oct, 2017

1 commit

  • While this came in with a default value of 6 I am lowering this to 4.
    The MTD/UBI code has a large number of error messages that we include
    now. In addition, "normally" warning messages are not included so this
    feels like a more natural level to have.

    Signed-off-by: Tom Rini

    Tom Rini
     

04 Oct, 2017

2 commits

  • U-Boot widely uses error() as a bit noisier variant of printf().

    This macro causes name conflict with the following line in
    include/linux/compiler-gcc.h:

    # define __compiletime_error(message) __attribute__((error(message)))

    This prevents us from using __compiletime_error(), and makes it
    difficult to fully sync BUILD_BUG macros with Linux. (Notice
    Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().)

    Let's convert error() into now treewide-available pr_err().

    Done with the help of Coccinelle, excluing tools/ directory.

    The semantic patch I used is as follows:

    //
    @@@@
    -error
    +pr_err
    (...)
    //

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Simon Glass
    [trini: Re-run Coccinelle]
    Signed-off-by: Tom Rini

    Masahiro Yamada
     
  • When we import code from Linux, with regular re-sync planned, we want
    to use printk() and pr_*(). U-Boot does not support them in a clean
    way. So, people end up with local macros, or compat headers here and
    there, then we occasionally see build errors of definition conflicts.

    We have include/linux/compat.h, but putting all sorts of unrelated
    things into a single header is just a temporal workaround. Hence this
    patch, to find the best home for all printk variants. If you want to
    use printk() and friends, please include . This header
    is self-contained, and pulls in only a few headers.

    When I was testing this clean-up, I noticed the image size exceeded
    its platform limit on some boards. This is because all pr_*() that
    were previously defined as no-op in include/linux/mtd/mtd.h (unless
    CONFIG_MTD_DEBUG is set), are now enabled.

    To make such boards happy, this commit also implements CONFIG_LOGLEVEL.
    The concept is similar to the kernel parameter "loglevel". (Actually,
    the Kconfig help message was taken from kernel-paremeter.txt of Linux)
    Messages with a loglevel smaller than console loglevel will be printed.

    The difference is the loglevel is build-time determined. To save the
    image size, lower priority pr_*() are compiled out. I set the default
    of CONFIG_LOGLEVEL to 6, i.e. pr_notice and higher priority messages
    are compiled in.

    I adjusted CONFIG_LOGLEVEL to avoid build error for some boards.

    Signed-off-by: Masahiro Yamada
    [trini: Add in SPL_LOGLEVEL that is the same as LOGLEVEL]
    Signed-off-by: Tom Rini

    Masahiro Yamada
     

02 Oct, 2017

1 commit