summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-05-19 17:56:47 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-05-19 17:56:47 +0000
commitbae0756acf71aa8a59c6c4f4aed302bef79e4678 (patch)
treedbd6dd8bfa11067e35f784f5e957ef275fc93404 /firmware
parent0b28594036f0350bd2e9d3074a8284b38e36fadd (diff)
downloadrockbox-bae0756acf71aa8a59c6c4f4aed302bef79e4678.tar.gz
rockbox-bae0756acf71aa8a59c6c4f4aed302bef79e4678.tar.bz2
rockbox-bae0756acf71aa8a59c6c4f4aed302bef79e4678.zip
as3525: don't use IRAM for usb, and avoid usb storage using uncached addresses behind our back
No need for special address handling, all addresses are equal to their physical address git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26176 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/as3525.h4
-rw-r--r--firmware/target/arm/as3525/usb-drv-as3525.c17
-rw-r--r--firmware/usbstack/usb_storage.c2
3 files changed, 5 insertions, 18 deletions
diff --git a/firmware/export/as3525.h b/firmware/export/as3525.h
index e578b608a6..a58a0ae0ad 100644
--- a/firmware/export/as3525.h
+++ b/firmware/export/as3525.h
@@ -530,9 +530,9 @@ CE lines
/* Timer frequency */
#define TIMER_FREQ (24000000 / 16)
-/* USB : TODO */
+/* USB */
#define USB_NUM_ENDPOINTS 4
-#define USB_DEVBSS_ATTR IBSS_ATTR
+#define USB_DEVBSS_ATTR
/* I2SIN registers */
diff --git a/firmware/target/arm/as3525/usb-drv-as3525.c b/firmware/target/arm/as3525/usb-drv-as3525.c
index ca484d0395..740526407d 100644
--- a/firmware/target/arm/as3525/usb-drv-as3525.c
+++ b/firmware/target/arm/as3525/usb-drv-as3525.c
@@ -626,19 +626,6 @@ void usb_drv_cancel_all_transfers(void)
restore_irq(flags);
}
-static void *virt_to_bus(void *addr)
-{
- unsigned int x = (long)addr;
-
- x -= (x & 0x40000000) >> 2; /* fix uncached address */
-
- if (x >= IRAM_ORIG) { /* iram address */
- x -= IRAM_ORIG;
- }
-
- return (void*)x;
-}
-
int usb_drv_recv(int ep, void *ptr, int len)
{
struct usb_dev_dma_desc *uc_desc = endpoints[ep][1].uc_desc;
@@ -664,7 +651,7 @@ int usb_drv_recv(int ep, void *ptr, int len)
uc_desc->status |= USB_DMA_DESC_ZERO_LEN;
uc_desc->data_ptr = 0;
} else {
- uc_desc->data_ptr = virt_to_bus(ptr);
+ uc_desc->data_ptr = ptr;
}
USB_OEP_DESC_PTR(ep) = (int)&dmadescs[ep][1];
USB_OEP_STS(ep) = USB_EP_STAT_OUT_RCVD; /* clear status */
@@ -716,7 +703,7 @@ void ep_send(int ep, void *ptr, int len)
if (len == 0)
uc_desc->status |= USB_DMA_DESC_ZERO_LEN;
- uc_desc->data_ptr = virt_to_bus(ptr);
+ uc_desc->data_ptr = ptr;
USB_IEP_DESC_PTR(ep) = (int)&dmadescs[ep][0];
USB_IEP_STS(ep) = 0xffffffff; /* clear status */
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c
index 3373bf41f3..8917a67141 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;