aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/boards/se/73180/setup.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-02-13 15:42:28 +0900
committerPaul Mundt <lethal@linux-sh.org>2007-02-13 15:42:28 +0900
commit3b4d9539628502768fe7f8fd4b48f2fbf2426255 (patch)
tree2bc27b9b57ed3f768a40cedc7c44b95da4025526 /arch/sh/boards/se/73180/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/73180/setup.c')
-rw-r--r--arch/sh/boards/se/73180/setup.c31
1 files changed, 27 insertions, 4 deletions
diff --git a/arch/sh/boards/se/73180/setup.c b/arch/sh/boards/se/73180/setup.c
index b38ef50a160..911ce1cdbd7 100644
--- a/arch/sh/boards/se/73180/setup.c
+++ b/arch/sh/boards/se/73180/setup.c
@@ -10,13 +10,39 @@
*/
#include <linux/init.h>
+#include <linux/platform_device.h>
#include <asm/machvec.h>
#include <asm/se73180.h>
#include <asm/irq.h>
-void heartbeat_73180se(void);
void init_73180se_IRQ(void);
+static struct resource heartbeat_resources[] = {
+ [0] = {
+ .start = PA_LED,
+ .end = PA_LED + 8 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+static struct platform_device heartbeat_device = {
+ .name = "heartbeat",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(heartbeat_resources),
+ .resource = heartbeat_resources,
+};
+
+static struct platform_device *se73180_devices[] __initdata = {
+ &heartbeat_device,
+};
+
+static int __init se73180_devices_setup(void)
+{
+ return platform_add_devices(sh7343se_platform_devices,
+ ARRAY_SIZE(sh7343se_platform_devices));
+}
+__initcall(se73180_devices_setup);
+
/*
* The Machine Vector
*/
@@ -46,8 +72,5 @@ struct sh_machine_vector mv_73180se __initmv = {
.mv_init_irq = init_73180se_IRQ,
.mv_irq_demux = shmse_irq_demux,
-#ifdef CONFIG_HEARTBEAT
- .mv_heartbeat = heartbeat_73180se,
-#endif
};
ALIAS_MV(73180se)