mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-24 15:37:38 -04:00
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:
parent
791f9c2a19
commit
ef6e1c4eaa
1 changed files with 4 additions and 3 deletions
|
|
@ -370,9 +370,10 @@ void usb_drv_exit(void)
|
||||||
{
|
{
|
||||||
DCTL = 0x802; /* Soft Disconnect */
|
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 */
|
OPHYPWR = 0xF; /* PHY: Power down */
|
||||||
|
|
||||||
PCGCCTL = 1; /* Mask clocks */
|
|
||||||
PWRCON |= 0x4000;
|
PWRCON |= 0x4000;
|
||||||
PWRCONEXT |= 0x800;
|
PWRCONEXT |= 0x800;
|
||||||
}
|
}
|
||||||
|
|
@ -406,12 +407,12 @@ int usb_detect(void)
|
||||||
#else
|
#else
|
||||||
void usb_init_device(void)
|
void usb_init_device(void)
|
||||||
{
|
{
|
||||||
/* simply switch USB off for now */
|
|
||||||
DCTL = 0x802; /* Soft Disconnect */
|
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 */
|
OPHYPWR = 0xF; /* PHY: Power down */
|
||||||
|
|
||||||
PCGCCTL = 1; /* Mask clocks */
|
|
||||||
PWRCON |= 0x4000;
|
PWRCON |= 0x4000;
|
||||||
PWRCONEXT |= 0x800;
|
PWRCONEXT |= 0x800;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue