19 Feb, 2020

1 commit

  • The implementation of dma_map_single() and dma_unmap_single() is
    exactly the same for all the architectures that support them.

    Factor them out to , and make all drivers to
    include instead of .

    If we need to differentiate them for some architectures, we can
    move the generic definitions to .

    Add some comments to the helpers. The concept is quite similar to
    the DMA-API of Linux kernel. Drivers are agnostic about what is
    going on behind the scene. Just call dma_map_single() before the
    DMA, and dma_unmap_single() after it.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

06 Feb, 2020

3 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
     
  • This function name conflicts with our desire to #define free() to
    something else on sandbox. Since it deals with resources, rename it to
    rfree().

    Signed-off-by: Simon Glass

    Simon Glass
     

20 Jan, 2020

6 commits


09 Dec, 2019

3 commits

  • Add new compatible to handle J721e SoC

    Signed-off-by: Vignesh Raghavendra
    Acked-by: Joe Hershberger
    Reviewed-by: Grygorii Strashko

    Vignesh Raghavendra
     
  • Implement dma_get_cfg() interface to pass flow id information for DMA
    clients to use. This is needed because on K3 SoCs, CPSW (ethernet) and
    UDMA (DMA provider) support "flows" within a given RX DMA channel. This
    allows different network packets to be segregated while using same RX
    DMA channel. In order for basic ethernet to work, CPSW slave must be
    aware of the flow ID allocated for the RX channel by the DMA driver.
    This interface allows CPSW to query flow ID from DMA provider and
    configure it in CPSW HW.

    Signed-off-by: Vignesh Raghavendra
    Acked-by: Joe Hershberger
    Reviewed-by: Grygorii Strashko

    Vignesh Raghavendra
     
  • Sometimes, there would be a need to exchange data between DMA provider
    and DMA client which are very specific to DMA driver of the SoC/platform
    and are not generic enough to be put into struct dma. Therefore, introduce
    dma_get_cfg() interface to get DMA provider specific data from client
    device. Clients can use unique configuration ID flags to get different
    configuration data from DMA driver.

    Signed-off-by: Vignesh Raghavendra
    Acked-by: Joe Hershberger
    Reviewed-by: Grygorii Strashko

    Vignesh Raghavendra
     

03 Dec, 2019

1 commit


18 May, 2019

1 commit

  • While converting CONFIG_SYS_[DI]CACHE_OFF to Kconfig, there are instances
    where these configuration items are conditional on SPL. This commit adds SPL
    variants of these configuration items, uses CONFIG_IS_ENABLED(), and updates
    the configurations as required.

    Acked-by: Alexey Brodkin
    Signed-off-by: Trevor Woerner
    [trini: Make the default depend on the setting for full U-Boot, update
    more zynq hardware]
    Signed-off-by: Tom Rini

    Trevor Woerner
     

03 May, 2019

2 commits


13 Apr, 2019

1 commit


12 Apr, 2019

2 commits

  • This patch prevents errors when running tftpput.

    Signed-off-by: Álvaro Fernández Rojas

    Álvaro Fernández Rojas
     
  • The UDMA-P is intended to perform similar (but significantly upgraded) functions
    as the packet-oriented DMA used on previous SoC devices. The UDMA-P module
    supports the transmission and reception of various packet types.
    The UDMA-P also supports acting as both a UTC and UDMA-C for its internal
    channels. Channels in the UDMA-P can be configured to be either Packet-Based or
    Third-Party channels on a channel by channel basis.

    The initial driver supports:
    - MEM_TO_MEM (TR mode)
    - DEV_TO_MEM (Packet mode)
    - MEM_TO_DEV (Packet mode)

    Signed-off-by: Peter Ujfalusi
    Signed-off-by: Grygorii Strashko
    Signed-off-by: Vignesh R

    Vignesh R
     

19 Dec, 2018

1 commit


07 Dec, 2018

3 commits

  • Add a sandbox DMA driver implementation (provider) and corresponding DM
    test.

    Reviewed-by: Tom Rini
    Signed-off-by: Grygorii Strashko
    Reviewed-by: Simon Glass
    Acked-by: Álvaro Fernández Rojas

    Grygorii Strashko
     
  • This adds channels support for dma controllers that have multiple channels
    which can transfer data to/from different devices (enet, usb...).

    DMA channle API:
    dma_get_by_index()
    dma_get_by_name()
    dma_request()
    dma_free()
    dma_enable()
    dma_disable()
    dma_prepare_rcv_buf()
    dma_receive()
    dma_send()

    Reviewed-by: Tom Rini
    Signed-off-by: Álvaro Fernández Rojas
    [grygorii.strashko@ti.com: drop unused dma_get_by_index_platdata(),
    add metadata to send/receive ops, add dma_prepare_rcv_buf(),
    minor clean up]
    Signed-off-by: Grygorii Strashko
    Reviewed-by: Simon Glass

    Álvaro Fernández Rojas
     
  • Move dma_ops to a separate header file, following other uclass
    implementations. While doing so, this patch also improves dma_ops
    documentation.

    Reviewed-by: Tom Rini
    Reviewed-by: Simon Glass
    Signed-off-by: Álvaro Fernández Rojas
    Signed-off-by: Grygorii Strashko

    Álvaro Fernández Rojas
     

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
     

28 Apr, 2018

1 commit


09 Feb, 2018

1 commit


20 Jan, 2018

1 commit


04 Oct, 2017

1 commit

  • 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
     

12 Jul, 2017

1 commit

  • Change is consistent with other SOCs and it is in preparation
    for adding SOMs. SOC's related files are moved from cpu/ to
    mach-imx/.

    This change is also coherent with the structure in kernel.

    Signed-off-by: Stefano Babic

    CC: Fabio Estevam
    CC: Akshay Bhat
    CC: Ken Lin
    CC: Marek Vasut
    CC: Heiko Schocher
    CC: "Sébastien Szymanski"
    CC: Christian Gmeiner
    CC: Stefan Roese
    CC: Patrick Bruenn
    CC: Troy Kisky
    CC: Nikita Kiryanov
    CC: Otavio Salvador
    CC: "Eric Bénard"
    CC: Jagan Teki
    CC: Ye Li
    CC: Peng Fan
    CC: Adrian Alonso
    CC: Alison Wang
    CC: Tim Harvey
    CC: Martin Donnelly
    CC: Marcin Niestroj
    CC: Lukasz Majewski
    CC: Adam Ford
    CC: "Albert ARIBAUD (3ADEV)"
    CC: Boris Brezillon
    CC: Soeren Moch
    CC: Richard Hu
    CC: Wig Cheng
    CC: Vanessa Maegima
    CC: Max Krummenacher
    CC: Stefan Agner
    CC: Markus Niebel
    CC: Breno Lima
    CC: Francesco Montefoschi
    CC: Jaehoon Chung
    CC: Scott Wood
    CC: Joe Hershberger
    CC: Anatolij Gustschin
    CC: Simon Glass
    CC: "Andrew F. Davis"
    CC: "Łukasz Majewski"
    CC: Patrice Chotard
    CC: Nobuhiro Iwamatsu
    CC: Hans de Goede
    CC: Masahiro Yamada
    CC: Stephen Warren
    CC: Andre Przywara
    CC: "Álvaro Fernández Rojas"
    CC: York Sun
    CC: Xiaoliang Yang
    CC: Chen-Yu Tsai
    CC: George McCollister
    CC: Sven Ebenfeld
    CC: Filip Brozovic
    CC: Petr Kulhavy
    CC: Eric Nelson
    CC: Bai Ping
    CC: Anson Huang
    CC: Sanchayan Maity
    CC: Lokesh Vutla
    CC: Patrick Delaunay
    CC: Gary Bisson
    CC: Alexander Graf
    CC: u-boot@lists.denx.de
    Reviewed-by: Fabio Estevam
    Reviewed-by: Christian Gmeiner

    Stefano Babic
     

01 Jun, 2017

2 commits

  • These support the flat device tree. We want to use the dev_read_..()
    prefix for functions that support both flat tree and live tree. So rename
    the existing functions to avoid confusion.

    In the end we will have:

    1. dev_read_addr...() - works on devices, supports flat/live tree
    2. devfdt_get_addr...() - current functions, flat tree only
    3. of_get_address() etc. - new functions, live tree only

    All drivers will be written to use 1. That function will in turn call
    either 2 or 3 depending on whether the flat or live tree is in use.

    Note this involves changing some dead code - the imx_lpi2c.c file.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • This header includes things that are needed to make driver build. Adjust
    existing users to include that always, even if other dm/ includes are
    present

    Signed-off-by: Simon Glass

    Simon Glass
     

24 Sep, 2016

1 commit


23 Feb, 2016

3 commits


24 Jan, 2016

1 commit


23 Oct, 2015

1 commit


19 Aug, 2015

1 commit

  • Incorporate DMA driver from legacy LPCLinux NXP BSP.
    The files taken from the legacy patch are:
    - lpc32xx DMA driver
    - lpc3250 header file DMA registers definition.

    The legacy driver was updated and clean-up as part of the integration with the latest u-boot.

    Signed-off-by: Sylvain Lemieux
    Acked-by: Marek Vasut
    Tested-by: Vladimir Zapolskiy

    Sylvain Lemieux
     

18 Aug, 2015

1 commit