summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorMichael Sparmann <theseven@rockbox.org>2010-10-12 23:14:27 +0000
committerMichael Sparmann <theseven@rockbox.org>2010-10-12 23:14:27 +0000
commit986910175cfc8a91668c54274a660ec853935a6b (patch)
tree978c46307d6ff0a1f8b9c84d2b3a54e921c52dcd /firmware
parentf70ec76fcc6a96b7712e2c7bad9495ce6c210ce6 (diff)
downloadrockbox-986910175cfc8a91668c54274a660ec853935a6b.tar.gz
rockbox-986910175cfc8a91668c54274a660ec853935a6b.tar.bz2
rockbox-986910175cfc8a91668c54274a660ec853935a6b.zip
iPod Nano 2G USB: Make sure the USB core is properly powered off on boot.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28261 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-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 23347ccf83..e94c54f086 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();
}