diff options
author | Vikram Pandita <vikram.pandita@ti.com> | 2011-01-28 18:36:28 -0800 |
---|---|---|
committer | Vikram Pandita <vikram.pandita@ti.com> | 2011-01-28 18:36:28 -0800 |
commit | e403c55801922ea725eaa6878feb2cd5c11993a5 (patch) | |
tree | 95cfe79fc2c41ad11bf3fb04adf00533449e07e6 | |
parent | a8fa3730fba8e677c454dbeedd4f81ea01805aea (diff) | |
download | u-boot-pandroid-e403c55801922ea725eaa6878feb2cd5c11993a5.tar.gz |
fastboot: panda: blink D1 led in fastboot mode
Blink the D1 LED when one enters the fastboot mode
This is a good user experience.
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
-rw-r--r-- | drivers/fastboot.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/fastboot.c b/drivers/fastboot.c index 3416d21f..1bc97bd7 100644 --- a/drivers/fastboot.c +++ b/drivers/fastboot.c @@ -27,6 +27,7 @@ #include <asm/arch/mem.h> #include <asm/arch/sys_proto.h> #include <asm/arch/sys_info.h> +#include <asm/arch/mux.h> #ifdef CONFIG_OMAP3430 #include <asm/arch/led.h> #endif @@ -953,6 +954,26 @@ int fastboot_poll(void) u8 intrusb; u16 intrtx; u16 intrrx; + static u32 blink = 0; + + /* On panda blink the D1 LED in fastboot mode */ +#if defined(CONFIG_4430PANDA) + #define OMAP44XX_WKUP_CTRL_BASE 0x4A31E000 + #define PRECEPTION_FACTOR 100000 + + if (blink == 0x7fff + PRECEPTION_FACTOR) + __raw_writew((PTU | M3), + OMAP44XX_WKUP_CTRL_BASE + CONTROL_WKUP_PAD1_FREF_CLK4_REQ); + + if (blink == (0xffff + PRECEPTION_FACTOR)) { + __raw_writew((M3), + OMAP44XX_WKUP_CTRL_BASE + CONTROL_WKUP_PAD1_FREF_CLK4_REQ); + blink = 0; + } + + blink ++ ; +#endif + /* Look at the interrupt registers */ intrusb = inb (OMAP34XX_USB_INTRUSB); |