summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-08-25 11:10:48 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-08-25 11:10:48 +0000
commite20fb32862e2c512903f4911097c783fc1a4510a (patch)
tree549fad72add72817ede8915d7bc0fc04feaa391e /firmware
parent8de2af7b9c52c305231c07a166063baa5496ac2e (diff)
usb-drv-as3525: only give physical addresses to USB HW
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27877 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/usb-drv-as3525.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/usb-drv-as3525.c b/firmware/target/arm/as3525/usb-drv-as3525.c
index 0ababd857d..3a2cc9df3f 100644
--- a/firmware/target/arm/as3525/usb-drv-as3525.c
+++ b/firmware/target/arm/as3525/usb-drv-as3525.c
@@ -218,7 +218,7 @@ static void reset_endpoints(int init)
}
setup_desc_init(setup_desc);
- USB_OEP_SUP_PTR(0) = (int)setup_desc;
+ USB_OEP_SUP_PTR(0) = AS3525_PHYSICAL_ADDR((int)setup_desc);
}
void usb_drv_init(void)
@@ -427,9 +427,9 @@ 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 = ptr;
+ uc_desc->data_ptr = AS3525_PHYSICAL_ADDR(ptr);
}
- USB_OEP_DESC_PTR(ep) = (int)&dmadescs[ep][1];
+ USB_OEP_DESC_PTR(ep) = AS3525_PHYSICAL_ADDR((int)&dmadescs[ep][1]);
USB_OEP_STS(ep) = USB_EP_STAT_OUT_RCVD; /* clear status */
/* Make sure receive DMA is on */
@@ -504,9 +504,9 @@ static void ep_send(int ep, void *ptr, int len)
if (len == 0)
uc_desc->status |= USB_DMA_DESC_ZERO_LEN;
- uc_desc->data_ptr = ptr;
+ uc_desc->data_ptr = AS3525_PHYSICAL_ADDR(ptr);
- USB_IEP_DESC_PTR(ep) = (int)&dmadescs[ep][0];
+ USB_IEP_DESC_PTR(ep) = AS3525_PHYSICAL_ADDR((int)&dmadescs[ep][0]);
USB_IEP_STS(ep) = 0xffffffff; /* clear status */
/* start transfer */
USB_IEP_CTRL(ep) |= USB_EP_CTRL_CNAK | USB_EP_CTRL_PD;