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