06 Feb, 2020

2 commits

  • At present dm/device.h includes the linux-compatible features. This
    requires including linux/compat.h which in turn includes a lot of headers.
    One of these is malloc.h which we thus end up including in every file in
    U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
    which needs to use the system malloc() in some files.

    Move the compatibility features into a separate header file.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present devres.h is included in all files that include dm.h but few
    make use of it. Also this pulls in linux/compat which adds several more
    headers. Drop the automatic inclusion and require files to include devres
    themselves. This provides a good indication of which files use devres.

    Signed-off-by: Simon Glass
    Reviewed-by: Anatolij Gustschin

    Simon Glass
     

25 Jan, 2020

1 commit


08 Jan, 2020

3 commits


03 Dec, 2019

1 commit


15 Oct, 2019

1 commit


11 Oct, 2019

8 commits


27 Aug, 2019

1 commit


27 Jul, 2019

3 commits

  • k3_rproc driver is specifically meant for controlling an arm64
    core using TISCI protocol. So rename the driver, Kconfig symbol,
    compatible and functions accordingly.

    While at it drop this remoteproc selection for a53 defconfig.

    Signed-off-by: Lokesh Vutla

    Lokesh Vutla
     
  • Update the k3_rproc driver to use the generic ti_sci_proc helper
    apis which simplifies the driver a bit.

    Signed-off-by: Lokesh Vutla

    Lokesh Vutla
     
  • Texas Instruments' K3 generation SoCs has specific modules/register
    spaces used for configuring the various aspects of a remote processor.
    These include power, reset, boot vector and other configuration features
    specific to each compute processor present on the SoC. These registers
    are managed by the System Controller such as DMSC on K3 AM65x SoCs.

    The Texas Instrument's System Control Interface (TI-SCI) Message Protocol
    is used to communicate to the System Controller from various compute
    processors to invoke specific services provided by the firmware running
    on the System Controller.

    Add a common processor control interface header file that can be used by
    multiple remoteproc drivers. The helper functions within this header file
    abstract the various TI SCI protocol ops for the remoteproc drivers, and
    allow them to request the System Controller to be able to program and
    manage various remote processors on the SoC. The common macros required
    by the R5 remoteproc driver were also added. The remoteproc drivers are
    expected to manage the life-cycle of their ti_sci_proc_dev local
    structures.

    Signed-off-by: Lokesh Vutla
    Signed-off-by: Suman Anna

    Lokesh Vutla
     

22 Jul, 2019

2 commits

  • This patch introduces support of Cortex-M4 remote processor for STM32
    MCU and MPU families.

    Signed-off-by: Loic Pallardy
    Signed-off-by: Fabien Dessenne

    Fabien Dessenne
     
  • The current implementation supports only binary file load.
    Add helpers to support ELF32 format (sanity check, and load).
    Note that since an ELF32 image is built for the remote processor, the
    load function uses the device_to_virt ops to translate the addresses.
    Implement a basic translation for sandbox_testproc.

    Add related tests. Test result:
    => ut dm remoteproc_elf
    Test: dm_test_remoteproc_elf: remoteproc.c
    Test: dm_test_remoteproc_elf: remoteproc.c (flat tree)
    Failures: 0

    Signed-off-by: Loic Pallardy
    Signed-off-by: Fabien Dessenne
    Reviewed-by: Lokesh Vutla

    Fabien Dessenne
     

10 May, 2019

1 commit

  • There is one case where 400ms is not sufficient for loading the
    system firmware:
    - System firmware is not signed with rsa degenerate key.
    - ROM loading the sysfw directly from SPI flash which is in memory
    mapped mode.

    The above scenario is definitely not desired in production use cases
    as it effects boot time. But still keeping this support as this is
    a valid boot scenario.

    Signed-off-by: Lokesh Vutla

    Lokesh Vutla
     

11 Sep, 2018

4 commits

  • Add an option for building remoteproc drivers within SPL.

    Reviewed-by: Tom Rini
    Signed-off-by: Lokesh Vutla

    Lokesh Vutla
     
  • Add support for K3 based remoteproc driver that
    communicates with TISCI to start start a remote processor.

    Reviewed-by: Tom Rini
    Signed-off-by: Lokesh Vutla

    Lokesh Vutla
     
  • K3 specific SoCs have a dedicated microcontroller for doing
    resource management. Any HLOS/firmware on compute clusters should
    load a firmware to this microcontroller before accessing any resource.
    Adding support for loading this firmware.

    After the K3 system controller got loaded with firmware and started
    up it sends out a boot notification message through the secure proxy
    facility using the TI SCI protocol. Intercept and receive this message
    through the rproc start operation which will need to get invoked
    explicitly after the firmware got loaded.

    Signed-off-by: Lokesh Vutla
    Signed-off-by: Andreas Dannenberg
    Reviewed-by: Tom Rini

    Lokesh Vutla
     
  • Existing rproc_init() api tries to initialize all available
    remoteproc devices. This will fail when there is dependency
    among available remoteprocs. So introduce a separate api
    that allows to initialize remoteprocs individually based
    on id.

    Reviewed-by: Tom Rini
    Signed-off-by: Lokesh Vutla

    Lokesh Vutla
     

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
     

08 Feb, 2017

1 commit

  • At present devices use a simple integer offset to record the device tree
    node associated with the device. In preparation for supporting a live
    device tree, which uses a node pointer instead, refactor existing code to
    access this field through an inline function.

    Signed-off-by: Simon Glass

    Simon Glass
     

15 Mar, 2016

1 commit

  • Many TI System on Chip (SoC) solutions do have a dedicated
    microcontroller for doing power management functionality. These include
    the AM335x, AM437x, Keystone K2G SoCs. The functionality provided by
    these microcontrollers and the communication mechanisms vary very
    widely. However, we are able to consolidate some basic functionality to
    be generic enough starting with K2G SoC family. Introduce a basic remote
    proc driver to support these microcontrollers. In fact, on SoCs starting
    with K2G, basic power management functions are primarily accessible for
    the High Level Operating Systems(HLOS) via these microcontroller solutions.

    Hence, having these started at a bootloader level is pretty much
    mandatory.

    Signed-off-by: Nishanth Menon
    Reviewed-by: Tom Rini

    Nishanth Menon
     

06 Dec, 2015

1 commit

  • Neither uc_pdata->name nor check_name are supposed to be NULL in
    _rproc_name_is_unique(). if uc_pdata->name is NULL, we are not
    intialized yet, however if check_data is NULL, we do not have
    proper data. Further, if either were NULL, strlen will crap out
    while attempting to derefence NULL.

    Instead, just check if either of these are NULL and bail out.

    This should also fix the following coverity scan warnings:
    *** CID 132281: Null pointer dereferences (FORWARD_NULL)
    /drivers/remoteproc/rproc-uclass.c: 73 in _rproc_name_is_unique()

    Reported-by: Tom Rini
    Signed-off-by: Nishanth Menon

    Nishanth Menon
     

23 Oct, 2015

2 commits

  • Introduce a dummy driver for sandbox that allows us to verify basic
    functionality. This is not meant to do anything functional - but is
    more or less meant as a framework plumbing debug helper.

    The sandbox remoteproc driver maintains absolutey no states and is a
    simple driver which just is filled with empty hooks. Idea being to give
    an approximate idea to implement own remoteproc driver using this as a
    template.

    Reviewed-by: Simon Glass
    Signed-off-by: Nishanth Menon
    Acked-by: Simon Glass

    Nishanth Menon
     
  • Many System on Chip(SoC) solutions are complex with multiple processors
    on the same die dedicated to either general purpose of specialized
    functions. Many examples do exist in today's SoCs from various vendors.
    Typical examples are micro controllers such as an ARM M3/M0 doing a
    offload of specific function such as event integration or power
    management or controlling camera etc.

    Traditionally, the responsibility of loading up such a processor with a
    firmware and communication has been with a High Level Operating
    System(HLOS) such as Linux. However, there exists classes of products
    where Linux would need to expect services from such a processor or the
    delay of Linux and operating system being able to load up such a
    firmware is unacceptable.

    To address these needs, we need some minimal capability to load such a
    system and ensure it is started prior to an Operating System(Linux or
    any other) is started up.

    NOTE: This is NOT meant to be a solve-all solution, instead, it tries to
    address certain class of SoCs and products that need such a solution.

    A very simple model is introduced here as part of the initial support
    that supports microcontrollers with internal memory (no MMU, no
    execution from external memory, or specific image format needs). This
    basic framework can then (hopefully) be extensible to other complex SoC
    processor support as need be.

    Reviewed-by: Simon Glass
    Signed-off-by: Nishanth Menon
    Acked-by: Simon Glass

    Nishanth Menon