aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/setup-sh7722.c')
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7722.c70
1 files changed, 67 insertions, 3 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index 538280a3dc66..aec182bed8a1 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -75,15 +75,79 @@ static struct sh_dmae_slave_config sh7722_dmae_slaves[] = {
75 }, 75 },
76}; 76};
77 77
78static struct sh_dmae_channel sh7722_dmae_channels[] = {
79 {
80 .offset = 0,
81 .dmars = 0,
82 .dmars_bit = 0,
83 }, {
84 .offset = 0x10,
85 .dmars = 0,
86 .dmars_bit = 8,
87 }, {
88 .offset = 0x20,
89 .dmars = 4,
90 .dmars_bit = 0,
91 }, {
92 .offset = 0x30,
93 .dmars = 4,
94 .dmars_bit = 8,
95 }, {
96 .offset = 0x50,
97 .dmars = 8,
98 .dmars_bit = 0,
99 }, {
100 .offset = 0x60,
101 .dmars = 8,
102 .dmars_bit = 8,
103 }
104};
105
78static struct sh_dmae_pdata dma_platform_data = { 106static struct sh_dmae_pdata dma_platform_data = {
79 .mode = 0, 107 .slave = sh7722_dmae_slaves,
80 .config = sh7722_dmae_slaves, 108 .slave_num = ARRAY_SIZE(sh7722_dmae_slaves),
81 .config_num = ARRAY_SIZE(sh7722_dmae_slaves), 109 .channel = sh7722_dmae_channels,
110 .channel_num = ARRAY_SIZE(sh7722_dmae_channels),
111};
112
113static struct resource sh7722_dmae_resources[] = {
114 [0] = {
115 /* Channel registers and DMAOR */
116 .start = 0xfe008020,
117 .end = 0xfe00808f,
118 .flags = IORESOURCE_MEM,
119 },
120 [1] = {
121 /* DMARSx */
122 .start = 0xfe009000,
123 .end = 0xfe00900b,
124 .flags = IORESOURCE_MEM,
125 },
126 {
127 /* DMA error IRQ */
128 .start = 78,
129 .end = 78,
130 .flags = IORESOURCE_IRQ,
131 },
132 {
133 /* IRQ for channels 0-3 */
134 .start = 48,
135 .end = 51,
136 .flags = IORESOURCE_IRQ,
137 },
138 {
139 /* IRQ for channels 4-5 */
140 .start = 76,
141 .end = 77,
142 .flags = IORESOURCE_IRQ,
143 },
82}; 144};
83 145
84struct platform_device dma_device = { 146struct platform_device dma_device = {
85 .name = "sh-dma-engine", 147 .name = "sh-dma-engine",
86 .id = -1, 148 .id = -1,
149 .resource = sh7722_dmae_resources,
150 .num_resources = ARRAY_SIZE(sh7722_dmae_resources),
87 .dev = { 151 .dev = {
88 .platform_data = &dma_platform_data, 152 .platform_data = &dma_platform_data,
89 }, 153 },