blob: df5c84e2a4fdf9769f6ad2e3098e668a79b2f1c7 [file] [log] [blame]
Andy Shevchenkob466a372019-01-07 13:07:41 +02001/* SPDX-License-Identifier: GPL-2.0 */
Andy Shevchenko9cade1a2013-06-05 15:26:45 +03002/*
3 * Driver for the Synopsys DesignWare DMA Controller
4 *
5 * Copyright (C) 2013 Intel Corporation
Andy Shevchenko9cade1a2013-06-05 15:26:45 +03006 */
7
Andy Shevchenko2a52f6e2014-09-23 17:18:15 +03008#ifndef _DMA_DW_INTERNAL_H
9#define _DMA_DW_INTERNAL_H
Andy Shevchenko3d588f82014-09-23 17:18:11 +030010
11#include <linux/dma/dw.h>
Andy Shevchenko9cade1a2013-06-05 15:26:45 +030012
13#include "regs.h"
14
Andy Shevchenko69da8be2019-01-07 13:07:38 +020015int do_dma_probe(struct dw_dma_chip *chip);
16int do_dma_remove(struct dw_dma_chip *chip);
17
18void do_dw_dma_on(struct dw_dma *dw);
19void do_dw_dma_off(struct dw_dma *dw);
20
21int do_dw_dma_disable(struct dw_dma_chip *chip);
22int do_dw_dma_enable(struct dw_dma_chip *chip);
Andy Shevchenko9cade1a2013-06-05 15:26:45 +030023
Andy Shevchenko4d130de2014-08-19 20:29:16 +030024extern bool dw_dma_filter(struct dma_chan *chan, void *param);
Andy Shevchenko9cade1a2013-06-05 15:26:45 +030025
Andy Shevchenkoae923c92019-08-20 16:15:39 +030026struct dw_dma_chip_pdata {
27 const struct dw_dma_platform_data *pdata;
28 int (*probe)(struct dw_dma_chip *chip);
29 int (*remove)(struct dw_dma_chip *chip);
30 struct dw_dma_chip *chip;
31};
32
33static __maybe_unused const struct dw_dma_chip_pdata dw_dma_chip_pdata = {
34 .probe = dw_dma_probe,
35 .remove = dw_dma_remove,
36};
37
38static const struct dw_dma_platform_data idma32_pdata = {
39 .nr_channels = 8,
40 .chan_allocation_order = CHAN_ALLOCATION_ASCENDING,
41 .chan_priority = CHAN_PRIORITY_ASCENDING,
42 .block_size = 131071,
43 .nr_masters = 1,
44 .data_width = {4},
45 .multi_block = {1, 1, 1, 1, 1, 1, 1, 1},
46};
47
48static __maybe_unused const struct dw_dma_chip_pdata idma32_chip_pdata = {
49 .pdata = &idma32_pdata,
50 .probe = idma32_dma_probe,
51 .remove = idma32_dma_remove,
52};
53
Andy Shevchenko2a52f6e2014-09-23 17:18:15 +030054#endif /* _DMA_DW_INTERNAL_H */