aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/amba/pl330.h
diff options
context:
space:
mode:
authorJassi Brar <jassi.brar@samsung.com>2010-05-23 23:28:19 -0400
committerDan Williams <dan.j.williams@intel.com>2010-05-23 23:28:19 -0400
commitb3040e40675ec2c43542331cd30d4ee3dae797e8 (patch)
treea327c4a92118dd0e1c61b8455e744910cd121f57 /include/linux/amba/pl330.h
parent6f68fbaafbaa033205cd131d3e1f3c4b914e9b78 (diff)
DMA: PL330: Add dma api driver
Add DMA Engine API driver for the PL330 DMAC. This driver is supposed to be reusable by various platforms that have one or more PL330 DMACs. Atm, DMA_SLAVE and DMA_MEMCPY capabilities have been implemented. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Reviewed-by: Linus Walleij <linus.walleij@stericsson.com> [dan.j.williams@intel.com: missing slab.h and ->device_control() fixups] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux/amba/pl330.h')
-rw-r--r--include/linux/amba/pl330.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/include/linux/amba/pl330.h b/include/linux/amba/pl330.h
new file mode 100644
index 000000000000..cbee7de7dd36
--- /dev/null
+++ b/include/linux/amba/pl330.h
@@ -0,0 +1,45 @@
1/* linux/include/linux/amba/pl330.h
2 *
3 * Copyright (C) 2010 Samsung Electronics Co. Ltd.
4 * Jaswinder Singh <jassi.brar@samsung.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 */
11
12#ifndef __AMBA_PL330_H_
13#define __AMBA_PL330_H_
14
15#include <asm/hardware/pl330.h>
16
17struct dma_pl330_peri {
18 /*
19 * Peri_Req i/f of the DMAC that is
20 * peripheral could be reached from.
21 */
22 u8 peri_id; /* {0, 31} */
23 enum pl330_reqtype rqtype;
24
25 /* For M->D and D->M Channels */
26 int burst_sz; /* in power of 2 */
27 dma_addr_t fifo_addr;
28};
29
30struct dma_pl330_platdata {
31 /*
32 * Number of valid peripherals connected to DMAC.
33 * This may be different from the value read from
34 * CR0, as the PL330 implementation might have 'holes'
35 * in the peri list or the peri could also be reached
36 * from another DMAC which the platform prefers.
37 */
38 u8 nr_valid_peri;
39 /* Array of valid peripherals */
40 struct dma_pl330_peri *peri;
41 /* Bytes to allocate for MC buffer */
42 unsigned mcbuf_sz;
43};
44
45#endif /* __AMBA_PL330_H_ */