1 #include <linux/init.h>
2 #include <linux/platform_device.h>
3 #include <linux/mtd/physmap.h>
4 #include <asm/machvec.h>
5 #include <mach-se/mach/se7343.h>
6 #include <asm/heartbeat.h>
10 static struct resource smc91x_resources[] = {
14 .flags = IORESOURCE_MEM,
18 * shared with other devices via externel
19 * interrupt controller in FPGA...
23 .flags = IORESOURCE_IRQ,
27 static struct platform_device smc91x_device = {
30 .num_resources = ARRAY_SIZE(smc91x_resources),
31 .resource = smc91x_resources,
34 static struct resource heartbeat_resources[] = {
38 .flags = IORESOURCE_MEM,
42 static struct heartbeat_data heartbeat_data = {
46 static struct platform_device heartbeat_device = {
50 .platform_data = &heartbeat_data,
52 .num_resources = ARRAY_SIZE(heartbeat_resources),
53 .resource = heartbeat_resources,
56 static struct mtd_partition nor_flash_partitions[] = {
64 .offset = MTDPART_OFS_APPEND,
65 .size = 31 * 1024 * 1024,
69 .offset = MTDPART_OFS_APPEND,
70 .size = MTDPART_SIZ_FULL,
74 static struct physmap_flash_data nor_flash_data = {
76 .parts = nor_flash_partitions,
77 .nr_parts = ARRAY_SIZE(nor_flash_partitions),
80 static struct resource nor_flash_resources[] = {
84 .flags = IORESOURCE_MEM,
88 static struct platform_device nor_flash_device = {
89 .name = "physmap-flash",
91 .platform_data = &nor_flash_data,
93 .num_resources = ARRAY_SIZE(nor_flash_resources),
94 .resource = nor_flash_resources,
97 static struct platform_device *sh7343se_platform_devices[] __initdata = {
103 static int __init sh7343se_devices_setup(void)
105 return platform_add_devices(sh7343se_platform_devices,
106 ARRAY_SIZE(sh7343se_platform_devices));
108 device_initcall(sh7343se_devices_setup);
111 * Initialize the board
113 static void __init sh7343se_setup(char **cmdline_p)
115 ctrl_outw(0xf900, FPGA_OUT); /* FPGA */
117 ctrl_outw(0x0002, PORT_PECR); /* PORT E 1 = IRQ5 */
118 ctrl_outw(0x0020, PORT_PSELD);
120 printk(KERN_INFO "MS7343CP01 Setup...done\n");
126 static struct sh_machine_vector mv_7343se __initmv = {
127 .mv_name = "SolutionEngine 7343",
128 .mv_setup = sh7343se_setup,
130 .mv_inb = sh7343se_inb,
131 .mv_inw = sh7343se_inw,
132 .mv_inl = sh7343se_inl,
133 .mv_outb = sh7343se_outb,
134 .mv_outw = sh7343se_outw,
135 .mv_outl = sh7343se_outl,
137 .mv_inb_p = sh7343se_inb_p,
138 .mv_inw_p = sh7343se_inw,
139 .mv_inl_p = sh7343se_inl,
140 .mv_outb_p = sh7343se_outb_p,
141 .mv_outw_p = sh7343se_outw,
142 .mv_outl_p = sh7343se_outl,
144 .mv_insb = sh7343se_insb,
145 .mv_insw = sh7343se_insw,
146 .mv_insl = sh7343se_insl,
147 .mv_outsb = sh7343se_outsb,
148 .mv_outsw = sh7343se_outsw,
149 .mv_outsl = sh7343se_outsl,
151 .mv_init_irq = init_7343se_IRQ,