summaryrefslogtreecommitdiffstats
path: root/bootloader/imx233.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader/imx233.c')
-rw-r--r--bootloader/imx233.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/bootloader/imx233.c b/bootloader/imx233.c
index 79e5708bad..8ac74f10bc 100644
--- a/bootloader/imx233.c
+++ b/bootloader/imx233.c
@@ -156,6 +156,18 @@ void main(uint32_t arg, uint32_t addr)
backlight_init();
button_init();
+ /* dummy read, might be necessary to init things */
+ button_read_device();
+
+#ifdef HAS_BUTTON_HOLD
+ if(button_hold())
+ {
+ printf("Hold switch on");
+ printf("Shutting down...");
+ sleep(HZ);
+ power_off();
+ }
+#endif
printf("%s: %s", MSG(240, "Ver", "Boot version"), RBVERSION);
printf("%s: %x ", MSG(240, "Arg", "Boot arg"), arg);