Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 1 | /* |
| 2 | * sh7367 processor support |
| 3 | * |
| 4 | * Copyright (C) 2010 Magnus Damm |
| 5 | * Copyright (C) 2008 Yoshihiro Shimoda |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; version 2 of the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | */ |
| 20 | #include <linux/kernel.h> |
| 21 | #include <linux/init.h> |
| 22 | #include <linux/interrupt.h> |
| 23 | #include <linux/irq.h> |
| 24 | #include <linux/platform_device.h> |
Magnus Damm | de32835 | 2011-04-28 03:16:32 +0000 | [diff] [blame] | 25 | #include <linux/uio_driver.h> |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 26 | #include <linux/delay.h> |
| 27 | #include <linux/input.h> |
| 28 | #include <linux/io.h> |
| 29 | #include <linux/serial_sci.h> |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 30 | #include <linux/sh_timer.h> |
| 31 | #include <mach/hardware.h> |
Magnus Damm | 237caf9 | 2012-02-29 21:37:04 +0900 | [diff] [blame^] | 32 | #include <mach/common.h> |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 33 | #include <asm/mach-types.h> |
| 34 | #include <asm/mach/arch.h> |
Magnus Damm | 237caf9 | 2012-02-29 21:37:04 +0900 | [diff] [blame^] | 35 | #include <asm/mach/map.h> |
| 36 | |
| 37 | static struct map_desc sh7367_io_desc[] __initdata = { |
| 38 | /* create a 1:1 entity map for 0xe6xxxxxx |
| 39 | * used by CPGA, INTC and PFC. |
| 40 | */ |
| 41 | { |
| 42 | .virtual = 0xe6000000, |
| 43 | .pfn = __phys_to_pfn(0xe6000000), |
| 44 | .length = 256 << 20, |
| 45 | .type = MT_DEVICE_NONSHARED |
| 46 | }, |
| 47 | }; |
| 48 | |
| 49 | void __init sh7367_map_io(void) |
| 50 | { |
| 51 | iotable_init(sh7367_io_desc, ARRAY_SIZE(sh7367_io_desc)); |
| 52 | } |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 53 | |
Magnus Damm | 7490509 | 2010-05-20 14:35:30 +0000 | [diff] [blame] | 54 | /* SCIFA0 */ |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 55 | static struct plat_sci_port scif0_platform_data = { |
| 56 | .mapbase = 0xe6c40000, |
| 57 | .flags = UPF_BOOT_AUTOCONF, |
Paul Mundt | f43dc23 | 2011-01-13 15:06:28 +0900 | [diff] [blame] | 58 | .scscr = SCSCR_RE | SCSCR_TE, |
| 59 | .scbrr_algo_id = SCBRR_ALGO_4, |
Paul Mundt | 3110572 | 2011-06-14 15:07:06 +0900 | [diff] [blame] | 60 | .type = PORT_SCIFA, |
Magnus Damm | 7490509 | 2010-05-20 14:35:30 +0000 | [diff] [blame] | 61 | .irqs = { evt2irq(0xc00), evt2irq(0xc00), |
| 62 | evt2irq(0xc00), evt2irq(0xc00) }, |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 63 | }; |
| 64 | |
| 65 | static struct platform_device scif0_device = { |
| 66 | .name = "sh-sci", |
| 67 | .id = 0, |
| 68 | .dev = { |
| 69 | .platform_data = &scif0_platform_data, |
| 70 | }, |
| 71 | }; |
| 72 | |
Magnus Damm | 7490509 | 2010-05-20 14:35:30 +0000 | [diff] [blame] | 73 | /* SCIFA1 */ |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 74 | static struct plat_sci_port scif1_platform_data = { |
| 75 | .mapbase = 0xe6c50000, |
| 76 | .flags = UPF_BOOT_AUTOCONF, |
Paul Mundt | f43dc23 | 2011-01-13 15:06:28 +0900 | [diff] [blame] | 77 | .scscr = SCSCR_RE | SCSCR_TE, |
| 78 | .scbrr_algo_id = SCBRR_ALGO_4, |
Paul Mundt | 3110572 | 2011-06-14 15:07:06 +0900 | [diff] [blame] | 79 | .type = PORT_SCIFA, |
Magnus Damm | 7490509 | 2010-05-20 14:35:30 +0000 | [diff] [blame] | 80 | .irqs = { evt2irq(0xc20), evt2irq(0xc20), |
| 81 | evt2irq(0xc20), evt2irq(0xc20) }, |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 82 | }; |
| 83 | |
| 84 | static struct platform_device scif1_device = { |
| 85 | .name = "sh-sci", |
| 86 | .id = 1, |
| 87 | .dev = { |
| 88 | .platform_data = &scif1_platform_data, |
| 89 | }, |
| 90 | }; |
| 91 | |
Magnus Damm | 7490509 | 2010-05-20 14:35:30 +0000 | [diff] [blame] | 92 | /* SCIFA2 */ |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 93 | static struct plat_sci_port scif2_platform_data = { |
| 94 | .mapbase = 0xe6c60000, |
| 95 | .flags = UPF_BOOT_AUTOCONF, |
Paul Mundt | f43dc23 | 2011-01-13 15:06:28 +0900 | [diff] [blame] | 96 | .scscr = SCSCR_RE | SCSCR_TE, |
| 97 | .scbrr_algo_id = SCBRR_ALGO_4, |
Paul Mundt | 3110572 | 2011-06-14 15:07:06 +0900 | [diff] [blame] | 98 | .type = PORT_SCIFA, |
Magnus Damm | 7490509 | 2010-05-20 14:35:30 +0000 | [diff] [blame] | 99 | .irqs = { evt2irq(0xc40), evt2irq(0xc40), |
| 100 | evt2irq(0xc40), evt2irq(0xc40) }, |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 101 | }; |
| 102 | |
| 103 | static struct platform_device scif2_device = { |
| 104 | .name = "sh-sci", |
| 105 | .id = 2, |
| 106 | .dev = { |
| 107 | .platform_data = &scif2_platform_data, |
| 108 | }, |
| 109 | }; |
| 110 | |
Magnus Damm | 7490509 | 2010-05-20 14:35:30 +0000 | [diff] [blame] | 111 | /* SCIFA3 */ |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 112 | static struct plat_sci_port scif3_platform_data = { |
| 113 | .mapbase = 0xe6c70000, |
| 114 | .flags = UPF_BOOT_AUTOCONF, |
Paul Mundt | f43dc23 | 2011-01-13 15:06:28 +0900 | [diff] [blame] | 115 | .scscr = SCSCR_RE | SCSCR_TE, |
| 116 | .scbrr_algo_id = SCBRR_ALGO_4, |
Paul Mundt | 3110572 | 2011-06-14 15:07:06 +0900 | [diff] [blame] | 117 | .type = PORT_SCIFA, |
Magnus Damm | 7490509 | 2010-05-20 14:35:30 +0000 | [diff] [blame] | 118 | .irqs = { evt2irq(0xc60), evt2irq(0xc60), |
| 119 | evt2irq(0xc60), evt2irq(0xc60) }, |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 120 | }; |
| 121 | |
| 122 | static struct platform_device scif3_device = { |
| 123 | .name = "sh-sci", |
| 124 | .id = 3, |
| 125 | .dev = { |
| 126 | .platform_data = &scif3_platform_data, |
| 127 | }, |
| 128 | }; |
| 129 | |
Magnus Damm | 7490509 | 2010-05-20 14:35:30 +0000 | [diff] [blame] | 130 | /* SCIFA4 */ |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 131 | static struct plat_sci_port scif4_platform_data = { |
| 132 | .mapbase = 0xe6c80000, |
| 133 | .flags = UPF_BOOT_AUTOCONF, |
Paul Mundt | f43dc23 | 2011-01-13 15:06:28 +0900 | [diff] [blame] | 134 | .scscr = SCSCR_RE | SCSCR_TE, |
| 135 | .scbrr_algo_id = SCBRR_ALGO_4, |
Paul Mundt | 3110572 | 2011-06-14 15:07:06 +0900 | [diff] [blame] | 136 | .type = PORT_SCIFA, |
Magnus Damm | 7490509 | 2010-05-20 14:35:30 +0000 | [diff] [blame] | 137 | .irqs = { evt2irq(0xd20), evt2irq(0xd20), |
| 138 | evt2irq(0xd20), evt2irq(0xd20) }, |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 139 | }; |
| 140 | |
| 141 | static struct platform_device scif4_device = { |
| 142 | .name = "sh-sci", |
| 143 | .id = 4, |
| 144 | .dev = { |
| 145 | .platform_data = &scif4_platform_data, |
| 146 | }, |
| 147 | }; |
| 148 | |
Magnus Damm | 7490509 | 2010-05-20 14:35:30 +0000 | [diff] [blame] | 149 | /* SCIFA5 */ |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 150 | static struct plat_sci_port scif5_platform_data = { |
| 151 | .mapbase = 0xe6cb0000, |
| 152 | .flags = UPF_BOOT_AUTOCONF, |
Paul Mundt | f43dc23 | 2011-01-13 15:06:28 +0900 | [diff] [blame] | 153 | .scscr = SCSCR_RE | SCSCR_TE, |
| 154 | .scbrr_algo_id = SCBRR_ALGO_4, |
Paul Mundt | 3110572 | 2011-06-14 15:07:06 +0900 | [diff] [blame] | 155 | .type = PORT_SCIFA, |
Magnus Damm | 7490509 | 2010-05-20 14:35:30 +0000 | [diff] [blame] | 156 | .irqs = { evt2irq(0xd40), evt2irq(0xd40), |
| 157 | evt2irq(0xd40), evt2irq(0xd40) }, |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 158 | }; |
| 159 | |
| 160 | static struct platform_device scif5_device = { |
| 161 | .name = "sh-sci", |
| 162 | .id = 5, |
| 163 | .dev = { |
| 164 | .platform_data = &scif5_platform_data, |
| 165 | }, |
| 166 | }; |
| 167 | |
Magnus Damm | 7490509 | 2010-05-20 14:35:30 +0000 | [diff] [blame] | 168 | /* SCIFB */ |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 169 | static struct plat_sci_port scif6_platform_data = { |
| 170 | .mapbase = 0xe6c30000, |
| 171 | .flags = UPF_BOOT_AUTOCONF, |
Paul Mundt | f43dc23 | 2011-01-13 15:06:28 +0900 | [diff] [blame] | 172 | .scscr = SCSCR_RE | SCSCR_TE, |
| 173 | .scbrr_algo_id = SCBRR_ALGO_4, |
Paul Mundt | 3110572 | 2011-06-14 15:07:06 +0900 | [diff] [blame] | 174 | .type = PORT_SCIFB, |
Magnus Damm | 7490509 | 2010-05-20 14:35:30 +0000 | [diff] [blame] | 175 | .irqs = { evt2irq(0xd60), evt2irq(0xd60), |
| 176 | evt2irq(0xd60), evt2irq(0xd60) }, |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 177 | }; |
| 178 | |
| 179 | static struct platform_device scif6_device = { |
| 180 | .name = "sh-sci", |
| 181 | .id = 6, |
| 182 | .dev = { |
| 183 | .platform_data = &scif6_platform_data, |
| 184 | }, |
| 185 | }; |
| 186 | |
| 187 | static struct sh_timer_config cmt10_platform_data = { |
| 188 | .name = "CMT10", |
| 189 | .channel_offset = 0x10, |
| 190 | .timer_bit = 0, |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 191 | .clockevent_rating = 125, |
| 192 | .clocksource_rating = 125, |
| 193 | }; |
| 194 | |
| 195 | static struct resource cmt10_resources[] = { |
| 196 | [0] = { |
| 197 | .name = "CMT10", |
| 198 | .start = 0xe6138010, |
| 199 | .end = 0xe613801b, |
| 200 | .flags = IORESOURCE_MEM, |
| 201 | }, |
| 202 | [1] = { |
Magnus Damm | 7490509 | 2010-05-20 14:35:30 +0000 | [diff] [blame] | 203 | .start = evt2irq(0xb00), /* CMT1_CMT10 */ |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 204 | .flags = IORESOURCE_IRQ, |
| 205 | }, |
| 206 | }; |
| 207 | |
| 208 | static struct platform_device cmt10_device = { |
| 209 | .name = "sh_cmt", |
| 210 | .id = 10, |
| 211 | .dev = { |
| 212 | .platform_data = &cmt10_platform_data, |
| 213 | }, |
| 214 | .resource = cmt10_resources, |
| 215 | .num_resources = ARRAY_SIZE(cmt10_resources), |
| 216 | }; |
| 217 | |
Magnus Damm | de32835 | 2011-04-28 03:16:32 +0000 | [diff] [blame] | 218 | /* VPU */ |
| 219 | static struct uio_info vpu_platform_data = { |
| 220 | .name = "VPU5", |
| 221 | .version = "0", |
| 222 | .irq = intcs_evt2irq(0x980), |
| 223 | }; |
| 224 | |
| 225 | static struct resource vpu_resources[] = { |
| 226 | [0] = { |
| 227 | .name = "VPU", |
| 228 | .start = 0xfe900000, |
| 229 | .end = 0xfe902807, |
| 230 | .flags = IORESOURCE_MEM, |
| 231 | }, |
| 232 | }; |
| 233 | |
| 234 | static struct platform_device vpu_device = { |
| 235 | .name = "uio_pdrv_genirq", |
| 236 | .id = 0, |
| 237 | .dev = { |
| 238 | .platform_data = &vpu_platform_data, |
| 239 | }, |
| 240 | .resource = vpu_resources, |
| 241 | .num_resources = ARRAY_SIZE(vpu_resources), |
| 242 | }; |
| 243 | |
| 244 | /* VEU0 */ |
| 245 | static struct uio_info veu0_platform_data = { |
| 246 | .name = "VEU0", |
| 247 | .version = "0", |
| 248 | .irq = intcs_evt2irq(0x700), |
| 249 | }; |
| 250 | |
| 251 | static struct resource veu0_resources[] = { |
| 252 | [0] = { |
| 253 | .name = "VEU0", |
| 254 | .start = 0xfe920000, |
| 255 | .end = 0xfe9200b7, |
| 256 | .flags = IORESOURCE_MEM, |
| 257 | }, |
| 258 | }; |
| 259 | |
| 260 | static struct platform_device veu0_device = { |
| 261 | .name = "uio_pdrv_genirq", |
| 262 | .id = 1, |
| 263 | .dev = { |
| 264 | .platform_data = &veu0_platform_data, |
| 265 | }, |
| 266 | .resource = veu0_resources, |
| 267 | .num_resources = ARRAY_SIZE(veu0_resources), |
| 268 | }; |
| 269 | |
| 270 | /* VEU1 */ |
| 271 | static struct uio_info veu1_platform_data = { |
| 272 | .name = "VEU1", |
| 273 | .version = "0", |
| 274 | .irq = intcs_evt2irq(0x720), |
| 275 | }; |
| 276 | |
| 277 | static struct resource veu1_resources[] = { |
| 278 | [0] = { |
| 279 | .name = "VEU1", |
| 280 | .start = 0xfe924000, |
| 281 | .end = 0xfe9240b7, |
| 282 | .flags = IORESOURCE_MEM, |
| 283 | }, |
| 284 | }; |
| 285 | |
| 286 | static struct platform_device veu1_device = { |
| 287 | .name = "uio_pdrv_genirq", |
| 288 | .id = 2, |
| 289 | .dev = { |
| 290 | .platform_data = &veu1_platform_data, |
| 291 | }, |
| 292 | .resource = veu1_resources, |
| 293 | .num_resources = ARRAY_SIZE(veu1_resources), |
| 294 | }; |
| 295 | |
| 296 | /* VEU2 */ |
| 297 | static struct uio_info veu2_platform_data = { |
| 298 | .name = "VEU2", |
| 299 | .version = "0", |
| 300 | .irq = intcs_evt2irq(0x740), |
| 301 | }; |
| 302 | |
| 303 | static struct resource veu2_resources[] = { |
| 304 | [0] = { |
| 305 | .name = "VEU2", |
| 306 | .start = 0xfe928000, |
| 307 | .end = 0xfe9280b7, |
| 308 | .flags = IORESOURCE_MEM, |
| 309 | }, |
| 310 | }; |
| 311 | |
| 312 | static struct platform_device veu2_device = { |
| 313 | .name = "uio_pdrv_genirq", |
| 314 | .id = 3, |
| 315 | .dev = { |
| 316 | .platform_data = &veu2_platform_data, |
| 317 | }, |
| 318 | .resource = veu2_resources, |
| 319 | .num_resources = ARRAY_SIZE(veu2_resources), |
| 320 | }; |
| 321 | |
| 322 | /* VEU3 */ |
| 323 | static struct uio_info veu3_platform_data = { |
| 324 | .name = "VEU3", |
| 325 | .version = "0", |
| 326 | .irq = intcs_evt2irq(0x760), |
| 327 | }; |
| 328 | |
| 329 | static struct resource veu3_resources[] = { |
| 330 | [0] = { |
| 331 | .name = "VEU3", |
| 332 | .start = 0xfe92c000, |
| 333 | .end = 0xfe92c0b7, |
| 334 | .flags = IORESOURCE_MEM, |
| 335 | }, |
| 336 | }; |
| 337 | |
| 338 | static struct platform_device veu3_device = { |
| 339 | .name = "uio_pdrv_genirq", |
| 340 | .id = 4, |
| 341 | .dev = { |
| 342 | .platform_data = &veu3_platform_data, |
| 343 | }, |
| 344 | .resource = veu3_resources, |
| 345 | .num_resources = ARRAY_SIZE(veu3_resources), |
| 346 | }; |
| 347 | |
| 348 | /* VEU2H */ |
| 349 | static struct uio_info veu2h_platform_data = { |
| 350 | .name = "VEU2H", |
| 351 | .version = "0", |
| 352 | .irq = intcs_evt2irq(0x520), |
| 353 | }; |
| 354 | |
| 355 | static struct resource veu2h_resources[] = { |
| 356 | [0] = { |
| 357 | .name = "VEU2H", |
| 358 | .start = 0xfe93c000, |
| 359 | .end = 0xfe93c27b, |
| 360 | .flags = IORESOURCE_MEM, |
| 361 | }, |
| 362 | }; |
| 363 | |
| 364 | static struct platform_device veu2h_device = { |
| 365 | .name = "uio_pdrv_genirq", |
| 366 | .id = 5, |
| 367 | .dev = { |
| 368 | .platform_data = &veu2h_platform_data, |
| 369 | }, |
| 370 | .resource = veu2h_resources, |
| 371 | .num_resources = ARRAY_SIZE(veu2h_resources), |
| 372 | }; |
| 373 | |
| 374 | /* JPU */ |
| 375 | static struct uio_info jpu_platform_data = { |
| 376 | .name = "JPU", |
| 377 | .version = "0", |
| 378 | .irq = intcs_evt2irq(0x560), |
| 379 | }; |
| 380 | |
| 381 | static struct resource jpu_resources[] = { |
| 382 | [0] = { |
| 383 | .name = "JPU", |
| 384 | .start = 0xfe980000, |
| 385 | .end = 0xfe9902d3, |
| 386 | .flags = IORESOURCE_MEM, |
| 387 | }, |
| 388 | }; |
| 389 | |
| 390 | static struct platform_device jpu_device = { |
| 391 | .name = "uio_pdrv_genirq", |
| 392 | .id = 6, |
| 393 | .dev = { |
| 394 | .platform_data = &jpu_platform_data, |
| 395 | }, |
| 396 | .resource = jpu_resources, |
| 397 | .num_resources = ARRAY_SIZE(jpu_resources), |
| 398 | }; |
| 399 | |
| 400 | /* SPU1 */ |
| 401 | static struct uio_info spu1_platform_data = { |
| 402 | .name = "SPU1", |
| 403 | .version = "0", |
| 404 | .irq = evt2irq(0xfc0), |
| 405 | }; |
| 406 | |
| 407 | static struct resource spu1_resources[] = { |
| 408 | [0] = { |
| 409 | .name = "SPU1", |
| 410 | .start = 0xfe300000, |
| 411 | .end = 0xfe3fffff, |
| 412 | .flags = IORESOURCE_MEM, |
| 413 | }, |
| 414 | }; |
| 415 | |
| 416 | static struct platform_device spu1_device = { |
| 417 | .name = "uio_pdrv_genirq", |
| 418 | .id = 7, |
| 419 | .dev = { |
| 420 | .platform_data = &spu1_platform_data, |
| 421 | }, |
| 422 | .resource = spu1_resources, |
| 423 | .num_resources = ARRAY_SIZE(spu1_resources), |
| 424 | }; |
| 425 | |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 426 | static struct platform_device *sh7367_early_devices[] __initdata = { |
| 427 | &scif0_device, |
| 428 | &scif1_device, |
| 429 | &scif2_device, |
| 430 | &scif3_device, |
| 431 | &scif4_device, |
| 432 | &scif5_device, |
| 433 | &scif6_device, |
| 434 | &cmt10_device, |
| 435 | }; |
| 436 | |
Magnus Damm | de32835 | 2011-04-28 03:16:32 +0000 | [diff] [blame] | 437 | static struct platform_device *sh7367_devices[] __initdata = { |
| 438 | &vpu_device, |
| 439 | &veu0_device, |
| 440 | &veu1_device, |
| 441 | &veu2_device, |
| 442 | &veu3_device, |
| 443 | &veu2h_device, |
| 444 | &jpu_device, |
| 445 | &spu1_device, |
| 446 | }; |
| 447 | |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 448 | void __init sh7367_add_standard_devices(void) |
| 449 | { |
| 450 | platform_add_devices(sh7367_early_devices, |
| 451 | ARRAY_SIZE(sh7367_early_devices)); |
Magnus Damm | de32835 | 2011-04-28 03:16:32 +0000 | [diff] [blame] | 452 | |
| 453 | platform_add_devices(sh7367_devices, |
| 454 | ARRAY_SIZE(sh7367_devices)); |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 455 | } |
| 456 | |
| 457 | #define SYMSTPCR2 0xe6158048 |
| 458 | #define SYMSTPCR2_CMT1 (1 << 29) |
| 459 | |
| 460 | void __init sh7367_add_early_devices(void) |
| 461 | { |
| 462 | /* enable clock to CMT1 */ |
| 463 | __raw_writel(__raw_readl(SYMSTPCR2) & ~SYMSTPCR2_CMT1, SYMSTPCR2); |
| 464 | |
| 465 | early_platform_add_devices(sh7367_early_devices, |
| 466 | ARRAY_SIZE(sh7367_early_devices)); |
Magnus Damm | 237caf9 | 2012-02-29 21:37:04 +0900 | [diff] [blame^] | 467 | |
| 468 | /* setup early console here as well */ |
| 469 | shmobile_setup_console(); |
Magnus Damm | c793c1b | 2010-02-05 11:14:49 +0000 | [diff] [blame] | 470 | } |