Commit e0b50d3c authored by David Brownell's avatar David Brownell Committed by Russell King

ARM: OMAP: partial LED fixes

Partial fix for CONFIG_LEDS breakage ... at least allow platforms
using the debug-leds support (H4 for now) to build with the generic
LED support, and default the LED that would be the timer LED to
trigger using the "heartbeat" (timer driven, rate depends on load).

Right now only H2 and P2 seem to have working LED support; this
at least makes H4 less broken.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent b1465bf7
...@@ -39,12 +39,6 @@ static struct h2p2_dbg_fpga __iomem *fpga; ...@@ -39,12 +39,6 @@ static struct h2p2_dbg_fpga __iomem *fpga;
static u16 led_state, hw_led_state; static u16 led_state, hw_led_state;
#ifdef CONFIG_LEDS
#define old_led_api() 1
#else
#define old_led_api() 0
#endif
#ifdef CONFIG_LEDS_OMAP_DEBUG #ifdef CONFIG_LEDS_OMAP_DEBUG
#define new_led_api() 1 #define new_led_api() 1
#else #else
...@@ -202,7 +196,8 @@ struct dbg_led { ...@@ -202,7 +196,8 @@ struct dbg_led {
static struct dbg_led dbg_leds[] = { static struct dbg_led dbg_leds[] = {
/* REVISIT at least H2 uses different timer & cpu leds... */ /* REVISIT at least H2 uses different timer & cpu leds... */
#ifndef CONFIG_LEDS_TIMER #ifndef CONFIG_LEDS_TIMER
{ .mask = 1 << 0, .cdev.name = "d4:green", }, /* timer */ { .mask = 1 << 0, .cdev.name = "d4:green",
.cdev.default_trigger = "heartbeat", },
#endif #endif
#ifndef CONFIG_LEDS_CPU #ifndef CONFIG_LEDS_CPU
{ .mask = 1 << 1, .cdev.name = "d5:green", }, /* !idle */ { .mask = 1 << 1, .cdev.name = "d5:green", }, /* !idle */
...@@ -274,10 +269,10 @@ static int /* __init */ fpga_probe(struct platform_device *pdev) ...@@ -274,10 +269,10 @@ static int /* __init */ fpga_probe(struct platform_device *pdev)
fpga = ioremap(iomem->start, H2P2_DBG_FPGA_SIZE); fpga = ioremap(iomem->start, H2P2_DBG_FPGA_SIZE);
__raw_writew(~0, &fpga->leds); __raw_writew(~0, &fpga->leds);
if (old_led_api()) { #ifdef CONFIG_LEDS
leds_event = h2p2_dbg_leds_event; leds_event = h2p2_dbg_leds_event;
leds_event(led_start); leds_event(led_start);
} #endif
if (new_led_api()) { if (new_led_api()) {
newled_init(&pdev->dev); newled_init(&pdev->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment