summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/arch-mx6/imx-regs.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/include/asm/arch-mx6/imx-regs.h')
-rw-r--r--arch/arm/include/asm/arch-mx6/imx-regs.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h
index 00bad47ac9..897639c3d1 100644
--- a/arch/arm/include/asm/arch-mx6/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
@@ -1102,11 +1102,17 @@ struct dbg_monitor_regs {
u32 version[4]; /* Version */
};
+ /* gd->flags reserves high 16 bits for arch-specific flags */
+#define GD_FLG_ARCH_MX6_USB_BOOT 0x80000000 /* If set, the u-boot is booting from USB serial download */
+
/*
* 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)))
+#include <stdbool.h>
+bool is_usb_boot(void);
+#define is_boot_from_usb is_usb_boot
+#define is_usbphy_power_on(void) (!(readl(USB_PHY0_BASE_ADDR) & (1<<20)))
#define disconnect_from_pc(void) writel(0x0, OTG_BASE_ADDR + 0x140)
#endif /* __ASSEMBLER__*/