diff --git a/firmware/SOURCES b/firmware/SOURCES index 9528ed0308..fe141eb366 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -337,6 +337,8 @@ drivers/m66591.c target/arm/usb-drv-arc.c #elif CONFIG_USBOTG == USBOTG_AS3525 target/arm/as3525/usb-drv-as3525.c +#elif CONFIG_USBOTG == USBOTG_AS3525v2 +target/arm/as3525/usb-drv-as3525v2.c #elif CONFIG_USBOTG == USBOTG_ISP1583 drivers/isp1583.c #endif @@ -444,9 +446,6 @@ target/arm/as3525/scrollwheel-as3525.c #else /* AS3535v2 */ target/arm/as3525/sd-as3525v2.c #endif -#if CONFIG_CPU == AS3525v2 -target/arm/as3525/usb-drv-as3525v2.c -#endif target/arm/as3525/power-as3525.c target/arm/as3525/usb-as3525.c target/arm/as3525/dma-pl081.c diff --git a/firmware/export/config/sansaclipv2.h b/firmware/export/config/sansaclipv2.h index 4c65e8fe86..262ed36167 100644 --- a/firmware/export/config/sansaclipv2.h +++ b/firmware/export/config/sansaclipv2.h @@ -169,7 +169,7 @@ #define USB_HANDLED_BY_OF /* USB On-the-go */ -#define CONFIG_USBOTG USBOTG_AS3525 +#define CONFIG_USBOTG USBOTG_AS3525v2 /* enable these for the experimental usb stack */ #define HAVE_USBSTACK diff --git a/firmware/export/config/sansafuzev2.h b/firmware/export/config/sansafuzev2.h index 96622818dd..8b2ffb3d93 100644 --- a/firmware/export/config/sansafuzev2.h +++ b/firmware/export/config/sansafuzev2.h @@ -186,7 +186,7 @@ #define USB_HANDLED_BY_OF /* USB On-the-go */ -#define CONFIG_USBOTG USBOTG_AS3525 +#define CONFIG_USBOTG USBOTG_AS3525v2 /* enable these for the experimental usb stack */ #define HAVE_USBSTACK diff --git a/firmware/target/arm/as3525/usb-drv-as3525.c b/firmware/target/arm/as3525/usb-drv-as3525.c index 15955276ab..2cb1318f72 100644 --- a/firmware/target/arm/as3525/usb-drv-as3525.c +++ b/firmware/target/arm/as3525/usb-drv-as3525.c @@ -35,7 +35,7 @@ #include "usb_core.h" #include "string.h" -#if defined(USE_ROCKBOX_USB) && CONFIG_USBOTG == USBOTG_AS3525 +#if defined(USE_ROCKBOX_USB) #define USB_NUM_EPS 4 diff --git a/firmware/target/arm/as3525/usb-drv-as3525v2.c b/firmware/target/arm/as3525/usb-drv-as3525v2.c index 9afe8255e5..83a5701a11 100644 --- a/firmware/target/arm/as3525/usb-drv-as3525v2.c +++ b/firmware/target/arm/as3525/usb-drv-as3525v2.c @@ -44,7 +44,9 @@ struct usb_endpoint bool busy; }; +#if 0 static struct usb_endpoint endpoints[USB_NUM_ENDPOINTS*2]; +#endif void usb_attach(void) { @@ -116,7 +118,9 @@ static void core_reset(void) i++; if(USB_GRSTCTL & USB_GRSTCTL_csftrst) + { logf("oops, usb core soft reset hang :("); + } /* Wait for 3 PHY Clocks */ /*mdelay(100);*/ @@ -256,6 +260,5 @@ bool usb_drv_stalled(int ep, bool in) (void) ep; (void) in; return true; - return true; }