Commit | Line | Data |
---|---|---|
373e68b5 | 1 | /* |
58862699 | 2 | * linux/arch/sh/boards/se/7751/setup.c |
1da177e4 LT |
3 | * |
4 | * Copyright (C) 2000 Kazumoto Kojima | |
5 | * | |
6 | * Hitachi SolutionEngine Support. | |
7 | * | |
8 | * Modified for 7751 Solution Engine by | |
9 | * Ian da Silva and Jeremy Siegel, 2001. | |
10 | */ | |
1da177e4 | 11 | #include <linux/init.h> |
3b4d9539 | 12 | #include <linux/platform_device.h> |
711fa809 | 13 | #include <asm/machvec.h> |
373e68b5 | 14 | #include <asm/se7751.h> |
711fa809 | 15 | #include <asm/io.h> |
1da177e4 | 16 | |
3b4d9539 PM |
17 | static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 }; |
18 | ||
19 | static struct resource heartbeat_resources[] = { | |
20 | [0] = { | |
21 | .start = PA_LED, | |
22 | .end = PA_LED + ARRAY_SIZE(heartbeat_bit_pos) - 1, | |
23 | .flags = IORESOURCE_MEM, | |
24 | }, | |
25 | }; | |
26 | ||
27 | static struct platform_device heartbeat_device = { | |
28 | .name = "heartbeat", | |
29 | .id = -1, | |
30 | .dev = { | |
31 | .platform_data = heartbeat_bit_pos, | |
32 | }, | |
33 | .num_resources = ARRAY_SIZE(heartbeat_resources), | |
34 | .resource = heartbeat_resources, | |
35 | }; | |
36 | ||
37 | static struct platform_device *se7751_devices[] __initdata = { | |
38 | &smc91x_device, | |
39 | &heartbeat_device, | |
40 | }; | |
41 | ||
42 | static int __init se7751_devices_setup(void) | |
43 | { | |
44 | return platform_add_devices(se7751_devices, ARRAY_SIZE(se7751_devices)); | |
45 | } | |
46 | __initcall(se7751_devices_setup); | |
2c7834a6 PM |
47 | |
48 | /* | |
49 | * The Machine Vector | |
50 | */ | |
2c7834a6 PM |
51 | struct sh_machine_vector mv_7751se __initmv = { |
52 | .mv_name = "7751 SolutionEngine", | |
2c7834a6 PM |
53 | .mv_nr_irqs = 72, |
54 | ||
55 | .mv_inb = sh7751se_inb, | |
56 | .mv_inw = sh7751se_inw, | |
57 | .mv_inl = sh7751se_inl, | |
58 | .mv_outb = sh7751se_outb, | |
59 | .mv_outw = sh7751se_outw, | |
60 | .mv_outl = sh7751se_outl, | |
61 | ||
62 | .mv_inb_p = sh7751se_inb_p, | |
63 | .mv_inw_p = sh7751se_inw, | |
64 | .mv_inl_p = sh7751se_inl, | |
65 | .mv_outb_p = sh7751se_outb_p, | |
66 | .mv_outw_p = sh7751se_outw, | |
67 | .mv_outl_p = sh7751se_outl, | |
68 | ||
69 | .mv_insl = sh7751se_insl, | |
70 | .mv_outsl = sh7751se_outsl, | |
71 | ||
72 | .mv_init_irq = init_7751se_IRQ, | |
2c7834a6 PM |
73 | }; |
74 | ALIAS_MV(7751se) |