- if (IS_ENABLED(CONFIG_ARMADA_38X)) {
- int mode;
- const struct a38x_main_hdr_v1 *hdr =
- (struct a38x_main_hdr_v1 *)get_load_addr();
-
- for (mode = 0; mode < ARRAY_SIZE(a38x_boot_modes); mode++) {
- if (strcmp(a38x_boot_modes[mode].name, dst->name) == 0)
- break;
- }
-
- if (a38x_boot_modes[mode].id == hdr->blockid)
- return 0;
+#if defined(CONFIG_ARMADA_3700) || defined(CONFIG_ARMADA_32BIT)
+ int mode;
+#if defined(CONFIG_ARMADA_3700)
+ const struct tim_boot_flash_sign *boot_modes = tim_boot_flash_signs;
+ const struct common_tim_data *hdr =
+ (struct common_tim_data *)get_load_addr();
+ u32 id = hdr->boot_flash_sign;
+#elif defined(CONFIG_ARMADA_32BIT)
+ const struct a38x_boot_mode *boot_modes = a38x_boot_modes;
+ const struct a38x_main_hdr_v1 *hdr =
+ (struct a38x_main_hdr_v1 *)get_load_addr();
+ u32 id = hdr->blockid;
+#endif