提交 23eaf418 编写于 作者: S Stefan Agner 提交者: Stefano Babic

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: NStefan Agner <stefan.agner@toradex.com>
Acked-by: NMarcel Ziswiler <marcel.ziswiler@toradex.com>
上级 c7f367bc
......@@ -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__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册