1
0
Fork 0
forked from len0rd/rockbox

Plumb an iPod Nano 2G battery leak that started spilling as soon as USB was used at least once until a reboot.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23335 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sparmann 2009-10-24 20:31:40 +00:00
parent 791f9c2a19
commit ef6e1c4eaa

View file

@ -370,9 +370,10 @@ void usb_drv_exit(void)
{
DCTL = 0x802; /* Soft Disconnect */
ORSTCON = 1; /* Put the PHY into reset (needed to get current down) */
PCGCCTL = 1; /* Shut down PHY clock */
OPHYPWR = 0xF; /* PHY: Power down */
PCGCCTL = 1; /* Mask clocks */
PWRCON |= 0x4000;
PWRCONEXT |= 0x800;
}
@ -406,12 +407,12 @@ int usb_detect(void)
#else
void usb_init_device(void)
{
/* simply switch USB off for now */
DCTL = 0x802; /* Soft Disconnect */
ORSTCON = 1; /* Put the PHY into reset (needed to get current down) */
PCGCCTL = 1; /* Shut down PHY clock */
OPHYPWR = 0xF; /* PHY: Power down */
PCGCCTL = 1; /* Mask clocks */
PWRCON |= 0x4000;
PWRCONEXT |= 0x800;
}