summaryrefslogtreecommitdiffstats
path: root/include/configs/omap3_beagle.h
diff options
context:
space:
mode:
authorJoel Fernandes <agnel.joel@gmail.com>2011-09-11 08:37:33 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-04-16 14:47:58 +0200
commitaae58b954b527882fde35bd718b9f865b18eda46 (patch)
treed8153d48b6b335a7746d2c83f4cc607832376620 /include/configs/omap3_beagle.h
parentc8da405c85edd665df1f9d4b36e14d3b5d46a680 (diff)
downloadblackbird-obmc-uboot-aae58b954b527882fde35bd718b9f865b18eda46.tar.gz
blackbird-obmc-uboot-aae58b954b527882fde35bd718b9f865b18eda46.zip
BeagleBoard: Remove userbutton command and use gpio command instead
Remove userbutton command and do the detection in board config file using the gpio command Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com> Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
Diffstat (limited to 'include/configs/omap3_beagle.h')
-rw-r--r--include/configs/omap3_beagle.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index d3a0122a09..ddeb4146f7 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -167,6 +167,7 @@
#define CONFIG_CMD_PING
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_SETEXPR /* Evaluate expressions */
+#define CONFIG_CMD_GPIO /* Enable gpio command */
#undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
#undef CONFIG_CMD_FPGA /* FPGA configuration Support */
@@ -280,10 +281,16 @@
"ramboot=echo Booting from ramdisk ...; " \
"run ramargs; " \
"bootm ${loadaddr}\0" \
-
+ "userbutton=if gpio input 173; then run userbutton_xm; " \
+ "else run userbutton_nonxm; fi;\0" \
+ "userbutton_xm=gpio input 4;\0" \
+ "userbutton_nonxm=gpio input 7;\0"
+/* "run userbutton" will return 1 (false) if is pressed and 0 (false) if not */
#define CONFIG_BOOTCOMMAND \
"if mmc rescan ${mmcdev}; then " \
- "if userbutton; then " \
+ "if run userbutton; then " \
+ "setenv bootenv uEnv.txt;" \
+ "else " \
"setenv bootenv user.txt;" \
"fi;" \
"echo SD/MMC found on device ${mmcdev};" \
OpenPOWER on IntegriCloud