From 00279ec7f86d31cb2e8653dfb192ab6279cdb7bd Mon Sep 17 00:00:00 2001 From: LeTama Date: Fri, 17 Sep 2010 14:13:00 +0200 Subject: [PATCH] Add led blink as kernel option --- arch/arm/configs/htcleo_defconfig | 3 ++- arch/arm/mach-msm/Kconfig | 7 +++++++ arch/arm/mach-msm/board-htcleo.c | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/arm/configs/htcleo_defconfig b/arch/arm/configs/htcleo_defconfig index 4819d284..f493d4b2 100644 --- a/arch/arm/configs/htcleo_defconfig +++ b/arch/arm/configs/htcleo_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.15 -# Fri Sep 17 12:02:54 2010 +# Fri Sep 17 14:11:22 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -231,6 +231,7 @@ CONFIG_MSM_DEBUG_UART_NONE=y # CONFIG_MACH_MAHIMAHI is not set # CONFIG_MACH_BRAVO is not set CONFIG_MACH_HTCLEO=y +# CONFIG_HTCLEO_BLINK_AT_BOOT is not set # CONFIG_MACH_PASSIONC is not set # CONFIG_MACH_BRAVOC is not set # CONFIG_MACH_INCREDIBLE is not set diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index 230f4977..5a17cc89 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig @@ -282,6 +282,13 @@ config MACH_HTCLEO help Select this to support the HTC Leo device +config HTCLEO_BLINK_AT_BOOT + depends on MACH_HTCLEO + default n + bool "Blink flash at boot" + help + Blink flash led during hardware init + config MACH_PASSIONC depends on ARCH_QSD8X50 default n diff --git a/arch/arm/mach-msm/board-htcleo.c b/arch/arm/mach-msm/board-htcleo.c index cb752346..a80343df 100644 --- a/arch/arm/mach-msm/board-htcleo.c +++ b/arch/arm/mach-msm/board-htcleo.c @@ -747,7 +747,9 @@ static void do_grp_reset(void) static void __init htcleo_init(void) { +#ifdef CONFIG_HTCLEO_BLINK_AT_BOOT volatile unsigned *bank6_in, *bank6_out; +#endif printk("htcleo_init()\n"); msm_hw_reset_hook = htcleo_reset; @@ -798,13 +800,14 @@ static void __init htcleo_init(void) #endif /* Blink the camera LED shortly to show that we're alive! */ - +#ifdef CONFIG_HTCLEO_BLINK_AT_BOOT bank6_in = (unsigned int*)(MSM_GPIO1_BASE + 0x0864); bank6_out = (unsigned int*)(MSM_GPIO1_BASE + 0x0814); *bank6_out = *bank6_in ^ 0x200000; mdelay(50); *bank6_out = *bank6_in | 0x200000; mdelay(200); +#endif }