diff options
author | Vikram Pandita <vikram.pandita@ti.com> | 2011-01-28 14:18:25 -0800 |
---|---|---|
committer | Vikram Pandita <vikram.pandita@ti.com> | 2011-01-28 14:18:25 -0800 |
commit | 370ec2e6792b02e2cc4cf29ced2921e54f4f98e4 (patch) | |
tree | 987a9bdc208c1d016120a7fa730375f698d4fb24 | |
parent | 01e163b39d89fcacbaeaa9e2cba34dfc3f78be8c (diff) | |
download | u-boot-pandroid-370ec2e6792b02e2cc4cf29ced2921e54f4f98e4.tar.gz |
panda: fastboot: enter fastboot on gpio 121 long press
If GPIO_121 button on panda is kept pressed, fastboot mode is entered
else do the default boot
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
-rw-r--r-- | drivers/fastboot.c | 9 | ||||
-rw-r--r-- | include/asm-arm/arch-omap4/omap4430.h | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/drivers/fastboot.c b/drivers/fastboot.c index 6806d860..3416d21f 100644 --- a/drivers/fastboot.c +++ b/drivers/fastboot.c @@ -1105,6 +1105,15 @@ int fastboot_preboot(void) /* Any key kept pressed does auto-fastboot */ if (__raw_readl(KBD_STATEMACHINE)) return 1; + + /* On Panda: GPIO_121 button pressed causes to enter fastboot */ +#if defined(CONFIG_4430PANDA) + if (!(__raw_readl(OMAP44XX_GPIO4_BASE + DATA_IN_OFFSET) & (1<<25))){ + printf("Panda: GPIO_121 pressed: entering fastboot....\n"); + return 1; + } +#endif + #endif return 0; } diff --git a/include/asm-arm/arch-omap4/omap4430.h b/include/asm-arm/arch-omap4/omap4430.h index a875fc39..294d721f 100644 --- a/include/asm-arm/arch-omap4/omap4430.h +++ b/include/asm-arm/arch-omap4/omap4430.h @@ -97,6 +97,16 @@ #define SYNC_32KTIMER_BASE (0x48320000) #define S32K_CR (SYNC_32KTIMER_BASE+0x10) +/* GPIO */ +/* OMAP3 GPIO registers */ +#define OMAP44XX_GPIO1_BASE (OMAP44XX_WAKEUP_L4_IO_BASE+0x10000+0x0000) +#define OMAP44XX_GPIO2_BASE (OMAP44XX_L4_PER+0x50000+0x5000) +#define OMAP44XX_GPIO3_BASE (OMAP44XX_L4_PER+0x50000+0x7000) +#define OMAP44XX_GPIO4_BASE (OMAP44XX_L4_PER+0x50000+0x9000) +#define OMAP44XX_GPIO5_BASE (OMAP44XX_L4_PER+0x50000+0xb000) +#define OMAP44XX_GPIO6_BASE (OMAP44XX_L4_PER+0x50000+0xd000) + #define DATA_IN_OFFSET (0x138) + /* * SDP4430 specific Section */ |