/* On ARM switch from EL3 or secure mode to EL2 or non-secure mode */
switch_to_non_secure_mode();
+#ifdef CONFIG_PARTITIONS
+ ret = efi_disk_register();
+ if (ret != EFI_SUCCESS)
+ goto out;
+#endif
/* Initialize variable services */
ret = efi_init_variables();
if (ret != EFI_SUCCESS)
ret = efi_console_register();
if (ret != EFI_SUCCESS)
goto out;
-#ifdef CONFIG_PARTITIONS
- ret = efi_disk_register();
- if (ret != EFI_SUCCESS)
- goto out;
-#endif
#if defined(CONFIG_LCD) || defined(CONFIG_DM_VIDEO)
ret = efi_gop_register();
if (ret != EFI_SUCCESS)