diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-20 04:14:40 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-26 14:59:30 -0500 |
commit | 75c06963dd947252271ffa6107a25cddb2b8f362 (patch) | |
tree | 71a4df9bc4d83ce3af62da53a1acf54f902421d9 /arch/arm/mach-s5pv210/dma.c | |
parent | b5b654f2c7396a5a575118eaafbfa2bdef168be2 (diff) |
ARM: amba: samsung: use common amba device initializers
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-s5pv210/dma.c')
-rw-r--r-- | arch/arm/mach-s5pv210/dma.c | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/arch/arm/mach-s5pv210/dma.c b/arch/arm/mach-s5pv210/dma.c index 8602fa51a942..f6885d247d14 100644 --- a/arch/arm/mach-s5pv210/dma.c +++ b/arch/arm/mach-s5pv210/dma.c | |||
@@ -71,21 +71,8 @@ struct dma_pl330_platdata s5pv210_pdma0_pdata = { | |||
71 | .peri_id = pdma0_peri, | 71 | .peri_id = pdma0_peri, |
72 | }; | 72 | }; |
73 | 73 | ||
74 | struct amba_device s5pv210_device_pdma0 = { | 74 | AMBA_AHB_DEVICE(s5pv210_pdma0, "dma-pl330.0", 0x00041330, S5PV210_PA_PDMA0, |
75 | .dev = { | 75 | {IRQ_PDMA0}, &s5pv210_pdma0_pdata); |
76 | .init_name = "dma-pl330.0", | ||
77 | .dma_mask = &dma_dmamask, | ||
78 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
79 | .platform_data = &s5pv210_pdma0_pdata, | ||
80 | }, | ||
81 | .res = { | ||
82 | .start = S5PV210_PA_PDMA0, | ||
83 | .end = S5PV210_PA_PDMA0 + SZ_4K, | ||
84 | .flags = IORESOURCE_MEM, | ||
85 | }, | ||
86 | .irq = {IRQ_PDMA0}, | ||
87 | .periphid = 0x00041330, | ||
88 | }; | ||
89 | 76 | ||
90 | u8 pdma1_peri[] = { | 77 | u8 pdma1_peri[] = { |
91 | DMACH_UART0_RX, | 78 | DMACH_UART0_RX, |
@@ -127,31 +114,18 @@ struct dma_pl330_platdata s5pv210_pdma1_pdata = { | |||
127 | .peri_id = pdma1_peri, | 114 | .peri_id = pdma1_peri, |
128 | }; | 115 | }; |
129 | 116 | ||
130 | struct amba_device s5pv210_device_pdma1 = { | 117 | AMBA_AHB_DEVICE(s5pv210_pdma1, "dma-pl330.1", 0x00041330, S5PV210_PA_PDMA1, |
131 | .dev = { | 118 | {IRQ_PDMA1}, &s5pv210_pdma1_pdata); |
132 | .init_name = "dma-pl330.1", | ||
133 | .dma_mask = &dma_dmamask, | ||
134 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
135 | .platform_data = &s5pv210_pdma1_pdata, | ||
136 | }, | ||
137 | .res = { | ||
138 | .start = S5PV210_PA_PDMA1, | ||
139 | .end = S5PV210_PA_PDMA1 + SZ_4K, | ||
140 | .flags = IORESOURCE_MEM, | ||
141 | }, | ||
142 | .irq = {IRQ_PDMA1}, | ||
143 | .periphid = 0x00041330, | ||
144 | }; | ||
145 | 119 | ||
146 | static int __init s5pv210_dma_init(void) | 120 | static int __init s5pv210_dma_init(void) |
147 | { | 121 | { |
148 | dma_cap_set(DMA_SLAVE, s5pv210_pdma0_pdata.cap_mask); | 122 | dma_cap_set(DMA_SLAVE, s5pv210_pdma0_pdata.cap_mask); |
149 | dma_cap_set(DMA_CYCLIC, s5pv210_pdma0_pdata.cap_mask); | 123 | dma_cap_set(DMA_CYCLIC, s5pv210_pdma0_pdata.cap_mask); |
150 | amba_device_register(&s5pv210_device_pdma0, &iomem_resource); | 124 | amba_device_register(&s5pv210_pdma0_device, &iomem_resource); |
151 | 125 | ||
152 | dma_cap_set(DMA_SLAVE, s5pv210_pdma1_pdata.cap_mask); | 126 | dma_cap_set(DMA_SLAVE, s5pv210_pdma1_pdata.cap_mask); |
153 | dma_cap_set(DMA_CYCLIC, s5pv210_pdma1_pdata.cap_mask); | 127 | dma_cap_set(DMA_CYCLIC, s5pv210_pdma1_pdata.cap_mask); |
154 | amba_device_register(&s5pv210_device_pdma1, &iomem_resource); | 128 | amba_device_register(&s5pv210_pdma1_device, &iomem_resource); |
155 | 129 | ||
156 | return 0; | 130 | return 0; |
157 | } | 131 | } |