summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/target/arm/usb-s3c6400x.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/target/arm/usb-s3c6400x.c b/firmware/target/arm/usb-s3c6400x.c
index 23347cc..e94c54f 100644
--- a/firmware/target/arm/usb-s3c6400x.c
+++ b/firmware/target/arm/usb-s3c6400x.c
@@ -403,6 +403,14 @@ void usb_init_device(void)
unsigned int i;
for (i = 0; i < sizeof(endpoints)/sizeof(struct ep_type); i++)
wakeup_init(&endpoints[i].complete);
+
+ /* Power up the core clocks to allow writing
+ to some registers needed to power it down */
+ PWRCON &= ~0x4000;
+ PWRCONEXT &= ~0x800;
+ PCGCCTL = 0;
+ INTMSK |= INTMSK_USB_OTG;
+
usb_drv_exit();
}