4 * Copyright (C) 2006 Paul Mundt
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
10 #include <linux/platform_device.h>
11 #include <linux/init.h>
12 #include <linux/serial.h>
13 #include <linux/serial_sci.h>
14 #include <linux/sh_timer.h>
16 static struct plat_sci_port sci_platform_data[] = {
18 .mapbase = 0xffe80000,
19 .flags = UPF_BOOT_AUTOCONF,
21 .irqs = { 40, 41, 43, 42 },
27 static struct platform_device sci_device = {
31 .platform_data = sci_platform_data,
35 static struct sh_timer_config tmu0_platform_data = {
37 .channel_offset = 0x04,
40 .clockevent_rating = 200,
43 static struct resource tmu0_resources[] = {
48 .flags = IORESOURCE_MEM,
52 .flags = IORESOURCE_IRQ,
56 static struct platform_device tmu0_device = {
60 .platform_data = &tmu0_platform_data,
62 .resource = tmu0_resources,
63 .num_resources = ARRAY_SIZE(tmu0_resources),
66 static struct sh_timer_config tmu1_platform_data = {
68 .channel_offset = 0x10,
71 .clocksource_rating = 200,
74 static struct resource tmu1_resources[] = {
79 .flags = IORESOURCE_MEM,
83 .flags = IORESOURCE_IRQ,
87 static struct platform_device tmu1_device = {
91 .platform_data = &tmu1_platform_data,
93 .resource = tmu1_resources,
94 .num_resources = ARRAY_SIZE(tmu1_resources),
97 static struct sh_timer_config tmu2_platform_data = {
99 .channel_offset = 0x1c,
104 static struct resource tmu2_resources[] = {
109 .flags = IORESOURCE_MEM,
113 .flags = IORESOURCE_IRQ,
117 static struct platform_device tmu2_device = {
121 .platform_data = &tmu2_platform_data,
123 .resource = tmu2_resources,
124 .num_resources = ARRAY_SIZE(tmu2_resources),
127 static struct platform_device *sh4202_devices[] __initdata = {
134 static int __init sh4202_devices_setup(void)
136 return platform_add_devices(sh4202_devices,
137 ARRAY_SIZE(sh4202_devices));
139 __initcall(sh4202_devices_setup);
141 static struct platform_device *sh4202_early_devices[] __initdata = {
147 void __init plat_early_device_setup(void)
149 early_platform_add_devices(sh4202_early_devices,
150 ARRAY_SIZE(sh4202_early_devices));
153 void __init plat_irq_setup(void)
155 /* do nothing - all IRL interrupts are handled by the board code */