Merge master.kernel.org:/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
[pandora-kernel.git] / arch / sh / boards / se / 7206 / setup.c
1 /*
2  *
3  * linux/arch/sh/boards/se/7206/setup.c
4  *
5  * Copyright (C) 2006  Yoshinori Sato
6  *
7  * Hitachi 7206 SolutionEngine Support.
8  *
9  */
10
11 #include <linux/init.h>
12 #include <linux/platform_device.h>
13 #include <asm/se7206.h>
14 #include <asm/io.h>
15 #include <asm/machvec.h>
16
17 static struct resource smc91x_resources[] = {
18         [0] = {
19                 .start          = 0x300,
20                 .end            = 0x300 + 0x020 - 1,
21                 .flags          = IORESOURCE_MEM,
22         },
23         [1] = {
24                 .start          = 64,
25                 .end            = 64,
26                 .flags          = IORESOURCE_IRQ,
27         },
28 };
29
30 static struct platform_device smc91x_device = {
31         .name           = "smc91x",
32         .id             = -1,
33         .num_resources  = ARRAY_SIZE(smc91x_resources),
34         .resource       = smc91x_resources,
35 };
36
37 static int __init se7206_devices_setup(void)
38 {
39         return platform_device_register(&smc91x_device);
40 }
41
42 __initcall(se7206_devices_setup);
43
44 void heartbeat_se(void);
45
46 /*
47  * The Machine Vector
48  */
49
50 struct sh_machine_vector mv_se __initmv = {
51         .mv_name                = "SolutionEngine",
52         .mv_nr_irqs             = 256,
53         .mv_inb                 = se7206_inb,
54         .mv_inw                 = se7206_inw,
55         .mv_inl                 = se7206_inl,
56         .mv_outb                = se7206_outb,
57         .mv_outw                = se7206_outw,
58         .mv_outl                = se7206_outl,
59
60         .mv_inb_p               = se7206_inb_p,
61         .mv_inw_p               = se7206_inw,
62         .mv_inl_p               = se7206_inl,
63         .mv_outb_p              = se7206_outb_p,
64         .mv_outw_p              = se7206_outw,
65         .mv_outl_p              = se7206_outl,
66
67         .mv_insb                = se7206_insb,
68         .mv_insw                = se7206_insw,
69         .mv_insl                = se7206_insl,
70         .mv_outsb               = se7206_outsb,
71         .mv_outsw               = se7206_outsw,
72         .mv_outsl               = se7206_outsl,
73
74         .mv_init_irq            = init_se7206_IRQ,
75 #ifdef CONFIG_HEARTBEAT
76         .mv_heartbeat           = heartbeat_se,
77 #endif
78 };
79 ALIAS_MV(se)