From aae58b954b527882fde35bd718b9f865b18eda46 Mon Sep 17 00:00:00 2001 From: Joel Fernandes Date: Sun, 11 Sep 2011 08:37:33 +0000 Subject: 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 Signed-off-by: Jason Kridner --- include/configs/omap3_beagle.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index d3a0122..ddeb414 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};" \ -- cgit v1.1