mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
imx: add macro to detect whether USB has been initialized
This macro allows to detect whether the boot ROM initialized USB already (serial downloader). This is helpful to reliably detect if the system has been recovered via USB serial downloader. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
This commit is contained in:
parent
c7f367bc8d
commit
23eaf4180f
1 changed files with 7 additions and 0 deletions
|
@ -996,5 +996,12 @@ struct pwm_regs {
|
|||
u32 pr;
|
||||
u32 cnr;
|
||||
};
|
||||
|
||||
/*
|
||||
* If ROM fail back to USB recover mode, USBPH0_PWD will be clear to use USB
|
||||
* If boot from the other mode, USB0_PWD will keep reset value
|
||||
*/
|
||||
#define is_boot_from_usb(void) (!(readl(USB_PHY0_BASE_ADDR) & (1<<20)))
|
||||
|
||||
#endif /* __ASSEMBLER__*/
|
||||
#endif /* __ASM_ARCH_MX6_IMX_REGS_H__ */
|
||||
|
|
Loading…
Reference in a new issue