imx233/bootloader: power off on hold

Change-Id: I3081ca6e47bed5a69e6163cb539d0a8516b689d2
diff --git a/bootloader/imx233.c b/bootloader/imx233.c
index 79e5708..8ac74f1 100644
--- a/bootloader/imx233.c
+++ b/bootloader/imx233.c
@@ -156,6 +156,18 @@
     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);