diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2009-02-17 22:24:00 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2009-02-17 22:24:00 +0000 |
commit | 25be896b9fed6f3dbaf7787d1ebbe3152664495e (patch) | |
tree | f986607a45c7993c450c218e7f1b863c12f7482a /firmware | |
parent | 00baccd945d3dc2e561c7a982fe77f9755777ebe (diff) | |
download | rockbox-25be896b9fed6f3dbaf7787d1ebbe3152664495e.tar.gz rockbox-25be896b9fed6f3dbaf7787d1ebbe3152664495e.zip |
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
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/arm/usb-drv-arc.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/firmware/target/arm/usb-drv-arc.c b/firmware/target/arm/usb-drv-arc.c index 5a08acb348..af97e3e174 100644 --- a/firmware/target/arm/usb-drv-arc.c +++ b/firmware/target/arm/usb-drv-arc.c | |||
@@ -388,6 +388,30 @@ void usb_drv_reset(void) | |||
388 | sleep(HZ/20); | 388 | sleep(HZ/20); |
389 | REG_USBCMD |= USBCMD_CTRL_RESET; | 389 | REG_USBCMD |= USBCMD_CTRL_RESET; |
390 | while (REG_USBCMD & USBCMD_CTRL_RESET); | 390 | while (REG_USBCMD & USBCMD_CTRL_RESET); |
391 | |||
392 | #if CONFIG_CPU == PP5022 || CONFIG_CPU == PP5024 | ||
393 | /* On a CPU which identifies as a PP5022, this | ||
394 | initialization must be done after USB is reset. | ||
395 | */ | ||
396 | outl(inl(0x70000060) | 0xF, 0x70000060); | ||
397 | outl(inl(0x70000028) | 0x10000, 0x70000028); | ||
398 | outl(inl(0x70000028) & ~0x10000, 0x70000028); | ||
399 | outl(inl(0x70000060) & ~0x20, 0x70000060); | ||
400 | udelay(10); | ||
401 | outl(inl(0x70000060) | 0x20, 0x70000060); | ||
402 | udelay(10); | ||
403 | outl((inl(0x70000060) & ~0xF) | 4, 0x70000060); | ||
404 | udelay(10); | ||
405 | outl(inl(0x70000060) & ~0x20, 0x70000060); | ||
406 | udelay(10); | ||
407 | outl(inl(0x70000060) & ~0xF, 0x70000060); | ||
408 | udelay(10); | ||
409 | outl(inl(0x70000060) | 0x20, 0x70000060); | ||
410 | udelay(10); | ||
411 | outl(inl(0x70000028) | 0x800, 0x70000028); | ||
412 | outl(inl(0x70000028) & ~0x800, 0x70000028); | ||
413 | while (inl(0x70000028) & 0x80); | ||
414 | #endif | ||
391 | } | 415 | } |
392 | 416 | ||
393 | /* One-time driver startup init */ | 417 | /* One-time driver startup init */ |