Merge branch 'master' of git://www.denx.de/git/u-boot-sunxi
[oweals/u-boot.git] / drivers / usb / musb-new / omap2430.c
index 9f307e991b21ce9ef1b2fc28e0d0555a4c60c1e8..684ad9539af5ca06b03bb376ecbb7ed23a73d134 100644 (file)
 #include <linux/usb/musb-omap.h>
 #else
 #include <common.h>
+#include <asm/omap_common.h>
 #include <asm/omap_musb.h>
 #include <twl4030.h>
+#include <twl6030.h>
 #include "linux-compat.h"
 #endif
 
@@ -434,6 +436,17 @@ static int omap2430_musb_enable(struct musb *musb)
                                __PRETTY_FUNCTION__);
        }
 #endif
+
+#ifdef CONFIG_TWL6030_POWER
+       twl6030_usb_device_settings();
+#endif
+
+#ifdef CONFIG_OMAP4430
+       u32 *usbotghs_control = (u32 *)((*ctrl)->control_usbotghs_ctrl);
+       *usbotghs_control = USBOTGHS_CONTROL_AVALID |
+               USBOTGHS_CONTROL_VBUSVALID | USBOTGHS_CONTROL_IDDIG;
+#endif
+
        return 0;
 #endif
 }