USB: DM: Convert i.MX5 ehci code to driver model
[oweals/u-boot.git] / arch / arm / mach-mvebu / spl.c
index 4c3933b8354dc536915cf2693e88d1b90712dfcb..9dd7c84b6874d6ba09729279a2227276463e3c9a 100644 (file)
@@ -28,6 +28,16 @@ static u32 get_boot_device(void)
        if (boot_device == BOOTROM_ERR_MODE_UART)
                return BOOT_DEVICE_UART;
 
+#ifdef CONFIG_ARMADA_38X
+       /*
+        * If the bootrom error code contains any other than zeros it's an
+        * error condition and the bootROM has fallen back to UART boot
+        */
+       boot_device = (val & BOOTROM_ERR_CODE_MASK) >> BOOTROM_ERR_CODE_OFFS;
+       if (boot_device)
+               return BOOT_DEVICE_UART;
+#endif
+
        /*
         * Now check the SAR register for the strapped boot-device
         */