From da76a3469437261bd8857c6eddeaafcc601f373e Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Thu, 22 Jan 2009 22:05:04 +0000 Subject: Use bus reset detection for all ARC OTG devices. Remove conflict from LV24020LP driver with some GPIO-by-number macros for PP502x. Start monitoring for USB stack once all core threads and queues are created otherwise queues will likely be registered after USB acks. Putting PP502x system_reboot in IRAM (unmapped, uncached) memory seems to help it work more consistently. Hopefully I got all the PP USB connect handlers in the right spot in irq_handler. If device seems unresponsive to cable, check there first. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19819 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/usb-drv-arc.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'firmware/target/arm/usb-drv-arc.c') diff --git a/firmware/target/arm/usb-drv-arc.c b/firmware/target/arm/usb-drv-arc.c index b6d6ff154d..15f3bf2c6c 100644 --- a/firmware/target/arm/usb-drv-arc.c +++ b/firmware/target/arm/usb-drv-arc.c @@ -419,13 +419,11 @@ static void _usb_drv_init(bool attach) REG_ENDPOINTLISTADDR = (unsigned int)qh_array; REG_DEVICEADDR = 0; -#ifdef USB_DETECT_BY_DRV if (!attach) { /* enable RESET interrupt */ REG_USBINTR = USBINTR_RESET_EN; } else -#endif { /* enable USB interrupts */ REG_USBINTR = @@ -449,23 +447,17 @@ static void _usb_drv_init(bool attach) (void)attach; } -/** With USB_DETECT_BY_DRV, attach is distinct from init, otherwise eqivalent. **/ - -/* USB_DETECT_BY_DRV - enable bus reset detection only - * else fully enable driver */ void usb_drv_init(void) { _usb_drv_init(false); } -#ifdef USB_DETECT_BY_DRV /* fully enable driver */ void usb_drv_attach(void) { sleep(HZ/10); _usb_drv_init(true); } -#endif /* USB_DETECT_BY_DRV */ void usb_drv_exit(void) { @@ -513,7 +505,7 @@ void usb_drv_int(void) /* reset interrupt */ if (status & USBSTS_RESET) { REG_USBSTS = USBSTS_RESET; -#ifdef USB_DETECT_BY_DRV + if (UNLIKELY(usbintr == USBINTR_RESET_EN)) { /* USB detected - detach and inform */ usb_drv_stop(); @@ -523,7 +515,6 @@ void usb_drv_int(void) usb_drv_usb_detect_event(); } else -#endif { bus_reset(); usb_core_bus_reset(); /* tell mom */ -- cgit v1.2.3