diff options
author | Joel Fernandes <agnel.joel@gmail.com> | 2011-09-11 08:37:33 +0000 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2012-04-16 14:47:58 +0200 |
commit | aae58b954b527882fde35bd718b9f865b18eda46 (patch) | |
tree | d8153d48b6b335a7746d2c83f4cc607832376620 /board | |
parent | c8da405c85edd665df1f9d4b36e14d3b5d46a680 (diff) |
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 'board')
-rw-r--r-- | board/ti/beagle/beagle.c | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 8b07eef551..e26b387934 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -507,58 +507,3 @@ int ehci_hcd_stop(void) } #endif /* CONFIG_USB_EHCI */ - -#ifndef CONFIG_SPL_BUILD -/* - * This command returns the status of the user button on beagle xM - * Input - none - * Returns - 1 if button is held down - * 0 if button is not held down - */ -int do_userbutton(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) -{ - int button = 0; - int gpio; - - /* - * pass address parameter as argv[0] (aka command name), - * and all remaining args - */ - switch (get_board_revision()) { - case REVISION_AXBX: - case REVISION_CX: - case REVISION_C4: - gpio = 7; - break; - case REVISION_XM_A: - case REVISION_XM_B: - case REVISION_XM_C: - default: - gpio = 4; - break; - } - gpio_request(gpio, ""); - gpio_direction_input(gpio); - printf("The user button is currently "); - if (gpio_get_value(gpio)) - { - button = 1; - printf("PRESSED.\n"); - } - else - { - button = 0; - printf("NOT pressed.\n"); - } - - return !button; -} - -/* -------------------------------------------------------------------- */ - -U_BOOT_CMD( - userbutton, CONFIG_SYS_MAXARGS, 1, do_userbutton, - "Return the status of the BeagleBoard USER button", - "" -); -#endif |