summaryrefslogtreecommitdiff
path: root/board/timll/devkit8000/devkit8000.c
diff options
context:
space:
mode:
authorSimon Schwarz <simonschwarzcor@googlemail.com>2012-03-15 04:01:40 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-03-27 22:05:28 +0200
commit2d52a9a38c20697b4aeecac0541c7496809e8238 (patch)
tree542687b2b910d64b80eca4954d479565614ba070 /board/timll/devkit8000/devkit8000.c
parentace73189a5245bc0b20930d83bbe8054911cb253 (diff)
downloadu-boot-2d52a9a38c20697b4aeecac0541c7496809e8238.tar.gz
devkit8000: Implement and activate direct OS boot
- Implements spl_start_uboot() for devkit8000 - Add configs to activate direct OS boot from SPL Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com> CC: Tom Rini <tom.rini@gmail.com> CC: Stefano Babic <sbabic@denx.de> CC: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'board/timll/devkit8000/devkit8000.c')
-rw-r--r--board/timll/devkit8000/devkit8000.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/board/timll/devkit8000/devkit8000.c b/board/timll/devkit8000/devkit8000.c
index dded697f95..d75e86b32e 100644
--- a/board/timll/devkit8000/devkit8000.c
+++ b/board/timll/devkit8000/devkit8000.c
@@ -41,6 +41,7 @@
#include <asm/arch/mem.h>
#include <asm/mach-types.h>
#include "devkit8000.h"
+#include <asm/gpio.h>
#ifdef CONFIG_DRIVER_DM9000
#include <net.h>
#include <netdev.h>
@@ -161,6 +162,23 @@ void spl_board_prepare_for_linux(void)
gpmc_dm9000_config();
}
+/*
+ * devkit8000 specific implementation of spl_start_uboot()
+ *
+ * RETURN
+ * 0 if the button is not pressed
+ * 1 if the button is pressed
+ */
+int spl_start_uboot(void)
+{
+ int val = 0;
+ if (!gpio_request(CONFIG_SPL_OS_BOOT_KEY, "U-Boot key")) {
+ gpio_direction_input(CONFIG_SPL_OS_BOOT_KEY);
+ val = gpio_get_value(CONFIG_SPL_OS_BOOT_KEY);
+ gpio_free(CONFIG_SPL_OS_BOOT_KEY);
+ }
+ return !val;
+}
#endif
/*