diff options
Diffstat (limited to 'arch/sh/boards/se/7206/setup.c')
-rw-r--r-- | arch/sh/boards/se/7206/setup.c | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/arch/sh/boards/se/7206/setup.c b/arch/sh/boards/se/7206/setup.c index 0f42e91a3238..ca714879f559 100644 --- a/arch/sh/boards/se/7206/setup.c +++ b/arch/sh/boards/se/7206/setup.c | |||
@@ -3,6 +3,7 @@ | |||
3 | * linux/arch/sh/boards/se/7206/setup.c | 3 | * linux/arch/sh/boards/se/7206/setup.c |
4 | * | 4 | * |
5 | * Copyright (C) 2006 Yoshinori Sato | 5 | * Copyright (C) 2006 Yoshinori Sato |
6 | * Copyright (C) 2007 Paul Mundt | ||
6 | * | 7 | * |
7 | * Hitachi 7206 SolutionEngine Support. | 8 | * Hitachi 7206 SolutionEngine Support. |
8 | * | 9 | * |
@@ -34,15 +35,37 @@ static struct platform_device smc91x_device = { | |||
34 | .resource = smc91x_resources, | 35 | .resource = smc91x_resources, |
35 | }; | 36 | }; |
36 | 37 | ||
38 | static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 }; | ||
39 | |||
40 | static struct resource heartbeat_resources[] = { | ||
41 | [0] = { | ||
42 | .start = PA_LED, | ||
43 | .end = PA_LED + ARRAY_SIZE(heartbeat_bit_pos) - 1, | ||
44 | .flags = IORESOURCE_MEM, | ||
45 | }, | ||
46 | }; | ||
47 | |||
48 | static struct platform_device heartbeat_device = { | ||
49 | .name = "heartbeat", | ||
50 | .id = -1, | ||
51 | .dev = { | ||
52 | .platform_data = heartbeat_bit_pos, | ||
53 | }, | ||
54 | .num_resources = ARRAY_SIZE(heartbeat_resources), | ||
55 | .resource = heartbeat_resources, | ||
56 | }; | ||
57 | |||
58 | static struct platform_device *se7206_devices[] __initdata = { | ||
59 | &smc91x_device, | ||
60 | &heartbeat_device, | ||
61 | }; | ||
62 | |||
37 | static int __init se7206_devices_setup(void) | 63 | static int __init se7206_devices_setup(void) |
38 | { | 64 | { |
39 | return platform_device_register(&smc91x_device); | 65 | return platform_add_devices(se7206_devices, ARRAY_SIZE(se7206_devices)); |
40 | } | 66 | } |
41 | |||
42 | __initcall(se7206_devices_setup); | 67 | __initcall(se7206_devices_setup); |
43 | 68 | ||
44 | void heartbeat_se(void); | ||
45 | |||
46 | /* | 69 | /* |
47 | * The Machine Vector | 70 | * The Machine Vector |
48 | */ | 71 | */ |
@@ -72,8 +95,5 @@ struct sh_machine_vector mv_se __initmv = { | |||
72 | .mv_outsl = se7206_outsl, | 95 | .mv_outsl = se7206_outsl, |
73 | 96 | ||
74 | .mv_init_irq = init_se7206_IRQ, | 97 | .mv_init_irq = init_se7206_IRQ, |
75 | #ifdef CONFIG_HEARTBEAT | ||
76 | .mv_heartbeat = heartbeat_se, | ||
77 | #endif | ||
78 | }; | 98 | }; |
79 | ALIAS_MV(se) | 99 | ALIAS_MV(se) |