h4 must have blinky leds!!
Subsystems (4)
PATCH 1/2 h4 must have blinky leds!!
This adds generic support for the "debug board" LEDs used by most of TI's OMAP reference boards, and board-specific support for the H4.
It's derived from the not-as-generic stuff used by OMAP1 H2/H3/P2. Those should be able to switch easily to this version, and clean up some of the omap1-specific code.
In addition to H4 support, one key improvement is supporting not just the "old" ARM debug LED API (with timer and idle LEDs, plus four that can be handy for kernel debugging), but it also supports the "new" generic LED API (most useful for usermode stuff IMO). Either or both APIs can be enabled.
arch/arm/plat-omap/Kconfig +5 -0
@@ -19,6 +19,11 @@ endchoice comment "OMAP Feature Selections" +config OMAP_DEBUG_LEDS + bool + help + For debug card leds on TI reference boards. + config OMAP_RESET_CLOCKS bool "Reset unused clocks during boot" depends on ARCH_OMAP
drivers/leds/Kconfig +8 -0
@@ -76,6 +76,14 @@ config LEDS_NET48XX This option enables support for the Soekris net4801 and net4826 error LED. +config LEDS_OMAP_DEBUG + boolean "LED Support for OMAP debug board LEDs" + depends LEDS_CLASS=y && ARCH_OMAP + help + Enables support for the LEDs on the debug board used with OMAP + reference boards like H2/H3/H4 and Perseus2. Up to six of these + may be claimed by the original ARM debug LED API. + config LEDS_OMAP tristate "LED Support for OMAP GPIO LEDs" depends LEDS_CLASS && ARCH_OMAP
arch/arm/mach-omap2/Kconfig +1 -0
@@ -25,6 +25,7 @@ config MACH_OMAP2_TUSB6010 config MACH_OMAP_H4 bool "OMAP 2420 H4 board" depends on ARCH_OMAP2 && ARCH_OMAP24XX + select OMAP_DEBUG_LEDS if LEDS || LEDS_OMAP_DEBUG select GPIOEXPANDER_OMAP config MACH_OMAP_H4_TUSB
arch/arm/mach-omap2/board-h4.c +19 -0
@@ -271,12 +271,26 @@ static struct platform_device h4_lcd_dev .id = -1, }; +static struct resource h4_led_resources[] = { + [0 ] = { + .flags =IORESOURCE_MEM , + }, +}; + +static struct platform_device h4_led_device = { + .name ="omap_dbg_led" , + .id =-1 , + .num_resources =ARRAY_SIZE (h4_led_resources), + .resource = h4_led_resources, +}; +static struct platform_device *h4_devices[]__initdata = { &h4_smc91x_device, &h4_flash_device, &h4_irda_device, &h4_kp_device, &h4_lcd_device, + &h4_led_device, };/* 2420 Sysboot setup (2430 is different) */
@@ -352,8 +366,13 @@ static inline void __init h4_init_smc91xprintk (KERN_ERR "Failed to request GPMC mem for smc91x\n" );return ; } + + h4_led_resources[0 ].start = cs_mem_base; + h4_led_resources[0 ].end = cs_mem_base +SZ_4K -1 ; + h4_smc91x_resources[0 ].start = cs_mem_base +0x300 ; h4_smc91x_resources[0 ].end = cs_mem_base +0x30f ; +udelay (100 );omap_cfg_reg (M15_24XX_GPIO92 );
arch/arm/plat-omap/Makefile +1 -0
@@ -24,6 +24,7 @@ obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o obj-$(CONFIG_OMAP_BOOT_REASON) += bootreason.o obj-$(CONFIG_OMAP_COMPONENT_VERSION) += component-version.o obj-$(CONFIG_OMAP_GPIO_SWITCH) += gpio-switch.o +obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o # DSP subsystem obj-y += dsp/
arch/arm/plat-omap/debug-leds.c new file +319 -0
319 lines not on this page · raw message
Tony Lindgren
maintainerQuoted 7 lines · David Brownell
This adds generic support for the "debug board" LEDs used by most of TI's OMAP reference boards, and board-specific support for the H4.
It's derived from the not-as-generic stuff used by OMAP1 H2/H3/P2. Those should be able to switch easily to this version, and clean up some of the omap1-specific code.
Quoted 5 lines
In addition to H4 support, one key improvement is supporting not just the "old" ARM debug LED API (with timer and idle LEDs, plus four that can be handy for kernel debugging), but it also supports the "new" generic LED API (most useful for usermode stuff IMO). Either or both APIs can be enabled.
Great, pushing today.
Tony