const unsigned int *boot_device_count;
int (*boot_device_is_usb)(u32 pinmon);
unsigned int (*boot_device_fixup)(unsigned int mode);
+ int (*boot_is_swapped)(void);
bool have_internal_stm;
};
.boot_device_sel_shift = 1,
.boot_device_table = uniphier_ld4_boot_device_table,
.boot_device_count = &uniphier_ld4_boot_device_count,
+ .boot_is_swapped = uniphier_sbc_boot_is_swapped,
.have_internal_stm = true,
},
#endif
.boot_device_sel_shift = 1,
.boot_device_table = uniphier_ld4_boot_device_table,
.boot_device_count = &uniphier_ld4_boot_device_count,
+ .boot_is_swapped = uniphier_sbc_boot_is_swapped,
.have_internal_stm = false,
},
#endif
.boot_device_sel_shift = 1,
.boot_device_table = uniphier_ld4_boot_device_table,
.boot_device_count = &uniphier_ld4_boot_device_count,
+ .boot_is_swapped = uniphier_sbc_boot_is_swapped,
.have_internal_stm = true,
},
#endif
.boot_device_sel_shift = 1,
.boot_device_table = uniphier_pro5_boot_device_table,
.boot_device_count = &uniphier_pro5_boot_device_count,
+ .boot_is_swapped = uniphier_sbc_boot_is_swapped,
.have_internal_stm = false,
},
#endif
.boot_device_count = &uniphier_pxs2_boot_device_count,
.boot_device_is_usb = uniphier_pxs2_boot_device_is_usb,
.boot_device_fixup = uniphier_pxs2_boot_device_fixup,
+ .boot_is_swapped = uniphier_sbc_boot_is_swapped,
.have_internal_stm = false,
},
#endif
.boot_device_count = &uniphier_pxs2_boot_device_count,
.boot_device_is_usb = uniphier_pxs2_boot_device_is_usb,
.boot_device_fixup = uniphier_pxs2_boot_device_fixup,
+ .boot_is_swapped = uniphier_sbc_boot_is_swapped,
.have_internal_stm = true, /* STM on A-chip */
},
#endif
.boot_device_table = uniphier_ld11_boot_device_table,
.boot_device_count = &uniphier_ld11_boot_device_count,
.boot_device_is_usb = uniphier_ld11_boot_device_is_usb,
+ .boot_is_swapped = uniphier_sbc_boot_is_swapped,
.have_internal_stm = true,
},
#endif
.boot_device_table = uniphier_ld11_boot_device_table,
.boot_device_count = &uniphier_ld11_boot_device_count,
.boot_device_is_usb = uniphier_ld20_boot_device_is_usb,
+ .boot_is_swapped = uniphier_sbc_boot_is_swapped,
.have_internal_stm = true,
},
#endif
.boot_device_table = uniphier_pxs3_boot_device_table,
.boot_device_count = &uniphier_pxs3_boot_device_count,
.boot_device_is_usb = uniphier_pxs3_boot_device_is_usb,
+ .boot_is_swapped = uniphier_sbc_boot_is_swapped,
.have_internal_stm = false,
},
#endif
u32 pinmon;
unsigned int boot_sel;
- if (boot_is_swapped())
+ if (info->boot_is_swapped && info->boot_is_swapped())
return BOOT_DEVICE_NOR;
pinmon = readl(SG_PINMON0);
printf("STB Micon: %s\n",
uniphier_boot_from_backend() ? "OFF" : "ON");
- printf("Boot Swap: %s\n", boot_is_swapped() ? "ON" : "OFF");
+ if (info->boot_is_swapped)
+ printf("Boot Swap: %s\n",
+ info->boot_is_swapped() ? "ON" : "OFF");
pinmon = readl(SG_PINMON0);