summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-07-17 12:55:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-17 12:55:43 -0400
commit47ebe00b684c2bc183a766bc33c8b5943bc0df85 (patch)
treec0f155acc5623f6990d20b7a623f48f5e7aa0f61 /include/linux
parentfa121bb3fed6313b1f0af23952301e06cf6d32ed (diff)
parent5c274ca4cfb22a455e880f61536b1894fa29fd17 (diff)
Merge tag 'dmaengine-5.3-rc1' of git://git.infradead.org/users/vkoul/slave-dma
Pull dmaengine updates from Vinod Koul: - Add support in dmaengine core to do device node checks for DT devices and update bunch of drivers to use that and remove open coding from drivers - New driver/driver support for new hardware, namely: - MediaTek UART APDMA - Freescale i.mx7ulp edma2 - Synopsys eDMA IP core version 0 - Allwinner H6 DMA - Updates to axi-dma and support for interleaved cyclic transfers - Greg's debugfs return value check removals on drivers - Updates to stm32-dma, hsu, dw, pl330, tegra drivers * tag 'dmaengine-5.3-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (68 commits) dmaengine: Revert "dmaengine: fsl-edma: add i.mx7ulp edma2 version support" dmaengine: at_xdmac: check for non-empty xfers_list before invoking callback Documentation: dmaengine: clean up description of dmatest usage dmaengine: tegra210-adma: remove PM_CLK dependency dmaengine: fsl-edma: add i.mx7ulp edma2 version support dt-bindings: dma: fsl-edma: add new i.mx7ulp-edma dmaengine: fsl-edma-common: version check for v2 instead dmaengine: fsl-edma-common: move dmamux register to another single function dmaengine: fsl-edma: add drvdata for fsl-edma dmaengine: Revert "dmaengine: fsl-edma: support little endian for edma driver" dmaengine: rcar-dmac: Reject zero-length slave DMA requests dmaengine: dw: Enable iDMA 32-bit on Intel Elkhart Lake dmaengine: dw-edma: fix semicolon.cocci warnings dmaengine: sh: usb-dmac: Use [] to denote a flexible array member dmaengine: dmatest: timeout value of -1 should specify infinite wait dmaengine: dw: Distinguish ->remove() between DW and iDMA 32-bit dmaengine: fsl-edma: support little endian for edma driver dmaengine: hsu: Revert "set HSU_CH_MTSR to memory width" dmagengine: pl330: add code to get reset property dt-bindings: pl330: document the optional resets property ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dma/edma.h47
-rw-r--r--include/linux/dmaengine.h12
-rw-r--r--include/linux/fpga/adi-axi-common.h19
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/platform_data/dma-imx.h1
-rw-r--r--include/linux/sudmac.h49
6 files changed, 75 insertions, 54 deletions
diff --git a/include/linux/dma/edma.h b/include/linux/dma/edma.h
new file mode 100644
index 000000000000..cab6e18773da
--- /dev/null
+++ b/include/linux/dma/edma.h
@@ -0,0 +1,47 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (c) 2018-2019 Synopsys, Inc. and/or its affiliates.
4 * Synopsys DesignWare eDMA core driver
5 *
6 * Author: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
7 */
8
9#ifndef _DW_EDMA_H
10#define _DW_EDMA_H
11
12#include <linux/device.h>
13#include <linux/dmaengine.h>
14
15struct dw_edma;
16
17/**
18 * struct dw_edma_chip - representation of DesignWare eDMA controller hardware
19 * @dev: struct device of the eDMA controller
20 * @id: instance ID
21 * @irq: irq line
22 * @dw: struct dw_edma that is filed by dw_edma_probe()
23 */
24struct dw_edma_chip {
25 struct device *dev;
26 int id;
27 int irq;
28 struct dw_edma *dw;
29};
30
31/* Export to the platform drivers */
32#if IS_ENABLED(CONFIG_DW_EDMA)
33int dw_edma_probe(struct dw_edma_chip *chip);
34int dw_edma_remove(struct dw_edma_chip *chip);
35#else
36static inline int dw_edma_probe(struct dw_edma_chip *chip)
37{
38 return -ENODEV;
39}
40
41static inline int dw_edma_remove(struct dw_edma_chip *chip)
42{
43 return 0;
44}
45#endif /* CONFIG_DW_EDMA */
46
47#endif /* _DW_EDMA_H */
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index c952f987ee57..8fcdee1c0cf9 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -1302,7 +1302,8 @@ enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
1302enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); 1302enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
1303void dma_issue_pending_all(void); 1303void dma_issue_pending_all(void);
1304struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask, 1304struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask,
1305 dma_filter_fn fn, void *fn_param); 1305 dma_filter_fn fn, void *fn_param,
1306 struct device_node *np);
1306struct dma_chan *dma_request_slave_channel(struct device *dev, const char *name); 1307struct dma_chan *dma_request_slave_channel(struct device *dev, const char *name);
1307 1308
1308struct dma_chan *dma_request_chan(struct device *dev, const char *name); 1309struct dma_chan *dma_request_chan(struct device *dev, const char *name);
@@ -1327,7 +1328,9 @@ static inline void dma_issue_pending_all(void)
1327{ 1328{
1328} 1329}
1329static inline struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask, 1330static inline struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask,
1330 dma_filter_fn fn, void *fn_param) 1331 dma_filter_fn fn,
1332 void *fn_param,
1333 struct device_node *np)
1331{ 1334{
1332 return NULL; 1335 return NULL;
1333} 1336}
@@ -1399,7 +1402,8 @@ void dma_async_device_unregister(struct dma_device *device);
1399void dma_run_dependencies(struct dma_async_tx_descriptor *tx); 1402void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
1400struct dma_chan *dma_get_slave_channel(struct dma_chan *chan); 1403struct dma_chan *dma_get_slave_channel(struct dma_chan *chan);
1401struct dma_chan *dma_get_any_slave_channel(struct dma_device *device); 1404struct dma_chan *dma_get_any_slave_channel(struct dma_device *device);
1402#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) 1405#define dma_request_channel(mask, x, y) \
1406 __dma_request_channel(&(mask), x, y, NULL)
1403#define dma_request_slave_channel_compat(mask, x, y, dev, name) \ 1407#define dma_request_slave_channel_compat(mask, x, y, dev, name) \
1404 __dma_request_slave_channel_compat(&(mask), x, y, dev, name) 1408 __dma_request_slave_channel_compat(&(mask), x, y, dev, name)
1405 1409
@@ -1417,6 +1421,6 @@ static inline struct dma_chan
1417 if (!fn || !fn_param) 1421 if (!fn || !fn_param)
1418 return NULL; 1422 return NULL;
1419 1423
1420 return __dma_request_channel(mask, fn, fn_param); 1424 return __dma_request_channel(mask, fn, fn_param, NULL);
1421} 1425}
1422#endif /* DMAENGINE_H */ 1426#endif /* DMAENGINE_H */
diff --git a/include/linux/fpga/adi-axi-common.h b/include/linux/fpga/adi-axi-common.h
new file mode 100644
index 000000000000..7fc95d5c95bb
--- /dev/null
+++ b/include/linux/fpga/adi-axi-common.h
@@ -0,0 +1,19 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Analog Devices AXI common registers & definitions
4 *
5 * Copyright 2019 Analog Devices Inc.
6 *
7 * https://wiki.analog.com/resources/fpga/docs/axi_ip
8 * https://wiki.analog.com/resources/fpga/docs/hdl/regmap
9 */
10
11#ifndef ADI_AXI_COMMON_H_
12#define ADI_AXI_COMMON_H_
13
14#define ADI_AXI_REG_VERSION 0x0000
15
16#define ADI_AXI_PCORE_VER(major, minor, patch) \
17 (((major) << 16) | ((minor) << 8) | (patch))
18
19#endif /* ADI_AXI_COMMON_H_ */
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 40015609c4b5..c842735a4f45 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2367,6 +2367,7 @@
2367#define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 0xabcd 2367#define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 0xabcd
2368#define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3_AXI 0xabce 2368#define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3_AXI 0xabce
2369#define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB31 0xabcf 2369#define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB31 0xabcf
2370#define PCI_DEVICE_ID_SYNOPSYS_EDDA 0xedda
2370 2371
2371#define PCI_VENDOR_ID_USR 0x16ec 2372#define PCI_VENDOR_ID_USR 0x16ec
2372 2373
diff --git a/include/linux/platform_data/dma-imx.h b/include/linux/platform_data/dma-imx.h
index 80f9be858bd0..281adbb26e6b 100644
--- a/include/linux/platform_data/dma-imx.h
+++ b/include/linux/platform_data/dma-imx.h
@@ -52,7 +52,6 @@ struct imx_dma_data {
52 int dma_request2; /* secondary DMA request line */ 52 int dma_request2; /* secondary DMA request line */
53 enum sdma_peripheral_type peripheral_type; 53 enum sdma_peripheral_type peripheral_type;
54 int priority; 54 int priority;
55 struct device_node *of_node;
56}; 55};
57 56
58static inline int imx_dma_is_ipu(struct dma_chan *chan) 57static inline int imx_dma_is_ipu(struct dma_chan *chan)
diff --git a/include/linux/sudmac.h b/include/linux/sudmac.h
deleted file mode 100644
index cccc0a665d26..000000000000
--- a/include/linux/sudmac.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Header for the SUDMAC driver
4 *
5 * Copyright (C) 2013 Renesas Solutions Corp.
6 */
7#ifndef SUDMAC_H
8#define SUDMAC_H
9
10#include <linux/dmaengine.h>
11#include <linux/shdma-base.h>
12#include <linux/types.h>
13
14/* Used by slave DMA clients to request DMA to/from a specific peripheral */
15struct sudmac_slave {
16 struct shdma_slave shdma_slave; /* Set by the platform */
17};
18
19/*
20 * Supplied by platforms to specify, how a DMA channel has to be configured for
21 * a certain peripheral
22 */
23struct sudmac_slave_config {
24 int slave_id;
25};
26
27struct sudmac_channel {
28 unsigned long offset;
29 unsigned long config;
30 unsigned long wait; /* The configuable range is 0 to 3 */
31 unsigned long dint_end_bit;
32};
33
34struct sudmac_pdata {
35 const struct sudmac_slave_config *slave;
36 int slave_num;
37 const struct sudmac_channel *channel;
38 int channel_num;
39};
40
41/* Definitions for the sudmac_channel.config */
42#define SUDMAC_TX_BUFFER_MODE BIT(0)
43#define SUDMAC_RX_END_MODE BIT(1)
44
45/* Definitions for the sudmac_channel.dint_end_bit */
46#define SUDMAC_DMA_BIT_CH0 BIT(0)
47#define SUDMAC_DMA_BIT_CH1 BIT(1)
48
49#endif