File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed
arch/arm/mach-stm32mp/include/mach Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -169,5 +169,9 @@ enum forced_boot_mode {
169169#define BSEC_OTP_BOARD 60
170170#endif
171171
172+ bool is_usb_boot (void );
173+ #define is_boot_from_usb is_usb_boot
174+ #define disconnect_from_pc ()
175+
172176#endif /* __ASSEMBLY__ */
173177#endif /* _MACH_STM32_H_ */
Original file line number Diff line number Diff line change @@ -228,3 +228,16 @@ void print_bootinfo(void)
228228 break ;
229229 }
230230}
231+
232+ bool is_usb_boot (void )
233+ {
234+ u32 bootmode = get_bootmode ();
235+
236+ switch (bootmode & TAMP_BOOT_DEVICE_MASK ) {
237+ case BOOT_SERIAL_USB :
238+ case BOOT_SERIAL_USB_OTG :
239+ return true;
240+ default :
241+ return false;
242+ }
243+ }
Original file line number Diff line number Diff line change @@ -13,5 +13,6 @@ void fdt_fixup_ccmp1(void *fdt);
1313void som_default_environment (void );
1414void print_som_info (void );
1515void print_bootinfo (void );
16+ bool is_usb_boot (void );
1617
1718#endif /* CCMP1_H */
You can’t perform that action at this time.
0 commit comments