1 /* linux/arch/arm/mach-s5pc100/dma.c
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
6 * Copyright (C) 2010 Samsung Electronics Co. Ltd.
7 * Jaswinder Singh <jassi.brar@samsung.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #include <linux/dma-mapping.h>
25 #include <linux/amba/bus.h>
26 #include <linux/amba/pl330.h>
29 #include <plat/devs.h>
30 #include <plat/irqs.h>
33 #include <mach/irqs.h>
36 static u64 dma_dmamask
= DMA_BIT_MASK(32);
38 static u8 pdma0_peri
[] = {
71 static struct dma_pl330_platdata s5pc100_pdma0_pdata
= {
72 .nr_valid_peri
= ARRAY_SIZE(pdma0_peri
),
73 .peri_id
= pdma0_peri
,
76 static AMBA_AHB_DEVICE(s5pc100_pdma0
, "dma-pl330.0", 0x00041330,
77 S5PC100_PA_PDMA0
, {IRQ_PDMA0
}, &s5pc100_pdma0_pdata
);
79 static u8 pdma1_peri
[] = {
112 static struct dma_pl330_platdata s5pc100_pdma1_pdata
= {
113 .nr_valid_peri
= ARRAY_SIZE(pdma1_peri
),
114 .peri_id
= pdma1_peri
,
117 static AMBA_AHB_DEVICE(s5pc100_pdma1
, "dma-pl330.1", 0x00041330,
118 S5PC100_PA_PDMA1
, {IRQ_PDMA1
}, &s5pc100_pdma1_pdata
);
120 static int __init
s5pc100_dma_init(void)
122 dma_cap_set(DMA_SLAVE
, s5pc100_pdma0_pdata
.cap_mask
);
123 dma_cap_set(DMA_CYCLIC
, s5pc100_pdma0_pdata
.cap_mask
);
124 amba_device_register(&s5pc100_pdma0_device
, &iomem_resource
);
126 dma_cap_set(DMA_SLAVE
, s5pc100_pdma1_pdata
.cap_mask
);
127 dma_cap_set(DMA_CYCLIC
, s5pc100_pdma1_pdata
.cap_mask
);
128 amba_device_register(&s5pc100_pdma1_device
, &iomem_resource
);
132 arch_initcall(s5pc100_dma_init
);