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
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
-
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 -
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
20 Jan, 2020
6 commits
-
Cast pointers properly so as to avoid warnings when driver is built for
32 bit platformsSigned-off-by: Vignesh Raghavendra
Reviewed-by: Grygorii Strashko
Signed-off-by: Lokesh Vutla -
UDMA always expects 64 bit address pointer of the transfer descriptor in
the Ring. But on 32 bit cores like R5, pointer is always 32 bit in size.
Therefore copy over 32 bit pointer value to 64 bit variable before
pushing it over to the ring, so that upper 32 bits are 0s.Signed-off-by: Vignesh Raghavendra
Reviewed-by: Grygorii Strashko
Signed-off-by: Lokesh Vutla -
Exposed ring mode works well with 32 bit and 64 bit cores without need
for Proxies for 32 bit cores. Therefore switch to exposed ring mode.Signed-off-by: Vignesh Raghavendra
Reviewed-by: Grygorii Strashko
Signed-off-by: Lokesh Vutla -
Fix up the debug prints that were dumping state of TCHAN RT registers to
use tchan for MEM_TO_DEV transfers.Signed-off-by: Vignesh Raghavendra
Reviewed-by: Grygorii Strashko
Signed-off-by: Lokesh Vutla -
Remove redundant coherency checks before calling cache ops in UDMA
driver. This is now handled in arch specific cache operation
implementation based on Kconfig optionSigned-off-by: Vignesh Raghavendra
Reviewed-by: Grygorii Strashko
Signed-off-by: Lokesh Vutla -
On K3 SoCs, DMA channels are shared across multiple entities, therefore
U-Boot DMA driver needs to query resource range from centralised
resource management controller i.e SystemFirmware and use DMA channels
allocated for A72 host. Add support for the same.Signed-off-by: Vignesh Raghavendra
Reviewed-by: Grygorii Strashko
Signed-off-by: Lokesh Vutla
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 -
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 -
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
03 Dec, 2019
1 commit
-
These functions are CPU-related and do not use driver model. Move them to
cpu_func.hSigned-off-by: Simon Glass
Reviewed-by: Daniel Schwierzeck
Reviewed-by: Tom Rini
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
03 May, 2019
2 commits
-
Upcoming sysfw (2019.03) will not open the channelized firewalls during
init, it only going to do so in response to the channel configuration
message.Remove the channel state checks done before the channel configuration and
move it after the configuration for warning purposes.Signed-off-by: Peter Ujfalusi
Signed-off-by: Vignesh Raghavendra
Reviewed-by: Grygorii Strashko -
Currently packet data is wrongly extracted when metadata is NULL.
Fix it and negate the if check.Signed-off-by: Keerthy
Reviewed-by: Grygorii Strashko
Reviewed-by: Peter Ujfalusi
13 Apr, 2019
1 commit
-
- mt76xx: add USB support, small fixes
- ath79: small fixes, add support for QCA9563 SoC and AP152 reference board
- mscc: small fixes, add network support for JR2 and ServalT SoCs
- bmips: small fixes, enable more drivers for ARM specific BCM6858 and BCM63158 SoCs
- MIPS: fix redundant relocation of initrd images
12 Apr, 2019
2 commits
-
This patch prevents errors when running tftpput.
Signed-off-by: Á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
19 Dec, 2018
1 commit
-
BCM6348 IUDMA controller is present on multiple BMIPS (BCM63xx) SoCs.
Signed-off-by: Álvaro Fernández Rojas
Reviewed-by: Daniel Schwierzeck
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 -
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 -
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
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
28 Apr, 2018
1 commit
-
We have a large number of places where while we historically referenced
gd in the code we no longer do, as well as cases where the code added
that line "just in case" during development and never dropped it.Signed-off-by: Tom Rini
09 Feb, 2018
1 commit
-
This converts the following to Kconfig:
CONFIG_APBH_DMA
CONFIG_APBH_DMA_BURST
CONFIG_APBH_DMA_BURST8Signed-off-by: Adam Ford
Reviewed-by: Stefan Agner
[trini: Add in MMC as well]
Signed-off-by: Tom Rini
20 Jan, 2018
1 commit
-
Add support for simple memory fill operation. With large data sizes
it is much faster to use EDMA for memory fill rather than CPU.Signed-off-by: Tero Kristo
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
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
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 onlyAll 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
-
This header includes things that are needed to make driver build. Adjust
existing users to include that always, even if other dm/ includes are
presentSigned-off-by: Simon Glass
24 Sep, 2016
1 commit
-
Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have
the same content. (both just wrap )Replace all include directives for with .
Signed-off-by: Masahiro Yamada
[trini: Fixup include/clk.]
Signed-off-by: Tom Rini
23 Feb, 2016
3 commits
-
adopt ti-edma3 driver to device driver model
Signed-off-by: Mugunthan V N
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki -
Add TI_EDMA3 entry on Kconfig with help description.
Signed-off-by: Mugunthan V N
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki -
Implement a DMA uclass so that the devices like ethernet, spi,
mmc etc can offload the data transfers from/to the device and
memory.Signed-off-by: Mugunthan V N
Reviewed-by: Simon Glass
Reviewed-by: Jagan Teki
24 Jan, 2016
1 commit
-
Update APBH-DMA driver and head files to support i.MX7D
Signed-off-by: Peng Fan
Cc: Stefano Babic
23 Oct, 2015
1 commit
-
Fix Linkram size.
Signed-off-by: Vitaly Andrianov
Signed-off-by: Mugunthan V N
Signed-off-by: Lokesh Vutla
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
18 Aug, 2015
1 commit
-
Signed-off-by: Vignesh R
Reviewed-by: Jagan Teki