]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/include/asm/arch-mx6/sys_proto.h
imx: add macro to detect whether USB PHY is active
[u-boot] / arch / arm / include / asm / arch-mx6 / sys_proto.h
index 14f5d948c9f65ddaf0cae4f30389caf3f1187173..ba739432606c10b061f7a6d21b662c3625c88f05 100644 (file)
@@ -6,3 +6,10 @@
  */
 
 #include <asm/mach-imx/sys_proto.h>
+
+#define USBPHY_PWD             0x00000000
+
+#define USBPHY_PWD_RXPWDRX     (1 << 20) /* receiver block power down */
+
+#define is_usbotg_phy_active(void) (!(readl(USB_PHY0_BASE_ADDR + USBPHY_PWD) & \
+                                  USBPHY_PWD_RXPWDRX))