]> nv-tegra.nvidia Code Review - linux-2.6.git/blob - arch/sh/boards/se/7343/setup.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
[linux-2.6.git] / arch / sh / boards / se / 7343 / setup.c
1 #include <linux/init.h>
2 #include <linux/platform_device.h>
3 #include <asm/machvec.h>
4 #include <asm/mach/se7343.h>
5 #include <asm/irq.h>
6
7 void init_7343se_IRQ(void);
8
9 static struct resource smc91x_resources[] = {
10         [0] = {
11                 .start  = 0x10000000,
12                 .end    = 0x1000000F,
13                 .flags  = IORESOURCE_MEM,
14         },
15         [1] = {
16                 /*
17                  * shared with other devices via externel
18                  * interrupt controller in FPGA...
19                  */
20                 .start  = EXT_IRQ2,
21                 .end    = EXT_IRQ2,
22                 .flags  = IORESOURCE_IRQ,
23         },
24 };
25
26 static struct platform_device smc91x_device = {
27         .name           = "smc91x",
28         .id             = 0,
29         .num_resources  = ARRAY_SIZE(smc91x_resources),
30         .resource       = smc91x_resources,
31 };
32
33 static struct resource heartbeat_resources[] = {
34         [0] = {
35                 .start  = PA_LED,
36                 .end    = PA_LED + 8 - 1,
37                 .flags  = IORESOURCE_MEM,
38         },
39 };
40
41 static struct platform_device heartbeat_device = {
42         .name           = "heartbeat",
43         .id             = -1,
44         .num_resources  = ARRAY_SIZE(heartbeat_resources),
45         .resource       = heartbeat_resources,
46 };
47
48 static struct platform_device *sh7343se_platform_devices[] __initdata = {
49         &smc91x_device,
50         &heartbeat_device,
51 };
52
53 static int __init sh7343se_devices_setup(void)
54 {
55         return platform_add_devices(sh7343se_platform_devices,
56                                     ARRAY_SIZE(sh7343se_platform_devices));
57 }
58
59 static void __init sh7343se_setup(char **cmdline_p)
60 {
61         device_initcall(sh7343se_devices_setup);
62 }
63
64 /*
65  * The Machine Vector
66  */
67 static struct sh_machine_vector mv_7343se __initmv = {
68         .mv_name = "SolutionEngine 7343",
69         .mv_setup = sh7343se_setup,
70         .mv_nr_irqs = 108,
71         .mv_inb = sh7343se_inb,
72         .mv_inw = sh7343se_inw,
73         .mv_inl = sh7343se_inl,
74         .mv_outb = sh7343se_outb,
75         .mv_outw = sh7343se_outw,
76         .mv_outl = sh7343se_outl,
77
78         .mv_inb_p = sh7343se_inb_p,
79         .mv_inw_p = sh7343se_inw,
80         .mv_inl_p = sh7343se_inl,
81         .mv_outb_p = sh7343se_outb_p,
82         .mv_outw_p = sh7343se_outw,
83         .mv_outl_p = sh7343se_outl,
84
85         .mv_insb = sh7343se_insb,
86         .mv_insw = sh7343se_insw,
87         .mv_insl = sh7343se_insl,
88         .mv_outsb = sh7343se_outsb,
89         .mv_outsw = sh7343se_outsw,
90         .mv_outsl = sh7343se_outsl,
91
92         .mv_init_irq = init_7343se_IRQ,
93         .mv_irq_demux = shmse_irq_demux,
94 };