diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2021-11-22 08:08:12 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-11-22 08:08:12 -0500 |
commit | 3d07ec46eed738e6dac6109598766f6568ac4669 (patch) | |
tree | 39c87d691c32110396de65c28dd8ecd0408a8c86 /firmware/target/mips/ingenic_jz47xx/usb-jz4740.c | |
parent | 5bd9ed801f4ef684e148222710e042c113e48e58 (diff) | |
download | rockbox-3d07ec46eed738e6dac6109598766f6568ac4669.tar.gz rockbox-3d07ec46eed738e6dac6109598766f6568ac4669.zip |
jz47x0: Minor code quality improvements in the jz47xx USB drivers
* Replace magic nubmers with #defined constant
* Tweak some logf messages
No functional changes!
Change-Id: I6a5e4c371a471197a8edbb853967e461621d73f8
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/usb-jz4740.c')
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/usb-jz4740.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c b/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c index 07d24be380..07697da723 100644 --- a/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/usb-jz4740.c | |||
@@ -75,7 +75,7 @@ static unsigned char ep0_rx_buf[64]; | |||
75 | static struct usb_endpoint endpoints[] = | 75 | static struct usb_endpoint endpoints[] = |
76 | { | 76 | { |
77 | { .type = ep_control, .fifo_addr = USB_FIFO_EP0, .fifo_size = 64 }, | 77 | { .type = ep_control, .fifo_addr = USB_FIFO_EP0, .fifo_size = 64 }, |
78 | { .type = ep_control, .fifo_addr = USB_FIFO_EP0, .buf = &ep0_rx_buf }, | 78 | { .type = ep_control, .fifo_addr = USB_FIFO_EP0, .buf = ep0_rx_buf }, |
79 | { .type = ep_bulk, .fifo_addr = USB_FIFO_EP1, .fifo_size = 512 }, | 79 | { .type = ep_bulk, .fifo_addr = USB_FIFO_EP1, .fifo_size = 512 }, |
80 | { .type = ep_bulk, .fifo_addr = USB_FIFO_EP1, .fifo_size = 512 }, | 80 | { .type = ep_bulk, .fifo_addr = USB_FIFO_EP1, .fifo_size = 512 }, |
81 | { .type = ep_interrupt, .fifo_addr = USB_FIFO_EP2, .fifo_size = 64 }, | 81 | { .type = ep_interrupt, .fifo_addr = USB_FIFO_EP2, .fifo_size = 64 }, |
@@ -193,7 +193,7 @@ static void EP0_send(void) | |||
193 | if(ep->sent >= ep->length) | 193 | if(ep->sent >= ep->length) |
194 | { | 194 | { |
195 | REG_USB_REG_CSR0 = (csr0 | USB_CSR0_INPKTRDY | USB_CSR0_DATAEND); /* Set data end! */ | 195 | REG_USB_REG_CSR0 = (csr0 | USB_CSR0_INPKTRDY | USB_CSR0_DATAEND); /* Set data end! */ |
196 | usb_core_transfer_complete(0, USB_DIR_IN, 0, ep->sent); | 196 | usb_core_transfer_complete(EP_CONTROL, USB_DIR_IN, 0, ep->sent); |
197 | ep_transfer_completed(ep); | 197 | ep_transfer_completed(ep); |
198 | } | 198 | } |
199 | else | 199 | else |