1 #include <linux/init.h>
2 #include <linux/platform_device.h>
3 #include <linux/mtd/physmap.h>
4 #include <linux/serial_8250.h>
5 #include <linux/serial_reg.h>
6 #include <linux/usb/isp116x.h>
7 #include <linux/delay.h>
8 #include <asm/machvec.h>
9 #include <mach-se/mach/se7343.h>
10 #include <asm/heartbeat.h>
14 static struct resource heartbeat_resources[] = {
18 .flags = IORESOURCE_MEM,
22 static struct heartbeat_data heartbeat_data = {
26 static struct platform_device heartbeat_device = {
30 .platform_data = &heartbeat_data,
32 .num_resources = ARRAY_SIZE(heartbeat_resources),
33 .resource = heartbeat_resources,
36 static struct mtd_partition nor_flash_partitions[] = {
44 .offset = MTDPART_OFS_APPEND,
45 .size = 31 * 1024 * 1024,
49 .offset = MTDPART_OFS_APPEND,
50 .size = MTDPART_SIZ_FULL,
54 static struct physmap_flash_data nor_flash_data = {
56 .parts = nor_flash_partitions,
57 .nr_parts = ARRAY_SIZE(nor_flash_partitions),
60 static struct resource nor_flash_resources[] = {
64 .flags = IORESOURCE_MEM,
68 static struct platform_device nor_flash_device = {
69 .name = "physmap-flash",
71 .platform_data = &nor_flash_data,
73 .num_resources = ARRAY_SIZE(nor_flash_resources),
74 .resource = nor_flash_resources,
77 #define ST16C2550C_FLAGS (UPF_BOOT_AUTOCONF | UPF_IOREMAP)
79 static struct plat_serial8250_port serial_platform_data[] = {
82 .mapbase = 0x16000000,
84 .flags = ST16C2550C_FLAGS,
90 .mapbase = 0x17000000,
92 .flags = ST16C2550C_FLAGS,
99 static struct platform_device uart_device = {
100 .name = "serial8250",
101 .id = PLAT8250_DEV_PLATFORM,
103 .platform_data = serial_platform_data,
107 static void isp116x_delay(struct device *dev, int delay)
112 static struct resource usb_resources[] = {
116 .flags = IORESOURCE_MEM,
121 .flags = IORESOURCE_MEM,
125 .flags = IORESOURCE_IRQ,
129 static struct isp116x_platform_data usb_platform_data = {
133 .int_edge_triggered = 0,
134 .remote_wakeup_enable = 0,
135 .delay = isp116x_delay,
138 static struct platform_device usb_device = {
139 .name = "isp116x-hcd",
141 .num_resources = ARRAY_SIZE(usb_resources),
142 .resource = usb_resources,
144 .platform_data = &usb_platform_data,
149 static struct platform_device *sh7343se_platform_devices[] __initdata = {
156 static int __init sh7343se_devices_setup(void)
158 return platform_add_devices(sh7343se_platform_devices,
159 ARRAY_SIZE(sh7343se_platform_devices));
161 device_initcall(sh7343se_devices_setup);
164 * Initialize the board
166 static void __init sh7343se_setup(char **cmdline_p)
168 ctrl_outw(0xf900, FPGA_OUT); /* FPGA */
170 ctrl_outw(0x0002, PORT_PECR); /* PORT E 1 = IRQ5 */
171 ctrl_outw(0x0020, PORT_PSELD);
173 printk(KERN_INFO "MS7343CP01 Setup...done\n");
179 static struct sh_machine_vector mv_7343se __initmv = {
180 .mv_name = "SolutionEngine 7343",
181 .mv_setup = sh7343se_setup,
182 .mv_nr_irqs = SE7343_FPGA_IRQ_BASE + SE7343_FPGA_IRQ_NR,
183 .mv_init_irq = init_7343se_IRQ,