mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
PP5022/PP5024-specific USB init which may fix "signal quality issues"
FS#9923 by Boris Gjenero (dreamlayers) This is reasonably likely to finally solve the USB issues on PP5022 and PP5024, but more testing is needed before USB will be considered stable enough to be enabled by default git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20032 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
00baccd945
commit
25be896b9f
1 changed files with 24 additions and 0 deletions
|
|
@ -388,6 +388,30 @@ void usb_drv_reset(void)
|
|||
sleep(HZ/20);
|
||||
REG_USBCMD |= USBCMD_CTRL_RESET;
|
||||
while (REG_USBCMD & USBCMD_CTRL_RESET);
|
||||
|
||||
#if CONFIG_CPU == PP5022 || CONFIG_CPU == PP5024
|
||||
/* On a CPU which identifies as a PP5022, this
|
||||
initialization must be done after USB is reset.
|
||||
*/
|
||||
outl(inl(0x70000060) | 0xF, 0x70000060);
|
||||
outl(inl(0x70000028) | 0x10000, 0x70000028);
|
||||
outl(inl(0x70000028) & ~0x10000, 0x70000028);
|
||||
outl(inl(0x70000060) & ~0x20, 0x70000060);
|
||||
udelay(10);
|
||||
outl(inl(0x70000060) | 0x20, 0x70000060);
|
||||
udelay(10);
|
||||
outl((inl(0x70000060) & ~0xF) | 4, 0x70000060);
|
||||
udelay(10);
|
||||
outl(inl(0x70000060) & ~0x20, 0x70000060);
|
||||
udelay(10);
|
||||
outl(inl(0x70000060) & ~0xF, 0x70000060);
|
||||
udelay(10);
|
||||
outl(inl(0x70000060) | 0x20, 0x70000060);
|
||||
udelay(10);
|
||||
outl(inl(0x70000028) | 0x800, 0x70000028);
|
||||
outl(inl(0x70000028) & ~0x800, 0x70000028);
|
||||
while (inl(0x70000028) & 0x80);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* One-time driver startup init */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue