tizen 2.4 release
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc9630 / usb20_reg_v3.h
1 /******************************************************************************
2  ** File Name:    usb20_v3_reg.h                                            *
3  ** Author:       Daniel.Ding                                                 *
4  ** DATE:         11/13/2005                                                  *
5  ** Copyright:    2005 Spreatrum, Incoporated. All Rights Reserved.           *
6  ** Description:                                                              *
7  ******************************************************************************/
8 /******************************************************************************
9  **                   Edit    History                                         *
10  **---------------------------------------------------------------------------*
11  ** DATE          NAME            DESCRIPTION                                 *
12  ** 11/13/2005    Daniel.Ding     Create.                                     *
13  ******************************************************************************/
14 #ifndef _USB20_V3_REG_H_
15 #define _USB20_V3_REG_H_
16 /*----------------------------------------------------------------------------*
17  **                         Dependencies                                      *
18  **------------------------------------------------------------------------- */
19
20 /**---------------------------------------------------------------------------*
21  **                             Compiler Flag                                 *
22  **--------------------------------------------------------------------------*/
23 #ifdef   __cplusplus
24 extern   "C"
25 {
26 #endif
27 /**---------------------------------------------------------------------------*
28 **                               Micro Define                                **
29 **---------------------------------------------------------------------------*/
30
31 #if 1
32
33
34
35 //**************** Core Global CSR ***************************
36 #define USB_GOTGCTL                     (USB_REG_BASE + 0x0000)
37 #define USB_GOTGINT                     (USB_REG_BASE + 0x0004)
38 #define USB_GAHBCFG                     (USB_REG_BASE + 0x0008)
39 #define USB_GUSBCFG                     (USB_REG_BASE + 0x000c)
40 #define USB_GRSTCTL                     (USB_REG_BASE + 0x0010)
41 #define USB_GINTSTS                     (USB_REG_BASE + 0x0014)
42 #define USB_GINTMSK                     (USB_REG_BASE + 0x0018)
43 #define USB_GRXSTSR                     (USB_REG_BASE + 0x001c)
44 #define USB_GRXSTSP                     (USB_REG_BASE + 0x0020)
45 #define USB_GRXFSIZ                     (USB_REG_BASE + 0x0024)
46 #define USB_GNPTXFSIZ                   (USB_REG_BASE + 0x0028)
47 #define USB_GNPTXSTS                    (USB_REG_BASE + 0x002c)
48 #define USB_GI2CCTL                     (USB_REG_BASE + 0x0030)
49 #define USB_GPVNDCTL                    (USB_REG_BASE + 0x0034)
50 #define USB_GGPIO                       (USB_REG_BASE + 0x0038)
51 #define USB_GUID                        (USB_REG_BASE + 0x003c)
52 #define USB_GSNPSID                     (USB_REG_BASE + 0x0040)
53 #define USB_GHWCFG1                     (USB_REG_BASE + 0x0044)
54 #define USB_GHWCFG2                     (USB_REG_BASE + 0x0048)
55 #define USB_GHWCFG3                     (USB_REG_BASE + 0x004c)
56 #define USB_GHWCFG4                     (USB_REG_BASE + 0x0050)
57 #define USB_GLPMCFG                     (USB_REG_BASE + 0x0054)
58 #define USB_HPTXFSIZ                    (USB_REG_BASE + 0x0100)
59 #define USB_DPTXFSIZ(n)                 (USB_REG_BASE + 0x0104+(n-1)*0x04)   // n(1-15)
60 #define USB_DIEPTXF(n)                  (USB_REG_BASE + 0x0104+(n-1)*0x04)   // n(1-15)
61
62 //**************** Power and Clock geting  CSR ****************
63 #define USB_PCGCR                       (USB_REG_BASE + 0x0E00)
64
65 //**************** Device CSR *********************************
66 #define USB_DCFG                        (USB_REG_BASE + 0x0800)
67 #define USB_DCTL                        (USB_REG_BASE + 0x0804)
68 #define USB_DSTS                        (USB_REG_BASE + 0x0808)
69 #define USB_DIEPMSK                     (USB_REG_BASE + 0x0810)
70 #define USB_DOEPMSK                     (USB_REG_BASE + 0x0814)
71 #define USB_DAINT                       (USB_REG_BASE + 0x0818)
72 #define USB_DAINTMSK                    (USB_REG_BASE + 0x081c)
73 #define USB_DTKNQR1                     (USB_REG_BASE + 0x0820)
74 #define USB_DTKNQR2                     (USB_REG_BASE + 0x0824)
75 #define USB_DTKNQR3                     (USB_REG_BASE + 0x0830)
76 #define USB_DTKNQR4                     (USB_REG_BASE + 0x0834)
77 #define USB_DVBUSDIS                    (USB_REG_BASE + 0x0828)
78 #define USB_DVBUSPULSE                  (USB_REG_BASE + 0x082c)
79 #define USB_DTHRCTL                     (USB_REG_BASE + 0x0830)
80 #define USB_DIEPEMPMSK                  (USB_REG_BASE + 0x0834)
81 #define USB_DEACHINT                    (USB_REG_BASE + 0x0838)
82 #define USB_DEACHINTMSK                 (USB_REG_BASE + 0x083c)
83 #define USB_DIACHINTMSK(n)              (USB_REG_BASE + 0x0840+n*0x04)  // n(0-15)
84 #define USB_DOACHINTMSK(n)              (USB_REG_BASE + 0x0880+n*0x04)  // n(0-15)
85 #define USB_DIEP0CTL                    (USB_REG_BASE + 0x0900)
86 #define USB_DIEPCTL(n)                  (USB_REG_BASE + 0x0900+n*0x20)  // n(1-15)
87 #define USB_DIEPINT(n)                  (USB_REG_BASE + 0x0908+n*0x20)  // n(0-15)
88 #define USB_DIEP0TSIZ                   (USB_REG_BASE + 0x0910)
89 #define USB_DIEPTSIZ(n)                 (USB_REG_BASE + 0x0910+n*0x20)  // n(1-15)
90 #define USB_DIEPDMA(n)                  (USB_REG_BASE + 0x0914+n*0x20)  // n(0-15)
91 #define USB_DTXFSTS(n)                  (USB_REG_BASE + 0x0918+n*0x20)  // n(0-15)
92 #define USB_DIEPDMAB(n)                 (USB_REG_BASE + 0x091c+n*0x20)  // n(0-15)
93 #define USB_DOEP0CTL                    (USB_REG_BASE + 0x0b00)
94 #define USB_DOEPCTL(n)                  (USB_REG_BASE + 0x0b00+n*0x20)  // n(1-15)
95 #define USB_DOEPINT(n)                  (USB_REG_BASE + 0x0b08+n*0x20)  // n(0-15)
96 #define USB_DOEP0TSIZ                   (USB_REG_BASE + 0x0b10)
97 #define USB_DOEPTSIZ(n)                 (USB_REG_BASE + 0x0b10+n*0x20)  // n(1-15)
98 #define USB_DOEPDMA(n)                  (USB_REG_BASE + 0x0b14+n*0x20)  // n(0-15)
99 #define USB_DOEPDMAB(n)                 (USB_REG_BASE + 0x0b1c+n*0x20)  // n(0-15)
100
101
102 //**************** Device EP FIFO base address  *********************************
103
104 #define USB_DEPFIFOBA(n)                (USB_REG_BASE + (n+1)*0x1000)   // n(0-15)
105
106
107 //#define USB_FIFO_MAX_WORD               128
108 //#define USB_FIFO_MAX_BYTE               512
109
110 #define USB_CTRL_END                    0x203FFFFF
111 #define USB_CLK_12M                     12000000
112 #define USB_CLK_48M                     48000000
113 #endif
114
115
116 #define USB_DEVICE                      0
117 #define USB_INTERFACE                   1
118 #define USB_ENDPOINT                    2
119 #define USB_RECIPIENT_OTHER             3
120
121 #define  ENPOINT_HALT                   0
122
123 #define  USB_CONNECTTED                  0
124 #define  USB_POWERED                     1
125 #define  USB_DEFAULT                     2
126 #define  USB_ADDRESSED                   3
127 #define  USB_CONFIGED                    4
128
129
130 #define USB_EP_DIR_OUT                  1
131 #define USB_EP_DIR_IN                   0
132
133
134 #define USB_PACKET_16           0x10
135 #define USB_PACKET_32           0x20
136 #define USB_PACKET_64           0x40
137 #define USB_PACKET_128          0x80
138 #define USB_PACKET_256          0x100
139 #define USB_PACKET_512          0x200
140 #define USB_PACKET_1024         0x400
141
142
143
144 // USB endpoind type
145 typedef enum
146 {
147     USB_EP_TYPE_CONTROL   = 0,
148     USB_EP_TYPE_ISO          ,
149     USB_EP_TYPE_BULK         ,
150     USB_EP_TYPE_INTERRUPT    ,
151     USB_EP_TYPE_MAX
152 }
153 USB_EP_TYPE_E;
154
155
156 #undef USB_EP1
157 #undef USB_EP2
158 #undef USB_EP3
159 #undef USB_EP4
160 #undef USB_EP5
161 #undef USB_EP6
162 // USB EPx ID
163 typedef enum
164 {
165     USB_EP0            =  0,
166     USB_EP1                ,
167     USB_EP2                ,
168     USB_EP3                ,
169     USB_EP4                ,
170     USB_EP5                ,
171     USB_EP6                ,
172     USB_EP_NUMBER
173 } USB_EP_NUM_E;
174
175
176
177
178 #define USB_INT_SOF                     (BIT_0)
179 #define USB_INT_SPEND                   (BIT_1)
180 #define USB_INT_RESUM                   (BIT_2)
181 #define USB_INT_RST                     (BIT_3)
182 #define USB_INT_UNPID                   (BIT_4)
183 #define USB_INT_EPID                    (BIT_5)
184 #define USB_INT_CHANGE                  (BIT_6)
185 #define USB_INT_DEVICE                  (BIT_7)
186 #define USB_INT_EP0                     (BIT_8)
187 #define USB_INT_EP1                     (BIT_9)
188 #define USB_INT_EP2                     (BIT_10)
189 #define USB_INT_EP3                     (BIT_11)
190 #define USB_INT_EP4                     (BIT_12)
191
192
193 /**----------------------------------------------------------------------------*
194 **                             Data Prototype                                 **
195 **----------------------------------------------------------------------------*/
196
197 //************************** Core Global Register Prototype *******************/
198
199 typedef union usb_gahbcfg_tag
200 {
201     struct usb_gahbcfg_map
202     {
203         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
204         
205         volatile unsigned int   reserved_2          :23;
206         volatile unsigned int   ptxfemplvl          :1;  //periodic_txfifo_empty_level
207         volatile unsigned int   nptxfemplvl         :1;  //non_periodic_txfifo_empty_level
208         volatile unsigned int   reserved_1          :1;
209         volatile unsigned int   dma_enable          :1;  //dma_enable
210         volatile unsigned int   burst_length        :4;  //burst_length
211         volatile unsigned int   global_int_mask     :1;  //global_interrupt_mask
212       #else
213         volatile unsigned int   global_int_mask         :1;      //global_interrupt_mask    
214         volatile unsigned int   burst_length            :4;  //burst_length               
215         volatile unsigned int   dma_enable                      :1;  //dma_enable           
216         volatile unsigned int   reserved_1                      :1;
217         volatile unsigned int   nptxfemplvl                     :1;  //non_periodic_txfifo_empty_level  
218                     volatile unsigned int       ptxfemplvl                      :1;  //periodic_txfifo_empty_level 
219                     volatile unsigned int       reserved_2                      :23;            
220       #endif
221     } mBits ;
222     volatile unsigned int dwValue ;
223 } USB_GAHBCFG_U;
224
225 typedef union usb_gusbcfg_tag
226 {
227     struct usb_gusbcfg_map
228     {
229         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
230         volatile unsigned int   corrupt_tx_packet       :1;  //Corrupt TX packet
231         volatile unsigned int   force_dev_mod           :1;  //Force device mode
232         volatile unsigned int   force_hst_mod           :1;  //Force host mode
233         volatile unsigned int   tx_end_delay            :1;  //TX end delay
234         volatile unsigned int   ic_usb_tri              :1;  //IC USB Tranfic Pull Remove Control
235         volatile unsigned int   ic_usb_cap              :1;  //IC USB capable
236         volatile unsigned int   reserved_3              :3;
237         volatile unsigned int   temseldlpulse           :1;  //Termsel Dline PUlsing Sleection
238         volatile unsigned int   reserved_2              :2;
239         volatile unsigned int   ulpiclksusm             :1;  //ULPI clock suspendM
240         volatile unsigned int   ulpiautores             :1;  //ULPI auto resume
241         volatile unsigned int   ulpifsls                :1;  //ULPI FS/LS select
242         volatile unsigned int   otgi2csel               :1;  //UTMIFS or I2C interface select
243         volatile unsigned int   phylpwrclksel           :1;  //PHY low power clock select
244         volatile unsigned int   reserved_1              :1;
245         volatile unsigned int   usbtrdtim               :4;  //USB turnaroud time
246         volatile unsigned int   hnpcap                  :1;  //HNP capable
247         volatile unsigned int   srpcap                  :1;  //SRP capable
248         volatile unsigned int   ddrsel                  :1;  //ULPI DDR select
249         volatile unsigned int   physel                  :1;  //USB 2.0 high speed PHY or USB 1.1 FULL speed serial transceiver select
250         volatile unsigned int   fsintf                  :1;  //FULL speed serial interface select
251         volatile unsigned int   ulpiutmisel             :1;  //ULPI or UTMI+ select
252         volatile unsigned int   phyintf                 :1;  //PHY interface
253         volatile unsigned int   toutcal                 :3;  //HS/FS time out calibration
254       #else
255         volatile unsigned int   toutcal                 :3;  //HS/FS time out calibration
256         volatile unsigned int   phyintf                 :1;  //PHY interface
257         volatile unsigned int   ulpiutmisel             :1;  //ULPI or UTMI+ select
258         volatile unsigned int   fsintf                  :1;  //FULL speed serial interface select
259         volatile unsigned int   physel                  :1;  //USB 2.0 high speed PHY or USB 1.1 FULL speed serial transceiver select
260         volatile unsigned int   ddrsel                  :1;  //ULPI DDR select
261         volatile unsigned int   srpcap                  :1;  //SRP capable
262                     volatile unsigned int   hnpcap                  :1;  //HNP capable
263                     volatile unsigned int   usbtrdtim               :4;  //USB turnaroud time
264         volatile unsigned int   reserved_1              :1;  
265         volatile unsigned int   phylpwrclksel           :1;  //PHY low power clock select
266         volatile unsigned int   otgi2csel               :1;  //UTMIFS or I2C interface select
267         volatile unsigned int   ulpifsls                :1;  //ULPI FS/LS select
268         volatile unsigned int   ulpiautores             :1;  //ULPI auto resume
269         volatile unsigned int   ulpiclksusm             :1;  //ULPI clock suspendM
270         volatile unsigned int   reserved_2              :2;
271         volatile unsigned int   temseldlpulse           :1;  //Termsel Dline PUlsing Sleection
272         volatile unsigned int   reserved_3                  :3;   
273         volatile unsigned int   ic_usb_cap                      :1;  //IC USB capable             
274         volatile unsigned int   ic_usb_tri                          :1;  //IC USB Tranfic Pull Remove Control        
275         volatile unsigned int   tx_end_delay                    :1;  //TX end delay
276         volatile unsigned int   force_hst_mod                   :1;  //Force host mode  
277                     volatile unsigned int       force_dev_mod                   :1;  //Force device mode 
278                     volatile unsigned int       corrupt_tx_packet               :1;  //Corrupt TX packet              
279       #endif
280     } mBits ;
281     volatile unsigned int dwValue ;
282 } USB_GUSBCFG_U;
283
284 typedef union usb_grstctl_tag
285 {
286     struct usb_grstctl_map
287     {
288         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
289         volatile unsigned int   ahbidle                 :1;  //AHB Master idle
290         volatile unsigned int   dmareq                  :1;  //DMA request signal
291         volatile unsigned int   reserved                :19;
292         volatile unsigned int   txfnum                  :5;  //TX fifo number
293         volatile unsigned int   txfflush                :1;  //TX fifo flush
294         volatile unsigned int   rxfflush                :1;  //RX fifo flush
295         volatile unsigned int   intknqflsh              :1;  //in token sequence learning queue flush
296         volatile unsigned int   frmcntrrst              :1;  //host frame counter reset
297         volatile unsigned int   fsftrst                 :1;  //Hclock soft reset
298         volatile unsigned int   csftrst                 :1;  //Core soft reset
299       #else
300         volatile unsigned int   csftrst                 :1;  //Core soft reset 
301         volatile unsigned int   fsftrst                 :1;  //Hclock soft reset
302         volatile unsigned int   frmcntrrst              :1;  //host frame counter reset
303         volatile unsigned int   intknqflsh              :1;  //in token sequence learning queue flush 
304         volatile unsigned int   rxfflush                :1;  //RX fifo flush
305         volatile unsigned int   txfflush                :1;  //TX fifo flush
306         volatile unsigned int   txfnum                  :5;  //TX fifo number
307         volatile unsigned int   reserved                :19; 
308         volatile unsigned int   dmareq                  :1;  //DMA request signal
309         volatile unsigned int   ahbidle                 :1;  //AHB Master idle       
310       #endif
311     } mBits ;
312     volatile unsigned int dwValue ;
313 } USB_GRSTCTL_U;
314
315 typedef union usb_gintsts_tag
316 {
317     struct usb_gintsts_map
318     {
319         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
320         volatile unsigned int   wkupint                 :1;  //resume/remote wakeup dedected interrupt
321         volatile unsigned int   sessreqint              :1;  //session request
322         volatile unsigned int   reserved_3              :1;
323         volatile unsigned int   conidstschng            :1;  //connecter id status change interupt
324         volatile unsigned int   lpmint                  :1;  //LPM tranction received interrupt
325         volatile unsigned int   reserved_2              :3;
326         volatile unsigned int   resetdet                :1;  //reset detected interrupt
327         volatile unsigned int   fetsusp                 :1;  //data fetch suspend
328         volatile unsigned int   incomip                 :1;  //incompleteperiodic transfer
329         volatile unsigned int   incomplsoin             :1;  //incomplete iso in transfer
330         volatile unsigned int   oepint                  :1;  //out endpoint interrupt
331         volatile unsigned int   iepint                  :1;  //in endpoint interrupt
332         volatile unsigned int   epmis                   :1;  //endpoint mismatch interrupt
333         volatile unsigned int   reserved_1              :1;
334         volatile unsigned int   eopf                    :1;  //end of periodic frame interrupt
335         volatile unsigned int   isooutdrop              :1;  //iso out packet dropped interrupt
336         volatile unsigned int   enumdone                :1;  //enumeration done
337         volatile unsigned int   usbrst                  :1;  //usb reset
338         volatile unsigned int   usbsusp                 :1;  //usb suspend
339         volatile unsigned int   erlususp                :1;  //early suspend
340         volatile unsigned int   i2cint                  :1;  //I2C interrupt
341         volatile unsigned int   ulpickint               :1;  //ULPI carkit interrupt
342         volatile unsigned int   goutnakeff              :1;  //global out nak effective
343         volatile unsigned int   ginnakeff               :1;  //global in nak effective
344         volatile unsigned int   nptxfemp                :1;  //non periodic nak effective
345         volatile unsigned int   rxflvl                  :1;  //RX fifo non empty
346         volatile unsigned int   sof                     :1;  //start of frame
347         volatile unsigned int   otgint                  :1;  //otg interrupt
348         volatile unsigned int   modemis                 :1;  //mode mismatch interrupt
349         volatile unsigned int   curmod                  :1;  //current mode of opration
350        #else
351         volatile unsigned int   curmod                  :1;  //current mode of opration
352         volatile unsigned int   modemis                 :1;  //mode mismatch interrupt
353         volatile unsigned int   otgint                  :1;  //otg interrupt
354         volatile unsigned int   sof                     :1;  //start of frame
355         volatile unsigned int   rxflvl                  :1;  //RX fifo non empty
356         volatile unsigned int   nptxfemp                :1;  //non periodic nak effective
357         volatile unsigned int   ginnakeff               :1;  //global in nak effective
358         volatile unsigned int   goutnakeff              :1;  //global out nak effective
359         volatile unsigned int   ulpickint               :1;  //ULPI carkit interrupt
360         volatile unsigned int   i2cint                  :1;  //I2C interrupt
361         volatile unsigned int   erlususp                :1;  //early suspend
362         volatile unsigned int   usbsusp                 :1;  //usb suspend
363         volatile unsigned int   usbrst                  :1;  //usb reset
364         volatile unsigned int   enumdone                :1;  //enumeration done
365         volatile unsigned int   isooutdrop              :1;  //iso out packet dropped interrupt
366         volatile unsigned int   eopf                    :1;  //end of periodic frame interrupt
367         volatile unsigned int   reserved_1              :1;  
368         volatile unsigned int   epmis                   :1;  //endpoint mismatch interrupt
369         volatile unsigned int   iepint                  :1;  //in endpoint interrupt
370         volatile unsigned int   oepint                  :1;  //out endpoint interrupt
371         volatile unsigned int   incomplsoin             :1;  //incomplete iso in transfer
372         volatile unsigned int   incomip                 :1;  //incompleteperiodic transfer
373         volatile unsigned int   fetsusp                 :1;  //data fetch suspend
374         volatile unsigned int   resetdet                :1;  //reset detected interrupt
375         volatile unsigned int   reserved_2              :3;
376         volatile unsigned int   lpmint                  :1;  //LPM tranction received interrupt
377         volatile unsigned int   conidstschng            :1;  //connecter id status change interupt
378         volatile unsigned int   reserved_3              :1;  
379         volatile unsigned int   sessreqint              :1;  //session request
380         volatile unsigned int   wkupint                 :1;  //resume/remote wakeup dedected interrupt
381        
382        #endif
383     } mBits ;
384     volatile unsigned int dwValue ;
385 } USB_GINTSTS_U;
386
387 typedef union usb_gintmsk_tag
388 {
389     struct usb_gintmsk_map
390     {
391         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
392         volatile unsigned int   wkupintmsk                 :1;  //resume/remote wakeup dedected interrupt
393         volatile unsigned int   sessreqintmsk              :1;  //session request
394         volatile unsigned int   disconintmsk               :1;  // disconnect detected interrupt mask
395         volatile unsigned int   conidstschngmsk            :1;  //connecter id status change interupt
396         volatile unsigned int   lpmintmsk                  :1;  //LPM tranction received interrupt
397         volatile unsigned int   reserved_3                 :3;
398         volatile unsigned int   resetdetmsk                :1;  //reset detected interrupt
399         volatile unsigned int   fetsuspmsk                 :1;  //data fetch suspend
400         volatile unsigned int   incomipmsk                 :1;  //data fetch suspend
401         volatile unsigned int   incomplsoinmsk             :1;  //incomplete iso in transfer,incompleteperiodic transfer
402         volatile unsigned int   oepintmsk                  :1;  //out endpoint interrupt
403         volatile unsigned int   iepintmsk                  :1;  //in endpoint interrupt
404         volatile unsigned int   epmismsk                   :1;  //endpoint mismatch interrupt
405         volatile unsigned int   reserved_2                 :1;
406         volatile unsigned int   eopfmsk                    :1;  //end of periodic frame interrupt
407         volatile unsigned int   isooutdropmsk              :1;  //iso out packet dropped interrupt
408         volatile unsigned int   enumdonemsk                :1;  //enumeration done
409         volatile unsigned int   usbrstmsk                  :1;  //usb reset
410         volatile unsigned int   usbsuspmsk                 :1;  //usb suspend
411         volatile unsigned int   erlususpmsk                :1;  //early suspend
412         volatile unsigned int   i2cintmsk                  :1;  //I2C interrupt
413         volatile unsigned int   ulpickintmsk               :1;  //ULPI carkit interrupt
414         volatile unsigned int   goutnakeffmsk              :1;  //global out nak effective
415         volatile unsigned int   ginnakeffmsk               :1;  //global in nak effective
416         volatile unsigned int   nptxfempmsk                :1;  //non periodic nak effective
417         volatile unsigned int   rxflvlmsk                  :1;  //RX fifo non empty
418         volatile unsigned int   sofmsk                     :1;  //start of frame
419         volatile unsigned int   otgintmsk                  :1;  //otg interrupt
420         volatile unsigned int   modemismsk                 :1;  //mode mismatch interrupt
421         volatile unsigned int   reserved_1                 :1;
422       #else
423         volatile unsigned int   reserved_1                 :1;  
424         volatile unsigned int   modemismsk                 :1;  //mode mismatch interrupt
425         volatile unsigned int   otgintmsk                  :1;  //otg interrupt
426         volatile unsigned int   sofmsk                     :1;  //start of frame
427         volatile unsigned int   rxflvlmsk                  :1;  //RX fifo non empty
428         volatile unsigned int   nptxfempmsk                :1;  //non periodic nak effective
429         volatile unsigned int   ginnakeffmsk               :1;  //global in nak effective
430         volatile unsigned int   goutnakeffmsk              :1;  //global out nak effective
431         volatile unsigned int   ulpickintmsk               :1;  //ULPI carkit interrupt
432         volatile unsigned int   i2cintmsk                  :1;  //I2C interrupt
433         volatile unsigned int   erlususpmsk                :1;  //early suspend
434         volatile unsigned int   usbsuspmsk                 :1;  //usb suspend
435         volatile unsigned int   usbrstmsk                  :1;  //usb reset
436         volatile unsigned int   enumdonemsk                :1;  //enumeration done
437         volatile unsigned int   isooutdropmsk              :1;  //iso out packet dropped interrupt
438         volatile unsigned int   eopfmsk                    :1;  //end of periodic frame interrupt
439         volatile unsigned int   reserved_2                 :1;  
440         volatile unsigned int   epmismsk                   :1;  //endpoint mismatch interrupt
441         volatile unsigned int   iepintmsk                  :1;  //in endpoint interrupt
442         volatile unsigned int   oepintmsk                  :1;  //out endpoint interrupt
443         volatile unsigned int   incomplsoinmsk             :1;  //incomplete iso in transfer,incompleteperiodic transfer
444         volatile unsigned int   incomipmsk                 :1;  //data fetch suspend
445         volatile unsigned int   fetsuspmsk                 :1;  //data fetch suspend
446         volatile unsigned int   resetdetmsk                :1;  //reset detected interrupt
447         volatile unsigned int   reserved_3                 :3;
448         volatile unsigned int   lpmintmsk                  :1;  //LPM tranction received interrupt
449         volatile unsigned int   conidstschngmsk            :1;  //connecter id status change interupt
450         volatile unsigned int   disconintmsk               :1;  // disconnect detected interrupt mask
451         volatile unsigned int   sessreqintmsk              :1;  //session request
452         volatile unsigned int   wkupintmsk                 :1;  //resume/remote wakeup dedected interrupt
453       
454       #endif
455     } mBits ;
456     volatile unsigned int dwValue ;
457 } USB_GINTMSK_U;
458
459 typedef union usb_grxstsp_tag
460 {
461     struct usb_grxstsp_map
462     {
463         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
464         volatile uint32  reserved                        :7;
465         volatile uint32  frame_number                    :4;  //frame nummber
466         volatile uint32  packet_status                   :4;  //packet status
467         volatile uint32  data_pid                        :2;  //data PID
468         volatile uint32  byte_count                      :11; //byte count
469         volatile uint32  endpoint_number                 :4;  //endpoint nummber
470       #else
471                volatile uint32  endpoint_number                                 :4;  //endpoint nummber
472                volatile uint32  byte_count                                              :11; //byte count
473                volatile uint32  data_pid                                                :2;  //data PID
474                volatile uint32  packet_status                                   :4;  //packet status
475                volatile uint32  frame_number                                    :4;  //frame nummber
476                volatile uint32  reserved                                                :7;
477       
478       #endif
479     } mBits;
480     volatile unsigned int dwValue ;
481 } USB_GRXSTSP_U;
482
483 typedef union usb_grxstsr_tag
484 {
485     struct usb_grxstsr_map
486     {
487         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
488         volatile uint32  reserved                        :7;
489         volatile uint32  frame_number                    :4;  //frame nummber
490         volatile uint32  packet_status                   :4;  //packet status
491         volatile uint32  data_pid                        :2;  //data PID
492         volatile uint32  byte_count                      :11; //byte count
493         volatile uint32  endpoint_number                 :4;  //endpoint nummber
494       #else
495                volatile uint32  endpoint_number                                 :4;  //endpoint nummber
496                volatile uint32  byte_count                                              :11; //byte count
497                volatile uint32  data_pid                                                :2;  //data PID
498                volatile uint32  packet_status                                   :4;  //packet status
499                volatile uint32  frame_number                                    :4;  //frame nummber
500            volatile uint32      reserved                                                :7;
501       
502       #endif
503     } mBits;
504     volatile unsigned int dwValue ;
505 } USB_GRXSTSR_U;
506
507 typedef union usb_grxfsiz_tag
508 {
509     struct usbgrxfsiz__map
510     {
511         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
512         volatile unsigned int   reserved                    :16;
513         volatile unsigned int   rxfdep                      :16;  //RX fifo deepth
514       #else
515         volatile unsigned int   rxfdep                      :16;  //RX fifo deepth
516         volatile unsigned int   reserved                                        :16;      
517       #endif
518     } mBits ;
519     volatile unsigned int dwValue ;
520 } USB_GRXFSIZ_U;
521
522 typedef union usb_gnptxfsiz_tag
523 {
524     struct usb_gnptxfsiz_map
525     {
526         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
527         volatile unsigned int       nptxfdep              :16;  //non periodic TX fifo deepth
528         volatile unsigned int       nptxfstaddr           :16;  //non periodic transmit ram start address
529       #else
530         volatile unsigned int       nptxfstaddr           :16;  //non periodic transmit ram start address
531         volatile unsigned int       nptxfdep              :16;  //non periodic TX fifo deepth
532       
533       #endif    
534         
535     } mBits ;
536     volatile unsigned int dwValue ;
537 } USB_GNPTXFSIZ_U;
538
539 typedef union usb_gnptxsts_tag
540 {
541     struct usb_gnptxsts_map
542     {
543         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
544         volatile unsigned int       reserved             :1;
545         volatile unsigned int       nptxqtop             :7;    //top of non periodic transmit request queue
546         volatile unsigned int       nptxqspcavail        :8;    //non periodic transmit request queue space available
547         volatile unsigned int       nptxfsavail          :16;   //non periodic tx fifo  space available
548       #else
549                 volatile unsigned int       nptxfsavail          :16;   //non periodic tx fifo  space available
550                 volatile unsigned int       nptxqspcavail        :8;    //non periodic transmit request queue space available
551                 volatile unsigned int       nptxqtop             :7;    //top of non periodic transmit request queue
552                 volatile unsigned int           reserved             :1;  
553       
554       #endif
555     } mBits ;
556     volatile unsigned int dwValue ;
557 } USB_GNPTXSTS_U;
558
559 typedef union usb_ggpio_tag
560 {
561     struct usb_ggpio_map
562     {
563         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
564         volatile unsigned int       gpo               :16;  //general purpose output
565         volatile unsigned int       gpi               :16;  //general purpose input
566       #else
567         volatile unsigned int       gpi               :16;  //general purpose input      
568         volatile unsigned int       gpo               :16;  //general purpose output
569       #endif
570     } mBits ;
571     volatile unsigned int dwValue ;
572 } USB_GGPIO_U;
573
574 typedef union usb_ghwcfg1_tag
575 {
576     struct usb_ghwcfg1_map
577     {
578         volatile unsigned int    epfir         :32;  //endpoint dirction
579     } mBits ;
580     volatile unsigned int dwValue ;
581 } USB_GHWCFG1_U;
582
583 typedef union usb_ghwcfg2_tag
584 {
585     struct usb_ghwcfg2_map
586     {
587         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
588         volatile unsigned int       reserved_2          :1;
589         volatile unsigned int       tknqdepth           :5;  //device mode in taken sequence learning queue depth
590         volatile unsigned int       ptxqdepth           :2;  //host mode periodic request queue deepth
591         volatile unsigned int       nptxqdepth          :2;  //non periodic request queue deepth
592         volatile unsigned int       reserved_1          :1;
593         volatile unsigned int       multiprocintprt     :1;  //multi processor interrupt enable
594         volatile unsigned int       dynfifosizing       :1;  //dynamic fifo size enable
595         volatile unsigned int       periodicsupport     :1;  //periodic out channels support in host mode
596         volatile unsigned int       numhstchnl          :4;  //nummber of host channel
597         volatile unsigned int       numdeveps           :4;  //nummber of device endpoint
598         volatile unsigned int       fsphytype           :2;  //FS PHY interface type
599         volatile unsigned int       hsphytype           :2;  //HS PHY interface type
600         volatile unsigned int       singpnt             :1;  //point to point
601         volatile unsigned int       architechure        :2;  //architechure
602         volatile unsigned int       otgmode             :3;  //mode of opration
603       #else
604         volatile unsigned int       otgmode             :3;  //mode of opration
605         volatile unsigned int       architechure        :2;  //architechure
606         volatile unsigned int       singpnt             :1;  //point to point
607         volatile unsigned int       hsphytype           :2;  //HS PHY interface type
608         volatile unsigned int       fsphytype           :2;  //FS PHY interface type
609         volatile unsigned int       numdeveps           :4;  //nummber of device endpoint
610         volatile unsigned int       numhstchnl          :4;  //nummber of host channel
611         volatile unsigned int       periodicsupport     :1;  //periodic out channels support in host mode
612         volatile unsigned int       dynfifosizing       :1;  //dynamic fifo size enable
613         volatile unsigned int       multiprocintprt     :1;  //multi processor interrupt enable
614         volatile unsigned int       reserved_1          :1;  
615                 volatile unsigned int       nptxqdepth          :2;  //non periodic request queue deepth
616                 volatile unsigned int       ptxqdepth           :2;  //host mode periodic request queue deepth
617                 volatile unsigned int       tknqdepth           :5;  //device mode in taken sequence learning queue depth
618                 volatile unsigned int           reserved_2                      :1;
619       
620       #endif
621     } mBits ;
622     volatile unsigned int dwValue ;
623 } USB_GHWCFG2_U;
624
625 typedef union usb_ghwcfg3_tag
626 {
627     struct usb_ghwcfg3_map
628     {
629         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
630         volatile unsigned int       dfifodepth         :16; // D FIFO depth
631         volatile unsigned int       otgenablelpm       :1;  //
632         volatile unsigned int       reserved           :1;  //
633         volatile unsigned int       othenablehsic      :1;  //
634         volatile unsigned int       otgenableicusb     :1;  //
635         volatile unsigned int       rsttype            :1;  //
636         volatile unsigned int       optfeature         :1;  //
637         volatile unsigned int       vndctlsupt         :1;  //
638         volatile unsigned int       i2cselect          :1;  //
639         volatile unsigned int       otgen              :1;  //
640         volatile unsigned int       pktsizewidth       :3;  //width of packet size counter
641         volatile unsigned int       xfersizewidth      :4;  //width of transfer size counter
642       #else
643         volatile unsigned int       xfersizewidth      :4;  //width of transfer size counter
644         volatile unsigned int       pktsizewidth       :3;  //width of packet size counter
645         volatile unsigned int       otgen              :1;  //
646         volatile unsigned int       i2cselect          :1;  //
647         volatile unsigned int       vndctlsupt         :1;  //
648         volatile unsigned int       optfeature         :1;  //
649         volatile unsigned int       rsttype            :1;  //
650         volatile unsigned int       otgenableicusb     :1;  //
651                 volatile unsigned int       othenablehsic      :1;  //
652                 volatile unsigned int       reserved           :1;  //
653                 volatile unsigned int       otgenablelpm       :1;  // 
654                 volatile unsigned int           dfifodepth         :16; // D FIFO depth
655       
656       #endif
657     } mBits ;
658     volatile unsigned int dwValue ;
659 } USB_GHWCFG3_U;
660
661 typedef union usb_ghwcfg4_tag
662 {
663     struct usb_ghwcfg4_map
664     {
665         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
666         volatile unsigned int       sgdma               :1;
667         volatile unsigned int       sgdmac              :1;
668         volatile unsigned int       ineps               :4;   //nummber of decice mode in endpoint include control endpoint
669         volatile unsigned int       dedfifomod          :1;
670         volatile unsigned int       sessendfltr         :1;
671         volatile unsigned int       bvalidfltr          :1;
672         volatile unsigned int       avalidfltr          :1;
673         volatile unsigned int       vbusvalidfltr       :1;
674         volatile unsigned int       iddgfltr            :1;
675         volatile unsigned int       numctleps           :4;   //nummber of device mode control endpoint in addition to endpoint 0
676         volatile unsigned int       phydatawidth        :2;   //UTMI+ PHY/ULPI to internal UTMI+ Wrapper data width
677         volatile unsigned int       reserved            :8;
678         volatile unsigned int       ahbfreq             :1;   //minimum ahb frequency less then 60MHz
679         volatile unsigned int       enablepwropt        :1;   //enable power optimization
680         volatile unsigned int       numdevperioeps      :4;   //nummber of device mode periodic in endpoint
681      #else
682         volatile unsigned int       numdevperioeps      :4;   //nummber of device mode periodic in endpoint
683         volatile unsigned int       enablepwropt        :1;   //enable power optimization
684         volatile unsigned int       ahbfreq             :1;   //minimum ahb frequency less then 60MHz
685         volatile unsigned int       reserved            :8;   
686         volatile unsigned int       phydatawidth        :2;   //UTMI+ PHY/ULPI to internal UTMI+ Wrapper data width 
687         volatile unsigned int       numctleps           :4;   //nummber of device mode control endpoint in addition to endpoint 0
688         volatile unsigned int       iddgfltr            :1;
689         volatile unsigned int       vbusvalidfltr       :1;
690         volatile unsigned int       avalidfltr          :1;
691         volatile unsigned int       bvalidfltr          :1;
692         volatile unsigned int       sessendfltr         :1;
693                 volatile unsigned int       dedfifomod          :1;
694                 volatile unsigned int       ineps               :4;   //nummber of decice mode in endpoint include control endpoint
695                 volatile unsigned int       sgdmac              :1;
696                 volatile unsigned int           sgdma                           :1;
697      
698      #endif
699     } mBits ;
700     volatile unsigned int dwValue ;
701 } USB_GHWCFG4_U;
702
703 typedef union usb_dptxfsiz_tag
704 {
705     struct usb_dptxfsiz_map
706     {
707         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
708         volatile unsigned int            dptxfsize          :16;  //device periodic TX fifo size
709         volatile unsigned int            dptxfstraddr       :16;  //device periodic TX fifo ram start address
710       #else
711         volatile unsigned int            dptxfstraddr       :16;  //device periodic TX fifo ram start address
712         volatile unsigned int            dptxfsize          :16;  //device periodic TX fifo size
713       
714       #endif
715     } mBits ;
716     volatile unsigned int dwValue ;
717 } USB_DPTXFSIZ_U;
718
719 typedef union usb_dieptxf_tag
720 {
721     struct usb_dieptxf_map
722     {
723                         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
724         volatile unsigned int           ineptxfsize         :16;  //in endpoint TX fifo depth
725         volatile unsigned int           ineptxfstraddr      :16;  //in endpoint fifo transmit ram start address
726       #else
727         volatile unsigned int           ineptxfstraddr      :16;  //in endpoint fifo transmit ram start address
728         volatile unsigned int           ineptxfsize         :16;  //in endpoint TX fifo depth
729       #endif
730     } mBits ;
731     volatile unsigned int dwValue ;
732 } USB_DIEPTXF_U;
733
734
735 /*********************Device Register Prototype****************/
736
737 typedef union usb_dcfg_tag
738 {
739     struct usb_dcfg_map
740     {
741         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
742
743         volatile unsigned int       reserved_2          :6;
744         volatile unsigned int       perschintvl         :2;
745         volatile unsigned int       descdma             :1;
746         volatile unsigned int       inepmiscnt          :5; //in endpoint mismatch count
747         volatile unsigned int       reserved            :5;
748         volatile unsigned int       perfrint            :2;  //periodic frame interval
749         volatile unsigned int       devaddr             :7;  //device address
750         volatile unsigned int       reserved_1          :1;
751         volatile unsigned int       nzstsouthshk        :1;  //non zero length status out handshake
752         volatile unsigned int       devspeed            :2;  //device speed
753       #else
754         volatile unsigned int       devspeed            :2;  //device speed
755         volatile unsigned int       nzstsouthshk        :1;  //non zero length status out handshake
756         volatile unsigned int       reserved_1          :1;
757         volatile unsigned int       devaddr             :7;  //device address
758         volatile unsigned int       perfrint            :2;  //periodic frame interval
759         volatile unsigned int       reserved            :5;  
760                 volatile unsigned int       inepmiscnt          :5; //in endpoint mismatch count
761                 volatile unsigned int       descdma             :1;
762                 volatile unsigned int       perschintvl         :2;
763                 volatile unsigned int           reserved_2                      :6;
764       
765       #endif
766     } mBits ;
767     volatile unsigned int dwValue ;
768 } USB_DCFG_U;
769
770 typedef union usb_dctl_tag
771 {
772     struct usb_dctl_map
773     {
774         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
775         volatile unsigned int           reserved_2        :15;
776         volatile unsigned int           setnak            :1;  //
777         volatile unsigned int           ignrfrmnum        :1;  //
778         volatile unsigned int           gmc               :2;  //global muti count
779         volatile unsigned int           reserved_1        :1;
780         volatile unsigned int           pwronprgdone      :1;  //power on programing done
781         volatile unsigned int           cgoutnak          :1;  //clear out nak
782         volatile unsigned int           sgoutnak          :1;  //set out nak
783         volatile unsigned int           cgnpinnak         :1;  //clear global non periodic in nak
784         volatile unsigned int           sgnpinnak         :1;  //set global non periodic in nak
785         volatile unsigned int           tstctl            :3;  //test control
786         volatile unsigned int           goutnaksts        :1;  //global out nak status
787         volatile unsigned int           gnpinnaksts       :1;  //global non periodic in nak status
788         volatile unsigned int           sftdiscon         :1;  //soft disconect
789         volatile unsigned int           rmtwkupsig        :1;  //remote wakeup signaling
790       #else
791         volatile unsigned int           rmtwkupsig        :1;  //remote wakeup signaling 
792         volatile unsigned int           sftdiscon         :1;  //soft disconect
793         volatile unsigned int           gnpinnaksts       :1;  //global non periodic in nak status
794         volatile unsigned int           goutnaksts        :1;  //global out nak status
795         volatile unsigned int           tstctl            :3;  //test control
796         volatile unsigned int           sgnpinnak         :1;  //set global non periodic in nak
797         volatile unsigned int           cgnpinnak         :1;  //clear global non periodic in nak
798         volatile unsigned int           sgoutnak          :1;  //set out nak
799         volatile unsigned int           cgoutnak          :1;  //clear out nak
800         volatile unsigned int           pwronprgdone      :1;  //power on programing done
801         volatile unsigned int           reserved_1        :1;  //power on programing done
802                 volatile unsigned int           gmc               :2;  //global muti count
803                 volatile unsigned int           ignrfrmnum        :1;  //
804                 volatile unsigned int           setnak            :1;  //
805                 volatile unsigned int                   reserved_2        :15;
806       
807       #endif
808     } mBits ;
809     volatile unsigned int dwValue ;
810 } USB_DCTL_U;
811
812
813 typedef union usb_dsts_tag
814 {
815     struct usb_dsts_map
816     {
817         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
818         volatile unsigned int           reserved_2          :10;
819         volatile unsigned int           soffn               :14;  //frame or microframe nummber of the recieved SOF
820         volatile unsigned int           reserved_1          :4;
821         volatile unsigned int           errticerr           :1;  //erratic error
822         volatile unsigned int           enumspd             :2;  //enumeration speed
823         volatile unsigned int           suspsts             :1;  // suspend status
824       #else
825         volatile unsigned int           suspsts             :1;  // suspend status
826         volatile unsigned int           enumspd             :2;  //enumeration speed
827                 volatile unsigned int           errticerr           :1;  //erratic error
828                 volatile unsigned int           reserved_1          :4;  
829                 volatile unsigned int           soffn               :14;  //frame or microframe nummber of the recieved SOF
830                 volatile unsigned int                   reserved_2                      :10;
831       
832       #endif
833     } mBits ;
834     volatile unsigned int dwValue ;
835 } USB_DSTS_U;
836
837 typedef union usb_diepmsk_tag
838 {
839     struct usb_diepmsk_map
840     {
841         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
842         volatile unsigned int           reserved_3           :18;
843         volatile unsigned int           nakmsk               :1;  //NAK interrupt mask
844         volatile unsigned int           reserved_2           :3;
845         volatile unsigned int           bnakintmsk           :1;  //BNK interrupt mask
846         volatile unsigned int           fifounmsk            :1;  //fifo underrun mask
847         volatile unsigned int           reserve_1            :1;
848         volatile unsigned int           inepnakeffmsk        :1;  //in endpoint nak effective mask
849         volatile unsigned int           intknepmismsk        :1;  //in token recieved with ep mismatch mask
850         volatile unsigned int           intkntxfempmsk       :1;  //in token recieved when tx fifo empty mask
851         volatile unsigned int           timeoutmsk           :1;  //time out mask
852         volatile unsigned int           ahberrmsk            :1;  //ahb error mask
853         volatile unsigned int           epdisbidmsk          :1;  //endpoint disabled interrupt mask
854         volatile unsigned int           xfercompimsk         :1;  //transfer completed interrupt mask
855       #else
856         volatile unsigned int           xfercompimsk         :1;  //transfer completed interrupt mask
857         volatile unsigned int           epdisbidmsk          :1;  //endpoint disabled interrupt mask
858         volatile unsigned int           ahberrmsk            :1;  //ahb error mask
859         volatile unsigned int           timeoutmsk           :1;  //time out mask
860         volatile unsigned int           intkntxfempmsk       :1;  //in token recieved when tx fifo empty mask
861         volatile unsigned int           intknepmismsk        :1;  //in token recieved with ep mismatch mask
862         volatile unsigned int           inepnakeffmsk        :1;  //in endpoint nak effective mask
863         volatile unsigned int           reserve_1            :1;
864         volatile unsigned int           fifounmsk            :1;  //fifo underrun mask
865                 volatile unsigned int           bnakintmsk           :1;  //BNK interrupt mask
866                 volatile unsigned int           reserved_2           :3;
867                 volatile unsigned int           nakmsk               :1;  //NAK interrupt mask
868                 volatile unsigned int                   reserved_3           :18;
869       
870       #endif
871     } mBits ;
872     volatile unsigned int dwValue ;
873 } USB_DIEPMSK_U;
874
875 typedef union usb_doepmsk_tag
876 {
877     struct usb_doepmsk_map
878     {
879         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
880         volatile unsigned int           reserved_4           :17;
881         volatile unsigned int           nyetmsk              :1;  //NYET mask
882         volatile unsigned int           nakmsk               :1;  //NAK mask
883         volatile unsigned int           bbleerrmsk           :1;  //Babble error mask
884         volatile unsigned int           reserved_3           :2;
885         volatile unsigned int           bnkmsk               :1;  //BNK mask
886         volatile unsigned int           outperrmsk           :1;  //out packet error mask
887         volatile unsigned int           reserved_2           :1;
888         volatile unsigned int           b2bsetup             :1;  //back to back setup packet recieved mask
889         volatile unsigned int           reserved_1           :1;
890         volatile unsigned int           outtknepdismsk       :1;  //out token recieved when endpoint disabled mask
891         volatile unsigned int           setupmsk             :1;  //setup phase done interrupt
892         volatile unsigned int           ahberr               :1;  //ahb error
893         volatile unsigned int           epdismsk             :1;  //endpopint disabled interrupt mask
894         volatile unsigned int           xfercompmsk          :1;  //transfer completed interrupt mask
895      #else
896         volatile unsigned int           xfercompmsk          :1;  //transfer completed interrupt mask
897         volatile unsigned int           epdismsk             :1;  //endpopint disabled interrupt mask
898         volatile unsigned int           ahberr               :1;  //ahb error 
899         volatile unsigned int           setupmsk             :1;  //setup phase done interrupt
900         volatile unsigned int           outtknepdismsk       :1;  //out token recieved when endpoint disabled mask
901         volatile unsigned int           reserved_1           :1; 
902         volatile unsigned int           b2bsetup             :1;  //back to back setup packet recieved mask
903         volatile unsigned int           reserved_2           :1;  
904         volatile unsigned int           outperrmsk           :1;  //out packet error mask
905         volatile unsigned int           bnkmsk               :1;  //BNK mask
906         volatile unsigned int           reserved_3           :2;
907                 volatile unsigned int           bbleerrmsk           :1;  //Babble error mask
908                 volatile unsigned int           nakmsk               :1;  //NAK mask 
909                 volatile unsigned int           nyetmsk              :1;  //NYET mask
910                 volatile unsigned int                   reserved_4           :17;
911      
912      #endif
913     } mBits ;
914     volatile unsigned int dwValue ;
915 } USB_DOEPMSK_U;
916
917 typedef union usb_daint_tag
918 {
919     struct usb_daint_map
920     {
921         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
922         volatile unsigned int            reserved_2        :9;  // out endppint interrupt
923         volatile unsigned int            outepint_6        :1;  // in endpoint interrupt
924         volatile unsigned int            outepint_5        :1;  // in endpoint interrupt
925         volatile unsigned int            outepint_4        :1;  // in endpoint interrupt
926         volatile unsigned int            outepint_3        :1;  // in endpoint interrupt
927         volatile unsigned int            outepint_2        :1;  // in endpoint interrupt
928         volatile unsigned int            outepint_1        :1;  // in endpoint interrupt
929         volatile unsigned int            outepint_0        :1;  // in endpoint interrupt
930         volatile unsigned int            reserved_1        :9;  // in endpoint interrupt
931         volatile unsigned int            inepint_6         :1;  // in endpoint interrupt
932         volatile unsigned int            inepint_5         :1;  // in endpoint interrupt
933         volatile unsigned int            inepint_4         :1;  // in endpoint interrupt
934         volatile unsigned int            inepint_3         :1;  // in endpoint interrupt
935         volatile unsigned int            inepint_2         :1;  // in endpoint interrupt
936         volatile unsigned int            inepint_1         :1;  // in endpoint interrupt
937         volatile unsigned int            inepint_0         :1;  // in endpoint interrupt
938        #else
939                 volatile unsigned int                    inepint_0         :1;  // in endpoint interrupt
940                 volatile unsigned int                    inepint_1         :1;  // in endpoint interrupt
941                 volatile unsigned int                    inepint_2         :1;  // in endpoint interrupt
942                 volatile unsigned int                    inepint_3         :1;  // in endpoint interrupt
943                 volatile unsigned int                    inepint_4         :1;  // in endpoint interrupt
944                 volatile unsigned int                    inepint_5         :1;  // in endpoint interrupt
945                 volatile unsigned int                    inepint_6         :1;  // in endpoint interrupt
946                 volatile unsigned int                    reserved_1        :9;  // in endpoint interrupt
947                 volatile unsigned int                    outepint_0        :1;  // in endpoint interrupt
948                 volatile unsigned int                    outepint_1        :1;  // in endpoint interrupt
949                 volatile unsigned int                    outepint_2        :1;  // in endpoint interrupt
950                 volatile unsigned int                    outepint_3        :1;  // in endpoint interrupt
951                 volatile unsigned int                    outepint_4        :1;  // in endpoint interrupt
952                 volatile unsigned int                    outepint_5        :1;  // in endpoint interrupt
953                 volatile unsigned int                    outepint_6        :1;  // in endpoint interrupt
954                 volatile unsigned int            reserved_2        :9;  // out endppint interrupt
955        
956        #endif
957     } mBits ;
958     volatile unsigned int dwValue ;
959 } USB_DAINT_U;
960
961 typedef union usb_daintmsk_tag
962 {
963     struct usb_daintmsk_map
964     {
965         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
966         volatile unsigned int           outepintmsk         :16;  //out endpoint interrupt mak
967         volatile unsigned int           inepintmsk          :16;  //in endpoint interrupt mask
968       #else
969         volatile unsigned int           inepintmsk          :16;  //in endpoint interrupt mask
970         volatile unsigned int           outepintmsk         :16;  //out endpoint interrupt mak
971       #endif
972     } mBits ;
973     volatile unsigned int dwValue ;
974 } USB_DAINTMSK_U;
975
976 typedef union usb_dtknqr1_tag
977 {
978     struct usb_dtknqr1_map
979     {
980         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
981         volatile unsigned int            eptkn             :24; //endpoint token
982         volatile unsigned int            wrapbit           :1;  //wrap bit
983         volatile unsigned int            reserved          :2;  //
984         volatile unsigned int            intknwptr         :5;  //in token queue write pointer
985       #else
986                 volatile unsigned int            intknwptr         :5;  //in token queue write pointer
987                 volatile unsigned int            reserved          :2;  //
988                 volatile unsigned int            wrapbit           :1;  //wrap bit
989                 volatile unsigned int                    eptkn             :24; //endpoint token
990                         #endif      
991     } mBits ;
992     volatile unsigned int dwValue ;
993 } USB_DTKNQR1_U;
994
995 typedef union usb_dtknqr2_tag
996 {
997     struct usb_dtknqr2_map
998     {
999         volatile unsigned int           eptoken            :32;  // endpoint token
1000     } mBits ;
1001     volatile unsigned int dwValue ;
1002 } USB_DTKNQR2_U;
1003
1004 typedef union usb_dtknqr3_tag
1005 {
1006     struct usb_dtknqr3_map
1007     {
1008         volatile unsigned int           eptoken            :32;  // endpoint token
1009     } mBits ;
1010     volatile unsigned int dwValue ;
1011 } USB_DTKNQR3_U;
1012
1013 typedef union usb_dtknqr4_tag
1014 {
1015     struct usb_dtknqr4_map
1016     {
1017         volatile unsigned int           eptoken            :32;  // endpoint token
1018     } mBits ;
1019     volatile unsigned int dwValue ;
1020 } USB_DTKNQR4_U;
1021
1022 typedef union usb_dvbusdis_tag
1023 {
1024     struct usb_dvbusdis_map
1025     {
1026         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
1027         volatile unsigned int           reserved          :16;
1028         volatile unsigned int           dvbusdis          :16;  //device vbus discharge time
1029       #else
1030         volatile unsigned int           dvbusdis          :16;  //device vbus discharge time
1031         volatile unsigned int           reserved          :16;
1032       #endif
1033     } mBits ;
1034     volatile unsigned int dwValue ;
1035 } USB_DVBUSDIS_U;
1036
1037 typedef union usb_dvbuspulse_tag
1038 {
1039     struct usb_dvbuspulse_map
1040     {
1041         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
1042         volatile unsigned int           reserved          :20;
1043         volatile unsigned int           dvbuspt           :12;  //device vbus pulse time
1044       #else
1045         volatile unsigned int           dvbuspt           :12;  //device vbus pulse time
1046         volatile unsigned int           reserved          :20;
1047       #endif
1048     } mBits ;
1049     volatile unsigned int dwValue ;
1050 } USB_DVBUSPULSE_U;
1051
1052 typedef union usb_dthrctl_tag
1053 {
1054     struct usb_dthrctl_map
1055     {
1056         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
1057         volatile unsigned int           reserved_3        :4;
1058         volatile unsigned int           arbprken          :1;  //
1059         volatile unsigned int           reserved_2        :1;
1060         volatile unsigned int           rxthrlen          :9;  //receive threshold length
1061         volatile unsigned int           rxthren           :1;  //receive threshold enable
1062         volatile unsigned int           reserved_1        :5;  //
1063         volatile unsigned int           txthrlen          :9;  //transmit threshold length
1064         volatile unsigned int           isothren          :1;  //iso in endpoint threshold enable
1065         volatile unsigned int           nonisothren       :1;  //non iso in endpoint threshold enable
1066      #else
1067         volatile unsigned int           nonisothren       :1;  //non iso in endpoint threshold enable
1068         volatile unsigned int           isothren          :1;  //iso in endpoint threshold enable
1069         volatile unsigned int           txthrlen          :9;  //transmit threshold length
1070         volatile unsigned int           reserved_1        :5;  //
1071         volatile unsigned int           rxthren           :1;  //receive threshold enable
1072         volatile unsigned int           rxthrlen          :9;  //receive threshold length
1073         volatile unsigned int           reserved_2        :1;
1074         volatile unsigned int           arbprken          :1;  //
1075         volatile unsigned int                   reserved_3        :4; 
1076      
1077      #endif
1078     } mBits ;
1079     volatile unsigned int dwValue ;
1080 } USB_DTHRCTL_U;
1081
1082
1083 typedef union usb_diepint_tag
1084 {
1085     struct usb_diepint_map
1086     {
1087         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
1088         volatile unsigned int           reserved_2      :17;
1089         volatile unsigned int           nyet            :1;
1090         volatile unsigned int           nak             :1;
1091         volatile unsigned int           bbleerr         :1;
1092         volatile unsigned int           pktdrpsts       :1;
1093         volatile unsigned int           reserved_1      :1;
1094         volatile unsigned int           bna             :1;
1095         volatile unsigned int           fifo_underrun   :1;
1096         volatile unsigned int           tfifoemp        :1;
1097         volatile unsigned int           inepnakef       :1;
1098         volatile unsigned int           intokenepmis    :1;
1099         volatile unsigned int           intokenfifoemp  :1;
1100         volatile unsigned int           timeout_condi   :1;
1101         volatile unsigned int           ahb_error       :1;
1102         volatile unsigned int           epdis           :1;
1103         volatile unsigned int           transfer_com    :1;
1104       #else
1105         volatile unsigned int                   transfer_com    :1; 
1106         volatile unsigned int           epdis                   :1;
1107         volatile unsigned int                   ahb_error       :1;
1108         volatile unsigned int                   timeout_condi   :1;
1109         volatile unsigned int                   intokenfifoemp  :1;
1110         volatile unsigned int                   intokenepmis    :1;
1111         volatile unsigned int                   inepnakef               :1;
1112         volatile unsigned int                   tfifoemp                :1;
1113         volatile unsigned int                   fifo_underrun   :1;
1114         volatile unsigned int                   bna                             :1;
1115         volatile unsigned int                   reserved_1              :1;
1116         volatile unsigned int           pktdrpsts       :1;
1117         volatile unsigned int                   bbleerr                 :1;
1118         volatile unsigned int           nak                             :1;
1119         volatile unsigned int                   nyet                    :1;
1120         volatile unsigned int                   reserved_2              :17;
1121       
1122       #endif
1123     } mBits ;
1124     volatile unsigned int dwValue ;
1125 } USB_DIEPINT_U;
1126
1127 typedef union usb_doepint_tag
1128 {
1129     struct usb_doepint_map
1130     {
1131         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
1132         volatile unsigned int           reserved_2      :17;
1133         volatile unsigned int           nyet            :1;
1134         volatile unsigned int           nak             :1;
1135         volatile unsigned int           bbleerr         :1;
1136         volatile unsigned int           pktdrpsts       :1;
1137         volatile unsigned int           reserved_1      :1;
1138         volatile unsigned int           bna             :1;
1139         volatile unsigned int           fifo_underrun   :1;
1140         volatile unsigned int           tfifoemp        :1;
1141         volatile unsigned int           inepnakef       :1;
1142         volatile unsigned int           intokenepmis    :1;
1143         volatile unsigned int           outtokenfifoemp :1;
1144         volatile unsigned int           timeout_condi   :1;
1145         volatile unsigned int           ahb_error       :1;
1146         volatile unsigned int           epdis           :1;
1147         volatile unsigned int           transfer_com    :1;
1148      #else
1149         volatile unsigned int                       transfer_com          :1; 
1150         volatile unsigned int           epdis                         :1;
1151         volatile unsigned int                       ahb_error       :1;
1152         volatile unsigned int                       timeout_condi   :1;
1153         volatile unsigned int                       outtokenfifoemp :1;
1154         volatile unsigned int                       intokenepmis          :1;
1155         volatile unsigned int                       inepnakef               :1;
1156         volatile unsigned int                       tfifoemp                :1;
1157         volatile unsigned int                       fifo_underrun         :1;
1158         volatile unsigned int                       bna                               :1;
1159         volatile unsigned int                     reserved_1              :1;
1160         volatile unsigned int           pktdrpsts       :1;
1161         volatile unsigned int                       bbleerr                         :1;
1162         volatile unsigned int           nak                                   :1;
1163         volatile unsigned int                       nyet                              :1;
1164         volatile unsigned int                       reserved_2            :17;
1165      
1166      #endif
1167     } mBits ;
1168     volatile unsigned int dwValue ;
1169 } USB_DOEPINT_U;
1170
1171
1172 typedef union usb_dieptsiz_tag
1173 {
1174     struct usb_dieptsiz_map
1175     {
1176         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
1177         volatile unsigned int           reserved        :1;
1178         volatile unsigned int           mult_count      :2;
1179         volatile unsigned int           packet_count    :10;
1180         volatile unsigned int           transfer_size   :19;
1181       #else
1182         volatile unsigned int           transfer_size   :19;
1183         volatile unsigned int           packet_count    :10;
1184         volatile unsigned int           mult_count      :2;
1185         volatile unsigned int                       reserved        :1;    
1186       #endif
1187     } mBits ;
1188     volatile unsigned int dwValue ;
1189 } USB_DIEPTSIZ_U;
1190
1191 typedef union usb_doeptsiz_tag
1192 {
1193     struct usb_doeptsiz_map
1194     {
1195         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
1196         volatile unsigned int           reserved        :1;
1197         volatile unsigned int           mult_count      :2;
1198         volatile unsigned int           packet_count    :10;
1199         volatile unsigned int           transfer_size   :19;
1200       #else
1201         volatile unsigned int           transfer_size   :19;
1202         volatile unsigned int           packet_count    :10;
1203         volatile unsigned int           mult_count      :2;
1204         volatile unsigned int                       reserved        :1;      
1205       #endif
1206     } mBits ;
1207     volatile unsigned int dwValue ;
1208 } USB_DOEPTSIZ_U;
1209
1210
1211 typedef union usb_diepctl_tag
1212 {
1213     struct usb_diepctl_map
1214     {
1215         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
1216         
1217         volatile unsigned int       ep_enable       :1;
1218         volatile unsigned int       ep_disable      :1;
1219         volatile unsigned int       set_data1_pid   :1;
1220         volatile unsigned int       set_data0_pid   :1;
1221         volatile unsigned int       set_nak         :1;
1222         volatile unsigned int       clear_nak       :1;
1223         volatile unsigned int       tx_fifo_number  :4;
1224         volatile unsigned int       stall_handshak  :1;
1225         volatile unsigned int       snoop_mode      :1;
1226         volatile unsigned int       ep_type         :2;
1227         volatile unsigned int       nak_status      :1;
1228         volatile unsigned int       ep_data_pid     :1;
1229         volatile unsigned int       active_ep       :1;
1230         volatile unsigned int       next_ep         :4;
1231         volatile unsigned int       mps             :11;
1232       #else
1233         volatile unsigned int       mps             :11; 
1234         volatile unsigned int       next_ep         :4;
1235         volatile unsigned int       active_ep       :1;
1236         volatile unsigned int       ep_data_pid     :1;
1237         volatile unsigned int       nak_status      :1;
1238         volatile unsigned int       ep_type         :2;
1239         volatile unsigned int       snoop_mode      :1;
1240         volatile unsigned int       stall_handshak  :1;
1241         volatile unsigned int       tx_fifo_number      :4;
1242         volatile unsigned int       clear_nak               :1;
1243         volatile unsigned int       set_nak                 :1;
1244         volatile unsigned int       set_data0_pid   :1;
1245         volatile unsigned int       set_data1_pid   :1;
1246         volatile unsigned int       ep_disable      :1;
1247         volatile unsigned int           ep_enable                   :1;
1248       
1249       #endif
1250     } mBits ;
1251     volatile unsigned int dwValue ;
1252 } USB_DIEPCTL_U;
1253
1254 typedef union usb_doepctl_tag
1255 {
1256     struct usb_doepctl_map
1257     {
1258         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
1259         volatile unsigned int       ep_enable       :1;
1260         volatile unsigned int       ep_disable      :1;
1261         volatile unsigned int       set_data1_pid   :1;
1262         volatile unsigned int       set_data0_pid   :1;
1263         volatile unsigned int       set_nak         :1;
1264         volatile unsigned int       clear_nak       :1;
1265         volatile unsigned int       tx_fifo_number  :4;
1266         volatile unsigned int       stall_handshak  :1;
1267         volatile unsigned int       snoop_mode      :1;
1268         volatile unsigned int       ep_type         :2;
1269         volatile unsigned int       nak_status      :1;
1270         volatile unsigned int       ep_data_pid     :1;
1271         volatile unsigned int       active_ep       :1;
1272         volatile unsigned int       next_ep         :4;
1273         volatile unsigned int       mps             :11;
1274      #else
1275         volatile unsigned int       mps             :11; 
1276         volatile unsigned int       next_ep         :4;
1277         volatile unsigned int       active_ep       :1;
1278         volatile unsigned int       ep_data_pid     :1;
1279         volatile unsigned int       nak_status      :1;
1280         volatile unsigned int       ep_type         :2;
1281         volatile unsigned int       snoop_mode      :1;
1282         volatile unsigned int       stall_handshak  :1;
1283         volatile unsigned int       tx_fifo_number      :4;
1284         volatile unsigned int       clear_nak           :1;
1285         volatile unsigned int       set_nak             :1;
1286         volatile unsigned int       set_data0_pid   :1;
1287         volatile unsigned int       set_data1_pid   :1;
1288         volatile unsigned int       ep_disable      :1;
1289         volatile unsigned int           ep_enable               :1;
1290      
1291      #endif
1292     } mBits ;
1293     volatile unsigned int dwValue ;
1294 } USB_DOEPCTL_U;
1295
1296 typedef union usb_diep0tsiz_tag
1297 {
1298     struct usb_diep0tsiz_map
1299     {
1300         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
1301         volatile unsigned int       reserved_2     :11;
1302         volatile unsigned int       packet_count   :2;
1303         volatile unsigned int       reserved_1     :12;
1304         volatile unsigned int       transfer_size  :7;
1305       #else
1306         volatile unsigned int       transfer_size  :7;
1307         volatile unsigned int       reserved_1     :12;
1308         volatile unsigned int       packet_count   :2;
1309         volatile unsigned int           reserved_2       :11;
1310       #endif
1311     } mBits ;
1312     volatile unsigned int dwValue ;
1313 } USB_DIEP0TSIZ_U;
1314
1315 typedef union usb_doep0tsiz_tag
1316 {
1317     struct usb_doep0tsiz_map
1318     {
1319         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
1320         volatile unsigned int       reserved_3          :1;
1321         volatile unsigned int       setup_packet_count  :2;
1322         volatile unsigned int       reserved_2          :9;
1323         volatile unsigned int       packet_count        :1;
1324         volatile unsigned int       reserved_1          :12;
1325         volatile unsigned int       transfer_size       :7;
1326       #else
1327         volatile unsigned int       transfer_size                 :7;
1328         volatile unsigned int       reserved_1                    :12;
1329         volatile unsigned int       packet_count                  :1;
1330         volatile unsigned int             reserved_2                      :9;
1331                     volatile unsigned int                 setup_packet_count  :2;
1332                     volatile unsigned int                 reserved_3                      :1;
1333       
1334       #endif
1335     } mBits ;
1336     volatile unsigned int dwValue ;
1337 } USB_DOEP0TSIZ_U;
1338
1339
1340
1341 typedef union usb_intsts_tag
1342 {
1343     struct usb_intsts_map
1344     {
1345         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
1346         volatile unsigned int wkupint           :1; //Reserved ;
1347         volatile unsigned int sessreqint        :1; //Slef powered ;
1348         volatile unsigned int discoonint        :1; //Device enable ;
1349         volatile unsigned int conidstschng      :1;
1350         volatile unsigned int lpmint            :1;
1351         volatile unsigned int ptxfemp           :1;
1352         volatile unsigned int hchint            :1;
1353         volatile unsigned int prtint            :1;
1354         volatile unsigned int resetdet          :1;
1355         volatile unsigned int fetsusp           :1;
1356         volatile unsigned int incompip          :1;
1357         volatile unsigned int incompisoin       :1;
1358         volatile unsigned int oepint            :1;
1359         volatile unsigned int iepint            :1;
1360         volatile unsigned int epmis             :1;
1361         volatile unsigned int reserved          :1;
1362         volatile unsigned int eopf              :1;
1363         volatile unsigned int isooutdrop        :1;
1364         volatile unsigned int enumdone          :1;
1365         volatile unsigned int usbrst            :1;
1366         volatile unsigned int usbsusp           :1;
1367         volatile unsigned int erlysusp          :1;
1368         volatile unsigned int i2cint            :1;
1369         volatile unsigned int ulpickint         :1;
1370         volatile unsigned int goutnakeff        :1;
1371         volatile unsigned int ginnakeff         :1;
1372         volatile unsigned int nptxfemp          :1;
1373         volatile unsigned int rxflvl            :1;
1374         volatile unsigned int sof               :1;
1375         volatile unsigned int otgint            :1;
1376         volatile unsigned int modemis           :1;
1377         volatile unsigned int curmod            :1;
1378      #else
1379         volatile unsigned int curmod            :1;  
1380         volatile unsigned int modemis           :1;
1381         volatile unsigned int otgint            :1;
1382         volatile unsigned int sof               :1;
1383         volatile unsigned int rxflvl            :1;
1384         volatile unsigned int nptxfemp          :1;
1385         volatile unsigned int ginnakeff         :1;
1386         volatile unsigned int goutnakeff        :1;
1387         volatile unsigned int ulpickint         :1;
1388         volatile unsigned int i2cint            :1;
1389         volatile unsigned int erlysusp          :1;
1390         volatile unsigned int usbsusp           :1;
1391         volatile unsigned int usbrst            :1;
1392         volatile unsigned int enumdone          :1;
1393         volatile unsigned int isooutdrop        :1;
1394         volatile unsigned int eopf              :1;
1395         volatile unsigned int reserved          :1;
1396         volatile unsigned int epmis             :1;
1397         volatile unsigned int iepint            :1;
1398         volatile unsigned int oepint            :1;
1399         volatile unsigned int incompisoin       :1;
1400         volatile unsigned int incompip          :1;
1401         volatile unsigned int fetsusp           :1;
1402         volatile unsigned int resetdet          :1;
1403         volatile unsigned int prtint            :1;
1404         volatile unsigned int hchint            :1;
1405         volatile unsigned int ptxfemp           :1;
1406         volatile unsigned int lpmint            :1;
1407                     volatile unsigned int conidstschng      :1;
1408                     volatile unsigned int discoonint                :1; //Device enable ;
1409                     volatile unsigned int sessreqint                :1; //Slef powered ;
1410                     volatile unsigned int wkupint                 :1; //Reserved ;
1411      #endif
1412     } mBits ;
1413     volatile unsigned int dwValue ;
1414 } USB_INTSTS_U;
1415
1416 /********************  USB2.0 Protocol Prototype  ****************/
1417
1418 typedef union usb_request_1_tag
1419 {
1420     struct usb_request_1_map
1421     {
1422         #if (!defined(_LITTLE_ENDIAN) && !defined(CHIP_ENDIAN_LITTLE))
1423         volatile unsigned int       direction     :1;
1424         volatile unsigned int       type          :2;
1425         volatile unsigned int       recipient     :5;
1426         volatile unsigned int       brequest      :8;
1427         volatile unsigned int       value_l       :8;
1428         volatile unsigned int       value_m       :8;
1429       #else
1430         volatile unsigned int       recipient     :5;
1431         volatile unsigned int       type          :2;
1432         volatile unsigned int           direction     :1;
1433         volatile unsigned int       brequest      :8;
1434         volatile unsigned int       value_l       :8;
1435         volatile unsigned int       value_m       :8;
1436       #endif
1437     } mBits ;
1438     volatile unsigned int dwValue ;
1439 } USB_REQUEST_1_U;
1440
1441 typedef union usb_request_2_tag
1442 {
1443     struct usb_request_2_map
1444     {
1445
1446         volatile unsigned int       index_l       :8;
1447         volatile unsigned int       index_m       :8;
1448         volatile unsigned int       length_l      :8;
1449         volatile unsigned int       length_m      :8;
1450     } mBits ;
1451     volatile unsigned int dwValue ;
1452 } USB_REQUEST_2_U;
1453 /*
1454 typedef struct _usb_endp_cfg{
1455     uint8 ep_address;
1456     uint8 ep_type;
1457     uint16 mps;
1458     uint32 res2;
1459 }USB_EPCfg_T;
1460 */
1461 #define USB_EPx_NUMBER                  6
1462 /**----------------------------------------------------------------------------*
1463 **                         Local Function Prototype                           **
1464 **----------------------------------------------------------------------------*/
1465
1466 /**----------------------------------------------------------------------------*
1467 **                           Function Prototype                               **
1468 **----------------------------------------------------------------------------*/
1469
1470
1471 /**----------------------------------------------------------------------------*
1472 **                         Compiler Flag                                      **
1473 **----------------------------------------------------------------------------*/
1474 #ifdef   __cplusplus
1475 }
1476 #endif
1477 /**---------------------------------------------------------------------------*/
1478 #endif
1479 // End
1480