aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/se/7343/setup.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-02-13 01:42:28 -0500
committerPaul Mundt <lethal@linux-sh.org>2007-02-13 01:42:28 -0500
commit3b4d9539628502768fe7f8fd4b48f2fbf2426255 (patch)
tree2bc27b9b57ed3f768a40cedc7c44b95da4025526 /arch/sh/boards/se/7343/setup.c
parentc7666e72cff1a2793055486340ac5f5137494c08 (diff)
sh: heartbeat consolidation for banked LEDs.
This consolidates the various board heartbeat LED implementations, used for strobing the load average across a LED bank. Those boards not implementing a full bank can hook in via the LED class. We leave the compat hook in the machvec for now until those non-banked boards are able to migrate to the drivers/leds. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/se/7343/setup.c')
-rw-r--r--arch/sh/boards/se/7343/setup.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/arch/sh/boards/se/7343/setup.c b/arch/sh/boards/se/7343/setup.c
index c7d17fe7764e..3fdb16f2cef1 100644
--- a/arch/sh/boards/se/7343/setup.c
+++ b/arch/sh/boards/se/7343/setup.c
@@ -4,7 +4,6 @@
4#include <asm/mach/se7343.h> 4#include <asm/mach/se7343.h>
5#include <asm/irq.h> 5#include <asm/irq.h>
6 6
7void heartbeat_7343se(void);
8void init_7343se_IRQ(void); 7void init_7343se_IRQ(void);
9 8
10static struct resource smc91x_resources[] = { 9static struct resource smc91x_resources[] = {
@@ -31,14 +30,30 @@ static struct platform_device smc91x_device = {
31 .resource = smc91x_resources, 30 .resource = smc91x_resources,
32}; 31};
33 32
34static struct platform_device *smc91x_platform_devices[] __initdata = { 33static struct resource heartbeat_resources[] = {
34 [0] = {
35 .start = PA_LED,
36 .end = PA_LED + 8 - 1,
37 .flags = IORESOURCE_MEM,
38 },
39};
40
41static struct platform_device heartbeat_device = {
42 .name = "heartbeat",
43 .id = -1,
44 .num_resources = ARRAY_SIZE(heartbeat_resources),
45 .resource = heartbeat_resources,
46};
47
48static struct platform_device *sh7343se_platform_devices[] __initdata = {
35 &smc91x_device, 49 &smc91x_device,
50 &heartbeat_device,
36}; 51};
37 52
38static int __init sh7343se_devices_setup(void) 53static int __init sh7343se_devices_setup(void)
39{ 54{
40 return platform_add_devices(smc91x_platform_devices, 55 return platform_add_devices(sh7343se_platform_devices,
41 ARRAY_SIZE(smc91x_platform_devices)); 56 ARRAY_SIZE(sh7343se_platform_devices));
42} 57}
43 58
44static void __init sh7343se_setup(char **cmdline_p) 59static void __init sh7343se_setup(char **cmdline_p)
@@ -76,8 +91,5 @@ struct sh_machine_vector mv_7343se __initmv = {
76 91
77 .mv_init_irq = init_7343se_IRQ, 92 .mv_init_irq = init_7343se_IRQ,
78 .mv_irq_demux = shmse_irq_demux, 93 .mv_irq_demux = shmse_irq_demux,
79#ifdef CONFIG_HEARTBEAT
80 .mv_heartbeat = heartbeat_7343se,
81#endif
82}; 94};
83ALIAS_MV(7343se) 95ALIAS_MV(7343se)