aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/sh3/setup-sh7710.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/cpu/sh3/setup-sh7710.c')
-rw-r--r--arch/sh/kernel/cpu/sh3/setup-sh7710.c73
1 files changed, 36 insertions, 37 deletions
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7710.c b/arch/sh/kernel/cpu/sh3/setup-sh7710.c
index 9a60ffd34a9f..78f6b01d42c3 100644
--- a/arch/sh/kernel/cpu/sh3/setup-sh7710.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh7710.c
@@ -96,48 +96,50 @@ static struct platform_device rtc_device = {
96 }, 96 },
97}; 97};
98 98
99static struct plat_sci_port sci_platform_data[] = { 99static struct plat_sci_port scif0_platform_data = {
100 { 100 .mapbase = 0xa4400000,
101 .mapbase = 0xa4400000, 101 .flags = UPF_BOOT_AUTOCONF,
102 .flags = UPF_BOOT_AUTOCONF, 102 .scscr = SCSCR_TE | SCSCR_RE | SCSCR_REIE |
103 .scscr = SCSCR_TE | SCSCR_RE | SCSCR_REIE | 103 SCSCR_CKE1 | SCSCR_CKE0,
104 SCSCR_CKE1 | SCSCR_CKE0, 104 .scbrr_algo_id = SCBRR_ALGO_2,
105 .scbrr_algo_id = SCBRR_ALGO_2, 105 .type = PORT_SCIF,
106 .type = PORT_SCIF, 106 .irqs = { 52, 52, 52, 52 },
107 .irqs = { 52, 52, 52, 52 }, 107};
108 }, { 108
109 .mapbase = 0xa4410000, 109static struct platform_device scif0_device = {
110 .flags = UPF_BOOT_AUTOCONF,
111 .scscr = SCSCR_TE | SCSCR_RE | SCSCR_REIE |
112 SCSCR_CKE1 | SCSCR_CKE0,
113 .scbrr_algo_id = SCBRR_ALGO_2,
114 .type = PORT_SCIF,
115 .irqs = { 56, 56, 56, 56 },
116 }, {
117
118 .flags = 0,
119 }
120};
121
122static struct platform_device sci_device = {
123 .name = "sh-sci", 110 .name = "sh-sci",
124 .id = -1, 111 .id = 0,
112 .dev = {
113 .platform_data = &scif0_platform_data,
114 },
115};
116
117static struct plat_sci_port scif1_platform_data = {
118 .mapbase = 0xa4410000,
119 .flags = UPF_BOOT_AUTOCONF,
120 .scscr = SCSCR_TE | SCSCR_RE | SCSCR_REIE |
121 SCSCR_CKE1 | SCSCR_CKE0,
122 .scbrr_algo_id = SCBRR_ALGO_2,
123 .type = PORT_SCIF,
124 .irqs = { 56, 56, 56, 56 },
125};
126
127static struct platform_device scif1_device = {
128 .name = "sh-sci",
129 .id = 1,
125 .dev = { 130 .dev = {
126 .platform_data = sci_platform_data, 131 .platform_data = &scif1_platform_data,
127 }, 132 },
128}; 133};
129 134
130static struct sh_timer_config tmu0_platform_data = { 135static struct sh_timer_config tmu0_platform_data = {
131 .name = "TMU0",
132 .channel_offset = 0x02, 136 .channel_offset = 0x02,
133 .timer_bit = 0, 137 .timer_bit = 0,
134 .clk = "peripheral_clk",
135 .clockevent_rating = 200, 138 .clockevent_rating = 200,
136}; 139};
137 140
138static struct resource tmu0_resources[] = { 141static struct resource tmu0_resources[] = {
139 [0] = { 142 [0] = {
140 .name = "TMU0",
141 .start = 0xa412fe94, 143 .start = 0xa412fe94,
142 .end = 0xa412fe9f, 144 .end = 0xa412fe9f,
143 .flags = IORESOURCE_MEM, 145 .flags = IORESOURCE_MEM,
@@ -159,16 +161,13 @@ static struct platform_device tmu0_device = {
159}; 161};
160 162
161static struct sh_timer_config tmu1_platform_data = { 163static struct sh_timer_config tmu1_platform_data = {
162 .name = "TMU1",
163 .channel_offset = 0xe, 164 .channel_offset = 0xe,
164 .timer_bit = 1, 165 .timer_bit = 1,
165 .clk = "peripheral_clk",
166 .clocksource_rating = 200, 166 .clocksource_rating = 200,
167}; 167};
168 168
169static struct resource tmu1_resources[] = { 169static struct resource tmu1_resources[] = {
170 [0] = { 170 [0] = {
171 .name = "TMU1",
172 .start = 0xa412fea0, 171 .start = 0xa412fea0,
173 .end = 0xa412feab, 172 .end = 0xa412feab,
174 .flags = IORESOURCE_MEM, 173 .flags = IORESOURCE_MEM,
@@ -190,15 +189,12 @@ static struct platform_device tmu1_device = {
190}; 189};
191 190
192static struct sh_timer_config tmu2_platform_data = { 191static struct sh_timer_config tmu2_platform_data = {
193 .name = "TMU2",
194 .channel_offset = 0x1a, 192 .channel_offset = 0x1a,
195 .timer_bit = 2, 193 .timer_bit = 2,
196 .clk = "peripheral_clk",
197}; 194};
198 195
199static struct resource tmu2_resources[] = { 196static struct resource tmu2_resources[] = {
200 [0] = { 197 [0] = {
201 .name = "TMU2",
202 .start = 0xa412feac, 198 .start = 0xa412feac,
203 .end = 0xa412feb5, 199 .end = 0xa412feb5,
204 .flags = IORESOURCE_MEM, 200 .flags = IORESOURCE_MEM,
@@ -220,10 +216,11 @@ static struct platform_device tmu2_device = {
220}; 216};
221 217
222static struct platform_device *sh7710_devices[] __initdata = { 218static struct platform_device *sh7710_devices[] __initdata = {
219 &scif0_device,
220 &scif1_device,
223 &tmu0_device, 221 &tmu0_device,
224 &tmu1_device, 222 &tmu1_device,
225 &tmu2_device, 223 &tmu2_device,
226 &sci_device,
227 &rtc_device, 224 &rtc_device,
228}; 225};
229 226
@@ -232,9 +229,11 @@ static int __init sh7710_devices_setup(void)
232 return platform_add_devices(sh7710_devices, 229 return platform_add_devices(sh7710_devices,
233 ARRAY_SIZE(sh7710_devices)); 230 ARRAY_SIZE(sh7710_devices));
234} 231}
235__initcall(sh7710_devices_setup); 232arch_initcall(sh7710_devices_setup);
236 233
237static struct platform_device *sh7710_early_devices[] __initdata = { 234static struct platform_device *sh7710_early_devices[] __initdata = {
235 &scif0_device,
236 &scif1_device,
238 &tmu0_device, 237 &tmu0_device,
239 &tmu1_device, 238 &tmu1_device,
240 &tmu2_device, 239 &tmu2_device,