summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-09-14 20:36:24 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-09-17 11:26:04 -0400
commitec413f7692de3e33254d79a84c46bd036fd27d0a (patch)
treed5853dd677c5d39233a067a9d7f1dc2d3290a8ae /utils
parenta66b9088014fd77d08c34fc07a4e701051e1525a (diff)
downloadrockbox-ec413f7692de3e33254d79a84c46bd036fd27d0a.tar.gz
rockbox-ec413f7692de3e33254d79a84c46bd036fd27d0a.zip
jz4760: Heavily rework USB driver to add working DMA support
* DMA Bulk IN (ie our TX) results in sequential transfers 33-68% faster. * DMA Bulk OUT (ie RX) is mostly stripped out due to complete brokenness. * Interrupt and control endpoints remain PIO-driven. Other improvements: 1) Use consistent endpoint references (no magic numbers) 2) Greatly enhanced logging 3) DMA support can be compiled out completely 4) Setting lockswitch will disable all DMA operations at runtime 5) Much more robust error checking and recovery Change-Id: I57b82e655e55ced0dfe289e379b0b61d8fe443b4
Diffstat (limited to 'utils')
-rw-r--r--utils/hwstub/stub/jz4760b/jz4760b.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/hwstub/stub/jz4760b/jz4760b.h b/utils/hwstub/stub/jz4760b/jz4760b.h
index 97ef74a56c..d07a039f70 100644
--- a/utils/hwstub/stub/jz4760b/jz4760b.h
+++ b/utils/hwstub/stub/jz4760b/jz4760b.h
@@ -6966,6 +6966,8 @@ do { \
6966 6966
6967#define USB_FIFO_EP(n) (USB_BASE + (n)*4 + 0x20) 6967#define USB_FIFO_EP(n) (USB_BASE + (n)*4 + 0x20)
6968 6968
6969#define USB_HWVERS (USB_BASE + 0x6c)
6970
6969#define USB_EPINFO (USB_BASE + 0x78) /* Endpoint information */ 6971#define USB_EPINFO (USB_BASE + 0x78) /* Endpoint information */
6970#define USB_RAMINFO (USB_BASE + 0x79) /* RAM information */ 6972#define USB_RAMINFO (USB_BASE + 0x79) /* RAM information */
6971 6973
@@ -7006,6 +7008,7 @@ do { \
7006#define USB_INCSRH_DMAREQENAB 0x10 7008#define USB_INCSRH_DMAREQENAB 0x10
7007#define USB_INCSRH_FRCDATATOG 0x08 7009#define USB_INCSRH_FRCDATATOG 0x08
7008#define USB_INCSRH_DMAREQMODE 0x04 7010#define USB_INCSRH_DMAREQMODE 0x04
7011#define USB_INCSR_INCOMPTX 0x80
7009#define USB_INCSR_CDT 0x40 7012#define USB_INCSR_CDT 0x40
7010#define USB_INCSR_SENTSTALL 0x20 7013#define USB_INCSR_SENTSTALL 0x20
7011#define USB_INCSR_SENDSTALL 0x10 7014#define USB_INCSR_SENDSTALL 0x10
@@ -7083,6 +7086,8 @@ do { \
7083#define REG_USB_ADDR(n) REG32(USB_ADDR(n)) 7086#define REG_USB_ADDR(n) REG32(USB_ADDR(n))
7084#define REG_USB_COUNT(n) REG32(USB_COUNT(n)) 7087#define REG_USB_COUNT(n) REG32(USB_COUNT(n))
7085 7088
7089#define REG_USB_HWVERS REG16(USB_HWVERS)
7090
7086#define REG_USB_EPINFO REG8(USB_EPINFO) 7091#define REG_USB_EPINFO REG8(USB_EPINFO)
7087#define REG_USB_RAMINFO REG8(USB_RAMINFO) 7092#define REG_USB_RAMINFO REG8(USB_RAMINFO)
7088 7093