aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7722.c6
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7724.c54
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7780.c6
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7785.c6
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7786.c4
5 files changed, 18 insertions, 58 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index dc9b30d086a4..24c6167a7181 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -24,7 +24,7 @@
24#include <cpu/dma-register.h> 24#include <cpu/dma-register.h>
25#include <cpu/sh7722.h> 25#include <cpu/sh7722.h>
26 26
27static struct sh_dmae_slave_config sh7722_dmae_slaves[] = { 27static const struct sh_dmae_slave_config sh7722_dmae_slaves[] = {
28 { 28 {
29 .slave_id = SHDMA_SLAVE_SCIF0_TX, 29 .slave_id = SHDMA_SLAVE_SCIF0_TX,
30 .addr = 0xffe0000c, 30 .addr = 0xffe0000c,
@@ -78,7 +78,7 @@ static struct sh_dmae_slave_config sh7722_dmae_slaves[] = {
78 }, 78 },
79}; 79};
80 80
81static struct sh_dmae_channel sh7722_dmae_channels[] = { 81static const struct sh_dmae_channel sh7722_dmae_channels[] = {
82 { 82 {
83 .offset = 0, 83 .offset = 0,
84 .dmars = 0, 84 .dmars = 0,
@@ -106,7 +106,7 @@ static struct sh_dmae_channel sh7722_dmae_channels[] = {
106 } 106 }
107}; 107};
108 108
109static unsigned int ts_shift[] = TS_SHIFT; 109static const unsigned int ts_shift[] = TS_SHIFT;
110 110
111static struct sh_dmae_pdata dma_platform_data = { 111static struct sh_dmae_pdata dma_platform_data = {
112 .slave = sh7722_dmae_slaves, 112 .slave = sh7722_dmae_slaves,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
index 8a0a4a99f86b..89fe16d20fdb 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
@@ -31,7 +31,7 @@
31#include <cpu/sh7724.h> 31#include <cpu/sh7724.h>
32 32
33/* DMA */ 33/* DMA */
34static struct sh_dmae_channel sh7724_dmae0_channels[] = { 34static const struct sh_dmae_channel sh7724_dmae_channels[] = {
35 { 35 {
36 .offset = 0, 36 .offset = 0,
37 .dmars = 0, 37 .dmars = 0,
@@ -59,51 +59,11 @@ static struct sh_dmae_channel sh7724_dmae0_channels[] = {
59 } 59 }
60}; 60};
61 61
62static struct sh_dmae_channel sh7724_dmae1_channels[] = { 62static const unsigned int ts_shift[] = TS_SHIFT;
63 {
64 .offset = 0,
65 .dmars = 0,
66 .dmars_bit = 0,
67 }, {
68 .offset = 0x10,
69 .dmars = 0,
70 .dmars_bit = 8,
71 }, {
72 .offset = 0x20,
73 .dmars = 4,
74 .dmars_bit = 0,
75 }, {
76 .offset = 0x30,
77 .dmars = 4,
78 .dmars_bit = 8,
79 }, {
80 .offset = 0x50,
81 .dmars = 8,
82 .dmars_bit = 0,
83 }, {
84 .offset = 0x60,
85 .dmars = 8,
86 .dmars_bit = 8,
87 }
88};
89
90static unsigned int ts_shift[] = TS_SHIFT;
91
92static struct sh_dmae_pdata dma0_platform_data = {
93 .channel = sh7724_dmae0_channels,
94 .channel_num = ARRAY_SIZE(sh7724_dmae0_channels),
95 .ts_low_shift = CHCR_TS_LOW_SHIFT,
96 .ts_low_mask = CHCR_TS_LOW_MASK,
97 .ts_high_shift = CHCR_TS_HIGH_SHIFT,
98 .ts_high_mask = CHCR_TS_HIGH_MASK,
99 .ts_shift = ts_shift,
100 .ts_shift_num = ARRAY_SIZE(ts_shift),
101 .dmaor_init = DMAOR_INIT,
102};
103 63
104static struct sh_dmae_pdata dma1_platform_data = { 64static struct sh_dmae_pdata dma_platform_data = {
105 .channel = sh7724_dmae1_channels, 65 .channel = sh7724_dmae_channels,
106 .channel_num = ARRAY_SIZE(sh7724_dmae1_channels), 66 .channel_num = ARRAY_SIZE(sh7724_dmae_channels),
107 .ts_low_shift = CHCR_TS_LOW_SHIFT, 67 .ts_low_shift = CHCR_TS_LOW_SHIFT,
108 .ts_low_mask = CHCR_TS_LOW_MASK, 68 .ts_low_mask = CHCR_TS_LOW_MASK,
109 .ts_high_shift = CHCR_TS_HIGH_SHIFT, 69 .ts_high_shift = CHCR_TS_HIGH_SHIFT,
@@ -187,7 +147,7 @@ static struct platform_device dma0_device = {
187 .resource = sh7724_dmae0_resources, 147 .resource = sh7724_dmae0_resources,
188 .num_resources = ARRAY_SIZE(sh7724_dmae0_resources), 148 .num_resources = ARRAY_SIZE(sh7724_dmae0_resources),
189 .dev = { 149 .dev = {
190 .platform_data = &dma0_platform_data, 150 .platform_data = &dma_platform_data,
191 }, 151 },
192 .archdata = { 152 .archdata = {
193 .hwblk_id = HWBLK_DMAC0, 153 .hwblk_id = HWBLK_DMAC0,
@@ -200,7 +160,7 @@ static struct platform_device dma1_device = {
200 .resource = sh7724_dmae1_resources, 160 .resource = sh7724_dmae1_resources,
201 .num_resources = ARRAY_SIZE(sh7724_dmae1_resources), 161 .num_resources = ARRAY_SIZE(sh7724_dmae1_resources),
202 .dev = { 162 .dev = {
203 .platform_data = &dma1_platform_data, 163 .platform_data = &dma_platform_data,
204 }, 164 },
205 .archdata = { 165 .archdata = {
206 .hwblk_id = HWBLK_DMAC1, 166 .hwblk_id = HWBLK_DMAC1,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
index 05fc38df1582..b12f537e4dde 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
@@ -233,7 +233,7 @@ static struct platform_device rtc_device = {
233}; 233};
234 234
235/* DMA */ 235/* DMA */
236static struct sh_dmae_channel sh7780_dmae0_channels[] = { 236static const struct sh_dmae_channel sh7780_dmae0_channels[] = {
237 { 237 {
238 .offset = 0, 238 .offset = 0,
239 .dmars = 0, 239 .dmars = 0,
@@ -261,7 +261,7 @@ static struct sh_dmae_channel sh7780_dmae0_channels[] = {
261 } 261 }
262}; 262};
263 263
264static struct sh_dmae_channel sh7780_dmae1_channels[] = { 264static const struct sh_dmae_channel sh7780_dmae1_channels[] = {
265 { 265 {
266 .offset = 0, 266 .offset = 0,
267 }, { 267 }, {
@@ -277,7 +277,7 @@ static struct sh_dmae_channel sh7780_dmae1_channels[] = {
277 } 277 }
278}; 278};
279 279
280static unsigned int ts_shift[] = TS_SHIFT; 280static const unsigned int ts_shift[] = TS_SHIFT;
281 281
282static struct sh_dmae_pdata dma0_platform_data = { 282static struct sh_dmae_pdata dma0_platform_data = {
283 .channel = sh7780_dmae0_channels, 283 .channel = sh7780_dmae0_channels,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
index 07bb2d4619f8..f3e3ea0ce050 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
@@ -275,7 +275,7 @@ static struct platform_device tmu5_device = {
275}; 275};
276 276
277/* DMA */ 277/* DMA */
278static struct sh_dmae_channel sh7785_dmae0_channels[] = { 278static const struct sh_dmae_channel sh7785_dmae0_channels[] = {
279 { 279 {
280 .offset = 0, 280 .offset = 0,
281 .dmars = 0, 281 .dmars = 0,
@@ -303,7 +303,7 @@ static struct sh_dmae_channel sh7785_dmae0_channels[] = {
303 } 303 }
304}; 304};
305 305
306static struct sh_dmae_channel sh7785_dmae1_channels[] = { 306static const struct sh_dmae_channel sh7785_dmae1_channels[] = {
307 { 307 {
308 .offset = 0, 308 .offset = 0,
309 }, { 309 }, {
@@ -319,7 +319,7 @@ static struct sh_dmae_channel sh7785_dmae1_channels[] = {
319 } 319 }
320}; 320};
321 321
322static unsigned int ts_shift[] = TS_SHIFT; 322static const unsigned int ts_shift[] = TS_SHIFT;
323 323
324static struct sh_dmae_pdata dma0_platform_data = { 324static struct sh_dmae_pdata dma0_platform_data = {
325 .channel = sh7785_dmae0_channels, 325 .channel = sh7785_dmae0_channels,
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
index d7336036d04d..81657091da46 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
@@ -445,7 +445,7 @@ static struct platform_device tmu11_device = {
445 .num_resources = ARRAY_SIZE(tmu11_resources), 445 .num_resources = ARRAY_SIZE(tmu11_resources),
446}; 446};
447 447
448static struct sh_dmae_channel dmac0_channels[] = { 448static const struct sh_dmae_channel dmac0_channels[] = {
449 { 449 {
450 .offset = 0, 450 .offset = 0,
451 .dmars = 0, 451 .dmars = 0,
@@ -473,7 +473,7 @@ static struct sh_dmae_channel dmac0_channels[] = {
473 } 473 }
474}; 474};
475 475
476static unsigned int ts_shift[] = TS_SHIFT; 476static const unsigned int ts_shift[] = TS_SHIFT;
477 477
478static struct sh_dmae_pdata dma0_platform_data = { 478static struct sh_dmae_pdata dma0_platform_data = {
479 .channel = dmac0_channels, 479 .channel = dmac0_channels,