diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-08-25 11:10:48 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-08-25 11:10:48 +0000 |
commit | e20fb32862e2c512903f4911097c783fc1a4510a (patch) | |
tree | 549fad72add72817ede8915d7bc0fc04feaa391e /firmware/target/arm/as3525/usb-drv-as3525.c | |
parent | 8de2af7b9c52c305231c07a166063baa5496ac2e (diff) | |
download | rockbox-e20fb32862e2c512903f4911097c783fc1a4510a.tar.gz rockbox-e20fb32862e2c512903f4911097c783fc1a4510a.zip |
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/target/arm/as3525/usb-drv-as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/usb-drv-as3525.c | 10 |
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) | |||
218 | } | 218 | } |
219 | 219 | ||
220 | setup_desc_init(setup_desc); | 220 | setup_desc_init(setup_desc); |
221 | USB_OEP_SUP_PTR(0) = (int)setup_desc; | 221 | USB_OEP_SUP_PTR(0) = AS3525_PHYSICAL_ADDR((int)setup_desc); |
222 | } | 222 | } |
223 | 223 | ||
224 | void usb_drv_init(void) | 224 | void usb_drv_init(void) |
@@ -427,9 +427,9 @@ int usb_drv_recv(int ep, void *ptr, int len) | |||
427 | uc_desc->status |= USB_DMA_DESC_ZERO_LEN; | 427 | uc_desc->status |= USB_DMA_DESC_ZERO_LEN; |
428 | uc_desc->data_ptr = 0; | 428 | uc_desc->data_ptr = 0; |
429 | } else { | 429 | } else { |
430 | uc_desc->data_ptr = ptr; | 430 | uc_desc->data_ptr = AS3525_PHYSICAL_ADDR(ptr); |
431 | } | 431 | } |
432 | USB_OEP_DESC_PTR(ep) = (int)&dmadescs[ep][1]; | 432 | USB_OEP_DESC_PTR(ep) = AS3525_PHYSICAL_ADDR((int)&dmadescs[ep][1]); |
433 | USB_OEP_STS(ep) = USB_EP_STAT_OUT_RCVD; /* clear status */ | 433 | USB_OEP_STS(ep) = USB_EP_STAT_OUT_RCVD; /* clear status */ |
434 | 434 | ||
435 | /* Make sure receive DMA is on */ | 435 | /* Make sure receive DMA is on */ |
@@ -504,9 +504,9 @@ static void ep_send(int ep, void *ptr, int len) | |||
504 | if (len == 0) | 504 | if (len == 0) |
505 | uc_desc->status |= USB_DMA_DESC_ZERO_LEN; | 505 | uc_desc->status |= USB_DMA_DESC_ZERO_LEN; |
506 | 506 | ||
507 | uc_desc->data_ptr = ptr; | 507 | uc_desc->data_ptr = AS3525_PHYSICAL_ADDR(ptr); |
508 | 508 | ||
509 | USB_IEP_DESC_PTR(ep) = (int)&dmadescs[ep][0]; | 509 | USB_IEP_DESC_PTR(ep) = AS3525_PHYSICAL_ADDR((int)&dmadescs[ep][0]); |
510 | USB_IEP_STS(ep) = 0xffffffff; /* clear status */ | 510 | USB_IEP_STS(ep) = 0xffffffff; /* clear status */ |
511 | /* start transfer */ | 511 | /* start transfer */ |
512 | USB_IEP_CTRL(ep) |= USB_EP_CTRL_CNAK | USB_EP_CTRL_PD; | 512 | USB_IEP_CTRL(ep) |= USB_EP_CTRL_CNAK | USB_EP_CTRL_PD; |