Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd517553

Browse files
committed
move common/public definitions to the correct headers.
1 parent17ff615 commitd517553

File tree

7 files changed

+59
-58
lines changed

7 files changed

+59
-58
lines changed

‎compiler/include/hardware/usb/ehci.h‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,42 @@
188188
#defineEHCI_SPLITISOTD 0x00000004/* split transaction isochronous TD */
189189
#defineEHCI_FRAMESPAN 0x00000006/* frame span traversal node */
190190

191+
/* Isochronous Transfer Descriptor definitions */
192+
193+
#defineEITF_STATUS_ACTIVE (1UL<<31)
194+
#defineEITF_STATUS_DBE (1UL<<30)
195+
#defineEITF_STATUS_BABBLE (1UL<<29)
196+
#defineEITF_STATUS_XACTERR (1UL<<28)
197+
#defineEITF_LENGTH_MASK 0x0fff
198+
#defineEITF_LENGTH_SHIFT 0
199+
#defineEITF_IOC (1UL<<15)
200+
#defineEITF_PAGESELECT_SHIFT 12
201+
202+
#defineEITM_BUFFER_BASE 0xfffff000
203+
#defineEITM_BUFFER_OFFSET 0x00000fff
204+
#defineEITM_DEVADDR(x) ((x) & 0x7f)
205+
#defineEITM_ENDPT(x) (((x) & 0x0f) << 8)
206+
#defineEITM_MAXPKTSIZE(x) (((x) & 0x07ff) << 0)
207+
#defineEITM_DIRECTION_IN (1UL<<11)
208+
#defineEITM_BUFFER_DIR(x) ((x) ? EITM_DIRECTION_IN : 0)
209+
#defineEITM_SMASK 0x000000ff
210+
#defineEITM_CMASK 0x0000ff00
211+
212+
#defineESIM_DEVADDR(x) ((x) & 0x7f)
213+
#defineESIM_ENDPT(x) (((x) & 0x0f) << 8)
214+
#defineESIM_DIRECTION_IN (1UL<<11)
215+
#defineESIM_PORT(x) (((x) & 0xff) << 16)
216+
#defineESIM_HUB(x) (((x) & 0x7f) << 24)
217+
218+
#defineESITF_STATUS_ACTIVE (1UL<<31)
219+
#defineESITF_STATUS_ERR (1UL<<30)
220+
#defineESITF_STATUS_BABBLE (1UL<<29)
221+
#defineESITF_STATUS_XACTERR (1UL<<28)
222+
#defineESITF_STATUS_MISSEDUF (1UL<<27)
223+
#defineESITF_LENGTH_MASK 0x03ff
224+
#defineESITF_LENGTH_SHIFT 16
225+
#defineESITM_BP0_OFFSET_MASK 0x00000fff
226+
191227
/* TD control and status word defines */
192228

193229
#defineETSB_PING 0/* PING state instead of OUT */

‎compiler/include/hardware/usb/ohci.h‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,22 @@
187187
#defineOHPF_OVERCURRENTCHG (1UL<<OHPB_OVERCURRENTCHG)
188188
#defineOHPF_RESETCHANGE (1UL<<OHPB_RESETCHANGE)
189189

190+
#defineOHCI_ISO_TD_POOLSIZE 128
191+
192+
#defineOITCS_STARTINGFRAME 0
193+
#defineOITCS_DELAYINT 21
194+
#defineOITCS_FRAMECOUNT 24
195+
#defineOITCS_COMPLETIONCODE 28
196+
197+
#defineOITF_NOINT (7UL<<OITCS_DELAYINT)
198+
#defineOITF_CC_MASK (0xFUL<<OITCS_COMPLETIONCODE)
199+
#defineOITF_CC_NOERROR (0UL<<OITCS_COMPLETIONCODE)
200+
#defineOITF_CC_NOTACCESSED (0xFUL<<OITCS_COMPLETIONCODE)
201+
202+
#defineOITM_PSW_CC 0xF000
203+
#defineOITS_PSW_CC 12
204+
#defineOITM_PSW_OFFSET 0x0FFF
205+
190206
/* data structures */
191207

192208
/* HCCA registers */

‎compiler/include/hardware/usb/uhci.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ struct UHCIRegs
112112
#defineUHCI_FRAMELIST_SIZE 1024
113113
#defineUHCI_FRAMELIST_ALIGNMENT 0x0fff
114114

115+
#defineUHCI_ISO_MAXPKTSIZE 0x3ff
116+
115117
#defineUHCI_TDQH_ALIGNMENT 0x0007
116118

117119
#defineUHCI_QH_POOLSIZE 128

‎rom/usb/pciusb/ehcichip.h‎

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -74,40 +74,6 @@ struct EhciSiTD
7474
ULONGsitd_BackPointer;
7575
};
7676

77-
#defineEITF_STATUS_ACTIVE (1UL<<31)
78-
#defineEITF_STATUS_DBE (1UL<<30)
79-
#defineEITF_STATUS_BABBLE (1UL<<29)
80-
#defineEITF_STATUS_XACTERR (1UL<<28)
81-
#defineEITF_LENGTH_MASK 0x0fff
82-
#defineEITF_LENGTH_SHIFT 0
83-
#defineEITF_IOC (1UL<<15)
84-
#defineEITF_PAGESELECT_SHIFT 12
85-
86-
#defineEITM_BUFFER_BASE 0xfffff000
87-
#defineEITM_BUFFER_OFFSET 0x00000fff
88-
#defineEITM_DEVADDR(x) ((x) & 0x7f)
89-
#defineEITM_ENDPT(x) (((x) & 0x0f) << 8)
90-
#defineEITM_MAXPKTSIZE(x) (((x) & 0x07ff) << 0)
91-
#defineEITM_DIRECTION_IN (1UL<<11)
92-
#defineEITM_BUFFER_DIR(x) ((x) ? EITM_DIRECTION_IN : 0)
93-
#defineEITM_SMASK 0x000000ff
94-
#defineEITM_CMASK 0x0000ff00
95-
96-
#defineESIM_DEVADDR(x) ((x) & 0x7f)
97-
#defineESIM_ENDPT(x) (((x) & 0x0f) << 8)
98-
#defineESIM_DIRECTION_IN (1UL<<11)
99-
#defineESIM_PORT(x) (((x) & 0xff) << 16)
100-
#defineESIM_HUB(x) (((x) & 0x7f) << 24)
101-
102-
#defineESITF_STATUS_ACTIVE (1UL<<31)
103-
#defineESITF_STATUS_ERR (1UL<<30)
104-
#defineESITF_STATUS_BABBLE (1UL<<29)
105-
#defineESITF_STATUS_XACTERR (1UL<<28)
106-
#defineESITF_STATUS_MISSEDUF (1UL<<27)
107-
#defineESITF_LENGTH_MASK 0x03ff
108-
#defineESITF_LENGTH_SHIFT 16
109-
#defineESITM_BP0_OFFSET_MASK 0x00000fff
110-
11177
structEhciQH
11278
{
11379
structEhciQH*eqh_Succ;

‎rom/usb/pciusb/hccommon.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
*/
1111

1212
/* Macros to swap bit defines, constants & variables */
13-
#defineSWB(x) ((x+16) & 31)
14-
#defineSWC(x) ((x>>16)|((x & 0xffff)<<16))
15-
#defineSWW(x) ((x>>16)|(x<<16))
16-
#defineL2U(x) (x<<16)
17-
#defineU2L(x) (x>>16)
13+
#defineSWB(x) ((x +16) & 31)
14+
#defineSWC(x) ((x >>16) |((x & 0xffff) <<16))
15+
#defineSWW(x) ((x >>16) | (x <<16))
16+
#defineL2U(x) (x <<16)
17+
#defineU2L(x) (x >>16)
1818

1919
#definePID_IN 0x69
2020
#definePID_OUT 0xe1

‎rom/usb/pciusb/ohcichip.h‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,6 @@
1212
#include<hardware/usb/ohci.h>
1313
#include"hccommon.h"
1414

15-
#defineOHCI_ISO_TD_POOLSIZE 128
16-
17-
#defineOITCS_STARTINGFRAME 0
18-
#defineOITCS_DELAYINT 21
19-
#defineOITCS_FRAMECOUNT 24
20-
#defineOITCS_COMPLETIONCODE 28
21-
22-
#defineOITF_NOINT (7UL<<OITCS_DELAYINT)
23-
#defineOITF_CC_MASK (0xFUL<<OITCS_COMPLETIONCODE)
24-
#defineOITF_CC_NOERROR (0UL<<OITCS_COMPLETIONCODE)
25-
#defineOITF_CC_NOTACCESSED (0xFUL<<OITCS_COMPLETIONCODE)
26-
27-
#defineOITM_PSW_CC 0xF000
28-
#defineOITS_PSW_CC 12
29-
#defineOITM_PSW_OFFSET 0x0FFF
30-
3115
/* PCI Class: PCI_CLASS_SERIAL_USB */
3216

3317
/* Framelist stuff

‎rom/usb/pciusb/uhcichip.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
#include<hardware/usb/uhci.h>
1313
#include"hccommon.h"
1414

15-
#defineUHCI_ISO_MAXPKTSIZE 0x3ff
16-
#defineUHCI_ISO_PTD_PER_HANDLER 2
17-
1815
/* PCI Class: PCI_CLASS_SERIAL_USB */
1916

2017
/* Framelist stuff

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp