Hang when the TPM needs to be power-cycled

Blink the red LED to indicate that the device is hanging.

Also hang if the TPM initialization failed for other reasons and
recovery mode was selected.

Change-Id: I1ccdf8905ff42b556383914ceb78e13f0163b693
diff --git a/arch/arm/boards/optimus/optimus.c b/arch/arm/boards/optimus/optimus.c
index bda7177..3baef54 100644
--- a/arch/arm/boards/optimus/optimus.c
+++ b/arch/arm/boards/optimus/optimus.c
@@ -375,6 +375,10 @@
 #ifdef	CONFIG_COMCERTO_BOOTLOADER
 	u32 bootopt;
 #endif
+#ifdef	CONFIG_TPM
+        uint32_t rc;
+#endif
+
 	int clk = HAL_get_axi_clk(); // Get AXI bus freq in MHz
 	serial_plat.clock = clk * 1000 * 1000;
 	register_device(&fast_uart_device);
@@ -576,12 +580,17 @@
 	}
 
 #ifdef	CONFIG_TPM
-	if (tpm_init() != TPM_SUCCESS) {
+	rc = tpm_init();
+	if (rc != TPM_SUCCESS) {
 		printf("TPM initialization failed\n");
-		if (recovery_mode) {
-			printf("Can't continue boot to recovery mode\nPower cycle needed\n");
+
+		if ((rc == TPM_E_MUST_REBOOT) ||
+			recovery_mode) {
+			printf("Device must be power cycled\n");
 			while (1) {
-				mdelay(100);
+				// Blink red LED
+				gpio_toggle(GPIO_RED_LED);
+				mdelay(200);
 			}
 		}
 	}