blob: 6db72dae2f16adf227b3c93dd93a45da07b7f825 [file] [log] [blame]
Jassi Brarb3040e42010-05-23 20:28:19 -07001/* 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
Thomas Abraham3e2ec132011-10-24 11:43:02 +020015#include <linux/dmaengine.h>
Jassi Brarb3040e42010-05-23 20:28:19 -070016#include <asm/hardware/pl330.h>
17
18struct dma_pl330_peri {
19 /*
20 * Peri_Req i/f of the DMAC that is
21 * peripheral could be reached from.
22 */
Boojin Kim1b9bb712011-09-02 09:44:30 +090023 u8 peri_id; /* specific dma id */
Jassi Brarb3040e42010-05-23 20:28:19 -070024 enum pl330_reqtype rqtype;
Jassi Brarb3040e42010-05-23 20:28:19 -070025};
26
27struct dma_pl330_platdata {
28 /*
29 * Number of valid peripherals connected to DMAC.
30 * This may be different from the value read from
31 * CR0, as the PL330 implementation might have 'holes'
32 * in the peri list or the peri could also be reached
33 * from another DMAC which the platform prefers.
34 */
35 u8 nr_valid_peri;
36 /* Array of valid peripherals */
37 struct dma_pl330_peri *peri;
38 /* Bytes to allocate for MC buffer */
39 unsigned mcbuf_sz;
40};
41
Thomas Abraham3e2ec132011-10-24 11:43:02 +020042extern bool pl330_filter(struct dma_chan *chan, void *param);
Jassi Brarb3040e42010-05-23 20:28:19 -070043#endif /* __AMBA_PL330_H_ */