Skip to content

Commit f7087bb

Browse files
committed
Merge pull request #945 from notro/dma
Make legacy DMA API available on ARCH_BCM2835
2 parents af4d42c + b1020b5 commit f7087bb

File tree

12 files changed

+591
-1054
lines changed

12 files changed

+591
-1054
lines changed

arch/arm/boot/dts/bcm2708_common.dtsi

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,23 @@
1010

1111
dma: dma@7e007000 {
1212
compatible = "brcm,bcm2835-dma";
13+
reg = <0x7e007000 0xf00>;
14+
interrupts = <1 16>,
15+
<1 17>,
16+
<1 18>,
17+
<1 19>,
18+
<1 20>,
19+
<1 21>,
20+
<1 22>,
21+
<1 23>,
22+
<1 24>,
23+
<1 25>,
24+
<1 26>,
25+
<1 27>,
26+
<1 28>;
27+
1328
#dma-cells = <1>;
29+
brcm,dma-channel-mask = <0x7f35>;
1430
};
1531

1632
intc: interrupt-controller {

arch/arm/mach-bcm2708/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# Makefile for the linux kernel.
33
#
44

5-
obj-$(CONFIG_MACH_BCM2708) += bcm2708.o armctrl.o vcio.o power.o dma.o
5+
obj-$(CONFIG_MACH_BCM2708) += bcm2708.o armctrl.o vcio.o power.o
66
obj-$(CONFIG_BCM2708_GPIO) += bcm2708_gpio.o
77
obj-$(CONFIG_BCM2708_VCMEM) += vc_mem.o

arch/arm/mach-bcm2708/bcm2708.c

Lines changed: 59 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
#include <asm/mach/map.h>
5656

5757
#include <mach/timex.h>
58-
#include <mach/dma.h>
5958
#include <mach/vcio.h>
6059
#include <mach/system.h>
6160

@@ -248,24 +247,71 @@ static struct amba_device *amba_devs[] __initdata = {
248247
&uart0_device,
249248
};
250249

251-
static struct resource bcm2708_dmaman_resources[] = {
250+
static struct resource bcm2708_dmaengine_resources[] = {
252251
{
253-
.start = DMA_BASE,
254-
.end = DMA_BASE + SZ_4K - 1,
255-
.flags = IORESOURCE_MEM,
256-
}
257-
};
258-
259-
static struct platform_device bcm2708_dmaman_device = {
260-
.name = BCM_DMAMAN_DRIVER_NAME,
261-
.id = 0, /* first bcm2708_dma */
262-
.resource = bcm2708_dmaman_resources,
263-
.num_resources = ARRAY_SIZE(bcm2708_dmaman_resources),
252+
.start = DMA_BASE,
253+
.end = DMA_BASE + SZ_4K - 1,
254+
.flags = IORESOURCE_MEM,
255+
}, {
256+
.start = IRQ_DMA0,
257+
.end = IRQ_DMA0,
258+
.flags = IORESOURCE_IRQ,
259+
}, {
260+
.start = IRQ_DMA1,
261+
.end = IRQ_DMA1,
262+
.flags = IORESOURCE_IRQ,
263+
}, {
264+
.start = IRQ_DMA2,
265+
.end = IRQ_DMA2,
266+
.flags = IORESOURCE_IRQ,
267+
}, {
268+
.start = IRQ_DMA3,
269+
.end = IRQ_DMA3,
270+
.flags = IORESOURCE_IRQ,
271+
}, {
272+
.start = IRQ_DMA4,
273+
.end = IRQ_DMA4,
274+
.flags = IORESOURCE_IRQ,
275+
}, {
276+
.start = IRQ_DMA5,
277+
.end = IRQ_DMA5,
278+
.flags = IORESOURCE_IRQ,
279+
}, {
280+
.start = IRQ_DMA6,
281+
.end = IRQ_DMA6,
282+
.flags = IORESOURCE_IRQ,
283+
}, {
284+
.start = IRQ_DMA7,
285+
.end = IRQ_DMA7,
286+
.flags = IORESOURCE_IRQ,
287+
}, {
288+
.start = IRQ_DMA8,
289+
.end = IRQ_DMA8,
290+
.flags = IORESOURCE_IRQ,
291+
}, {
292+
.start = IRQ_DMA9,
293+
.end = IRQ_DMA9,
294+
.flags = IORESOURCE_IRQ,
295+
}, {
296+
.start = IRQ_DMA10,
297+
.end = IRQ_DMA10,
298+
.flags = IORESOURCE_IRQ,
299+
}, {
300+
.start = IRQ_DMA11,
301+
.end = IRQ_DMA11,
302+
.flags = IORESOURCE_IRQ,
303+
}, {
304+
.start = IRQ_DMA12,
305+
.end = IRQ_DMA12,
306+
.flags = IORESOURCE_IRQ,
307+
}
264308
};
265309

266310
static struct platform_device bcm2708_dmaengine_device = {
267311
.name = "bcm2708-dmaengine",
268312
.id = -1,
313+
.resource = bcm2708_dmaengine_resources,
314+
.num_resources = ARRAY_SIZE(bcm2708_dmaengine_resources),
269315
};
270316

271317
#if defined(CONFIG_W1_MASTER_GPIO) || defined(CONFIG_W1_MASTER_GPIO_MODULE)
@@ -858,7 +904,6 @@ void __init bcm2708_init(void)
858904
bcm2708_init_clocks();
859905
bcm2708_dt_init();
860906

861-
bcm_register_device(&bcm2708_dmaman_device);
862907
bcm_register_device_dt(&bcm2708_dmaengine_device);
863908
bcm_register_device(&bcm2708_vcio_device);
864909
#ifdef CONFIG_BCM2708_GPIO

0 commit comments

Comments
 (0)