#ifndef USB_REG_OFFSET_H
#define USB_REG_OFFSET_H


/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*

    File Name : UsbRegOffset.h

 GENERAL DESCRIPTION

    This file defines the USB HS ChipIdea hardware registers.

  Copyright (c) 2008-2010 by Qualcomm Technologies, Incorporated. All Rights Reserved.
*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/

/*===========================================================================

                           EDIT HISTORY FOR FILE
  This section contains comments describing changes made to the module.
  Notice that changes are listed in reverse chronological order.


when       who      what, where, why
--------   ---      ----------------------------------------------------------
06/24/11   cching   Port QHSUSB to UEFI
08/30/10   dpatnaik Port QHSUSB to RPM, add ULPI based charger detection
07/14/08   amirs    First Draft

===========================================================================*/

// ====================================
// Register offset address
// ====================================

#define USB_OTG_HS_ID                                      0x000
#define USB_OTG_HS_HWGENERAL                               0x004
#define USB_OTG_HS_HWHOST                                  0x008
#define USB_OTG_HS_HWDEVICE                                0x00C
#define USB_OTG_HS_HWTXBUF                                 0x010
#define USB_OTG_HS_HWRXBUF                                 0x014
#define USB_OTG_HS_GPTIMER0LD                              0x080
#define USB_OTG_HS_GPTIMER0CTRL                            0x084
#define USB_OTG_HS_GPTIMER1LD                              0x088
#define USB_OTG_HS_GPTIMER1CTRL                            0x08C
#define USB_OTG_HS_AHB_BURST                               0x090
#define USB_OTG_HS_XTOR_STS                                0x094
#define USB_OTG_HS_AHB_MODE                                0x098
#define USB_OTG_HS_GEN_CONFIG                              0x09C
#define USB_OTG_HS_GEN_CONFIG2                             0x0A0
#define USB_OTG_HS_CAPLENGTH                               0x100
#define USB_OTG_HS_HCIVERSION                              0x102
#define USB_OTG_HS_HCSPARAMS                               0x104
#define USB_OTG_HS_HCCPARAMS                               0x108
#define USB_OTG_HS_DCIVERSION                              0x120
#define USB_OTG_HS_DCCPARAMS                               0x124
#define USB_OTG_HS_USBCMD                                  0x140
#define USB_OTG_HS_USBSTS                                  0x144
#define USB_OTG_HS_USBINTR                                 0x148
#define USB_OTG_HS_FRINDEX                                 0x14C
#define USB_OTG_HS_PERIODICLISTBASE                        0x154
#define USB_OTG_HS_DEVICEADDR                              0x154
#define USB_OTG_HS_ASYNCLISTADDR                           0x158
#define USB_OTG_HS_ENDPOINTLISTADDR                        0x158
#define USB_OTG_HS_TTCTRL                                  0x15C
#define USB_OTG_HS_BURSTSIZE                               0x160
#define USB_OTG_HS_TXFILLTUNING                            0x164
#define USB_OTG_HS_ULPI_VIEWPORT                           0x170
#define USB_OTG_HS_ENDPTNAK                                0x178
#define USB_OTG_HS_ENDPTNAKEN                              0x17C
#define USB_OTG_HS_PORTSC                                  0x184
#define USB_OTG_HS_OTGSC                                   0x1A4
#define USB_OTG_HS_USBMODE                                 0x1A8
#define USB_OTG_HS_ENPDTSETUPSTAT                          0x1AC
#define USB_OTG_HS_ENDPTPRIME                              0x1B0
#define USB_OTG_HS_ENDPTFLUSH                              0x1B4
#define USB_OTG_HS_ENDPTSTAT                               0x1B8
#define USB_OTG_HS_ENDPTCOMPLETE                           0x1BC
#define USB_OTG_HS_ENDPTCTRL0                              0x1C0
#define USB_OTG_HS_ENDPTCTRLn                              0x1C0
// ====================================
// Registers bitmask and shift
// ====================================

#define USB_OTG_HS_ID_SHFT                                                      0
#define USB_OTG_HS_ID_REVISON_BMSK                                       0xff0000
#define USB_OTG_HS_ID_REVISON_SHFT                                           0x10
#define USB_OTG_HS_ID_NID_BMSK                                             0x3f00
#define USB_OTG_HS_ID_NID_SHFT                                                0x8
#define USB_OTG_HS_ID_ID_BMSK                                                0x3f
#define USB_OTG_HS_ID_ID_SHFT                                                   0
#define USB_OTG_HS_HWGENERAL_SHFT                                               0
#define USB_OTG_HS_HWGENERAL_SM_BMSK                                        0x200
#define USB_OTG_HS_HWGENERAL_SM_SHFT                                          0x9
#define USB_OTG_HS_HWGENERAL_PHYM_BMSK                                      0x1c0
#define USB_OTG_HS_HWGENERAL_PHYM_SHFT                                        0x6
#define USB_OTG_HS_HWGENERAL_PHYW_BMSK                                       0x30
#define USB_OTG_HS_HWGENERAL_PHYW_SHFT                                        0x4
#define USB_OTG_HS_HWGENERAL_BWT_BMSK                                         0x8
#define USB_OTG_HS_HWGENERAL_BWT_SHFT                                         0x3
#define USB_OTG_HS_HWGENERAL_CLCK_BMSK                                        0x6
#define USB_OTG_HS_HWGENERAL_CLCK_SHFT                                        0x1
#define USB_OTG_HS_HWGENERAL_RT_BMSK                                          0x1
#define USB_OTG_HS_HWGENERAL_RT_SHFT                                            0
#define USB_OTG_HS_HWHOST_SHFT                                                  0
#define USB_OTG_HS_HWHOST_TTPER_BMSK                                   0xff000000
#define USB_OTG_HS_HWHOST_TTPER_SHFT                                         0x18
#define USB_OTG_HS_HWHOST_TTASY_BMSK                                     0xff0000
#define USB_OTG_HS_HWHOST_TTASY_SHFT                                         0x10
#define USB_OTG_HS_HWHOST_NPORT_BMSK                                          0xe
#define USB_OTG_HS_HWHOST_NPORT_SHFT                                          0x1
#define USB_OTG_HS_HWHOST_HC_BMSK                                             0x1
#define USB_OTG_HS_HWHOST_HC_SHFT                                               0
#define USB_OTG_HS_HWDEVICE_SHFT                                                0
#define USB_OTG_HS_HWDEVICE_DEVEP_BMSK                                       0x3e
#define USB_OTG_HS_HWDEVICE_DEVEP_SHFT                                        0x1
#define USB_OTG_HS_HWDEVICE_DC_BMSK                                           0x1
#define USB_OTG_HS_HWDEVICE_DC_SHFT                                             0
#define USB_OTG_HS_HWTXBUF_SHFT                                                 0
#define USB_OTG_HS_HWTXBUF_TXLCR_BMSK                                  0x80000000
#define USB_OTG_HS_HWTXBUF_TXLCR_SHFT                                        0x1f
#define USB_OTG_HS_HWTXBUF_TXCHANADD_BMSK                                0xff0000
#define USB_OTG_HS_HWTXBUF_TXCHANADD_SHFT                                    0x10
#define USB_OTG_HS_HWTXBUF_TXADD_BMSK                                      0xff00
#define USB_OTG_HS_HWTXBUF_TXADD_SHFT                                         0x8
#define USB_OTG_HS_HWTXBUF_TCBURST_BMSK                                      0xff
#define USB_OTG_HS_HWTXBUF_TCBURST_SHFT                                         0
#define USB_OTG_HS_HWRXBUF_SHFT                                                 0
#define USB_OTG_HS_HWRXBUF_RX_ADD_BMSK                                     0xff00
#define USB_OTG_HS_HWRXBUF_RX_ADD_SHFT                                        0x8
#define USB_OTG_HS_HWRXBUF_RX_BURST_BMSK                                     0xff
#define USB_OTG_HS_HWRXBUF_RX_BURST_SHFT                                        0
#define USB_OTG_HS_GPTIMER0LD_SHFT                                              0
#define USB_OTG_HS_GPTIMER0LD_GPTLD_BMSK                                 0xffffff
#define USB_OTG_HS_GPTIMER0LD_GPTLD_SHFT                                        0
#define USB_OTG_HS_GPTIMER0CTRL_SHFT                                            0
#define USB_OTG_HS_GPTIMER0CTRL_GTPRUN_BMSK                            0x80000000
#define USB_OTG_HS_GPTIMER0CTRL_GTPRUN_SHFT                                  0x1f
#define USB_OTG_HS_GPTIMER0CTRL_GPTRST_BMSK                            0x40000000
#define USB_OTG_HS_GPTIMER0CTRL_GPTRST_SHFT                                  0x1e
#define USB_OTG_HS_GPTIMER0CTRL_GPTMODE_BMSK                            0x1000000
#define USB_OTG_HS_GPTIMER0CTRL_GPTMODE_SHFT                                 0x18
#define USB_OTG_HS_GPTIMER0CTRL_GPTCNT_BMSK                              0xffffff
#define USB_OTG_HS_GPTIMER0CTRL_GPTCNT_SHFT                                     0
#define USB_OTG_HS_GPTIMER1LD_SHFT                                              0
#define USB_OTG_HS_GPTIMER1LD_GPTLD_BMSK                                 0xffffff
#define USB_OTG_HS_GPTIMER1LD_GPTLD_SHFT                                        0
#define USB_OTG_HS_GPTIMER1CTRL_SHFT                                            0
#define USB_OTG_HS_GPTIMER1CTRL_GTPRUN_BMSK                            0x80000000
#define USB_OTG_HS_GPTIMER1CTRL_GTPRUN_SHFT                                  0x1f
#define USB_OTG_HS_GPTIMER1CTRL_GPTRST_BMSK                            0x40000000
#define USB_OTG_HS_GPTIMER1CTRL_GPTRST_SHFT                                  0x1e
#define USB_OTG_HS_GPTIMER1CTRL_GPTMODE_BMSK                            0x1000000
#define USB_OTG_HS_GPTIMER1CTRL_GPTMODE_SHFT                                 0x18
#define USB_OTG_HS_GPTIMER1CTRL_GPTCNT_BMSK                              0xffffff
#define USB_OTG_HS_GPTIMER1CTRL_GPTCNT_SHFT                                     0
#define USB_OTG_HS_AHB_BURST_SHFT                                               0
#define USB_OTG_HS_AHB_BURST_AHB_BURST_BMSK                                   0x7
#define USB_OTG_HS_AHB_BURST_AHB_BURST_SHFT                                     0
#define USB_OTG_HS_XTOR_STS_SHFT                                                0
#define USB_OTG_HS_XTOR_STS_GRANT_STOLEN_BMSK                                 0x2
#define USB_OTG_HS_XTOR_STS_GRANT_STOLEN_SHFT                                 0x1
#define USB_OTG_HS_AHB_MODE_SHFT                                                0
#define USB_OTG_HS_AHB_MODE_XTOR_BYPASS_BMSK                                  0x1
#define USB_OTG_HS_AHB_MODE_XTOR_BYPASS_SHFT                                    0
#define USB_OTG_HS_AHB_MODE_GRANT_STOLEN_CLEAR_BMSK                           0x2
#define USB_OTG_HS_AHB_MODE_GRANT_STOLEN_CLEAR_SHFT                           0x1
#define USB_OTG_HS_AHB_MODE_HPROT_MODE_BMSK                                   0xc
#define USB_OTG_HS_AHB_MODE_HPROT_MODE_SHFT                                   0x2
#define USB_OTG_HS_GEN_CONFIG_SHFT                                              0
#define USB_OTG_HS_GEN_CONFIG_USB_OTG_HS_TESTMUX_SEL_BMSK                     0xf
#define USB_OTG_HS_GEN_CONFIG_USB_OTG_HS_TESTMUX_SEL_SHFT                       0
#define USB_OTG_HS_GEN_CONFIG_DEV_PE_NAK_CTRL_BMSK                           0x10
#define USB_OTG_HS_GEN_CONFIG_DEV_PE_NAK_CTRL_SHFT                            0x4
#define USB_OTG_HS_GEN_CONFIG_HOST_SIM_TIMERS_EN_STD_BMSK                   0x100
#define USB_OTG_HS_GEN_CONFIG_HOST_SIM_TIMERS_EN_STD_SHFT                     0x8
#define USB_OTG_HS_GEN_CONFIG_HOST_SIM_TIMERS_EN_SUSP_BMSK                  0x200
#define USB_OTG_HS_GEN_CONFIG_HOST_SIM_TIMERS_EN_SUSP_SHFT                    0x9
#define USB_OTG_HS_GEN_CONFIG2_SESS_VLD_CTRL_EN_BMSK                         0x80
#define USB_OTG_HS_GEN_CONFIG2_SESS_VLD_CTRL_EN_SHFT                          0x7
#define USB_OTG_HS_CAPLENGTH_SHFT                                               0
#define USB_OTG_HS_CAPLENGTH_CAPLENGTH_BMSK                                  0xff
#define USB_OTG_HS_CAPLENGTH_CAPLENGTH_SHFT                                     0
#define USB_OTG_HS_HCIVERSION_SHFT                                              0
#define USB_OTG_HS_HCIVERSION_HCIVERSION_BMSK                              0xffff
#define USB_OTG_HS_HCIVERSION_HCIVERSION_SHFT                                   0
#define USB_OTG_HS_HCSPARAMS_SHFT                                               0
#define USB_OTG_HS_HCSPARAMS_N_TT_BMSK                                  0xf000000
#define USB_OTG_HS_HCSPARAMS_N_TT_SHFT                                       0x18
#define USB_OTG_HS_HCSPARAMS_N_PTT_BMSK                                  0xf00000
#define USB_OTG_HS_HCSPARAMS_N_PTT_SHFT                                      0x14
#define USB_OTG_HS_HCSPARAMS_PI_BMSK                                      0x10000
#define USB_OTG_HS_HCSPARAMS_PI_SHFT                                         0x10
#define USB_OTG_HS_HCSPARAMS_N_CC_BMSK                                     0xf000
#define USB_OTG_HS_HCSPARAMS_N_CC_SHFT                                        0xc
#define USB_OTG_HS_HCSPARAMS_N_PCC_BMSK                                     0xf00
#define USB_OTG_HS_HCSPARAMS_N_PCC_SHFT                                       0x8
#define USB_OTG_HS_HCSPARAMS_PPC_BMSK                                        0x10
#define USB_OTG_HS_HCSPARAMS_PPC_SHFT                                         0x4
#define USB_OTG_HS_HCSPARAMS_N_PORTS_BMSK                                     0xf
#define USB_OTG_HS_HCSPARAMS_N_PORTS_SHFT                                       0
#define USB_OTG_HS_HCCPARAMS_SHFT                                               0
#define USB_OTG_HS_HCCPARAMS_EECP_BMSK                                     0xff00
#define USB_OTG_HS_HCCPARAMS_EECP_SHFT                                        0x8
#define USB_OTG_HS_HCCPARAMS_IST_BMSK                                        0xf0
#define USB_OTG_HS_HCCPARAMS_IST_SHFT                                         0x4
#define USB_OTG_HS_HCCPARAMS_ASP_BMSK                                         0x4
#define USB_OTG_HS_HCCPARAMS_ASP_SHFT                                         0x2
#define USB_OTG_HS_HCCPARAMS_PFL_BMSK                                         0x2
#define USB_OTG_HS_HCCPARAMS_PFL_SHFT                                         0x1
#define USB_OTG_HS_HCCPARAMS_ADC_BMSK                                         0x1
#define USB_OTG_HS_HCCPARAMS_ADC_SHFT                                           0
#define USB_OTG_HS_DCIVERSION_SHFT                                              0
#define USB_OTG_HS_DCIVERSION_DCIVERSION_BMSK                              0xffff
#define USB_OTG_HS_DCIVERSION_DCIVERSION_SHFT                                   0
#define USB_OTG_HS_DCCPARAMS_SHFT                                               0
#define USB_OTG_HS_DCCPARAMS_HC_BMSK                                        0x100
#define USB_OTG_HS_DCCPARAMS_HC_SHFT                                          0x8
#define USB_OTG_HS_DCCPARAMS_DC_BMSK                                         0x80
#define USB_OTG_HS_DCCPARAMS_DC_SHFT                                          0x7
#define USB_OTG_HS_DCCPARAMS_DEN_BMSK                                        0x1f
#define USB_OTG_HS_DCCPARAMS_DEN_SHFT                                           0
#define USB_OTG_HS_USBCMD_SHFT                                                  0
#define USB_OTG_HS_USBCMD_RST_CTRL_BMSK                                0x80000000
#define USB_OTG_HS_USBCMD_RST_CTRL_SHFT                                      0x1f
#define USB_OTG_HS_USBCMD_ULPI_STP_CTRL_BMSK                           0x40000000
#define USB_OTG_HS_USBCMD_ULPI_STP_CTRL_SHFT                                 0x1e
#define USB_OTG_HS_USBCMD_ASYNC_INTR_CTRL_BMSK                         0x20000000
#define USB_OTG_HS_USBCMD_ASYNC_INTR_CTRL_SHFT                               0x1d
#define USB_OTG_HS_USBCMD_SE0_GLITCH_FIX_CTRL_BMSK                     0x10000000
#define USB_OTG_HS_USBCMD_SE0_GLITCH_FIX_CTRL_SHFT                           0x1c
#define USB_OTG_HS_USBCMD_SESS_VLD_CTRL_BMSK                            0x2000000
#define USB_OTG_HS_USBCMD_SESS_VLD_CTRL_SHFT                                 0x19
#define USB_OTG_HS_USBCMD_ITC_BMSK                                       0xff0000
#define USB_OTG_HS_USBCMD_ITC_SHFT                                           0x10
#define USB_OTG_HS_USBCMD_FS2_BMSK                                         0x8000
#define USB_OTG_HS_USBCMD_FS2_SHFT                                            0xf
#define USB_OTG_HS_USBCMD_SUTW_BMSK                                        0x2000
#define USB_OTG_HS_USBCMD_SUTW_SHFT                                           0xd
#define USB_OTG_HS_USBCMD_ATDTW_BMSK                                       0x1000
#define USB_OTG_HS_USBCMD_ATDTW_SHFT                                          0xc
#define USB_OTG_HS_USBCMD_ASPE_BMSK                                         0x800
#define USB_OTG_HS_USBCMD_ASPE_SHFT                                           0xb
#define USB_OTG_HS_USBCMD_ASP_BMSK                                          0x300
#define USB_OTG_HS_USBCMD_ASP_SHFT                                            0x8
#define USB_OTG_HS_USBCMD_LR_BMSK                                            0x80
#define USB_OTG_HS_USBCMD_LR_SHFT                                             0x7
#define USB_OTG_HS_USBCMD_IAA_BMSK                                           0x40
#define USB_OTG_HS_USBCMD_IAA_SHFT                                            0x6
#define USB_OTG_HS_USBCMD_ASE_BMSK                                           0x20
#define USB_OTG_HS_USBCMD_ASE_SHFT                                            0x5
#define USB_OTG_HS_USBCMD_PSE_BMSK                                           0x10
#define USB_OTG_HS_USBCMD_PSE_SHFT                                            0x4
#define USB_OTG_HS_USBCMD_FS1_BMSK                                            0x8
#define USB_OTG_HS_USBCMD_FS1_SHFT                                            0x3
#define USB_OTG_HS_USBCMD_FS0_BMSK                                            0x4
#define USB_OTG_HS_USBCMD_FS0_SHFT                                            0x2
#define USB_OTG_HS_USBCMD_RST_BMSK                                            0x2
#define USB_OTG_HS_USBCMD_RST_SHFT                                            0x1
#define USB_OTG_HS_USBCMD_RS_BMSK                                             0x1
#define USB_OTG_HS_USBCMD_RS_SHFT                                               0
#define USB_OTG_HS_USBSTS_SHFT                                                  0
#define USB_OTG_HS_USBSTS_ULPI_INTR_BMSK                               0x80000000
#define USB_OTG_HS_USBSTS_ULPI_INTR_SHFT                                     0x1f
#define USB_OTG_HS_USBSTS_TI1_BMSK                                      0x2000000
#define USB_OTG_HS_USBSTS_TI1_SHFT                                           0x19
#define USB_OTG_HS_USBSTS_TI0_BMSK                                      0x1000000
#define USB_OTG_HS_USBSTS_TI0_SHFT                                           0x18
#define USB_OTG_HS_USBSTS_UPI_BMSK                                        0x80000
#define USB_OTG_HS_USBSTS_UPI_SHFT                                           0x13
#define USB_OTG_HS_USBSTS_UAI_BMSK                                        0x40000
#define USB_OTG_HS_USBSTS_UAI_SHFT                                           0x12
#define USB_OTG_HS_USBSTS_NAKI_BMSK                                       0x10000
#define USB_OTG_HS_USBSTS_NAKI_SHFT                                          0x10
#define USB_OTG_HS_USBSTS_AS_BMSK                                          0x8000
#define USB_OTG_HS_USBSTS_AS_SHFT                                             0xf
#define USB_OTG_HS_USBSTS_PS_BMSK                                          0x4000
#define USB_OTG_HS_USBSTS_PS_SHFT                                             0xe
#define USB_OTG_HS_USBSTS_RCL_BMSK                                         0x2000
#define USB_OTG_HS_USBSTS_RCL_SHFT                                            0xd
#define USB_OTG_HS_USBSTS_HCH_BMSK                                         0x1000
#define USB_OTG_HS_USBSTS_HCH_SHFT                                            0xc
#define USB_OTG_HS_USBSTS_ULPII_BMSK                                        0x400
#define USB_OTG_HS_USBSTS_ULPII_SHFT                                          0xa
#define USB_OTG_HS_USBSTS_SLI_BMSK                                          0x100
#define USB_OTG_HS_USBSTS_SLI_SHFT                                            0x8
#define USB_OTG_HS_USBSTS_SRI_BMSK                                           0x80
#define USB_OTG_HS_USBSTS_SRI_SHFT                                            0x7
#define USB_OTG_HS_USBSTS_URI_BMSK                                           0x40
#define USB_OTG_HS_USBSTS_URI_SHFT                                            0x6
#define USB_OTG_HS_USBSTS_AAI_BMSK                                           0x20
#define USB_OTG_HS_USBSTS_AAI_SHFT                                            0x5
#define USB_OTG_HS_USBSTS_SEI_BMSK                                           0x10
#define USB_OTG_HS_USBSTS_SEI_SHFT                                            0x4
#define USB_OTG_HS_USBSTS_FRI_BMSK                                            0x8
#define USB_OTG_HS_USBSTS_FRI_SHFT                                            0x3
#define USB_OTG_HS_USBSTS_PCI_BMSK                                            0x4
#define USB_OTG_HS_USBSTS_PCI_SHFT                                            0x2
#define USB_OTG_HS_USBSTS_UEI_BMSK                                            0x2
#define USB_OTG_HS_USBSTS_UEI_SHFT                                            0x1
#define USB_OTG_HS_USBSTS_UI_BMSK                                             0x1
#define USB_OTG_HS_USBSTS_UI_SHFT                                               0
#define USB_OTG_HS_USBINTR_SHFT                                                 0
#define USB_OTG_HS_USBINTR_ULPI_INTR_EN_BMSK                           0x80000000
#define USB_OTG_HS_USBINTR_ULPI_INTR_EN_SHFT                                 0x1f
#define USB_OTG_HS_USBINTR_TIE1_BMSK                                    0x2000000
#define USB_OTG_HS_USBINTR_TIE1_SHFT                                         0x19
#define USB_OTG_HS_USBINTR_TIE0_BMSK                                    0x1000000
#define USB_OTG_HS_USBINTR_TIE0_SHFT                                         0x18
#define USB_OTG_HS_USBINTR_UPIE_BMSK                                      0x80000
#define USB_OTG_HS_USBINTR_UPIE_SHFT                                         0x13
#define USB_OTG_HS_USBINTR_UAIE_BMSK                                      0x40000
#define USB_OTG_HS_USBINTR_UAIE_SHFT                                         0x12
#define USB_OTG_HS_USBINTR_NAKE_BMSK                                      0x10000
#define USB_OTG_HS_USBINTR_NAKE_SHFT                                         0x10
#define USB_OTG_HS_USBINTR_ULPIE_BMSK                                       0x400
#define USB_OTG_HS_USBINTR_ULPIE_SHFT                                         0xa
#define USB_OTG_HS_USBINTR_SLE_BMSK                                         0x100
#define USB_OTG_HS_USBINTR_SLE_SHFT                                           0x8
#define USB_OTG_HS_USBINTR_SRE_BMSK                                          0x80
#define USB_OTG_HS_USBINTR_SRE_SHFT                                           0x7
#define USB_OTG_HS_USBINTR_URE_BMSK                                          0x40
#define USB_OTG_HS_USBINTR_URE_SHFT                                           0x6
#define USB_OTG_HS_USBINTR_AAE_BMSK                                          0x20
#define USB_OTG_HS_USBINTR_AAE_SHFT                                           0x5
#define USB_OTG_HS_USBINTR_SEE_BMSK                                          0x10
#define USB_OTG_HS_USBINTR_SEE_SHFT                                           0x4
#define USB_OTG_HS_USBINTR_FRE_BMSK                                           0x8
#define USB_OTG_HS_USBINTR_FRE_SHFT                                           0x3
#define USB_OTG_HS_USBINTR_PCE_BMSK                                           0x4
#define USB_OTG_HS_USBINTR_PCE_SHFT                                           0x2
#define USB_OTG_HS_USBINTR_UEE_BMSK                                           0x2
#define USB_OTG_HS_USBINTR_UEE_SHFT                                           0x1
#define USB_OTG_HS_USBINTR_UE_BMSK                                            0x1
#define USB_OTG_HS_USBINTR_UE_SHFT                                              0
#define USB_OTG_HS_FRINDEX_SHFT                                                 0
#define USB_OTG_HS_FRINDEX_FRINDEX_BMSK                                    0x3fff
#define USB_OTG_HS_FRINDEX_FRINDEX_SHFT                                         0
#define USB_OTG_HS_PERIODICLISTBASE_SHFT                                        0
#define USB_OTG_HS_PERIODICLISTBASE_PERBASE_BMSK                       0xfffff000
#define USB_OTG_HS_PERIODICLISTBASE_PERBASE_SHFT                              0xc
#define USB_OTG_HS_DEVICEADDR_SHFT                                              0
#define USB_OTG_HS_DEVICEADDR_USBADR_BMSK                              0xfe000000
#define USB_OTG_HS_DEVICEADDR_USBADR_SHFT                                    0x19
#define USB_OTG_HS_DEVICEADDR_USBADRA_BMSK                              0x1000000
#define USB_OTG_HS_DEVICEADDR_USBADRA_SHFT                                   0x18
#define USB_OTG_HS_ASYNCLISTADDR_SHFT                                           0
#define USB_OTG_HS_ASYNCLISTADDR_ASYBASE_BMSK                          0xffffffe0
#define USB_OTG_HS_ASYNCLISTADDR_ASYBASE_SHFT                                 0x5
#define USB_OTG_HS_ENDPOINTLISTADDR_SHFT                                        0
#define USB_OTG_HS_ENDPOINTLISTADDR_EPBASE_BMSK                        0xfffff800
#define USB_OTG_HS_ENDPOINTLISTADDR_EPBASE_SHFT                               0xb
#define USB_OTG_HS_TTCTRL_SHFT                                                  0
#define USB_OTG_HS_TTCTRL_TTHA_BMSK                                    0x7f000000
#define USB_OTG_HS_TTCTRL_TTHA_SHFT                                          0x18
#define USB_OTG_HS_BURSTSIZE_SHFT                                               0
#define USB_OTG_HS_BURSTSIZE_TXPBURST_BMSK                                 0xff00
#define USB_OTG_HS_BURSTSIZE_TXPBURST_SHFT                                    0x8
#define USB_OTG_HS_BURSTSIZE_RXPBURST_BMSK                                   0xff
#define USB_OTG_HS_BURSTSIZE_RXPBURST_SHFT                                      0
#define USB_OTG_HS_TXFILLTUNING_SHFT                                            0
#define USB_OTG_HS_TXFILLTUNING_TXFIFOTHRES_BMSK                         0x3f0000
#define USB_OTG_HS_TXFILLTUNING_TXFIFOTHRES_SHFT                             0x10
#define USB_OTG_HS_TXFILLTUNING_TXSCHHEALTH_BMSK                           0x1f00
#define USB_OTG_HS_TXFILLTUNING_TXSCHHEALTH_SHFT                              0x8
#define USB_OTG_HS_TXFILLTUNING_TXSCHOH_BMSK                                 0xff
#define USB_OTG_HS_TXFILLTUNING_TXSCHOH_SHFT                                    0
#define USB_OTG_HS_ULPI_VIEWPORT_SHFT                                           0
#define USB_OTG_HS_ULPI_VIEWPORT_ULPIWU_BMSK                           0x80000000
#define USB_OTG_HS_ULPI_VIEWPORT_ULPIWU_SHFT                                 0x1f
#define USB_OTG_HS_ULPI_VIEWPORT_ULPIRUN_BMSK                          0x40000000
#define USB_OTG_HS_ULPI_VIEWPORT_ULPIRUN_SHFT                                0x1e
#define USB_OTG_HS_ULPI_VIEWPORT_ULPIRW_BMSK                           0x20000000
#define USB_OTG_HS_ULPI_VIEWPORT_ULPIRW_SHFT                                 0x1d
#define USB_OTG_HS_ULPI_VIEWPORT_ULPISS_BMSK                            0x8000000
#define USB_OTG_HS_ULPI_VIEWPORT_ULPISS_SHFT                                 0x1b
#define USB_OTG_HS_ULPI_VIEWPORT_ULPIPORT_BMSK                          0x7000000
#define USB_OTG_HS_ULPI_VIEWPORT_ULPIPORT_SHFT                               0x18
#define USB_OTG_HS_ULPI_VIEWPORT_ULPIADDR_BMSK                           0xff0000
#define USB_OTG_HS_ULPI_VIEWPORT_ULPIADDR_SHFT                               0x10
#define USB_OTG_HS_ULPI_VIEWPORT_ULPIDATRD_BMSK                            0xff00
#define USB_OTG_HS_ULPI_VIEWPORT_ULPIDATRD_SHFT                               0x8
#define USB_OTG_HS_ULPI_VIEWPORT_ULPIDATWR_BMSK                              0xff
#define USB_OTG_HS_ULPI_VIEWPORT_ULPIDATWR_SHFT                                 0
#define USB_OTG_HS_ENDPTNAK_SHFT                                                0
#define USB_OTG_HS_ENDPTNAK_EPTN_BMSK                                  0xffff0000
#define USB_OTG_HS_ENDPTNAK_EPTN_SHFT                                        0x10
#define USB_OTG_HS_ENDPTNAK_EPRN_BMSK                                      0xffff
#define USB_OTG_HS_ENDPTNAK_EPRN_SHFT                                           0
#define USB_OTG_HS_ENDPTNAKEN_SHFT                                              0
#define USB_OTG_HS_ENDPTNAKEN_EPTNE_BMSK                               0xffff0000
#define USB_OTG_HS_ENDPTNAKEN_EPTNE_SHFT                                     0x10
#define USB_OTG_HS_ENDPTNAKEN_EPRNE_BMSK                                   0xffff
#define USB_OTG_HS_ENDPTNAKEN_EPRNE_SHFT                                        0
#define USB_OTG_HS_PORTSC_SHFT                                                  0
#define USB_OTG_HS_PORTSC_PTS_BMSK                                     0xc0000000
#define USB_OTG_HS_PORTSC_PTS_SHFT                                           0x1e
#define USB_OTG_HS_PORTSC_STS_BMSK                                     0x20000000
#define USB_OTG_HS_PORTSC_STS_SHFT                                           0x1d
#define USB_OTG_HS_PORTSC_PTW_BMSK                                     0x10000000
#define USB_OTG_HS_PORTSC_PTW_SHFT                                           0x1c
#define USB_OTG_HS_PORTSC_PSPD_BMSK                                     0xc000000
#define USB_OTG_HS_PORTSC_PSPD_SHFT                                          0x1a
#define USB_OTG_HS_PORTSC_PFSC_BMSK                                     0x1000000
#define USB_OTG_HS_PORTSC_PFSC_SHFT                                          0x18
#define USB_OTG_HS_PORTSC_PHCD_BMSK                                      0x800000
#define USB_OTG_HS_PORTSC_PHCD_SHFT                                          0x17
#define USB_OTG_HS_PORTSC_WKOC_BMSK                                      0x400000
#define USB_OTG_HS_PORTSC_WKOC_SHFT                                          0x16
#define USB_OTG_HS_PORTSC_WKDS_BMSK                                      0x200000
#define USB_OTG_HS_PORTSC_WKDS_SHFT                                          0x15
#define USB_OTG_HS_PORTSC_WKCN_BMSK                                      0x100000
#define USB_OTG_HS_PORTSC_WKCN_SHFT                                          0x14
#define USB_OTG_HS_PORTSC_PTC_BMSK                                        0xf0000
#define USB_OTG_HS_PORTSC_PTC_SHFT                                           0x10
#define USB_OTG_HS_PORTSC_PIC_BMSK                                         0xc000
#define USB_OTG_HS_PORTSC_PIC_SHFT                                            0xe
#define USB_OTG_HS_PORTSC_PO_BMSK                                          0x2000
#define USB_OTG_HS_PORTSC_PO_SHFT                                             0xd
#define USB_OTG_HS_PORTSC_PP_BMSK                                          0x1000
#define USB_OTG_HS_PORTSC_PP_SHFT                                             0xc
#define USB_OTG_HS_PORTSC_LS_BMSK                                           0xc00
#define USB_OTG_HS_PORTSC_LS_SHFT                                             0xa
#define USB_OTG_HS_PORTSC_HSP_BMSK                                          0x200
#define USB_OTG_HS_PORTSC_HSP_SHFT                                            0x9
#define USB_OTG_HS_PORTSC_PR_BMSK                                           0x100
#define USB_OTG_HS_PORTSC_PR_SHFT                                             0x8
#define USB_OTG_HS_PORTSC_SUSP_BMSK                                          0x80
#define USB_OTG_HS_PORTSC_SUSP_SHFT                                           0x7
#define USB_OTG_HS_PORTSC_FPR_BMSK                                           0x40
#define USB_OTG_HS_PORTSC_FPR_SHFT                                            0x6
#define USB_OTG_HS_PORTSC_OCC_BMSK                                           0x20
#define USB_OTG_HS_PORTSC_OCC_SHFT                                            0x5
#define USB_OTG_HS_PORTSC_OCA_BMSK                                           0x10
#define USB_OTG_HS_PORTSC_OCA_SHFT                                            0x4
#define USB_OTG_HS_PORTSC_PEC_BMSK                                            0x8
#define USB_OTG_HS_PORTSC_PEC_SHFT                                            0x3
#define USB_OTG_HS_PORTSC_PE_BMSK                                             0x4
#define USB_OTG_HS_PORTSC_PE_SHFT                                             0x2
#define USB_OTG_HS_PORTSC_CSC_BMSK                                            0x2
#define USB_OTG_HS_PORTSC_CSC_SHFT                                            0x1
#define USB_OTG_HS_PORTSC_CCS_BMSK                                            0x1
#define USB_OTG_HS_PORTSC_CCS_SHFT                                              0
#define USB_OTG_HS_OTGSC_SHFT                                                   0
#define USB_OTG_HS_OTGSC_DPIE_BMSK                                     0x40000000
#define USB_OTG_HS_OTGSC_DPIE_SHFT                                           0x1e
#define USB_OTG_HS_OTGSC_1MSE_BMSK                                     0x20000000
#define USB_OTG_HS_OTGSC_1MSE_SHFT                                           0x1d
#define USB_OTG_HS_OTGSC_BSEIE_BMSK                                    0x10000000
#define USB_OTG_HS_OTGSC_BSEIE_SHFT                                          0x1c
#define USB_OTG_HS_OTGSC_BSVIE_BMSK                                     0x8000000
#define USB_OTG_HS_OTGSC_BSVIE_SHFT                                          0x1b
#define USB_OTG_HS_OTGSC_ASVIE_BMSK                                     0x4000000
#define USB_OTG_HS_OTGSC_ASVIE_SHFT                                          0x1a
#define USB_OTG_HS_OTGSC_AVVIE_BMSK                                     0x2000000
#define USB_OTG_HS_OTGSC_AVVIE_SHFT                                          0x19
#define USB_OTG_HS_OTGSC_IDIE_BMSK                                      0x1000000
#define USB_OTG_HS_OTGSC_IDIE_SHFT                                           0x18
#define USB_OTG_HS_OTGSC_DPIS_BMSK                                       0x400000
#define USB_OTG_HS_OTGSC_DPIS_SHFT                                           0x16
#define USB_OTG_HS_OTGSC_1MSS_BMSK                                       0x200000
#define USB_OTG_HS_OTGSC_1MSS_SHFT                                           0x15
#define USB_OTG_HS_OTGSC_BSEIS_BMSK                                      0x100000
#define USB_OTG_HS_OTGSC_BSEIS_SHFT                                          0x14
#define USB_OTG_HS_OTGSC_BSVIS_BMSK                                       0x80000
#define USB_OTG_HS_OTGSC_BSVIS_SHFT                                          0x13
#define USB_OTG_HS_OTGSC_ASVIS_BMSK                                       0x40000
#define USB_OTG_HS_OTGSC_ASVIS_SHFT                                          0x12
#define USB_OTG_HS_OTGSC_AVVIS_BMSK                                       0x20000
#define USB_OTG_HS_OTGSC_AVVIS_SHFT                                          0x11
#define USB_OTG_HS_OTGSC_IDIS_BMSK                                        0x10000
#define USB_OTG_HS_OTGSC_IDIS_SHFT                                           0x10
#define USB_OTG_HS_OTGSC_DPS_BMSK                                          0x4000
#define USB_OTG_HS_OTGSC_DPS_SHFT                                             0xe
#define USB_OTG_HS_OTGSC_1MST_BMSK                                         0x2000
#define USB_OTG_HS_OTGSC_1MST_SHFT                                            0xd
#define USB_OTG_HS_OTGSC_BSE_BMSK                                          0x1000
#define USB_OTG_HS_OTGSC_BSE_SHFT                                             0xc
#define USB_OTG_HS_OTGSC_BSV_BMSK                                           0x800
#define USB_OTG_HS_OTGSC_BSV_SHFT                                             0xb
#define USB_OTG_HS_OTGSC_ASV_BMSK                                           0x400
#define USB_OTG_HS_OTGSC_ASV_SHFT                                             0xa
#define USB_OTG_HS_OTGSC_AVV_BMSK                                           0x200
#define USB_OTG_HS_OTGSC_AVV_SHFT                                             0x9
#define USB_OTG_HS_OTGSC_ID_BMSK                                            0x100
#define USB_OTG_HS_OTGSC_ID_SHFT                                              0x8
#define USB_OTG_HS_OTGSC_HABA_BMSK                                           0x80
#define USB_OTG_HS_OTGSC_HABA_SHFT                                            0x7
#define USB_OTG_HS_OTGSC_HADP_BMSK                                           0x40
#define USB_OTG_HS_OTGSC_HADP_SHFT                                            0x6
#define USB_OTG_HS_OTGSC_IDPU_BMSK                                           0x20
#define USB_OTG_HS_OTGSC_IDPU_SHFT                                            0x5
#define USB_OTG_HS_OTGSC_DP_BMSK                                             0x10
#define USB_OTG_HS_OTGSC_DP_SHFT                                              0x4
#define USB_OTG_HS_OTGSC_OT_BMSK                                              0x8
#define USB_OTG_HS_OTGSC_OT_SHFT                                              0x3
#define USB_OTG_HS_OTGSC_HAAR_BMSK                                            0x4
#define USB_OTG_HS_OTGSC_HAAR_SHFT                                            0x2
#define USB_OTG_HS_OTGSC_VC_BMSK                                              0x2
#define USB_OTG_HS_OTGSC_VC_SHFT                                              0x1
#define USB_OTG_HS_OTGSC_VD_BMSK                                              0x1
#define USB_OTG_HS_OTGSC_VD_SHFT                                                0
#define USB_OTG_HS_USBMODE_SHFT                                                 0
#define USB_OTG_HS_USBMODE_VBPS_BMSK                                         0x20
#define USB_OTG_HS_USBMODE_VBPS_SHFT                                          0x5
#define USB_OTG_HS_USBMODE_SDIS_BMSK                                         0x10
#define USB_OTG_HS_USBMODE_SDIS_SHFT                                          0x4
#define USB_OTG_HS_USBMODE_SLOM_BMSK                                          0x8
#define USB_OTG_HS_USBMODE_SLOM_SHFT                                          0x3
#define USB_OTG_HS_USBMODE_ES_BMSK                                            0x4
#define USB_OTG_HS_USBMODE_ES_SHFT                                            0x2
#define USB_OTG_HS_USBMODE_CM_BMSK                                            0x3
#define USB_OTG_HS_USBMODE_CM_SHFT                                              0
#define USB_OTG_HS_ENPDTSETUPSTAT_SHFT                                          0
#define USB_OTG_HS_ENPDTSETUPSTAT_ENDPTSETUPSTAT_BMSK                      0xffff
#define USB_OTG_HS_ENPDTSETUPSTAT_ENDPTSETUPSTAT_SHFT                           0
#define USB_OTG_HS_ENDPTPRIME_SHFT                                              0
#define USB_OTG_HS_ENDPTPRIME_PETB_BMSK                                0xffff0000
#define USB_OTG_HS_ENDPTPRIME_PETB_SHFT                                      0x10
#define USB_OTG_HS_ENDPTPRIME_PERB_BMSK                                    0xffff
#define USB_OTG_HS_ENDPTPRIME_PERB_SHFT                                         0
#define USB_OTG_HS_ENDPTFLUSH_SHFT                                              0
#define USB_OTG_HS_ENDPTFLUSH_FETB_BMSK                                0xffff0000
#define USB_OTG_HS_ENDPTFLUSH_FETB_SHFT                                      0x10
#define USB_OTG_HS_ENDPTFLUSH_FERB_BMSK                                    0xffff
#define USB_OTG_HS_ENDPTFLUSH_FERB_SHFT                                         0
#define USB_OTG_HS_ENDPTSTAT_SHFT                                               0
#define USB_OTG_HS_ENDPTSTAT_ETBR_BMSK                                 0xffff0000
#define USB_OTG_HS_ENDPTSTAT_ETBR_SHFT                                       0x10
#define USB_OTG_HS_ENDPTSTAT_ERBR_BMSK                                     0xffff
#define USB_OTG_HS_ENDPTSTAT_ERBR_SHFT                                          0
#define USB_OTG_HS_ENDPTCOMPLETE_SHFT                                           0
#define USB_OTG_HS_ENDPTCOMPLETE_ETCE_BMSK                             0xffff0000
#define USB_OTG_HS_ENDPTCOMPLETE_ETCE_SHFT                                   0x10
#define USB_OTG_HS_ENDPTCOMPLETE_ERCE_BMSK                                 0xffff
#define USB_OTG_HS_ENDPTCOMPLETE_ERCE_SHFT                                      0
#define USB_OTG_HS_ENDPTCTRL0_SHFT                                              0
#define USB_OTG_HS_ENDPTCTRL0_TXE_BMSK                                   0x800000
#define USB_OTG_HS_ENDPTCTRL0_TXE_SHFT                                       0x17
#define USB_OTG_HS_ENDPTCTRL0_TXT_BMSK                                    0xc0000
#define USB_OTG_HS_ENDPTCTRL0_TXT_SHFT                                       0x12
#define USB_OTG_HS_ENDPTCTRL0_TXS_BMSK                                    0x10000
#define USB_OTG_HS_ENDPTCTRL0_TXS_SHFT                                       0x10
#define USB_OTG_HS_ENDPTCTRL0_RXE_BMSK                                       0x80
#define USB_OTG_HS_ENDPTCTRL0_RXE_SHFT                                        0x7
#define USB_OTG_HS_ENDPTCTRL0_RXT_BMSK                                        0xc
#define USB_OTG_HS_ENDPTCTRL0_RXT_SHFT                                        0x2
#define USB_OTG_HS_ENDPTCTRL0_RXS_BMSK                                        0x1
#define USB_OTG_HS_ENDPTCTRL0_RXS_SHFT                                          0
#define USB_OTG_HS_ENDPTCTRLn_SHFT                                              0
#define USB_OTG_HS_ENDPTCTRLn_TXE_BMSK                                   0x800000
#define USB_OTG_HS_ENDPTCTRLn_TXE_SHFT                                       0x17
#define USB_OTG_HS_ENDPTCTRLn_TXR_BMSK                                   0x400000
#define USB_OTG_HS_ENDPTCTRLn_TXR_SHFT                                       0x16
#define USB_OTG_HS_ENDPTCTRLn_TXI_BMSK                                   0x200000
#define USB_OTG_HS_ENDPTCTRLn_TXI_SHFT                                       0x15
#define USB_OTG_HS_ENDPTCTRLn_TXT_BMSK                                    0xc0000
#define USB_OTG_HS_ENDPTCTRLn_TXT_SHFT                                       0x12
#define USB_OTG_HS_ENDPTCTRLn_TXD_BMSK                                    0x20000
#define USB_OTG_HS_ENDPTCTRLn_TXD_SHFT                                       0x11
#define USB_OTG_HS_ENDPTCTRLn_TXS_BMSK                                    0x10000
#define USB_OTG_HS_ENDPTCTRLn_TXS_SHFT                                       0x10
#define USB_OTG_HS_ENDPTCTRLn_RXE_BMSK                                       0x80
#define USB_OTG_HS_ENDPTCTRLn_RXE_SHFT                                        0x7
#define USB_OTG_HS_ENDPTCTRLn_RXR_BMSK                                       0x40
#define USB_OTG_HS_ENDPTCTRLn_RXR_SHFT                                        0x6
#define USB_OTG_HS_ENDPTCTRLn_RXI_BMSK                                       0x20
#define USB_OTG_HS_ENDPTCTRLn_RXI_SHFT                                        0x5
#define USB_OTG_HS_ENDPTCTRLn_RXT_BMSK                                        0xc
#define USB_OTG_HS_ENDPTCTRLn_RXT_SHFT                                        0x2
#define USB_OTG_HS_ENDPTCTRLn_RXD_BMSK                                        0x2
#define USB_OTG_HS_ENDPTCTRLn_RXD_SHFT                                        0x1
#define USB_OTG_HS_ENDPTCTRLn_RXS_BMSK                                        0x1
#define USB_OTG_HS_ENDPTCTRLn_RXS_SHFT                                          0
// ====================================
// Register Field Value
// ====================================
// -----------------------------------------------------------------
// Note: the defines that are missing in msmhwioreg.h in some tragets.
// -----------------------------------------------------------------
#define USB_OTG_HS_USBMODE_CM_DEVICE_CONTROLLER_DEFAULT_FOR_DEVICE_ONLY_CONTROLLER_FVAL ((0x02)<<(USB_OTG_HS_USBMODE_CM_SHFT))
#define USB_OTG_HS_USBMODE_SLOM_SETUP_LOCKOUTS_OFF_FVAL ((0x01)<<(USB_OTG_HS_USBMODE_SLOM_SHFT))
#define USB_OTG_HS_USBMODE_SDIS_STREAM_DISABLE_FVAL ((0x1)<<(USB_OTG_HS_USBMODE_SDIS_SHFT))
#define USB_OTG_HS_USBCMD_RS_RUN_FVAL  ((0x01)<<(USB_OTG_HS_USBCMD_RS_SHFT))
#define USB_OTG_HS_USBCMD_RS_STOP_FVAL ((0x00)<<(USB_OTG_HS_USBCMD_RS_SHFT))
#define USB_OTG_HS_USBCMD_SUTW_SET_FVAL ((0x01)<<(USB_OTG_HS_USBCMD_SUTW_SHFT))
#define USB_OTG_HS_USBCMD_SUTW_CLR_FVAL ((0x00)<<(USB_OTG_HS_USBCMD_SUTW_SHFT))



#define USB_OTG_HS_GPTIMER0CTRL_GTPRUN_TIMER_STOP_FVAL                   0
#define USB_OTG_HS_GPTIMER0CTRL_GTPRUN_TIMER_RUN_FVAL                  0x1
#define USB_OTG_HS_GPTIMER0CTRL_GPTMODE_ONE_SHOT_FVAL                    0
#define USB_OTG_HS_GPTIMER0CTRL_GPTMODE_REPEAT_FVAL                    0x1
#define USB_OTG_HS_OTGSC_IDPU_ON_FVAL                                  0x1
#define USB_OTG_HS_OTGSC_IDPU_OFF_FVAL                                 0x0
// -----------------------------------------------------------------       
#endif // USB_REG_OFFSET_H
