diff --git a/firmware/export/as3525.h b/firmware/export/as3525.h
index 699762a..c7431fc 100644
--- a/firmware/export/as3525.h
+++ b/firmware/export/as3525.h
@@ -525,7 +525,7 @@ CE lines

/* USB : TODO */
#define USB_NUM_ENDPOINTS 4
-#define USB_DEVBSS_ATTR IBSS_ATTR
+#define USB_DEVBSS_ATTR

/* I2SIN registers */

diff --git a/firmware/export/config.h b/firmware/export/config.h
index 38eb696..d16ede4 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -912,7 +912,7 @@ Lyre prototype 1 */
#else /* BOOTLOADER */

#ifndef SIMULATOR
-//#define USB_ENABLE_SERIAL
+#define USB_ENABLE_SERIAL
#define USB_ENABLE_STORAGE

#ifdef USB_HAS_INTERRUPT
diff --git a/firmware/export/config/sansaclip.h b/firmware/export/config/sansaclip.h
index fc26f9d..86075c7 100644
--- a/firmware/export/config/sansaclip.h
+++ b/firmware/export/config/sansaclip.h
@@ -164,19 +164,14 @@
/* Type of LCD */
#define CONFIG_LCD LCD_SSD1303

-#ifndef BOOTLOADER
-
-#define USB_HANDLED_BY_OF
-
#define CONFIG_USBOTG USBOTG_AS3525

/* enable these for the experimental usb stack */
#define HAVE_USBSTACK
+#define USE_ROCKBOX_USB
#define USB_VENDOR_ID 0x0781
#define USB_PRODUCT_ID 0x7433

-#endif /* BOOTLOADER */
-
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ

diff --git a/firmware/target/arm/as3525/usb-drv-as3525.c b/firmware/target/arm/as3525/usb-drv-as3525.c
index 2cb1318..f78fcfd 100644
--- a/firmware/target/arm/as3525/usb-drv-as3525.c
+++ b/firmware/target/arm/as3525/usb-drv-as3525.c
@@ -300,11 +300,9 @@ static struct usb_endpoint endpoints[USB_NUM_EPS][2];
static struct usb_dev_dma_desc dmadescs[USB_NUM_EPS][2] __attribute__((aligned(32)));

static struct usb_dev_setup_buf setup_desc;
-/* Dummy buffer, to keep rx_buf out of this cacheline */
-static struct usb_dev_setup_buf dummy __attribute__((unused));

-static char rx_buf[1024];
-static char tx_buf[1024];
+static char rx_buf[1024] __attribute__((aligned(32)));
+static char tx_buf[1024] __attribute__((aligned(32)));

void usb_attach(void)
{
@@ -600,15 +598,12 @@ void usb_drv_cancel_all_transfers(void)
restore_irq(flags);
}

-static void *virt_to_bus(void *addr)
+static inline void *virt_to_bus(void *addr)
{
- unsigned int x = (long)addr;
+ uintptr_t x = (uintptr_t)addr;

- x -= (x & 0x40000000) >> 2; /* fix uncached address */
-
- if (x >= IRAM_ORIG) { /* iram address */
- x -= IRAM_ORIG;
- }
+ x &= ~0x40000000;
+ x |= 0x30000000;

return (void*)x;
}
@@ -796,7 +791,8 @@ static void handle_out_ep(int ep)
/*
* If parts of the just dmaed range are in cache, dump them now.
*/
- dump_dcache_range(uc_desc->data_ptr, dma_len);
+ //dump_dcache_range(uc_desc->data_ptr, dma_len);
+ clean_dcache();
} else{
logf("EP%d OUT token, st:%08x len:%d frm:%x\n", ep,
dma_mst, dma_len, dma_frm);
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c
index 3373bf4..8917a67 100644
--- a/firmware/usbstack/usb_storage.c
+++ b/firmware/usbstack/usb_storage.c
@@ -449,7 +449,7 @@ void usb_storage_init_connection(void)
state = WAITING_FOR_COMMAND;

#if CONFIG_CPU == IMX31L || defined(CPU_TCC77X) || defined(CPU_TCC780X) || \
- defined(BOOTLOADER) || CONFIG_CPU == DM320
+ defined(BOOTLOADER) || CONFIG_CPU == DM320 || CONFIG_CPU == AS3525
static unsigned char _cbw_buffer[MAX_CBW_SIZE]
USB_DEVBSS_ATTR __attribute__((aligned(32)));
cbw_buffer = (void *)_cbw_buffer;