| 1 | #ifndef __BDK_CSRS_USBH_H__ |
| 2 | #define __BDK_CSRS_USBH_H__ |
| 3 | /* This file is auto-generated. Do not edit */ |
| 4 | |
| 5 | /***********************license start*************** |
| 6 | * Copyright (c) 2003-2017 Cavium Inc. ([email protected]). All rights |
| 7 | * reserved. |
| 8 | * |
| 9 | * |
| 10 | * Redistribution and use in source and binary forms, with or without |
| 11 | * modification, are permitted provided that the following conditions are |
| 12 | * met: |
| 13 | * |
| 14 | * * Redistributions of source code must retain the above copyright |
| 15 | * notice, this list of conditions and the following disclaimer. |
| 16 | * |
| 17 | * * Redistributions in binary form must reproduce the above |
| 18 | * copyright notice, this list of conditions and the following |
| 19 | * disclaimer in the documentation and/or other materials provided |
| 20 | * with the distribution. |
| 21 | |
| 22 | * * Neither the name of Cavium Inc. nor the names of |
| 23 | * its contributors may be used to endorse or promote products |
| 24 | * derived from this software without specific prior written |
| 25 | * permission. |
| 26 | |
| 27 | * This Software, including technical data, may be subject to U.S. export control |
| 28 | * laws, including the U.S. Export Administration Act and its associated |
| 29 | * regulations, and may be subject to export or import regulations in other |
| 30 | * countries. |
| 31 | |
| 32 | * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" |
| 33 | * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR |
| 34 | * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO |
| 35 | * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR |
| 36 | * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM |
| 37 | * SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE, |
| 38 | * MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF |
| 39 | * VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR |
| 40 | * CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR |
| 41 | * PERFORMANCE OF THE SOFTWARE LIES WITH YOU. |
| 42 | ***********************license end**************************************/ |
| 43 | |
| 44 | |
| 45 | /** |
| 46 | * @file |
| 47 | * |
| 48 | * Configuration and status register (CSR) address and type definitions for |
| 49 | * Cavium USBH. |
| 50 | * |
| 51 | * This file is auto generated. Do not edit. |
| 52 | * |
| 53 | */ |
| 54 | |
| 55 | /** |
| 56 | * Enumeration uctl_ecc_err_source_e |
| 57 | * |
| 58 | * UCTL ECC Error Source Enumeration |
| 59 | * Enumerate sources of ECC error log information. |
| 60 | */ |
| 61 | #define BDK_UCTL_ECC_ERR_SOURCE_E_NONE (0) |
| 62 | #define BDK_UCTL_ECC_ERR_SOURCE_E_RAM0_DBE (0xf) |
| 63 | #define BDK_UCTL_ECC_ERR_SOURCE_E_RAM0_SBE (7) |
| 64 | #define BDK_UCTL_ECC_ERR_SOURCE_E_RAM1_DBE (0xe) |
| 65 | #define BDK_UCTL_ECC_ERR_SOURCE_E_RAM1_SBE (6) |
| 66 | #define BDK_UCTL_ECC_ERR_SOURCE_E_RAM2_DBE (0xd) |
| 67 | #define BDK_UCTL_ECC_ERR_SOURCE_E_RAM2_SBE (5) |
| 68 | #define BDK_UCTL_ECC_ERR_SOURCE_E_XM_R_DBE (0xa) |
| 69 | #define BDK_UCTL_ECC_ERR_SOURCE_E_XM_R_SBE (2) |
| 70 | #define BDK_UCTL_ECC_ERR_SOURCE_E_XM_W_DBE (9) |
| 71 | #define BDK_UCTL_ECC_ERR_SOURCE_E_XM_W_SBE (1) |
| 72 | |
| 73 | /** |
| 74 | * Enumeration usbh_bar_e |
| 75 | * |
| 76 | * USBH Base Address Register Enumeration |
| 77 | * Enumerates the base address registers. |
| 78 | */ |
| 79 | #define BDK_USBH_BAR_E_USBHX_PF_BAR0(a) (0x868000000000ll + 0x1000000000ll * (a)) |
| 80 | #define BDK_USBH_BAR_E_USBHX_PF_BAR0_SIZE 0x200000ull |
| 81 | #define BDK_USBH_BAR_E_USBHX_PF_BAR4(a) (0x868000200000ll + 0x1000000000ll * (a)) |
| 82 | #define BDK_USBH_BAR_E_USBHX_PF_BAR4_SIZE 0x100000ull |
| 83 | |
| 84 | /** |
| 85 | * Enumeration usbh_int_vec_e |
| 86 | * |
| 87 | * USBH MSI-X Vector Enumeration |
| 88 | * Enumerates the MSI-X interrupt vectors. |
| 89 | */ |
| 90 | #define BDK_USBH_INT_VEC_E_UAHC_IMAN_IP_CN88XXP1_1 (0) |
| 91 | #define BDK_USBH_INT_VEC_E_UAHC_IMAN_IP_CN88XXP1_0 (2) |
| 92 | #define BDK_USBH_INT_VEC_E_UAHC_IMAN_IP_CN88XXP2 (0) |
| 93 | #define BDK_USBH_INT_VEC_E_UAHC_USBSTS_HSE_CN88XXP1_1 (2) |
| 94 | #define BDK_USBH_INT_VEC_E_UAHC_USBSTS_HSE_CN88XXP1_0 (0) |
| 95 | #define BDK_USBH_INT_VEC_E_UAHC_USBSTS_HSE_CN88XXP2 (2) |
| 96 | #define BDK_USBH_INT_VEC_E_UAHC_USBSTS_HSE_CLEAR_CN88XXP1_1 (3) |
| 97 | #define BDK_USBH_INT_VEC_E_UAHC_USBSTS_HSE_CLEAR_CN88XXP1_0 (1) |
| 98 | #define BDK_USBH_INT_VEC_E_UAHC_USBSTS_HSE_CLEAR_CN88XXP2 (3) |
| 99 | #define BDK_USBH_INT_VEC_E_UCTL_INTSTAT_CN88XXP1_1 (1) |
| 100 | #define BDK_USBH_INT_VEC_E_UCTL_INTSTAT_CN88XXP1_0 (3) |
| 101 | #define BDK_USBH_INT_VEC_E_UCTL_INTSTAT_CN88XXP2 (1) |
| 102 | |
| 103 | /** |
| 104 | * Register (NCB) usbh#_msix_pba# |
| 105 | * |
| 106 | * USBH MSI-X Pending Bit Array Registers |
| 107 | * This register is the MSI-X PBA table, the bit number is indexed by the USBH_INT_VEC_E enumeration. |
| 108 | */ |
| 109 | union bdk_usbhx_msix_pbax |
| 110 | { |
| 111 | uint64_t u; |
| 112 | struct bdk_usbhx_msix_pbax_s |
| 113 | { |
| 114 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 115 | uint64_t pend : 64; /**< [ 63: 0](RO/H) Pending message for the associated USBH_MSIX_VEC()_CTL, enumerated by USBH_INT_VEC_E. |
| 116 | Bits that have no associated USBH_INT_VEC_E are zero. */ |
| 117 | #else /* Word 0 - Little Endian */ |
| 118 | uint64_t pend : 64; /**< [ 63: 0](RO/H) Pending message for the associated USBH_MSIX_VEC()_CTL, enumerated by USBH_INT_VEC_E. |
| 119 | Bits that have no associated USBH_INT_VEC_E are zero. */ |
| 120 | #endif /* Word 0 - End */ |
| 121 | } s; |
| 122 | /* struct bdk_usbhx_msix_pbax_s cn; */ |
| 123 | }; |
| 124 | typedef union bdk_usbhx_msix_pbax bdk_usbhx_msix_pbax_t; |
| 125 | |
| 126 | static inline uint64_t BDK_USBHX_MSIX_PBAX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 127 | static inline uint64_t BDK_USBHX_MSIX_PBAX(unsigned long a, unsigned long b) |
| 128 | { |
| 129 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==0))) |
| 130 | return 0x8680002f0000ll + 0x1000000000ll * ((a) & 0x1) + 8ll * ((b) & 0x0); |
| 131 | __bdk_csr_fatal("USBHX_MSIX_PBAX", 2, a, b, 0, 0); |
| 132 | } |
| 133 | |
| 134 | #define typedef_BDK_USBHX_MSIX_PBAX(a,b) bdk_usbhx_msix_pbax_t |
| 135 | #define bustype_BDK_USBHX_MSIX_PBAX(a,b) BDK_CSR_TYPE_NCB |
| 136 | #define basename_BDK_USBHX_MSIX_PBAX(a,b) "USBHX_MSIX_PBAX" |
| 137 | #define device_bar_BDK_USBHX_MSIX_PBAX(a,b) 0x4 /* PF_BAR4 */ |
| 138 | #define busnum_BDK_USBHX_MSIX_PBAX(a,b) (a) |
| 139 | #define arguments_BDK_USBHX_MSIX_PBAX(a,b) (a),(b),-1,-1 |
| 140 | |
| 141 | /** |
| 142 | * Register (NCB) usbh#_msix_vec#_addr |
| 143 | * |
| 144 | * USBH MSI-X Vector Table Address Registers |
| 145 | * This register is the MSI-X vector table, indexed by the USBH_INT_VEC_E enumeration. |
| 146 | */ |
| 147 | union bdk_usbhx_msix_vecx_addr |
| 148 | { |
| 149 | uint64_t u; |
| 150 | struct bdk_usbhx_msix_vecx_addr_s |
| 151 | { |
| 152 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 153 | uint64_t reserved_49_63 : 15; |
| 154 | uint64_t addr : 47; /**< [ 48: 2](R/W) IOVA to use for MSI-X delivery of this vector. */ |
| 155 | uint64_t reserved_1 : 1; |
| 156 | uint64_t secvec : 1; /**< [ 0: 0](SR/W) Secure vector. |
| 157 | 0 = This vector may be read or written by either secure or nonsecure states. |
| 158 | 1 = This vector's USBH()_MSIX_VEC()_ADDR, USBH()_MSIX_VEC()_CTL, and |
| 159 | corresponding |
| 160 | bit of USBH()_MSIX_PBA() are RAZ/WI and does not cause a fault when accessed |
| 161 | by the nonsecure world. |
| 162 | |
| 163 | If PCCPF_USBH()_VSEC_SCTL[MSIX_SEC] (for documentation, see |
| 164 | PCCPF_XXX_VSEC_SCTL[MSIX_SEC]) is |
| 165 | set, all vectors are secure and function as if [SECVEC] was set. */ |
| 166 | #else /* Word 0 - Little Endian */ |
| 167 | uint64_t secvec : 1; /**< [ 0: 0](SR/W) Secure vector. |
| 168 | 0 = This vector may be read or written by either secure or nonsecure states. |
| 169 | 1 = This vector's USBH()_MSIX_VEC()_ADDR, USBH()_MSIX_VEC()_CTL, and |
| 170 | corresponding |
| 171 | bit of USBH()_MSIX_PBA() are RAZ/WI and does not cause a fault when accessed |
| 172 | by the nonsecure world. |
| 173 | |
| 174 | If PCCPF_USBH()_VSEC_SCTL[MSIX_SEC] (for documentation, see |
| 175 | PCCPF_XXX_VSEC_SCTL[MSIX_SEC]) is |
| 176 | set, all vectors are secure and function as if [SECVEC] was set. */ |
| 177 | uint64_t reserved_1 : 1; |
| 178 | uint64_t addr : 47; /**< [ 48: 2](R/W) IOVA to use for MSI-X delivery of this vector. */ |
| 179 | uint64_t reserved_49_63 : 15; |
| 180 | #endif /* Word 0 - End */ |
| 181 | } s; |
| 182 | /* struct bdk_usbhx_msix_vecx_addr_s cn; */ |
| 183 | }; |
| 184 | typedef union bdk_usbhx_msix_vecx_addr bdk_usbhx_msix_vecx_addr_t; |
| 185 | |
| 186 | static inline uint64_t BDK_USBHX_MSIX_VECX_ADDR(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 187 | static inline uint64_t BDK_USBHX_MSIX_VECX_ADDR(unsigned long a, unsigned long b) |
| 188 | { |
| 189 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b<=3))) |
| 190 | return 0x868000200000ll + 0x1000000000ll * ((a) & 0x1) + 0x10ll * ((b) & 0x3); |
| 191 | __bdk_csr_fatal("USBHX_MSIX_VECX_ADDR", 2, a, b, 0, 0); |
| 192 | } |
| 193 | |
| 194 | #define typedef_BDK_USBHX_MSIX_VECX_ADDR(a,b) bdk_usbhx_msix_vecx_addr_t |
| 195 | #define bustype_BDK_USBHX_MSIX_VECX_ADDR(a,b) BDK_CSR_TYPE_NCB |
| 196 | #define basename_BDK_USBHX_MSIX_VECX_ADDR(a,b) "USBHX_MSIX_VECX_ADDR" |
| 197 | #define device_bar_BDK_USBHX_MSIX_VECX_ADDR(a,b) 0x4 /* PF_BAR4 */ |
| 198 | #define busnum_BDK_USBHX_MSIX_VECX_ADDR(a,b) (a) |
| 199 | #define arguments_BDK_USBHX_MSIX_VECX_ADDR(a,b) (a),(b),-1,-1 |
| 200 | |
| 201 | /** |
| 202 | * Register (NCB) usbh#_msix_vec#_ctl |
| 203 | * |
| 204 | * USBH MSI-X Vector Table Control and Data Registers |
| 205 | * This register is the MSI-X vector table, indexed by the USBH_INT_VEC_E enumeration. |
| 206 | */ |
| 207 | union bdk_usbhx_msix_vecx_ctl |
| 208 | { |
| 209 | uint64_t u; |
| 210 | struct bdk_usbhx_msix_vecx_ctl_s |
| 211 | { |
| 212 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 213 | uint64_t reserved_33_63 : 31; |
| 214 | uint64_t mask : 1; /**< [ 32: 32](R/W) When set, no MSI-X interrupts will be sent to this vector. */ |
| 215 | uint64_t reserved_20_31 : 12; |
| 216 | uint64_t data : 20; /**< [ 19: 0](R/W) Data to use for MSI-X delivery of this vector. */ |
| 217 | #else /* Word 0 - Little Endian */ |
| 218 | uint64_t data : 20; /**< [ 19: 0](R/W) Data to use for MSI-X delivery of this vector. */ |
| 219 | uint64_t reserved_20_31 : 12; |
| 220 | uint64_t mask : 1; /**< [ 32: 32](R/W) When set, no MSI-X interrupts will be sent to this vector. */ |
| 221 | uint64_t reserved_33_63 : 31; |
| 222 | #endif /* Word 0 - End */ |
| 223 | } s; |
| 224 | /* struct bdk_usbhx_msix_vecx_ctl_s cn; */ |
| 225 | }; |
| 226 | typedef union bdk_usbhx_msix_vecx_ctl bdk_usbhx_msix_vecx_ctl_t; |
| 227 | |
| 228 | static inline uint64_t BDK_USBHX_MSIX_VECX_CTL(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 229 | static inline uint64_t BDK_USBHX_MSIX_VECX_CTL(unsigned long a, unsigned long b) |
| 230 | { |
| 231 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b<=3))) |
| 232 | return 0x868000200008ll + 0x1000000000ll * ((a) & 0x1) + 0x10ll * ((b) & 0x3); |
| 233 | __bdk_csr_fatal("USBHX_MSIX_VECX_CTL", 2, a, b, 0, 0); |
| 234 | } |
| 235 | |
| 236 | #define typedef_BDK_USBHX_MSIX_VECX_CTL(a,b) bdk_usbhx_msix_vecx_ctl_t |
| 237 | #define bustype_BDK_USBHX_MSIX_VECX_CTL(a,b) BDK_CSR_TYPE_NCB |
| 238 | #define basename_BDK_USBHX_MSIX_VECX_CTL(a,b) "USBHX_MSIX_VECX_CTL" |
| 239 | #define device_bar_BDK_USBHX_MSIX_VECX_CTL(a,b) 0x4 /* PF_BAR4 */ |
| 240 | #define busnum_BDK_USBHX_MSIX_VECX_CTL(a,b) (a) |
| 241 | #define arguments_BDK_USBHX_MSIX_VECX_CTL(a,b) (a),(b),-1,-1 |
| 242 | |
| 243 | /** |
| 244 | * Register (NCB32b) usbh#_uahc_caplength |
| 245 | * |
| 246 | * XHCI Capability Length Register |
| 247 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.3.1. |
| 248 | */ |
| 249 | union bdk_usbhx_uahc_caplength |
| 250 | { |
| 251 | uint32_t u; |
| 252 | struct bdk_usbhx_uahc_caplength_s |
| 253 | { |
| 254 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 255 | uint32_t hciversion : 16; /**< [ 31: 16](RO) Host controller interface version number. */ |
| 256 | uint32_t reserved_8_15 : 8; |
| 257 | uint32_t caplength : 8; /**< [ 7: 0](RO) Capability registers length. */ |
| 258 | #else /* Word 0 - Little Endian */ |
| 259 | uint32_t caplength : 8; /**< [ 7: 0](RO) Capability registers length. */ |
| 260 | uint32_t reserved_8_15 : 8; |
| 261 | uint32_t hciversion : 16; /**< [ 31: 16](RO) Host controller interface version number. */ |
| 262 | #endif /* Word 0 - End */ |
| 263 | } s; |
| 264 | /* struct bdk_usbhx_uahc_caplength_s cn; */ |
| 265 | }; |
| 266 | typedef union bdk_usbhx_uahc_caplength bdk_usbhx_uahc_caplength_t; |
| 267 | |
| 268 | static inline uint64_t BDK_USBHX_UAHC_CAPLENGTH(unsigned long a) __attribute__ ((pure, always_inline)); |
| 269 | static inline uint64_t BDK_USBHX_UAHC_CAPLENGTH(unsigned long a) |
| 270 | { |
| 271 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 272 | return 0x868000000000ll + 0x1000000000ll * ((a) & 0x1); |
| 273 | __bdk_csr_fatal("USBHX_UAHC_CAPLENGTH", 1, a, 0, 0, 0); |
| 274 | } |
| 275 | |
| 276 | #define typedef_BDK_USBHX_UAHC_CAPLENGTH(a) bdk_usbhx_uahc_caplength_t |
| 277 | #define bustype_BDK_USBHX_UAHC_CAPLENGTH(a) BDK_CSR_TYPE_NCB32b |
| 278 | #define basename_BDK_USBHX_UAHC_CAPLENGTH(a) "USBHX_UAHC_CAPLENGTH" |
| 279 | #define device_bar_BDK_USBHX_UAHC_CAPLENGTH(a) 0x0 /* PF_BAR0 */ |
| 280 | #define busnum_BDK_USBHX_UAHC_CAPLENGTH(a) (a) |
| 281 | #define arguments_BDK_USBHX_UAHC_CAPLENGTH(a) (a),-1,-1,-1 |
| 282 | |
| 283 | /** |
| 284 | * Register (NCB32b) usbh#_uahc_config |
| 285 | * |
| 286 | * XHCI Configuration Register |
| 287 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.4.7. |
| 288 | * |
| 289 | * This register can be reset by NCB reset, |
| 290 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 291 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 292 | * or USBH()_UAHC_USBCMD[HCRST], or USBH()_UAHC_USBCMD[LHCRST]. |
| 293 | */ |
| 294 | union bdk_usbhx_uahc_config |
| 295 | { |
| 296 | uint32_t u; |
| 297 | struct bdk_usbhx_uahc_config_s |
| 298 | { |
| 299 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 300 | uint32_t reserved_8_31 : 24; |
| 301 | uint32_t maxslotsen : 8; /**< [ 7: 0](R/W) Maximum device slots enabled. */ |
| 302 | #else /* Word 0 - Little Endian */ |
| 303 | uint32_t maxslotsen : 8; /**< [ 7: 0](R/W) Maximum device slots enabled. */ |
| 304 | uint32_t reserved_8_31 : 24; |
| 305 | #endif /* Word 0 - End */ |
| 306 | } s; |
| 307 | /* struct bdk_usbhx_uahc_config_s cn; */ |
| 308 | }; |
| 309 | typedef union bdk_usbhx_uahc_config bdk_usbhx_uahc_config_t; |
| 310 | |
| 311 | static inline uint64_t BDK_USBHX_UAHC_CONFIG(unsigned long a) __attribute__ ((pure, always_inline)); |
| 312 | static inline uint64_t BDK_USBHX_UAHC_CONFIG(unsigned long a) |
| 313 | { |
| 314 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 315 | return 0x868000000058ll + 0x1000000000ll * ((a) & 0x1); |
| 316 | __bdk_csr_fatal("USBHX_UAHC_CONFIG", 1, a, 0, 0, 0); |
| 317 | } |
| 318 | |
| 319 | #define typedef_BDK_USBHX_UAHC_CONFIG(a) bdk_usbhx_uahc_config_t |
| 320 | #define bustype_BDK_USBHX_UAHC_CONFIG(a) BDK_CSR_TYPE_NCB32b |
| 321 | #define basename_BDK_USBHX_UAHC_CONFIG(a) "USBHX_UAHC_CONFIG" |
| 322 | #define device_bar_BDK_USBHX_UAHC_CONFIG(a) 0x0 /* PF_BAR0 */ |
| 323 | #define busnum_BDK_USBHX_UAHC_CONFIG(a) (a) |
| 324 | #define arguments_BDK_USBHX_UAHC_CONFIG(a) (a),-1,-1,-1 |
| 325 | |
| 326 | /** |
| 327 | * Register (NCB) usbh#_uahc_crcr |
| 328 | * |
| 329 | * XHCI Command Ring Control Register |
| 330 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.4.5. |
| 331 | * |
| 332 | * This register can be reset by NCB reset, |
| 333 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 334 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 335 | * or USBH()_UAHC_USBCMD[HCRST], or USBH()_UAHC_USBCMD[LHCRST]. |
| 336 | */ |
| 337 | union bdk_usbhx_uahc_crcr |
| 338 | { |
| 339 | uint64_t u; |
| 340 | struct bdk_usbhx_uahc_crcr_s |
| 341 | { |
| 342 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 343 | uint64_t cmd_ring_ptr : 58; /**< [ 63: 6](WO) Command ring pointer. */ |
| 344 | uint64_t reserved_4_5 : 2; |
| 345 | uint64_t crr : 1; /**< [ 3: 3](RO/H) Command ring running. */ |
| 346 | uint64_t ca : 1; /**< [ 2: 2](WO) Command abort. */ |
| 347 | uint64_t cs : 1; /**< [ 1: 1](WO) Command stop. */ |
| 348 | uint64_t rcs : 1; /**< [ 0: 0](WO) Ring cycle state. */ |
| 349 | #else /* Word 0 - Little Endian */ |
| 350 | uint64_t rcs : 1; /**< [ 0: 0](WO) Ring cycle state. */ |
| 351 | uint64_t cs : 1; /**< [ 1: 1](WO) Command stop. */ |
| 352 | uint64_t ca : 1; /**< [ 2: 2](WO) Command abort. */ |
| 353 | uint64_t crr : 1; /**< [ 3: 3](RO/H) Command ring running. */ |
| 354 | uint64_t reserved_4_5 : 2; |
| 355 | uint64_t cmd_ring_ptr : 58; /**< [ 63: 6](WO) Command ring pointer. */ |
| 356 | #endif /* Word 0 - End */ |
| 357 | } s; |
| 358 | /* struct bdk_usbhx_uahc_crcr_s cn; */ |
| 359 | }; |
| 360 | typedef union bdk_usbhx_uahc_crcr bdk_usbhx_uahc_crcr_t; |
| 361 | |
| 362 | static inline uint64_t BDK_USBHX_UAHC_CRCR(unsigned long a) __attribute__ ((pure, always_inline)); |
| 363 | static inline uint64_t BDK_USBHX_UAHC_CRCR(unsigned long a) |
| 364 | { |
| 365 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 366 | return 0x868000000038ll + 0x1000000000ll * ((a) & 0x1); |
| 367 | __bdk_csr_fatal("USBHX_UAHC_CRCR", 1, a, 0, 0, 0); |
| 368 | } |
| 369 | |
| 370 | #define typedef_BDK_USBHX_UAHC_CRCR(a) bdk_usbhx_uahc_crcr_t |
| 371 | #define bustype_BDK_USBHX_UAHC_CRCR(a) BDK_CSR_TYPE_NCB |
| 372 | #define basename_BDK_USBHX_UAHC_CRCR(a) "USBHX_UAHC_CRCR" |
| 373 | #define device_bar_BDK_USBHX_UAHC_CRCR(a) 0x0 /* PF_BAR0 */ |
| 374 | #define busnum_BDK_USBHX_UAHC_CRCR(a) (a) |
| 375 | #define arguments_BDK_USBHX_UAHC_CRCR(a) (a),-1,-1,-1 |
| 376 | |
| 377 | /** |
| 378 | * Register (NCB32b) usbh#_uahc_db# |
| 379 | * |
| 380 | * XHCI Doorbell Registers |
| 381 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.6. |
| 382 | * |
| 383 | * This register can be reset by NCB reset, |
| 384 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 385 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 386 | * or USBH()_UAHC_USBCMD[HCRST], or USBH()_UAHC_USBCMD[LHCRST]. |
| 387 | * |
| 388 | * Internal: |
| 389 | * xHCI spec, page 32: there are USBH()_UAHC_HCSPARAMS1[MAXSLOTS]+1 doorbell registers. |
| 390 | */ |
| 391 | union bdk_usbhx_uahc_dbx |
| 392 | { |
| 393 | uint32_t u; |
| 394 | struct bdk_usbhx_uahc_dbx_s |
| 395 | { |
| 396 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 397 | uint32_t dbstreamid : 16; /**< [ 31: 16](WO) Doorbell stream ID. */ |
| 398 | uint32_t reserved_8_15 : 8; |
| 399 | uint32_t dbtarget : 8; /**< [ 7: 0](WO) Doorbell target. */ |
| 400 | #else /* Word 0 - Little Endian */ |
| 401 | uint32_t dbtarget : 8; /**< [ 7: 0](WO) Doorbell target. */ |
| 402 | uint32_t reserved_8_15 : 8; |
| 403 | uint32_t dbstreamid : 16; /**< [ 31: 16](WO) Doorbell stream ID. */ |
| 404 | #endif /* Word 0 - End */ |
| 405 | } s; |
| 406 | /* struct bdk_usbhx_uahc_dbx_s cn; */ |
| 407 | }; |
| 408 | typedef union bdk_usbhx_uahc_dbx bdk_usbhx_uahc_dbx_t; |
| 409 | |
| 410 | static inline uint64_t BDK_USBHX_UAHC_DBX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 411 | static inline uint64_t BDK_USBHX_UAHC_DBX(unsigned long a, unsigned long b) |
| 412 | { |
| 413 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b<=64))) |
| 414 | return 0x868000000480ll + 0x1000000000ll * ((a) & 0x1) + 4ll * ((b) & 0x7f); |
| 415 | __bdk_csr_fatal("USBHX_UAHC_DBX", 2, a, b, 0, 0); |
| 416 | } |
| 417 | |
| 418 | #define typedef_BDK_USBHX_UAHC_DBX(a,b) bdk_usbhx_uahc_dbx_t |
| 419 | #define bustype_BDK_USBHX_UAHC_DBX(a,b) BDK_CSR_TYPE_NCB32b |
| 420 | #define basename_BDK_USBHX_UAHC_DBX(a,b) "USBHX_UAHC_DBX" |
| 421 | #define device_bar_BDK_USBHX_UAHC_DBX(a,b) 0x0 /* PF_BAR0 */ |
| 422 | #define busnum_BDK_USBHX_UAHC_DBX(a,b) (a) |
| 423 | #define arguments_BDK_USBHX_UAHC_DBX(a,b) (a),(b),-1,-1 |
| 424 | |
| 425 | /** |
| 426 | * Register (NCB32b) usbh#_uahc_dboff |
| 427 | * |
| 428 | * XHCI Doorbell Array Offset Register |
| 429 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.3.7. |
| 430 | */ |
| 431 | union bdk_usbhx_uahc_dboff |
| 432 | { |
| 433 | uint32_t u; |
| 434 | struct bdk_usbhx_uahc_dboff_s |
| 435 | { |
| 436 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 437 | uint32_t dboff : 30; /**< [ 31: 2](RO) Doorbell array offset. */ |
| 438 | uint32_t reserved_0_1 : 2; |
| 439 | #else /* Word 0 - Little Endian */ |
| 440 | uint32_t reserved_0_1 : 2; |
| 441 | uint32_t dboff : 30; /**< [ 31: 2](RO) Doorbell array offset. */ |
| 442 | #endif /* Word 0 - End */ |
| 443 | } s; |
| 444 | /* struct bdk_usbhx_uahc_dboff_s cn; */ |
| 445 | }; |
| 446 | typedef union bdk_usbhx_uahc_dboff bdk_usbhx_uahc_dboff_t; |
| 447 | |
| 448 | static inline uint64_t BDK_USBHX_UAHC_DBOFF(unsigned long a) __attribute__ ((pure, always_inline)); |
| 449 | static inline uint64_t BDK_USBHX_UAHC_DBOFF(unsigned long a) |
| 450 | { |
| 451 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 452 | return 0x868000000014ll + 0x1000000000ll * ((a) & 0x1); |
| 453 | __bdk_csr_fatal("USBHX_UAHC_DBOFF", 1, a, 0, 0, 0); |
| 454 | } |
| 455 | |
| 456 | #define typedef_BDK_USBHX_UAHC_DBOFF(a) bdk_usbhx_uahc_dboff_t |
| 457 | #define bustype_BDK_USBHX_UAHC_DBOFF(a) BDK_CSR_TYPE_NCB32b |
| 458 | #define basename_BDK_USBHX_UAHC_DBOFF(a) "USBHX_UAHC_DBOFF" |
| 459 | #define device_bar_BDK_USBHX_UAHC_DBOFF(a) 0x0 /* PF_BAR0 */ |
| 460 | #define busnum_BDK_USBHX_UAHC_DBOFF(a) (a) |
| 461 | #define arguments_BDK_USBHX_UAHC_DBOFF(a) (a),-1,-1,-1 |
| 462 | |
| 463 | /** |
| 464 | * Register (NCB) usbh#_uahc_dcbaap |
| 465 | * |
| 466 | * XHCI Device Context Base-Address-Array Pointer Register |
| 467 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.4.6. |
| 468 | * |
| 469 | * This register can be reset by NCB reset, |
| 470 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 471 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 472 | * or USBH()_UAHC_USBCMD[HCRST], or USBH()_UAHC_USBCMD[LHCRST]. |
| 473 | */ |
| 474 | union bdk_usbhx_uahc_dcbaap |
| 475 | { |
| 476 | uint64_t u; |
| 477 | struct bdk_usbhx_uahc_dcbaap_s |
| 478 | { |
| 479 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 480 | uint64_t dcbaap : 58; /**< [ 63: 6](R/W) Device context base address array pointer. */ |
| 481 | uint64_t reserved_0_5 : 6; |
| 482 | #else /* Word 0 - Little Endian */ |
| 483 | uint64_t reserved_0_5 : 6; |
| 484 | uint64_t dcbaap : 58; /**< [ 63: 6](R/W) Device context base address array pointer. */ |
| 485 | #endif /* Word 0 - End */ |
| 486 | } s; |
| 487 | /* struct bdk_usbhx_uahc_dcbaap_s cn; */ |
| 488 | }; |
| 489 | typedef union bdk_usbhx_uahc_dcbaap bdk_usbhx_uahc_dcbaap_t; |
| 490 | |
| 491 | static inline uint64_t BDK_USBHX_UAHC_DCBAAP(unsigned long a) __attribute__ ((pure, always_inline)); |
| 492 | static inline uint64_t BDK_USBHX_UAHC_DCBAAP(unsigned long a) |
| 493 | { |
| 494 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 495 | return 0x868000000050ll + 0x1000000000ll * ((a) & 0x1); |
| 496 | __bdk_csr_fatal("USBHX_UAHC_DCBAAP", 1, a, 0, 0, 0); |
| 497 | } |
| 498 | |
| 499 | #define typedef_BDK_USBHX_UAHC_DCBAAP(a) bdk_usbhx_uahc_dcbaap_t |
| 500 | #define bustype_BDK_USBHX_UAHC_DCBAAP(a) BDK_CSR_TYPE_NCB |
| 501 | #define basename_BDK_USBHX_UAHC_DCBAAP(a) "USBHX_UAHC_DCBAAP" |
| 502 | #define device_bar_BDK_USBHX_UAHC_DCBAAP(a) 0x0 /* PF_BAR0 */ |
| 503 | #define busnum_BDK_USBHX_UAHC_DCBAAP(a) (a) |
| 504 | #define arguments_BDK_USBHX_UAHC_DCBAAP(a) (a),-1,-1,-1 |
| 505 | |
| 506 | /** |
| 507 | * Register (NCB32b) usbh#_uahc_dnctrl |
| 508 | * |
| 509 | * XHCI Device Notification Control Register |
| 510 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.4.4. |
| 511 | * |
| 512 | * This register can be reset by NCB reset, |
| 513 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 514 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 515 | * or USBH()_UAHC_USBCMD[HCRST], or USBH()_UAHC_USBCMD[LHCRST]. |
| 516 | */ |
| 517 | union bdk_usbhx_uahc_dnctrl |
| 518 | { |
| 519 | uint32_t u; |
| 520 | struct bdk_usbhx_uahc_dnctrl_s |
| 521 | { |
| 522 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 523 | uint32_t reserved_16_31 : 16; |
| 524 | uint32_t n : 16; /**< [ 15: 0](R/W) Notification enable. */ |
| 525 | #else /* Word 0 - Little Endian */ |
| 526 | uint32_t n : 16; /**< [ 15: 0](R/W) Notification enable. */ |
| 527 | uint32_t reserved_16_31 : 16; |
| 528 | #endif /* Word 0 - End */ |
| 529 | } s; |
| 530 | /* struct bdk_usbhx_uahc_dnctrl_s cn; */ |
| 531 | }; |
| 532 | typedef union bdk_usbhx_uahc_dnctrl bdk_usbhx_uahc_dnctrl_t; |
| 533 | |
| 534 | static inline uint64_t BDK_USBHX_UAHC_DNCTRL(unsigned long a) __attribute__ ((pure, always_inline)); |
| 535 | static inline uint64_t BDK_USBHX_UAHC_DNCTRL(unsigned long a) |
| 536 | { |
| 537 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 538 | return 0x868000000034ll + 0x1000000000ll * ((a) & 0x1); |
| 539 | __bdk_csr_fatal("USBHX_UAHC_DNCTRL", 1, a, 0, 0, 0); |
| 540 | } |
| 541 | |
| 542 | #define typedef_BDK_USBHX_UAHC_DNCTRL(a) bdk_usbhx_uahc_dnctrl_t |
| 543 | #define bustype_BDK_USBHX_UAHC_DNCTRL(a) BDK_CSR_TYPE_NCB32b |
| 544 | #define basename_BDK_USBHX_UAHC_DNCTRL(a) "USBHX_UAHC_DNCTRL" |
| 545 | #define device_bar_BDK_USBHX_UAHC_DNCTRL(a) 0x0 /* PF_BAR0 */ |
| 546 | #define busnum_BDK_USBHX_UAHC_DNCTRL(a) (a) |
| 547 | #define arguments_BDK_USBHX_UAHC_DNCTRL(a) (a),-1,-1,-1 |
| 548 | |
| 549 | /** |
| 550 | * Register (NCB) usbh#_uahc_erdp# |
| 551 | * |
| 552 | * XHCI Event Ring Dequeue Pointer Register |
| 553 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.5.2.3.3. |
| 554 | * |
| 555 | * This register can be reset by NCB reset, |
| 556 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 557 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 558 | * or USBH()_UAHC_USBCMD[HCRST], or USBH()_UAHC_USBCMD[LHCRST]. |
| 559 | */ |
| 560 | union bdk_usbhx_uahc_erdpx |
| 561 | { |
| 562 | uint64_t u; |
| 563 | struct bdk_usbhx_uahc_erdpx_s |
| 564 | { |
| 565 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 566 | uint64_t erdp : 60; /**< [ 63: 4](R/W) Event ring dequeue pointer bits \<63:4\>. */ |
| 567 | uint64_t ehb : 1; /**< [ 3: 3](R/W1C/H) Event handler busy */ |
| 568 | uint64_t desi : 3; /**< [ 2: 0](R/W) Dequeue ERST segment index. */ |
| 569 | #else /* Word 0 - Little Endian */ |
| 570 | uint64_t desi : 3; /**< [ 2: 0](R/W) Dequeue ERST segment index. */ |
| 571 | uint64_t ehb : 1; /**< [ 3: 3](R/W1C/H) Event handler busy */ |
| 572 | uint64_t erdp : 60; /**< [ 63: 4](R/W) Event ring dequeue pointer bits \<63:4\>. */ |
| 573 | #endif /* Word 0 - End */ |
| 574 | } s; |
| 575 | /* struct bdk_usbhx_uahc_erdpx_s cn; */ |
| 576 | }; |
| 577 | typedef union bdk_usbhx_uahc_erdpx bdk_usbhx_uahc_erdpx_t; |
| 578 | |
| 579 | static inline uint64_t BDK_USBHX_UAHC_ERDPX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 580 | static inline uint64_t BDK_USBHX_UAHC_ERDPX(unsigned long a, unsigned long b) |
| 581 | { |
| 582 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==0))) |
| 583 | return 0x868000000478ll + 0x1000000000ll * ((a) & 0x1) + 0ll * ((b) & 0x0); |
| 584 | __bdk_csr_fatal("USBHX_UAHC_ERDPX", 2, a, b, 0, 0); |
| 585 | } |
| 586 | |
| 587 | #define typedef_BDK_USBHX_UAHC_ERDPX(a,b) bdk_usbhx_uahc_erdpx_t |
| 588 | #define bustype_BDK_USBHX_UAHC_ERDPX(a,b) BDK_CSR_TYPE_NCB |
| 589 | #define basename_BDK_USBHX_UAHC_ERDPX(a,b) "USBHX_UAHC_ERDPX" |
| 590 | #define device_bar_BDK_USBHX_UAHC_ERDPX(a,b) 0x0 /* PF_BAR0 */ |
| 591 | #define busnum_BDK_USBHX_UAHC_ERDPX(a,b) (a) |
| 592 | #define arguments_BDK_USBHX_UAHC_ERDPX(a,b) (a),(b),-1,-1 |
| 593 | |
| 594 | /** |
| 595 | * Register (NCB) usbh#_uahc_erstba# |
| 596 | * |
| 597 | * XHCI Event-Ring Segment-Table Base-Address Register |
| 598 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.5.2.3.2. |
| 599 | * |
| 600 | * This register can be reset by NCB reset, |
| 601 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 602 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 603 | * or USBH()_UAHC_USBCMD[HCRST], or USBH()_UAHC_USBCMD[LHCRST]. |
| 604 | */ |
| 605 | union bdk_usbhx_uahc_erstbax |
| 606 | { |
| 607 | uint64_t u; |
| 608 | struct bdk_usbhx_uahc_erstbax_s |
| 609 | { |
| 610 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 611 | uint64_t erstba : 58; /**< [ 63: 6](R/W) Event-ring segment-table base-address bits\<63:6\>. */ |
| 612 | uint64_t reserved_0_5 : 6; |
| 613 | #else /* Word 0 - Little Endian */ |
| 614 | uint64_t reserved_0_5 : 6; |
| 615 | uint64_t erstba : 58; /**< [ 63: 6](R/W) Event-ring segment-table base-address bits\<63:6\>. */ |
| 616 | #endif /* Word 0 - End */ |
| 617 | } s; |
| 618 | /* struct bdk_usbhx_uahc_erstbax_s cn; */ |
| 619 | }; |
| 620 | typedef union bdk_usbhx_uahc_erstbax bdk_usbhx_uahc_erstbax_t; |
| 621 | |
| 622 | static inline uint64_t BDK_USBHX_UAHC_ERSTBAX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 623 | static inline uint64_t BDK_USBHX_UAHC_ERSTBAX(unsigned long a, unsigned long b) |
| 624 | { |
| 625 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==0))) |
| 626 | return 0x868000000470ll + 0x1000000000ll * ((a) & 0x1) + 0ll * ((b) & 0x0); |
| 627 | __bdk_csr_fatal("USBHX_UAHC_ERSTBAX", 2, a, b, 0, 0); |
| 628 | } |
| 629 | |
| 630 | #define typedef_BDK_USBHX_UAHC_ERSTBAX(a,b) bdk_usbhx_uahc_erstbax_t |
| 631 | #define bustype_BDK_USBHX_UAHC_ERSTBAX(a,b) BDK_CSR_TYPE_NCB |
| 632 | #define basename_BDK_USBHX_UAHC_ERSTBAX(a,b) "USBHX_UAHC_ERSTBAX" |
| 633 | #define device_bar_BDK_USBHX_UAHC_ERSTBAX(a,b) 0x0 /* PF_BAR0 */ |
| 634 | #define busnum_BDK_USBHX_UAHC_ERSTBAX(a,b) (a) |
| 635 | #define arguments_BDK_USBHX_UAHC_ERSTBAX(a,b) (a),(b),-1,-1 |
| 636 | |
| 637 | /** |
| 638 | * Register (NCB32b) usbh#_uahc_erstsz# |
| 639 | * |
| 640 | * XHCI Event-Ring Segment-Table Size Register |
| 641 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.5.2.3.1. |
| 642 | * |
| 643 | * This register can be reset by NCB reset, |
| 644 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 645 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 646 | * or USBH()_UAHC_USBCMD[HCRST], or USBH()_UAHC_USBCMD[LHCRST]. |
| 647 | */ |
| 648 | union bdk_usbhx_uahc_erstszx |
| 649 | { |
| 650 | uint32_t u; |
| 651 | struct bdk_usbhx_uahc_erstszx_s |
| 652 | { |
| 653 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 654 | uint32_t reserved_16_31 : 16; |
| 655 | uint32_t erstsz : 16; /**< [ 15: 0](R/W) Event-ring segment-table size. */ |
| 656 | #else /* Word 0 - Little Endian */ |
| 657 | uint32_t erstsz : 16; /**< [ 15: 0](R/W) Event-ring segment-table size. */ |
| 658 | uint32_t reserved_16_31 : 16; |
| 659 | #endif /* Word 0 - End */ |
| 660 | } s; |
| 661 | /* struct bdk_usbhx_uahc_erstszx_s cn; */ |
| 662 | }; |
| 663 | typedef union bdk_usbhx_uahc_erstszx bdk_usbhx_uahc_erstszx_t; |
| 664 | |
| 665 | static inline uint64_t BDK_USBHX_UAHC_ERSTSZX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 666 | static inline uint64_t BDK_USBHX_UAHC_ERSTSZX(unsigned long a, unsigned long b) |
| 667 | { |
| 668 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==0))) |
| 669 | return 0x868000000468ll + 0x1000000000ll * ((a) & 0x1) + 0ll * ((b) & 0x0); |
| 670 | __bdk_csr_fatal("USBHX_UAHC_ERSTSZX", 2, a, b, 0, 0); |
| 671 | } |
| 672 | |
| 673 | #define typedef_BDK_USBHX_UAHC_ERSTSZX(a,b) bdk_usbhx_uahc_erstszx_t |
| 674 | #define bustype_BDK_USBHX_UAHC_ERSTSZX(a,b) BDK_CSR_TYPE_NCB32b |
| 675 | #define basename_BDK_USBHX_UAHC_ERSTSZX(a,b) "USBHX_UAHC_ERSTSZX" |
| 676 | #define device_bar_BDK_USBHX_UAHC_ERSTSZX(a,b) 0x0 /* PF_BAR0 */ |
| 677 | #define busnum_BDK_USBHX_UAHC_ERSTSZX(a,b) (a) |
| 678 | #define arguments_BDK_USBHX_UAHC_ERSTSZX(a,b) (a),(b),-1,-1 |
| 679 | |
| 680 | /** |
| 681 | * Register (NCB) usbh#_uahc_gbuserraddr |
| 682 | * |
| 683 | * UAHC Bus-Error-Address Register |
| 684 | * When the AXI master bus returns error response, the SoC bus error is generated. In the host |
| 685 | * mode, the host_system_err port indicates this condition. In addition, it is also indicated in |
| 686 | * USBH()_UAHC_USBSTS[HSE]. Due to the nature of AXI, it is possible that multiple AXI |
| 687 | * transactions |
| 688 | * are active at a time. The host controller does not keep track of the start address of all |
| 689 | * outstanding transactions. Instead, it keeps track of the start address of the DMA transfer |
| 690 | * associated with all active transactions. It is this address that is reported in |
| 691 | * USBH()_UAHC_GBUSERRADDR when a bus error occurs. For example, if the host controller initiates |
| 692 | * a DMA |
| 693 | * transfer to write 1 k of packet data starting at buffer address 0xABCD0000, and this DMA is |
| 694 | * broken up into multiple 256 B bursts on the AXI, then if a bus error occurs on any of these |
| 695 | * associated AXI transfers, USBH()_UAHC_GBUSERRADDR reflects the DMA start address of 0xABCD0000 |
| 696 | * regardless of which AXI transaction received the error. |
| 697 | * |
| 698 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 699 | * |
| 700 | * Internal: |
| 701 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.1.12. |
| 702 | */ |
| 703 | union bdk_usbhx_uahc_gbuserraddr |
| 704 | { |
| 705 | uint64_t u; |
| 706 | struct bdk_usbhx_uahc_gbuserraddr_s |
| 707 | { |
| 708 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 709 | uint64_t busaddr : 64; /**< [ 63: 0](RO/H) Bus address. Contains the first bus address that encountered an SoC bus error. It is valid |
| 710 | when the USBH()_UAHC_GSTS[BUSERRADDRVLD] = 1. It can only be cleared by resetting the |
| 711 | core. */ |
| 712 | #else /* Word 0 - Little Endian */ |
| 713 | uint64_t busaddr : 64; /**< [ 63: 0](RO/H) Bus address. Contains the first bus address that encountered an SoC bus error. It is valid |
| 714 | when the USBH()_UAHC_GSTS[BUSERRADDRVLD] = 1. It can only be cleared by resetting the |
| 715 | core. */ |
| 716 | #endif /* Word 0 - End */ |
| 717 | } s; |
| 718 | /* struct bdk_usbhx_uahc_gbuserraddr_s cn; */ |
| 719 | }; |
| 720 | typedef union bdk_usbhx_uahc_gbuserraddr bdk_usbhx_uahc_gbuserraddr_t; |
| 721 | |
| 722 | static inline uint64_t BDK_USBHX_UAHC_GBUSERRADDR(unsigned long a) __attribute__ ((pure, always_inline)); |
| 723 | static inline uint64_t BDK_USBHX_UAHC_GBUSERRADDR(unsigned long a) |
| 724 | { |
| 725 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 726 | return 0x86800000c130ll + 0x1000000000ll * ((a) & 0x1); |
| 727 | __bdk_csr_fatal("USBHX_UAHC_GBUSERRADDR", 1, a, 0, 0, 0); |
| 728 | } |
| 729 | |
| 730 | #define typedef_BDK_USBHX_UAHC_GBUSERRADDR(a) bdk_usbhx_uahc_gbuserraddr_t |
| 731 | #define bustype_BDK_USBHX_UAHC_GBUSERRADDR(a) BDK_CSR_TYPE_NCB |
| 732 | #define basename_BDK_USBHX_UAHC_GBUSERRADDR(a) "USBHX_UAHC_GBUSERRADDR" |
| 733 | #define device_bar_BDK_USBHX_UAHC_GBUSERRADDR(a) 0x0 /* PF_BAR0 */ |
| 734 | #define busnum_BDK_USBHX_UAHC_GBUSERRADDR(a) (a) |
| 735 | #define arguments_BDK_USBHX_UAHC_GBUSERRADDR(a) (a),-1,-1,-1 |
| 736 | |
| 737 | /** |
| 738 | * Register (NCB32b) usbh#_uahc_gctl |
| 739 | * |
| 740 | * UAHC Control Register |
| 741 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 742 | * Internal: |
| 743 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.1.5. |
| 744 | */ |
| 745 | union bdk_usbhx_uahc_gctl |
| 746 | { |
| 747 | uint32_t u; |
| 748 | struct bdk_usbhx_uahc_gctl_s |
| 749 | { |
| 750 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 751 | uint32_t pwrdnscale : 13; /**< [ 31: 19](R/W) Power down scale. The USB3 suspend-clock input replaces pipe3_rx_pclk as a clock source to |
| 752 | a small part of the USB3 core that operates when the SuperSpeed PHY is in its lowest power |
| 753 | (P3) state, and therefore does not provide a clock. This field specifies how many suspend- |
| 754 | clock periods fit into a 16 kHz clock period. When performing the division, round up the |
| 755 | remainder. |
| 756 | |
| 757 | For example, when using an 32-bit PHY and 25-MHz suspend clock, PWRDNSCALE = 25000 kHz/16 |
| 758 | kHz = 1563 (rounded up). |
| 759 | |
| 760 | The minimum suspend-clock frequency is 32 KHz, and maximum suspend-clock frequency is 125 |
| 761 | MHz. |
| 762 | |
| 763 | The LTSSM uses suspend clock for 12-ms and 100-ms timers during suspend mode. According to |
| 764 | the USB 3.0 specification, the accuracy on these timers is 0% to +50%. 12 ms + 0~+50% |
| 765 | accuracy = 18 ms (Range is 12 ms - 18 ms) |
| 766 | 100 ms + 0~+50% accuracy = 150 ms (Range is 100 ms - 150 ms). |
| 767 | |
| 768 | The suspend clock accuracy requirement is: |
| 769 | _ (12,000/62.5) * (GCTL[31:19]) * actual suspend_clk_period should be between 12,000 and |
| 770 | 18,000 |
| 771 | _ (100,000/62.5) * (GCTL[31:19]) * actual suspend_clk_period should be between 100,000 and |
| 772 | 150,000 |
| 773 | |
| 774 | For example, if your suspend_clk frequency varies from 7.5 MHz to 10.5 MHz, then the value |
| 775 | needs to programmed is: power down scale = 10500/16 = 657 (rounded up; and fastest |
| 776 | frequency used). */ |
| 777 | uint32_t masterfiltbypass : 1; /**< [ 18: 18](R/W) Master filter bypass. Not relevant for Cavium's configuration. */ |
| 778 | uint32_t reserved_16_17 : 2; |
| 779 | uint32_t frmscldwn : 2; /**< [ 15: 14](R/W) Frame scale down. Scales down device view of a SOF/USOF/ITP duration. |
| 780 | For SuperSpeed/high-speed mode: |
| 781 | 0x0 = Interval is 125 us. |
| 782 | 0x1 = Interval is 62.5 us. |
| 783 | 0x2 = Interval is 31.25 us. |
| 784 | 0x3 = Interval is 15.625 us. |
| 785 | |
| 786 | For full speed mode, the scale down value is multiplied by 8. */ |
| 787 | uint32_t prtcapdir : 2; /**< [ 13: 12](R/W) Port capability direction. Always keep set to 0x1. */ |
| 788 | uint32_t coresoftreset : 1; /**< [ 11: 11](R/W) Core soft reset: 1 = soft reset to core, 0 = no soft reset. |
| 789 | Clears the interrupts and all the USBH()_UAHC_* CSRs except the |
| 790 | following registers: USBH()_UAHC_GCTL, USBH()_UAHC_GUCTL, USBH()_UAHC_GSTS, |
| 791 | USBH()_UAHC_GRLSID, USBH()_UAHC_GGPIO, USBH()_UAHC_GUID, USBH()_UAHC_GUSB2PHYCFG(), |
| 792 | USBH()_UAHC_GUSB3PIPECTL(). |
| 793 | |
| 794 | When you reset PHYs (using USBH()_UAHC_GUSB2PHYCFG() or USBH()_UAHC_GUSB3PIPECTL()), you |
| 795 | must keep the |
| 796 | core in reset state until PHY clocks are stable. This controls the bus, RAM, and MAC |
| 797 | domain resets. |
| 798 | |
| 799 | Internal: |
| 800 | Refer to Reset Generation on Synopsys Databook page 250. |
| 801 | Under soft reset, accesses to USBH()_UAHC_* CSRs other than USBH()_UAHC_GCTL may fail |
| 802 | (timeout). |
| 803 | This bit is for debug purposes only. Use USBH()_UAHC_USBCMD[HCRST] for soft reset. */ |
| 804 | uint32_t sofitpsync : 1; /**< [ 10: 10](R/W) Synchronize ITP to reference clock. In host mode, if this bit is set to: |
| 805 | 0 = The core keeps the UTMI/ULPI PHY on the first port in non-suspended state whenever |
| 806 | there is a SuperSpeed port that is not in Rx.Detect, SS.Disable, and U3 state. |
| 807 | 1 = The core keeps the UTMI/ULPI PHY on the first port in non-suspended state whenever the |
| 808 | other non-SuperSpeed ports are not in suspended state. |
| 809 | |
| 810 | This feature is useful because it saves power by suspending UTMI/ULPI when SuperSpeed only |
| 811 | is active and it helps resolve when the PHY does not transmit a host resume unless it is |
| 812 | placed in suspend state. |
| 813 | USBH()_UAHC_GUSB2PHYCFG()[SUSPHY] eventually decides to put the UTMI/ULPI PHY in to |
| 814 | suspend |
| 815 | state. In addition, when this bit is set to 1, the core generates ITP off of the REF_CLK- |
| 816 | based counter. Otherwise, ITP and SOF are generated off of UTMI/ULPI_CLK[0] based counter. |
| 817 | |
| 818 | To program the reference clock period inside the core, refer to |
| 819 | USBH()_UAHC_GUCTL[REFCLKPER]. |
| 820 | |
| 821 | If you do not plan to ever use this feature or the |
| 822 | USBH()_UAHC_GFLADJ[GFLADJ_REFCLK_LPM_SEL] |
| 823 | feature, the minimum frequency for the ref_clk can be as low as 32 KHz. You can connect |
| 824 | the |
| 825 | SUSPEND_CLK (as low as 32 KHz) to REF_CLK. |
| 826 | |
| 827 | If you plan to enable hardware-based LPM (PORTPMSC[HLE] = 1), this feature cannot be used. |
| 828 | Turn off this feature by setting this bit to zero and use the |
| 829 | USBH()_UAHC_GFLADJ[GFLADJ_REFCLK_LPM_SEL] feature. |
| 830 | |
| 831 | If you set this bit to 1, the USBH()_UAHC_GUSB2PHYCFG() [U2_FREECLK_EXISTS] bit |
| 832 | must be set to 0. */ |
| 833 | uint32_t u1u2timerscale : 1; /**< [ 9: 9](R/W) Disable U1/U2 timer scaledown. If set to 1, along with SCALEDOWN = 0x1, disables the scale |
| 834 | down of U1/U2 inactive timer values. |
| 835 | This is for simulation mode only. */ |
| 836 | uint32_t debugattach : 1; /**< [ 8: 8](R/W) Debug attach. When this bit is set: |
| 837 | * SuperSpeed link proceeds directly to the polling-link state (USBH()_UAHC_DCTL[RS] = 1) |
| 838 | without checking remote termination. |
| 839 | * Link LFPS polling timeout is infinite. |
| 840 | * Polling timeout during TS1 is infinite (in case link is waiting for TXEQ to finish). */ |
| 841 | uint32_t ramclksel : 2; /**< [ 7: 6](R/W) RAM clock select. Always keep set to 0x0. */ |
| 842 | uint32_t scaledown : 2; /**< [ 5: 4](R/W) Scale-down mode. When scale-down mode is enabled for simulation, the core uses scaled-down |
| 843 | timing values, resulting in faster simulations. When scale-down mode is disabled, actual |
| 844 | timing values are used. This is required for hardware operation. |
| 845 | |
| 846 | High-speed/full-speed/low-speed modes: |
| 847 | 0x0 = Disables all scale-downs. Actual timing values are used. |
| 848 | 0x1 = Enables scale-down of all timing values. These include: |
| 849 | * Speed enumeration. |
| 850 | * HNP/SRP. |
| 851 | * Suspend and resume. |
| 852 | |
| 853 | 0x2 = N/A. |
| 854 | 0x3 = Enables bits \<0\> and \<1\> scale-down timing values. |
| 855 | |
| 856 | SuperSpeed mode: |
| 857 | 0x0 = Disables all scale-downs. Actual timing values are used. |
| 858 | 0x1 = Enables scaled down SuperSpeed timing and repeat values including: |
| 859 | * Number of TxEq training sequences reduce to eight. |
| 860 | * LFPS polling burst time reduce to 100 ns. |
| 861 | * LFPS warm reset receive reduce to 30 us. |
| 862 | |
| 863 | Internal: |
| 864 | Refer to the rtl_vip_scaledown_mapping.xls file under \<workspace\>/sim/SoC_sim |
| 865 | directory for the complete list. |
| 866 | 0x2 = No TxEq training sequences are sent. Overrides bit\<4\>. |
| 867 | 0x3 = Enables bits\<0\> and \<1\> scale-down timing values. */ |
| 868 | uint32_t disscramble : 1; /**< [ 3: 3](R/W) Disable scrambling. Transmit request to link partner on next transition to recovery or polling. */ |
| 869 | uint32_t u2exit_lfps : 1; /**< [ 2: 2](R/W) LFPS U2 exit. |
| 870 | 0 = The link treats 248 ns LFPS as a valid U2 exit. |
| 871 | 1 = The link waits for 8 us of LFPS before it detects a valid U2 exit. |
| 872 | |
| 873 | This bit is added to improve interoperability with a third party host controller. This |
| 874 | host controller in U2 state while performing receiver detection generates an LFPS glitch |
| 875 | of about 4s duration. This causes the device to exit from U2 state because the LFPS filter |
| 876 | value is 248 ns. With the new functionality enabled, the device can stay in U2 while |
| 877 | ignoring this glitch from the host controller. */ |
| 878 | uint32_t reserved_1 : 1; |
| 879 | uint32_t dsblclkgtng : 1; /**< [ 0: 0](R/W) Disable clock gating. When set to 1 and the core is in low power mode, internal clock |
| 880 | gating is disabled, which means the clocks are always running. This bit can be set to 1 |
| 881 | after power-up reset. */ |
| 882 | #else /* Word 0 - Little Endian */ |
| 883 | uint32_t dsblclkgtng : 1; /**< [ 0: 0](R/W) Disable clock gating. When set to 1 and the core is in low power mode, internal clock |
| 884 | gating is disabled, which means the clocks are always running. This bit can be set to 1 |
| 885 | after power-up reset. */ |
| 886 | uint32_t reserved_1 : 1; |
| 887 | uint32_t u2exit_lfps : 1; /**< [ 2: 2](R/W) LFPS U2 exit. |
| 888 | 0 = The link treats 248 ns LFPS as a valid U2 exit. |
| 889 | 1 = The link waits for 8 us of LFPS before it detects a valid U2 exit. |
| 890 | |
| 891 | This bit is added to improve interoperability with a third party host controller. This |
| 892 | host controller in U2 state while performing receiver detection generates an LFPS glitch |
| 893 | of about 4s duration. This causes the device to exit from U2 state because the LFPS filter |
| 894 | value is 248 ns. With the new functionality enabled, the device can stay in U2 while |
| 895 | ignoring this glitch from the host controller. */ |
| 896 | uint32_t disscramble : 1; /**< [ 3: 3](R/W) Disable scrambling. Transmit request to link partner on next transition to recovery or polling. */ |
| 897 | uint32_t scaledown : 2; /**< [ 5: 4](R/W) Scale-down mode. When scale-down mode is enabled for simulation, the core uses scaled-down |
| 898 | timing values, resulting in faster simulations. When scale-down mode is disabled, actual |
| 899 | timing values are used. This is required for hardware operation. |
| 900 | |
| 901 | High-speed/full-speed/low-speed modes: |
| 902 | 0x0 = Disables all scale-downs. Actual timing values are used. |
| 903 | 0x1 = Enables scale-down of all timing values. These include: |
| 904 | * Speed enumeration. |
| 905 | * HNP/SRP. |
| 906 | * Suspend and resume. |
| 907 | |
| 908 | 0x2 = N/A. |
| 909 | 0x3 = Enables bits \<0\> and \<1\> scale-down timing values. |
| 910 | |
| 911 | SuperSpeed mode: |
| 912 | 0x0 = Disables all scale-downs. Actual timing values are used. |
| 913 | 0x1 = Enables scaled down SuperSpeed timing and repeat values including: |
| 914 | * Number of TxEq training sequences reduce to eight. |
| 915 | * LFPS polling burst time reduce to 100 ns. |
| 916 | * LFPS warm reset receive reduce to 30 us. |
| 917 | |
| 918 | Internal: |
| 919 | Refer to the rtl_vip_scaledown_mapping.xls file under \<workspace\>/sim/SoC_sim |
| 920 | directory for the complete list. |
| 921 | 0x2 = No TxEq training sequences are sent. Overrides bit\<4\>. |
| 922 | 0x3 = Enables bits\<0\> and \<1\> scale-down timing values. */ |
| 923 | uint32_t ramclksel : 2; /**< [ 7: 6](R/W) RAM clock select. Always keep set to 0x0. */ |
| 924 | uint32_t debugattach : 1; /**< [ 8: 8](R/W) Debug attach. When this bit is set: |
| 925 | * SuperSpeed link proceeds directly to the polling-link state (USBH()_UAHC_DCTL[RS] = 1) |
| 926 | without checking remote termination. |
| 927 | * Link LFPS polling timeout is infinite. |
| 928 | * Polling timeout during TS1 is infinite (in case link is waiting for TXEQ to finish). */ |
| 929 | uint32_t u1u2timerscale : 1; /**< [ 9: 9](R/W) Disable U1/U2 timer scaledown. If set to 1, along with SCALEDOWN = 0x1, disables the scale |
| 930 | down of U1/U2 inactive timer values. |
| 931 | This is for simulation mode only. */ |
| 932 | uint32_t sofitpsync : 1; /**< [ 10: 10](R/W) Synchronize ITP to reference clock. In host mode, if this bit is set to: |
| 933 | 0 = The core keeps the UTMI/ULPI PHY on the first port in non-suspended state whenever |
| 934 | there is a SuperSpeed port that is not in Rx.Detect, SS.Disable, and U3 state. |
| 935 | 1 = The core keeps the UTMI/ULPI PHY on the first port in non-suspended state whenever the |
| 936 | other non-SuperSpeed ports are not in suspended state. |
| 937 | |
| 938 | This feature is useful because it saves power by suspending UTMI/ULPI when SuperSpeed only |
| 939 | is active and it helps resolve when the PHY does not transmit a host resume unless it is |
| 940 | placed in suspend state. |
| 941 | USBH()_UAHC_GUSB2PHYCFG()[SUSPHY] eventually decides to put the UTMI/ULPI PHY in to |
| 942 | suspend |
| 943 | state. In addition, when this bit is set to 1, the core generates ITP off of the REF_CLK- |
| 944 | based counter. Otherwise, ITP and SOF are generated off of UTMI/ULPI_CLK[0] based counter. |
| 945 | |
| 946 | To program the reference clock period inside the core, refer to |
| 947 | USBH()_UAHC_GUCTL[REFCLKPER]. |
| 948 | |
| 949 | If you do not plan to ever use this feature or the |
| 950 | USBH()_UAHC_GFLADJ[GFLADJ_REFCLK_LPM_SEL] |
| 951 | feature, the minimum frequency for the ref_clk can be as low as 32 KHz. You can connect |
| 952 | the |
| 953 | SUSPEND_CLK (as low as 32 KHz) to REF_CLK. |
| 954 | |
| 955 | If you plan to enable hardware-based LPM (PORTPMSC[HLE] = 1), this feature cannot be used. |
| 956 | Turn off this feature by setting this bit to zero and use the |
| 957 | USBH()_UAHC_GFLADJ[GFLADJ_REFCLK_LPM_SEL] feature. |
| 958 | |
| 959 | If you set this bit to 1, the USBH()_UAHC_GUSB2PHYCFG() [U2_FREECLK_EXISTS] bit |
| 960 | must be set to 0. */ |
| 961 | uint32_t coresoftreset : 1; /**< [ 11: 11](R/W) Core soft reset: 1 = soft reset to core, 0 = no soft reset. |
| 962 | Clears the interrupts and all the USBH()_UAHC_* CSRs except the |
| 963 | following registers: USBH()_UAHC_GCTL, USBH()_UAHC_GUCTL, USBH()_UAHC_GSTS, |
| 964 | USBH()_UAHC_GRLSID, USBH()_UAHC_GGPIO, USBH()_UAHC_GUID, USBH()_UAHC_GUSB2PHYCFG(), |
| 965 | USBH()_UAHC_GUSB3PIPECTL(). |
| 966 | |
| 967 | When you reset PHYs (using USBH()_UAHC_GUSB2PHYCFG() or USBH()_UAHC_GUSB3PIPECTL()), you |
| 968 | must keep the |
| 969 | core in reset state until PHY clocks are stable. This controls the bus, RAM, and MAC |
| 970 | domain resets. |
| 971 | |
| 972 | Internal: |
| 973 | Refer to Reset Generation on Synopsys Databook page 250. |
| 974 | Under soft reset, accesses to USBH()_UAHC_* CSRs other than USBH()_UAHC_GCTL may fail |
| 975 | (timeout). |
| 976 | This bit is for debug purposes only. Use USBH()_UAHC_USBCMD[HCRST] for soft reset. */ |
| 977 | uint32_t prtcapdir : 2; /**< [ 13: 12](R/W) Port capability direction. Always keep set to 0x1. */ |
| 978 | uint32_t frmscldwn : 2; /**< [ 15: 14](R/W) Frame scale down. Scales down device view of a SOF/USOF/ITP duration. |
| 979 | For SuperSpeed/high-speed mode: |
| 980 | 0x0 = Interval is 125 us. |
| 981 | 0x1 = Interval is 62.5 us. |
| 982 | 0x2 = Interval is 31.25 us. |
| 983 | 0x3 = Interval is 15.625 us. |
| 984 | |
| 985 | For full speed mode, the scale down value is multiplied by 8. */ |
| 986 | uint32_t reserved_16_17 : 2; |
| 987 | uint32_t masterfiltbypass : 1; /**< [ 18: 18](R/W) Master filter bypass. Not relevant for Cavium's configuration. */ |
| 988 | uint32_t pwrdnscale : 13; /**< [ 31: 19](R/W) Power down scale. The USB3 suspend-clock input replaces pipe3_rx_pclk as a clock source to |
| 989 | a small part of the USB3 core that operates when the SuperSpeed PHY is in its lowest power |
| 990 | (P3) state, and therefore does not provide a clock. This field specifies how many suspend- |
| 991 | clock periods fit into a 16 kHz clock period. When performing the division, round up the |
| 992 | remainder. |
| 993 | |
| 994 | For example, when using an 32-bit PHY and 25-MHz suspend clock, PWRDNSCALE = 25000 kHz/16 |
| 995 | kHz = 1563 (rounded up). |
| 996 | |
| 997 | The minimum suspend-clock frequency is 32 KHz, and maximum suspend-clock frequency is 125 |
| 998 | MHz. |
| 999 | |
| 1000 | The LTSSM uses suspend clock for 12-ms and 100-ms timers during suspend mode. According to |
| 1001 | the USB 3.0 specification, the accuracy on these timers is 0% to +50%. 12 ms + 0~+50% |
| 1002 | accuracy = 18 ms (Range is 12 ms - 18 ms) |
| 1003 | 100 ms + 0~+50% accuracy = 150 ms (Range is 100 ms - 150 ms). |
| 1004 | |
| 1005 | The suspend clock accuracy requirement is: |
| 1006 | _ (12,000/62.5) * (GCTL[31:19]) * actual suspend_clk_period should be between 12,000 and |
| 1007 | 18,000 |
| 1008 | _ (100,000/62.5) * (GCTL[31:19]) * actual suspend_clk_period should be between 100,000 and |
| 1009 | 150,000 |
| 1010 | |
| 1011 | For example, if your suspend_clk frequency varies from 7.5 MHz to 10.5 MHz, then the value |
| 1012 | needs to programmed is: power down scale = 10500/16 = 657 (rounded up; and fastest |
| 1013 | frequency used). */ |
| 1014 | #endif /* Word 0 - End */ |
| 1015 | } s; |
| 1016 | /* struct bdk_usbhx_uahc_gctl_s cn; */ |
| 1017 | }; |
| 1018 | typedef union bdk_usbhx_uahc_gctl bdk_usbhx_uahc_gctl_t; |
| 1019 | |
| 1020 | static inline uint64_t BDK_USBHX_UAHC_GCTL(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1021 | static inline uint64_t BDK_USBHX_UAHC_GCTL(unsigned long a) |
| 1022 | { |
| 1023 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 1024 | return 0x86800000c110ll + 0x1000000000ll * ((a) & 0x1); |
| 1025 | __bdk_csr_fatal("USBHX_UAHC_GCTL", 1, a, 0, 0, 0); |
| 1026 | } |
| 1027 | |
| 1028 | #define typedef_BDK_USBHX_UAHC_GCTL(a) bdk_usbhx_uahc_gctl_t |
| 1029 | #define bustype_BDK_USBHX_UAHC_GCTL(a) BDK_CSR_TYPE_NCB32b |
| 1030 | #define basename_BDK_USBHX_UAHC_GCTL(a) "USBHX_UAHC_GCTL" |
| 1031 | #define device_bar_BDK_USBHX_UAHC_GCTL(a) 0x0 /* PF_BAR0 */ |
| 1032 | #define busnum_BDK_USBHX_UAHC_GCTL(a) (a) |
| 1033 | #define arguments_BDK_USBHX_UAHC_GCTL(a) (a),-1,-1,-1 |
| 1034 | |
| 1035 | /** |
| 1036 | * Register (NCB32b) usbh#_uahc_gdbgbmu |
| 1037 | * |
| 1038 | * UAHC BMU Debug Register |
| 1039 | * See description in USBH()_UAHC_GDBGFIFOSPACE. |
| 1040 | * |
| 1041 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 1042 | * |
| 1043 | * Internal: |
| 1044 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.4.5. |
| 1045 | */ |
| 1046 | union bdk_usbhx_uahc_gdbgbmu |
| 1047 | { |
| 1048 | uint32_t u; |
| 1049 | struct bdk_usbhx_uahc_gdbgbmu_s |
| 1050 | { |
| 1051 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1052 | uint32_t bmu_bcu_dbg : 24; /**< [ 31: 8](RO/H) BMU_BCU debug information. */ |
| 1053 | uint32_t bmu_dcu_dbg : 4; /**< [ 7: 4](RO/H) BMU_DCU debug information. */ |
| 1054 | uint32_t bmu_ccu_dbg : 4; /**< [ 3: 0](RO/H) BMU_CCU debug information. */ |
| 1055 | #else /* Word 0 - Little Endian */ |
| 1056 | uint32_t bmu_ccu_dbg : 4; /**< [ 3: 0](RO/H) BMU_CCU debug information. */ |
| 1057 | uint32_t bmu_dcu_dbg : 4; /**< [ 7: 4](RO/H) BMU_DCU debug information. */ |
| 1058 | uint32_t bmu_bcu_dbg : 24; /**< [ 31: 8](RO/H) BMU_BCU debug information. */ |
| 1059 | #endif /* Word 0 - End */ |
| 1060 | } s; |
| 1061 | /* struct bdk_usbhx_uahc_gdbgbmu_s cn; */ |
| 1062 | }; |
| 1063 | typedef union bdk_usbhx_uahc_gdbgbmu bdk_usbhx_uahc_gdbgbmu_t; |
| 1064 | |
| 1065 | static inline uint64_t BDK_USBHX_UAHC_GDBGBMU(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1066 | static inline uint64_t BDK_USBHX_UAHC_GDBGBMU(unsigned long a) |
| 1067 | { |
| 1068 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 1069 | return 0x86800000c16cll + 0x1000000000ll * ((a) & 0x1); |
| 1070 | __bdk_csr_fatal("USBHX_UAHC_GDBGBMU", 1, a, 0, 0, 0); |
| 1071 | } |
| 1072 | |
| 1073 | #define typedef_BDK_USBHX_UAHC_GDBGBMU(a) bdk_usbhx_uahc_gdbgbmu_t |
| 1074 | #define bustype_BDK_USBHX_UAHC_GDBGBMU(a) BDK_CSR_TYPE_NCB32b |
| 1075 | #define basename_BDK_USBHX_UAHC_GDBGBMU(a) "USBHX_UAHC_GDBGBMU" |
| 1076 | #define device_bar_BDK_USBHX_UAHC_GDBGBMU(a) 0x0 /* PF_BAR0 */ |
| 1077 | #define busnum_BDK_USBHX_UAHC_GDBGBMU(a) (a) |
| 1078 | #define arguments_BDK_USBHX_UAHC_GDBGBMU(a) (a),-1,-1,-1 |
| 1079 | |
| 1080 | /** |
| 1081 | * Register (NCB) usbh#_uahc_gdbgepinfo |
| 1082 | * |
| 1083 | * UAHC Endpoint Information Debug Register |
| 1084 | * See description in USBH()_UAHC_GDBGFIFOSPACE. |
| 1085 | * |
| 1086 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 1087 | */ |
| 1088 | union bdk_usbhx_uahc_gdbgepinfo |
| 1089 | { |
| 1090 | uint64_t u; |
| 1091 | struct bdk_usbhx_uahc_gdbgepinfo_s |
| 1092 | { |
| 1093 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1094 | uint64_t endpt_dbg : 64; /**< [ 63: 0](RO/H) Endpoint debug information. */ |
| 1095 | #else /* Word 0 - Little Endian */ |
| 1096 | uint64_t endpt_dbg : 64; /**< [ 63: 0](RO/H) Endpoint debug information. */ |
| 1097 | #endif /* Word 0 - End */ |
| 1098 | } s; |
| 1099 | /* struct bdk_usbhx_uahc_gdbgepinfo_s cn; */ |
| 1100 | }; |
| 1101 | typedef union bdk_usbhx_uahc_gdbgepinfo bdk_usbhx_uahc_gdbgepinfo_t; |
| 1102 | |
| 1103 | static inline uint64_t BDK_USBHX_UAHC_GDBGEPINFO(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1104 | static inline uint64_t BDK_USBHX_UAHC_GDBGEPINFO(unsigned long a) |
| 1105 | { |
| 1106 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 1107 | return 0x86800000c178ll + 0x1000000000ll * ((a) & 0x1); |
| 1108 | __bdk_csr_fatal("USBHX_UAHC_GDBGEPINFO", 1, a, 0, 0, 0); |
| 1109 | } |
| 1110 | |
| 1111 | #define typedef_BDK_USBHX_UAHC_GDBGEPINFO(a) bdk_usbhx_uahc_gdbgepinfo_t |
| 1112 | #define bustype_BDK_USBHX_UAHC_GDBGEPINFO(a) BDK_CSR_TYPE_NCB |
| 1113 | #define basename_BDK_USBHX_UAHC_GDBGEPINFO(a) "USBHX_UAHC_GDBGEPINFO" |
| 1114 | #define device_bar_BDK_USBHX_UAHC_GDBGEPINFO(a) 0x0 /* PF_BAR0 */ |
| 1115 | #define busnum_BDK_USBHX_UAHC_GDBGEPINFO(a) (a) |
| 1116 | #define arguments_BDK_USBHX_UAHC_GDBGEPINFO(a) (a),-1,-1,-1 |
| 1117 | |
| 1118 | /** |
| 1119 | * Register (NCB32b) usbh#_uahc_gdbgfifospace |
| 1120 | * |
| 1121 | * UAHC Debug FIFO Space Available Register |
| 1122 | * This register is for debug purposes. It provides debug information on the internal status and |
| 1123 | * state machines. Global debug registers have design-specific information, and are used by state |
| 1124 | * machines. Global debug registers have design-specific information, and are used for debugging |
| 1125 | * purposes. These registers are not intended to be used by the customer. If any debug assistance |
| 1126 | * is needed for the silicon, contact customer support with a dump of these registers. |
| 1127 | * |
| 1128 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 1129 | * |
| 1130 | * Internal: |
| 1131 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.4.2. |
| 1132 | * INTERNAL: Contact Synopsys directly. |
| 1133 | */ |
| 1134 | union bdk_usbhx_uahc_gdbgfifospace |
| 1135 | { |
| 1136 | uint32_t u; |
| 1137 | struct bdk_usbhx_uahc_gdbgfifospace_s |
| 1138 | { |
| 1139 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1140 | uint32_t spaceavailable : 16; /**< [ 31: 16](RO/H) Space available in the selected FIFO. */ |
| 1141 | uint32_t reserved_9_15 : 7; |
| 1142 | uint32_t select : 9; /**< [ 8: 0](R/W) FIFO/queue select/port-select. |
| 1143 | FIFO/queue select: \<7:5\> indicates the FIFO/queue type; \<4:0\> indicates the FIFO/queue |
| 1144 | number. |
| 1145 | For example, 0x21 refers to RxFIFO_1, and 0x5E refers to TxReqQ_30. |
| 1146 | 0x1F-0x0: TxFIFO_31 to TxFIFO_0. |
| 1147 | 0x3F-0x20: RxFIFO_31 to RxFIFO_0. |
| 1148 | 0x5F-0x40: TxReqQ_31 to TxReqQ_0. |
| 1149 | 0x7F-0x60: RxReqQ_31 to RxReqQ_0. |
| 1150 | 0x9F-0x80: RxInfoQ_31 to RxInfoQ_0. |
| 1151 | 0xA0: DescFetchQ. |
| 1152 | 0xA1: EventQ. |
| 1153 | 0xA2: ProtocolStatusQ. |
| 1154 | |
| 1155 | Port-select: \<3:0\> selects the port-number when accessing USBH()_UAHC_GDBGLTSSM. */ |
| 1156 | #else /* Word 0 - Little Endian */ |
| 1157 | uint32_t select : 9; /**< [ 8: 0](R/W) FIFO/queue select/port-select. |
| 1158 | FIFO/queue select: \<7:5\> indicates the FIFO/queue type; \<4:0\> indicates the FIFO/queue |
| 1159 | number. |
| 1160 | For example, 0x21 refers to RxFIFO_1, and 0x5E refers to TxReqQ_30. |
| 1161 | 0x1F-0x0: TxFIFO_31 to TxFIFO_0. |
| 1162 | 0x3F-0x20: RxFIFO_31 to RxFIFO_0. |
| 1163 | 0x5F-0x40: TxReqQ_31 to TxReqQ_0. |
| 1164 | 0x7F-0x60: RxReqQ_31 to RxReqQ_0. |
| 1165 | 0x9F-0x80: RxInfoQ_31 to RxInfoQ_0. |
| 1166 | 0xA0: DescFetchQ. |
| 1167 | 0xA1: EventQ. |
| 1168 | 0xA2: ProtocolStatusQ. |
| 1169 | |
| 1170 | Port-select: \<3:0\> selects the port-number when accessing USBH()_UAHC_GDBGLTSSM. */ |
| 1171 | uint32_t reserved_9_15 : 7; |
| 1172 | uint32_t spaceavailable : 16; /**< [ 31: 16](RO/H) Space available in the selected FIFO. */ |
| 1173 | #endif /* Word 0 - End */ |
| 1174 | } s; |
| 1175 | /* struct bdk_usbhx_uahc_gdbgfifospace_s cn; */ |
| 1176 | }; |
| 1177 | typedef union bdk_usbhx_uahc_gdbgfifospace bdk_usbhx_uahc_gdbgfifospace_t; |
| 1178 | |
| 1179 | static inline uint64_t BDK_USBHX_UAHC_GDBGFIFOSPACE(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1180 | static inline uint64_t BDK_USBHX_UAHC_GDBGFIFOSPACE(unsigned long a) |
| 1181 | { |
| 1182 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 1183 | return 0x86800000c160ll + 0x1000000000ll * ((a) & 0x1); |
| 1184 | __bdk_csr_fatal("USBHX_UAHC_GDBGFIFOSPACE", 1, a, 0, 0, 0); |
| 1185 | } |
| 1186 | |
| 1187 | #define typedef_BDK_USBHX_UAHC_GDBGFIFOSPACE(a) bdk_usbhx_uahc_gdbgfifospace_t |
| 1188 | #define bustype_BDK_USBHX_UAHC_GDBGFIFOSPACE(a) BDK_CSR_TYPE_NCB32b |
| 1189 | #define basename_BDK_USBHX_UAHC_GDBGFIFOSPACE(a) "USBHX_UAHC_GDBGFIFOSPACE" |
| 1190 | #define device_bar_BDK_USBHX_UAHC_GDBGFIFOSPACE(a) 0x0 /* PF_BAR0 */ |
| 1191 | #define busnum_BDK_USBHX_UAHC_GDBGFIFOSPACE(a) (a) |
| 1192 | #define arguments_BDK_USBHX_UAHC_GDBGFIFOSPACE(a) (a),-1,-1,-1 |
| 1193 | |
| 1194 | /** |
| 1195 | * Register (NCB32b) usbh#_uahc_gdbglnmcc |
| 1196 | * |
| 1197 | * UAHC LNMCC Debug Register |
| 1198 | * See description in USBH()_UAHC_GDBGFIFOSPACE. |
| 1199 | * |
| 1200 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 1201 | * |
| 1202 | * Internal: |
| 1203 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.4.4. |
| 1204 | */ |
| 1205 | union bdk_usbhx_uahc_gdbglnmcc |
| 1206 | { |
| 1207 | uint32_t u; |
| 1208 | struct bdk_usbhx_uahc_gdbglnmcc_s |
| 1209 | { |
| 1210 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1211 | uint32_t reserved_9_31 : 23; |
| 1212 | uint32_t lnmcc_berc : 9; /**< [ 8: 0](RO/H) This field indicates the bit-error-rate information for the port selected in |
| 1213 | USBH()_UAHC_GDBGFIFOSPACE[SELECT] (port-select). |
| 1214 | This field is for debug purposes only. */ |
| 1215 | #else /* Word 0 - Little Endian */ |
| 1216 | uint32_t lnmcc_berc : 9; /**< [ 8: 0](RO/H) This field indicates the bit-error-rate information for the port selected in |
| 1217 | USBH()_UAHC_GDBGFIFOSPACE[SELECT] (port-select). |
| 1218 | This field is for debug purposes only. */ |
| 1219 | uint32_t reserved_9_31 : 23; |
| 1220 | #endif /* Word 0 - End */ |
| 1221 | } s; |
| 1222 | /* struct bdk_usbhx_uahc_gdbglnmcc_s cn; */ |
| 1223 | }; |
| 1224 | typedef union bdk_usbhx_uahc_gdbglnmcc bdk_usbhx_uahc_gdbglnmcc_t; |
| 1225 | |
| 1226 | static inline uint64_t BDK_USBHX_UAHC_GDBGLNMCC(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1227 | static inline uint64_t BDK_USBHX_UAHC_GDBGLNMCC(unsigned long a) |
| 1228 | { |
| 1229 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 1230 | return 0x86800000c168ll + 0x1000000000ll * ((a) & 0x1); |
| 1231 | __bdk_csr_fatal("USBHX_UAHC_GDBGLNMCC", 1, a, 0, 0, 0); |
| 1232 | } |
| 1233 | |
| 1234 | #define typedef_BDK_USBHX_UAHC_GDBGLNMCC(a) bdk_usbhx_uahc_gdbglnmcc_t |
| 1235 | #define bustype_BDK_USBHX_UAHC_GDBGLNMCC(a) BDK_CSR_TYPE_NCB32b |
| 1236 | #define basename_BDK_USBHX_UAHC_GDBGLNMCC(a) "USBHX_UAHC_GDBGLNMCC" |
| 1237 | #define device_bar_BDK_USBHX_UAHC_GDBGLNMCC(a) 0x0 /* PF_BAR0 */ |
| 1238 | #define busnum_BDK_USBHX_UAHC_GDBGLNMCC(a) (a) |
| 1239 | #define arguments_BDK_USBHX_UAHC_GDBGLNMCC(a) (a),-1,-1,-1 |
| 1240 | |
| 1241 | /** |
| 1242 | * Register (NCB32b) usbh#_uahc_gdbglsp |
| 1243 | * |
| 1244 | * UAHC LSP Debug Register |
| 1245 | * See description in USBH()_UAHC_GDBGFIFOSPACE. |
| 1246 | * |
| 1247 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 1248 | */ |
| 1249 | union bdk_usbhx_uahc_gdbglsp |
| 1250 | { |
| 1251 | uint32_t u; |
| 1252 | struct bdk_usbhx_uahc_gdbglsp_s |
| 1253 | { |
| 1254 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1255 | uint32_t lsp_dbg : 32; /**< [ 31: 0](RO/H) LSP debug information. */ |
| 1256 | #else /* Word 0 - Little Endian */ |
| 1257 | uint32_t lsp_dbg : 32; /**< [ 31: 0](RO/H) LSP debug information. */ |
| 1258 | #endif /* Word 0 - End */ |
| 1259 | } s; |
| 1260 | /* struct bdk_usbhx_uahc_gdbglsp_s cn; */ |
| 1261 | }; |
| 1262 | typedef union bdk_usbhx_uahc_gdbglsp bdk_usbhx_uahc_gdbglsp_t; |
| 1263 | |
| 1264 | static inline uint64_t BDK_USBHX_UAHC_GDBGLSP(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1265 | static inline uint64_t BDK_USBHX_UAHC_GDBGLSP(unsigned long a) |
| 1266 | { |
| 1267 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 1268 | return 0x86800000c174ll + 0x1000000000ll * ((a) & 0x1); |
| 1269 | __bdk_csr_fatal("USBHX_UAHC_GDBGLSP", 1, a, 0, 0, 0); |
| 1270 | } |
| 1271 | |
| 1272 | #define typedef_BDK_USBHX_UAHC_GDBGLSP(a) bdk_usbhx_uahc_gdbglsp_t |
| 1273 | #define bustype_BDK_USBHX_UAHC_GDBGLSP(a) BDK_CSR_TYPE_NCB32b |
| 1274 | #define basename_BDK_USBHX_UAHC_GDBGLSP(a) "USBHX_UAHC_GDBGLSP" |
| 1275 | #define device_bar_BDK_USBHX_UAHC_GDBGLSP(a) 0x0 /* PF_BAR0 */ |
| 1276 | #define busnum_BDK_USBHX_UAHC_GDBGLSP(a) (a) |
| 1277 | #define arguments_BDK_USBHX_UAHC_GDBGLSP(a) (a),-1,-1,-1 |
| 1278 | |
| 1279 | /** |
| 1280 | * Register (NCB32b) usbh#_uahc_gdbglspmux |
| 1281 | * |
| 1282 | * UAHC LSP Multiplexer Debug Register |
| 1283 | * See description in USBH()_UAHC_GDBGFIFOSPACE. |
| 1284 | * |
| 1285 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 1286 | * |
| 1287 | * Internal: |
| 1288 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.4.6. |
| 1289 | * INTERNAL: This register is for Synopsys internal use only. |
| 1290 | */ |
| 1291 | union bdk_usbhx_uahc_gdbglspmux |
| 1292 | { |
| 1293 | uint32_t u; |
| 1294 | struct bdk_usbhx_uahc_gdbglspmux_s |
| 1295 | { |
| 1296 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1297 | uint32_t reserved_24_31 : 8; |
| 1298 | uint32_t latraceportmuxselect : 8; /**< [ 23: 16](R/W) logic_analyzer_trace port multiplexer select. Only bits\<21:16\> are used. For details on |
| 1299 | how the mux controls the debug traces, refer to the Verilog file. |
| 1300 | A value of 0x3F drives 0s on the logic_analyzer_trace signal. If you plan to OR (instead |
| 1301 | using a mux) this signal with other trace signals in your system to generate a common |
| 1302 | trace signal, you can use this feature. */ |
| 1303 | uint32_t endbc : 1; /**< [ 15: 15](R/W) Enable debugging of the debug capability LSP. Use HOSTSELECT to select the DbC LSP debug |
| 1304 | information presented in the GDBGLSP register. |
| 1305 | |
| 1306 | Internal: |
| 1307 | Note this can only be used if DebugCapabaility was enabled at compile. */ |
| 1308 | uint32_t reserved_14 : 1; |
| 1309 | uint32_t hostselect : 14; /**< [ 13: 0](R/W) Host select. Selects the LSP debug information presented in USBH()_UAHC_GDBGLSP. */ |
| 1310 | #else /* Word 0 - Little Endian */ |
| 1311 | uint32_t hostselect : 14; /**< [ 13: 0](R/W) Host select. Selects the LSP debug information presented in USBH()_UAHC_GDBGLSP. */ |
| 1312 | uint32_t reserved_14 : 1; |
| 1313 | uint32_t endbc : 1; /**< [ 15: 15](R/W) Enable debugging of the debug capability LSP. Use HOSTSELECT to select the DbC LSP debug |
| 1314 | information presented in the GDBGLSP register. |
| 1315 | |
| 1316 | Internal: |
| 1317 | Note this can only be used if DebugCapabaility was enabled at compile. */ |
| 1318 | uint32_t latraceportmuxselect : 8; /**< [ 23: 16](R/W) logic_analyzer_trace port multiplexer select. Only bits\<21:16\> are used. For details on |
| 1319 | how the mux controls the debug traces, refer to the Verilog file. |
| 1320 | A value of 0x3F drives 0s on the logic_analyzer_trace signal. If you plan to OR (instead |
| 1321 | using a mux) this signal with other trace signals in your system to generate a common |
| 1322 | trace signal, you can use this feature. */ |
| 1323 | uint32_t reserved_24_31 : 8; |
| 1324 | #endif /* Word 0 - End */ |
| 1325 | } s; |
| 1326 | /* struct bdk_usbhx_uahc_gdbglspmux_s cn; */ |
| 1327 | }; |
| 1328 | typedef union bdk_usbhx_uahc_gdbglspmux bdk_usbhx_uahc_gdbglspmux_t; |
| 1329 | |
| 1330 | static inline uint64_t BDK_USBHX_UAHC_GDBGLSPMUX(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1331 | static inline uint64_t BDK_USBHX_UAHC_GDBGLSPMUX(unsigned long a) |
| 1332 | { |
| 1333 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 1334 | return 0x86800000c170ll + 0x1000000000ll * ((a) & 0x1); |
| 1335 | __bdk_csr_fatal("USBHX_UAHC_GDBGLSPMUX", 1, a, 0, 0, 0); |
| 1336 | } |
| 1337 | |
| 1338 | #define typedef_BDK_USBHX_UAHC_GDBGLSPMUX(a) bdk_usbhx_uahc_gdbglspmux_t |
| 1339 | #define bustype_BDK_USBHX_UAHC_GDBGLSPMUX(a) BDK_CSR_TYPE_NCB32b |
| 1340 | #define basename_BDK_USBHX_UAHC_GDBGLSPMUX(a) "USBHX_UAHC_GDBGLSPMUX" |
| 1341 | #define device_bar_BDK_USBHX_UAHC_GDBGLSPMUX(a) 0x0 /* PF_BAR0 */ |
| 1342 | #define busnum_BDK_USBHX_UAHC_GDBGLSPMUX(a) (a) |
| 1343 | #define arguments_BDK_USBHX_UAHC_GDBGLSPMUX(a) (a),-1,-1,-1 |
| 1344 | |
| 1345 | /** |
| 1346 | * Register (NCB32b) usbh#_uahc_gdbgltssm |
| 1347 | * |
| 1348 | * UAHC LTSSM Debug Register |
| 1349 | * In multiport host configuration, the port number is defined by |
| 1350 | * USBH()_UAHC_GDBGFIFOSPACE[SELECT]\<3:0\>. Value of this register may change immediately after |
| 1351 | * reset. |
| 1352 | * See description in USBH()_UAHC_GDBGFIFOSPACE. |
| 1353 | * |
| 1354 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 1355 | * |
| 1356 | * Internal: |
| 1357 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.4.3. |
| 1358 | */ |
| 1359 | union bdk_usbhx_uahc_gdbgltssm |
| 1360 | { |
| 1361 | uint32_t u; |
| 1362 | struct bdk_usbhx_uahc_gdbgltssm_s |
| 1363 | { |
| 1364 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1365 | uint32_t reserved_27_31 : 5; |
| 1366 | uint32_t ltdbtimeout : 1; /**< [ 26: 26](RO/H) LTDB timeout. */ |
| 1367 | uint32_t ltdblinkstate : 4; /**< [ 25: 22](RO/H) LTDB link state. */ |
| 1368 | uint32_t ltdbsubstate : 4; /**< [ 21: 18](RO/H) LTDB substate. */ |
| 1369 | uint32_t debugpipestatus : 18; /**< [ 17: 0](RO/H) Debug PIPE status. |
| 1370 | _ \<17\> Elastic buffer mode. |
| 1371 | _ \<16\> TX elec idle. |
| 1372 | _ \<15\> RX polarity. |
| 1373 | _ \<14\> TX Detect RX/loopback. |
| 1374 | _ \<13:11\> LTSSM PHY command state. |
| 1375 | _ 0x0 = PHY_IDLE (PHY command state is in IDLE. No PHY request is pending). |
| 1376 | _ 0x1 = PHY_DET (Request to start receiver detection). |
| 1377 | _ 0x2 = PHY_DET_3 (Wait for Phy_Status (receiver detection)). |
| 1378 | _ 0x3 = PHY_PWR_DLY (delay Pipe3_PowerDown P0 -\> P1/P2/P3 request). |
| 1379 | _ 0x4 = PHY_PWR_A (delay for internal logic). |
| 1380 | _ 0x5 = PHY_PWR_B (wait for Phy_Status(Power-state change request)). |
| 1381 | |
| 1382 | _ \<10:9\> Power down. |
| 1383 | _ \<8\> RxEq train. |
| 1384 | _ \<7:6\> TX de-emphasis. |
| 1385 | _ \<5:3\> LTSSM clock state. |
| 1386 | _ 0x0 = CLK_NORM (PHY is in non-P3 state and PCLK is running). |
| 1387 | _ 0x1 = CLK_TO_P3 (P3 entry request to PHY). |
| 1388 | _ 0x2 = CLK_WAIT1 (wait for Phy_Status (P3 request)). |
| 1389 | _ 0x3 = CLK_P3 (PHY is in P3 and PCLK is not running). |
| 1390 | _ 0x4 = CLK_TO_P0 (P3 exit request to PHY). |
| 1391 | _ 0x5 = CLK_WAIT2 (Wait for Phy_Status (P3 exit request)). |
| 1392 | |
| 1393 | _ \<2\> TX swing. |
| 1394 | _ \<1\> RX termination. |
| 1395 | _ \<0\> TX 1s/0s. */ |
| 1396 | #else /* Word 0 - Little Endian */ |
| 1397 | uint32_t debugpipestatus : 18; /**< [ 17: 0](RO/H) Debug PIPE status. |
| 1398 | _ \<17\> Elastic buffer mode. |
| 1399 | _ \<16\> TX elec idle. |
| 1400 | _ \<15\> RX polarity. |
| 1401 | _ \<14\> TX Detect RX/loopback. |
| 1402 | _ \<13:11\> LTSSM PHY command state. |
| 1403 | _ 0x0 = PHY_IDLE (PHY command state is in IDLE. No PHY request is pending). |
| 1404 | _ 0x1 = PHY_DET (Request to start receiver detection). |
| 1405 | _ 0x2 = PHY_DET_3 (Wait for Phy_Status (receiver detection)). |
| 1406 | _ 0x3 = PHY_PWR_DLY (delay Pipe3_PowerDown P0 -\> P1/P2/P3 request). |
| 1407 | _ 0x4 = PHY_PWR_A (delay for internal logic). |
| 1408 | _ 0x5 = PHY_PWR_B (wait for Phy_Status(Power-state change request)). |
| 1409 | |
| 1410 | _ \<10:9\> Power down. |
| 1411 | _ \<8\> RxEq train. |
| 1412 | _ \<7:6\> TX de-emphasis. |
| 1413 | _ \<5:3\> LTSSM clock state. |
| 1414 | _ 0x0 = CLK_NORM (PHY is in non-P3 state and PCLK is running). |
| 1415 | _ 0x1 = CLK_TO_P3 (P3 entry request to PHY). |
| 1416 | _ 0x2 = CLK_WAIT1 (wait for Phy_Status (P3 request)). |
| 1417 | _ 0x3 = CLK_P3 (PHY is in P3 and PCLK is not running). |
| 1418 | _ 0x4 = CLK_TO_P0 (P3 exit request to PHY). |
| 1419 | _ 0x5 = CLK_WAIT2 (Wait for Phy_Status (P3 exit request)). |
| 1420 | |
| 1421 | _ \<2\> TX swing. |
| 1422 | _ \<1\> RX termination. |
| 1423 | _ \<0\> TX 1s/0s. */ |
| 1424 | uint32_t ltdbsubstate : 4; /**< [ 21: 18](RO/H) LTDB substate. */ |
| 1425 | uint32_t ltdblinkstate : 4; /**< [ 25: 22](RO/H) LTDB link state. */ |
| 1426 | uint32_t ltdbtimeout : 1; /**< [ 26: 26](RO/H) LTDB timeout. */ |
| 1427 | uint32_t reserved_27_31 : 5; |
| 1428 | #endif /* Word 0 - End */ |
| 1429 | } s; |
| 1430 | /* struct bdk_usbhx_uahc_gdbgltssm_s cn; */ |
| 1431 | }; |
| 1432 | typedef union bdk_usbhx_uahc_gdbgltssm bdk_usbhx_uahc_gdbgltssm_t; |
| 1433 | |
| 1434 | static inline uint64_t BDK_USBHX_UAHC_GDBGLTSSM(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1435 | static inline uint64_t BDK_USBHX_UAHC_GDBGLTSSM(unsigned long a) |
| 1436 | { |
| 1437 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 1438 | return 0x86800000c164ll + 0x1000000000ll * ((a) & 0x1); |
| 1439 | __bdk_csr_fatal("USBHX_UAHC_GDBGLTSSM", 1, a, 0, 0, 0); |
| 1440 | } |
| 1441 | |
| 1442 | #define typedef_BDK_USBHX_UAHC_GDBGLTSSM(a) bdk_usbhx_uahc_gdbgltssm_t |
| 1443 | #define bustype_BDK_USBHX_UAHC_GDBGLTSSM(a) BDK_CSR_TYPE_NCB32b |
| 1444 | #define basename_BDK_USBHX_UAHC_GDBGLTSSM(a) "USBHX_UAHC_GDBGLTSSM" |
| 1445 | #define device_bar_BDK_USBHX_UAHC_GDBGLTSSM(a) 0x0 /* PF_BAR0 */ |
| 1446 | #define busnum_BDK_USBHX_UAHC_GDBGLTSSM(a) (a) |
| 1447 | #define arguments_BDK_USBHX_UAHC_GDBGLTSSM(a) (a),-1,-1,-1 |
| 1448 | |
| 1449 | /** |
| 1450 | * Register (NCB32b) usbh#_uahc_gdmahlratio |
| 1451 | * |
| 1452 | * UAHC DMA High/Low Ratio Register |
| 1453 | * This register specifies the relative priority of the SuperSpeed FIFOs with respect to the |
| 1454 | * high-speed/full-speed/low-speed FIFOs. The DMA arbiter prioritizes the high-speed/full-speed |
| 1455 | * /low-speed round-robin arbiter group every DMA high-low priority ratio grants as indicated in |
| 1456 | * the register separately for TX and RX. |
| 1457 | * |
| 1458 | * To illustrate, consider that all FIFOs are requesting access simultaneously, and the ratio is |
| 1459 | * 4. SuperSpeed gets priority for four packets, high-speed/full-speed/low-speed gets priority |
| 1460 | * for one packet, SuperSpeed gets priority for four packets, high-speed/full-speed/low-speed |
| 1461 | * gets priority for one packet, and so on. |
| 1462 | * |
| 1463 | * If FIFOs from both speed groups are not requesting access simultaneously then: |
| 1464 | * * If SuperSpeed got grants four out of the last four times, then high-speed/full-speed/ |
| 1465 | * low-speed get the priority on any future request. |
| 1466 | * * If high-speed/full-speed/low-speed got the grant last time, SuperSpeed gets the priority on |
| 1467 | * the next request. |
| 1468 | * |
| 1469 | * If there is a valid request on either SuperSpeed or high-speed/full-speed/low-speed, a grant |
| 1470 | * is always awarded; there is no idle. |
| 1471 | * |
| 1472 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 1473 | * |
| 1474 | * Internal: |
| 1475 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.9.5. |
| 1476 | */ |
| 1477 | union bdk_usbhx_uahc_gdmahlratio |
| 1478 | { |
| 1479 | uint32_t u; |
| 1480 | struct bdk_usbhx_uahc_gdmahlratio_s |
| 1481 | { |
| 1482 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1483 | uint32_t reserved_13_31 : 19; |
| 1484 | uint32_t rx_ratio : 5; /**< [ 12: 8](R/W) Speed ratio for RX arbitration. */ |
| 1485 | uint32_t reserved_5_7 : 3; |
| 1486 | uint32_t tx_ratio : 5; /**< [ 4: 0](R/W) Speed ratio for TX arbitration. */ |
| 1487 | #else /* Word 0 - Little Endian */ |
| 1488 | uint32_t tx_ratio : 5; /**< [ 4: 0](R/W) Speed ratio for TX arbitration. */ |
| 1489 | uint32_t reserved_5_7 : 3; |
| 1490 | uint32_t rx_ratio : 5; /**< [ 12: 8](R/W) Speed ratio for RX arbitration. */ |
| 1491 | uint32_t reserved_13_31 : 19; |
| 1492 | #endif /* Word 0 - End */ |
| 1493 | } s; |
| 1494 | /* struct bdk_usbhx_uahc_gdmahlratio_s cn; */ |
| 1495 | }; |
| 1496 | typedef union bdk_usbhx_uahc_gdmahlratio bdk_usbhx_uahc_gdmahlratio_t; |
| 1497 | |
| 1498 | static inline uint64_t BDK_USBHX_UAHC_GDMAHLRATIO(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1499 | static inline uint64_t BDK_USBHX_UAHC_GDMAHLRATIO(unsigned long a) |
| 1500 | { |
| 1501 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 1502 | return 0x86800000c624ll + 0x1000000000ll * ((a) & 0x1); |
| 1503 | __bdk_csr_fatal("USBHX_UAHC_GDMAHLRATIO", 1, a, 0, 0, 0); |
| 1504 | } |
| 1505 | |
| 1506 | #define typedef_BDK_USBHX_UAHC_GDMAHLRATIO(a) bdk_usbhx_uahc_gdmahlratio_t |
| 1507 | #define bustype_BDK_USBHX_UAHC_GDMAHLRATIO(a) BDK_CSR_TYPE_NCB32b |
| 1508 | #define basename_BDK_USBHX_UAHC_GDMAHLRATIO(a) "USBHX_UAHC_GDMAHLRATIO" |
| 1509 | #define device_bar_BDK_USBHX_UAHC_GDMAHLRATIO(a) 0x0 /* PF_BAR0 */ |
| 1510 | #define busnum_BDK_USBHX_UAHC_GDMAHLRATIO(a) (a) |
| 1511 | #define arguments_BDK_USBHX_UAHC_GDMAHLRATIO(a) (a),-1,-1,-1 |
| 1512 | |
| 1513 | /** |
| 1514 | * Register (NCB32b) usbh#_uahc_gfladj |
| 1515 | * |
| 1516 | * UAHC Global Frame Length Adjustment Register |
| 1517 | * This register provides options for the software to control the core behavior with respect to |
| 1518 | * SOF (start of frame) and ITP (isochronous timestamp packet) timers and frame timer |
| 1519 | * functionality. It provides the option to override the sideband signal fladj_30mhz_reg. In |
| 1520 | * addition, it enables running SOF or ITP frame timer counters completely off of the REF_CLK. |
| 1521 | * This facilitates hardware LPM in host mode with the SOF or ITP counters being run off of the |
| 1522 | * REF_CLK signal. |
| 1523 | * |
| 1524 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 1525 | * |
| 1526 | * Internal: |
| 1527 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.9.6. |
| 1528 | */ |
| 1529 | union bdk_usbhx_uahc_gfladj |
| 1530 | { |
| 1531 | uint32_t u; |
| 1532 | struct bdk_usbhx_uahc_gfladj_s |
| 1533 | { |
| 1534 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1535 | uint32_t gfladj_refclk_240mhzdecr_pls1 : 1;/**< [ 31: 31](R/W) This field indicates that the decrement value that the controller applies for each REF_CLK |
| 1536 | must be GFLADJ_REFCLK_240MHZ_DECR and GFLADJ_REFCLK_240MHZ_DECR +1 alternatively on each |
| 1537 | REF_CLK. Set this bit to 1 only if [GFLADJ_REFCLK_LPM_SEL] is set to 1 and the fractional |
| 1538 | component of 240/ref_frequency is greater than or equal to 0.5. |
| 1539 | |
| 1540 | Example: |
| 1541 | |
| 1542 | If the REF_CLK is 19.2 MHz then: |
| 1543 | * USBH()_UAHC_GUCTL[REFCLKPER] = 52. |
| 1544 | * [GFLADJ_REFCLK_240MHZ_DECR] = (240/19.2) = 12.5. |
| 1545 | * [GFLADJ_REFCLK_240MHZDECR_PLS1] = 1. |
| 1546 | |
| 1547 | If the REF_CLK is 24 MHz then: |
| 1548 | * USBH()_UAHC_GUCTL[REFCLKPER] = 41. |
| 1549 | * [GFLADJ_REFCLK_240MHZ_DECR] = (240/24) = 10. |
| 1550 | * [GFLADJ_REFCLK_240MHZDECR_PLS1] = 0. */ |
| 1551 | uint32_t gfladj_refclk_240mhz_decr : 7;/**< [ 30: 24](R/W) This field indicates the decrement value that the controller applies for each REF_CLK in |
| 1552 | order to derive a frame timer in terms of a 240-MHz clock. This field must be programmed |
| 1553 | to a nonzero value only if [GFLADJ_REFCLK_LPM_SEL] is set to 1. |
| 1554 | |
| 1555 | The value is derived as follows: |
| 1556 | _ [GFLADJ_REFCLK_240MHZ_DECR] = 240/ref_clk_frequency |
| 1557 | |
| 1558 | Examples: |
| 1559 | |
| 1560 | If the REF_CLK is 24 MHz then: |
| 1561 | * USBH()_UAHC_GUCTL[REFCLKPER] = 41. |
| 1562 | * [GFLADJ_REFCLK_240MHZ_DECR] = 240/24 = 10. |
| 1563 | |
| 1564 | If the REF_CLK is 48 MHz then: |
| 1565 | * USBH()_UAHC_GUCTL[REFCLKPER] = 20. |
| 1566 | * [GFLADJ_REFCLK_240MHZ_DECR] = 240/48 = 5. |
| 1567 | |
| 1568 | If the REF_CLK is 17 MHz then: |
| 1569 | * USBH()_UAHC_GUCTL[REFCLKPER] = 58. |
| 1570 | * [GFLADJ_REFCLK_240MHZ_DECR] = 240/17 = 14. */ |
| 1571 | uint32_t gfladj_refclk_lpm_sel : 1; /**< [ 23: 23](R/W) This bit enables the functionality of running SOF/ITP counters on the REF_CLK. |
| 1572 | This bit must not be set to 1 if USBH()_UAHC_GCTL[SOFITPSYNC] = 1. Similarly, if |
| 1573 | [GFLADJ_REFCLK_LPM_SEL] = 1, USBH()_UAHC_GCTL[SOFITPSYNC] must not be set to 1. |
| 1574 | When [GFLADJ_REFCLK_LPM_SEL] = 1 the overloading of the suspend control of the USB 2.0 |
| 1575 | first |
| 1576 | port PHY (UTMI) with USB 3.0 port states is removed. Note that the REF_CLK frequencies |
| 1577 | supported in this mode are 16/17/19.2/20/24/39.7/40 MHz. |
| 1578 | |
| 1579 | Internal: |
| 1580 | The utmi_clk[0] signal of the core must be connected to the FREECLK of the PHY. |
| 1581 | If you set this bit to 1, USBH()_UAHC_GUSB2PHYCFG()[U2_FREECLK_EXISTS] must be set to 0. */ |
| 1582 | uint32_t reserved_22 : 1; |
| 1583 | uint32_t gfladj_refclk_fladj : 14; /**< [ 21: 8](R/W) This field indicates the frame length adjustment to be applied when SOF/ITP counter is |
| 1584 | running off of the REF_CLK. This register value is used to adjust:. |
| 1585 | * ITP interval when USBH()_UAHC_GCTL[SOFITPSYNC] = 1 |
| 1586 | * both SOF and ITP interval when [GFLADJ_REFCLK_LPM_SEL] = 1. |
| 1587 | |
| 1588 | This field must be programmed to a nonzero value only if [GFLADJ_REFCLK_LPM_SEL] = 1 or |
| 1589 | USBH()_UAHC_GCTL[SOFITPSYNC] = 1. |
| 1590 | |
| 1591 | The value is derived as below: |
| 1592 | |
| 1593 | _ FLADJ_REF_CLK_FLADJ = ((125000/ref_clk_period_integer) - (125000/ref_clk_period)) * |
| 1594 | ref_clk_period |
| 1595 | |
| 1596 | where, |
| 1597 | * the ref_clk_period_integer is the integer value of the REF_CLK period got by truncating |
| 1598 | the decimal (fractional) value that is programmed in USBH()_UAHC_GUCTL[REFCLKPER]. |
| 1599 | * the ref_clk_period is the REF_CLK period including the fractional value. |
| 1600 | |
| 1601 | Examples: |
| 1602 | |
| 1603 | If the REF_CLK is 24 MHz then: |
| 1604 | * USBH()_UAHC_GUCTL[REFCLKPER] = 41. |
| 1605 | * GLADJ_REFCLK_FLADJ = ((125000/41) - |
| 1606 | (125000/41.6666)) * 41.6666 = 2032 (ignoring the fractional value). |
| 1607 | |
| 1608 | If the REF_CLK is 48 MHz then: |
| 1609 | * USBH()_UAHC_GUCTL[REFCLKPER] = 20. |
| 1610 | * GLADJ_REFCLK_FLADJ = ((125000/20) - |
| 1611 | (125000/20.8333)) * 20.8333 = 5208 (ignoring the fractional value). */ |
| 1612 | uint32_t gfladj_30mhz_reg_sel : 1; /**< [ 7: 7](R/W) This field selects whether to use the input signal fladj_30mhz_reg or the [GFLADJ_30MHZ] |
| 1613 | to |
| 1614 | adjust the frame length for the SOF/ITP. When this bit is set to, 1, the controller uses |
| 1615 | [GFLADJ_30MHZ] value 0x0, the controller uses the input signal fladj_30mhz_reg value. */ |
| 1616 | uint32_t reserved_6 : 1; |
| 1617 | uint32_t gfladj_30mhz : 6; /**< [ 5: 0](R/W) This field indicates the value that is used for frame length adjustment instead of |
| 1618 | considering from the sideband input signal fladj_30mhz_reg. This enables post-silicon |
| 1619 | frame length adjustment in case the input signal fladj_30mhz_reg is connected to a wrong |
| 1620 | value or is not valid. The controller uses this value if [GFLADJ_30MHZ_REG_SEL] = 1 and |
| 1621 | the |
| 1622 | SOF/ITP counters are running off of UTMI(ULPI) clock ([GFLADJ_REFCLK_LPM_SEL] = 0 and |
| 1623 | USBH()_UAHC_GCTL[SOFITPSYNC] is 1 or 0). For details on how to set this value, refer to |
| 1624 | section 5.2.4 Frame Length Adjustment Register (FLADJ) of the xHCI Specification. */ |
| 1625 | #else /* Word 0 - Little Endian */ |
| 1626 | uint32_t gfladj_30mhz : 6; /**< [ 5: 0](R/W) This field indicates the value that is used for frame length adjustment instead of |
| 1627 | considering from the sideband input signal fladj_30mhz_reg. This enables post-silicon |
| 1628 | frame length adjustment in case the input signal fladj_30mhz_reg is connected to a wrong |
| 1629 | value or is not valid. The controller uses this value if [GFLADJ_30MHZ_REG_SEL] = 1 and |
| 1630 | the |
| 1631 | SOF/ITP counters are running off of UTMI(ULPI) clock ([GFLADJ_REFCLK_LPM_SEL] = 0 and |
| 1632 | USBH()_UAHC_GCTL[SOFITPSYNC] is 1 or 0). For details on how to set this value, refer to |
| 1633 | section 5.2.4 Frame Length Adjustment Register (FLADJ) of the xHCI Specification. */ |
| 1634 | uint32_t reserved_6 : 1; |
| 1635 | uint32_t gfladj_30mhz_reg_sel : 1; /**< [ 7: 7](R/W) This field selects whether to use the input signal fladj_30mhz_reg or the [GFLADJ_30MHZ] |
| 1636 | to |
| 1637 | adjust the frame length for the SOF/ITP. When this bit is set to, 1, the controller uses |
| 1638 | [GFLADJ_30MHZ] value 0x0, the controller uses the input signal fladj_30mhz_reg value. */ |
| 1639 | uint32_t gfladj_refclk_fladj : 14; /**< [ 21: 8](R/W) This field indicates the frame length adjustment to be applied when SOF/ITP counter is |
| 1640 | running off of the REF_CLK. This register value is used to adjust:. |
| 1641 | * ITP interval when USBH()_UAHC_GCTL[SOFITPSYNC] = 1 |
| 1642 | * both SOF and ITP interval when [GFLADJ_REFCLK_LPM_SEL] = 1. |
| 1643 | |
| 1644 | This field must be programmed to a nonzero value only if [GFLADJ_REFCLK_LPM_SEL] = 1 or |
| 1645 | USBH()_UAHC_GCTL[SOFITPSYNC] = 1. |
| 1646 | |
| 1647 | The value is derived as below: |
| 1648 | |
| 1649 | _ FLADJ_REF_CLK_FLADJ = ((125000/ref_clk_period_integer) - (125000/ref_clk_period)) * |
| 1650 | ref_clk_period |
| 1651 | |
| 1652 | where, |
| 1653 | * the ref_clk_period_integer is the integer value of the REF_CLK period got by truncating |
| 1654 | the decimal (fractional) value that is programmed in USBH()_UAHC_GUCTL[REFCLKPER]. |
| 1655 | * the ref_clk_period is the REF_CLK period including the fractional value. |
| 1656 | |
| 1657 | Examples: |
| 1658 | |
| 1659 | If the REF_CLK is 24 MHz then: |
| 1660 | * USBH()_UAHC_GUCTL[REFCLKPER] = 41. |
| 1661 | * GLADJ_REFCLK_FLADJ = ((125000/41) - |
| 1662 | (125000/41.6666)) * 41.6666 = 2032 (ignoring the fractional value). |
| 1663 | |
| 1664 | If the REF_CLK is 48 MHz then: |
| 1665 | * USBH()_UAHC_GUCTL[REFCLKPER] = 20. |
| 1666 | * GLADJ_REFCLK_FLADJ = ((125000/20) - |
| 1667 | (125000/20.8333)) * 20.8333 = 5208 (ignoring the fractional value). */ |
| 1668 | uint32_t reserved_22 : 1; |
| 1669 | uint32_t gfladj_refclk_lpm_sel : 1; /**< [ 23: 23](R/W) This bit enables the functionality of running SOF/ITP counters on the REF_CLK. |
| 1670 | This bit must not be set to 1 if USBH()_UAHC_GCTL[SOFITPSYNC] = 1. Similarly, if |
| 1671 | [GFLADJ_REFCLK_LPM_SEL] = 1, USBH()_UAHC_GCTL[SOFITPSYNC] must not be set to 1. |
| 1672 | When [GFLADJ_REFCLK_LPM_SEL] = 1 the overloading of the suspend control of the USB 2.0 |
| 1673 | first |
| 1674 | port PHY (UTMI) with USB 3.0 port states is removed. Note that the REF_CLK frequencies |
| 1675 | supported in this mode are 16/17/19.2/20/24/39.7/40 MHz. |
| 1676 | |
| 1677 | Internal: |
| 1678 | The utmi_clk[0] signal of the core must be connected to the FREECLK of the PHY. |
| 1679 | If you set this bit to 1, USBH()_UAHC_GUSB2PHYCFG()[U2_FREECLK_EXISTS] must be set to 0. */ |
| 1680 | uint32_t gfladj_refclk_240mhz_decr : 7;/**< [ 30: 24](R/W) This field indicates the decrement value that the controller applies for each REF_CLK in |
| 1681 | order to derive a frame timer in terms of a 240-MHz clock. This field must be programmed |
| 1682 | to a nonzero value only if [GFLADJ_REFCLK_LPM_SEL] is set to 1. |
| 1683 | |
| 1684 | The value is derived as follows: |
| 1685 | _ [GFLADJ_REFCLK_240MHZ_DECR] = 240/ref_clk_frequency |
| 1686 | |
| 1687 | Examples: |
| 1688 | |
| 1689 | If the REF_CLK is 24 MHz then: |
| 1690 | * USBH()_UAHC_GUCTL[REFCLKPER] = 41. |
| 1691 | * [GFLADJ_REFCLK_240MHZ_DECR] = 240/24 = 10. |
| 1692 | |
| 1693 | If the REF_CLK is 48 MHz then: |
| 1694 | * USBH()_UAHC_GUCTL[REFCLKPER] = 20. |
| 1695 | * [GFLADJ_REFCLK_240MHZ_DECR] = 240/48 = 5. |
| 1696 | |
| 1697 | If the REF_CLK is 17 MHz then: |
| 1698 | * USBH()_UAHC_GUCTL[REFCLKPER] = 58. |
| 1699 | * [GFLADJ_REFCLK_240MHZ_DECR] = 240/17 = 14. */ |
| 1700 | uint32_t gfladj_refclk_240mhzdecr_pls1 : 1;/**< [ 31: 31](R/W) This field indicates that the decrement value that the controller applies for each REF_CLK |
| 1701 | must be GFLADJ_REFCLK_240MHZ_DECR and GFLADJ_REFCLK_240MHZ_DECR +1 alternatively on each |
| 1702 | REF_CLK. Set this bit to 1 only if [GFLADJ_REFCLK_LPM_SEL] is set to 1 and the fractional |
| 1703 | component of 240/ref_frequency is greater than or equal to 0.5. |
| 1704 | |
| 1705 | Example: |
| 1706 | |
| 1707 | If the REF_CLK is 19.2 MHz then: |
| 1708 | * USBH()_UAHC_GUCTL[REFCLKPER] = 52. |
| 1709 | * [GFLADJ_REFCLK_240MHZ_DECR] = (240/19.2) = 12.5. |
| 1710 | * [GFLADJ_REFCLK_240MHZDECR_PLS1] = 1. |
| 1711 | |
| 1712 | If the REF_CLK is 24 MHz then: |
| 1713 | * USBH()_UAHC_GUCTL[REFCLKPER] = 41. |
| 1714 | * [GFLADJ_REFCLK_240MHZ_DECR] = (240/24) = 10. |
| 1715 | * [GFLADJ_REFCLK_240MHZDECR_PLS1] = 0. */ |
| 1716 | #endif /* Word 0 - End */ |
| 1717 | } s; |
| 1718 | /* struct bdk_usbhx_uahc_gfladj_s cn; */ |
| 1719 | }; |
| 1720 | typedef union bdk_usbhx_uahc_gfladj bdk_usbhx_uahc_gfladj_t; |
| 1721 | |
| 1722 | static inline uint64_t BDK_USBHX_UAHC_GFLADJ(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1723 | static inline uint64_t BDK_USBHX_UAHC_GFLADJ(unsigned long a) |
| 1724 | { |
| 1725 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 1726 | return 0x86800000c630ll + 0x1000000000ll * ((a) & 0x1); |
| 1727 | __bdk_csr_fatal("USBHX_UAHC_GFLADJ", 1, a, 0, 0, 0); |
| 1728 | } |
| 1729 | |
| 1730 | #define typedef_BDK_USBHX_UAHC_GFLADJ(a) bdk_usbhx_uahc_gfladj_t |
| 1731 | #define bustype_BDK_USBHX_UAHC_GFLADJ(a) BDK_CSR_TYPE_NCB32b |
| 1732 | #define basename_BDK_USBHX_UAHC_GFLADJ(a) "USBHX_UAHC_GFLADJ" |
| 1733 | #define device_bar_BDK_USBHX_UAHC_GFLADJ(a) 0x0 /* PF_BAR0 */ |
| 1734 | #define busnum_BDK_USBHX_UAHC_GFLADJ(a) (a) |
| 1735 | #define arguments_BDK_USBHX_UAHC_GFLADJ(a) (a),-1,-1,-1 |
| 1736 | |
| 1737 | /** |
| 1738 | * Register (NCB32b) usbh#_uahc_ggpio |
| 1739 | * |
| 1740 | * UAHC Core General-Purpose I/O Register |
| 1741 | * The application can use this register for general purpose input and output ports or for |
| 1742 | * debugging. |
| 1743 | * |
| 1744 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 1745 | * |
| 1746 | * Internal: |
| 1747 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.1.9. |
| 1748 | */ |
| 1749 | union bdk_usbhx_uahc_ggpio |
| 1750 | { |
| 1751 | uint32_t u; |
| 1752 | struct bdk_usbhx_uahc_ggpio_s |
| 1753 | { |
| 1754 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1755 | uint32_t gpo : 16; /**< [ 31: 16](R/W) General purpose output. These outputs are not connected to anything. Can be used as scratch. */ |
| 1756 | uint32_t gpi : 16; /**< [ 15: 0](RO) General purpose input. These inputs are tied 0x0. */ |
| 1757 | #else /* Word 0 - Little Endian */ |
| 1758 | uint32_t gpi : 16; /**< [ 15: 0](RO) General purpose input. These inputs are tied 0x0. */ |
| 1759 | uint32_t gpo : 16; /**< [ 31: 16](R/W) General purpose output. These outputs are not connected to anything. Can be used as scratch. */ |
| 1760 | #endif /* Word 0 - End */ |
| 1761 | } s; |
| 1762 | /* struct bdk_usbhx_uahc_ggpio_s cn; */ |
| 1763 | }; |
| 1764 | typedef union bdk_usbhx_uahc_ggpio bdk_usbhx_uahc_ggpio_t; |
| 1765 | |
| 1766 | static inline uint64_t BDK_USBHX_UAHC_GGPIO(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1767 | static inline uint64_t BDK_USBHX_UAHC_GGPIO(unsigned long a) |
| 1768 | { |
| 1769 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 1770 | return 0x86800000c124ll + 0x1000000000ll * ((a) & 0x1); |
| 1771 | __bdk_csr_fatal("USBHX_UAHC_GGPIO", 1, a, 0, 0, 0); |
| 1772 | } |
| 1773 | |
| 1774 | #define typedef_BDK_USBHX_UAHC_GGPIO(a) bdk_usbhx_uahc_ggpio_t |
| 1775 | #define bustype_BDK_USBHX_UAHC_GGPIO(a) BDK_CSR_TYPE_NCB32b |
| 1776 | #define basename_BDK_USBHX_UAHC_GGPIO(a) "USBHX_UAHC_GGPIO" |
| 1777 | #define device_bar_BDK_USBHX_UAHC_GGPIO(a) 0x0 /* PF_BAR0 */ |
| 1778 | #define busnum_BDK_USBHX_UAHC_GGPIO(a) (a) |
| 1779 | #define arguments_BDK_USBHX_UAHC_GGPIO(a) (a),-1,-1,-1 |
| 1780 | |
| 1781 | /** |
| 1782 | * Register (NCB32b) usbh#_uahc_ghwparams0 |
| 1783 | * |
| 1784 | * UAHC Hardware Parameters Register 0 |
| 1785 | * This register contains the hardware configuration options selected at compile-time. |
| 1786 | * Internal: |
| 1787 | * Register field names refer to Synopsys DWC_USB3_* parameters of the same suffix. |
| 1788 | * INTERNAL: See Synopsys DWC_usb3 Databook v2.50a, section 6.2.3.1. |
| 1789 | */ |
| 1790 | union bdk_usbhx_uahc_ghwparams0 |
| 1791 | { |
| 1792 | uint32_t u; |
| 1793 | struct bdk_usbhx_uahc_ghwparams0_s |
| 1794 | { |
| 1795 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1796 | uint32_t awidth : 8; /**< [ 31: 24](RO) USB core bus-address width. */ |
| 1797 | uint32_t sdwidth : 8; /**< [ 23: 16](RO) USB core bus slave-data width. */ |
| 1798 | uint32_t mdwidth : 8; /**< [ 15: 8](RO) USB core bus master-data width. */ |
| 1799 | uint32_t sbus_type : 2; /**< [ 7: 6](RO) USB core bus slave type: AXI. */ |
| 1800 | uint32_t mbus_type : 3; /**< [ 5: 3](RO) USB core bus master type: AXI. */ |
| 1801 | uint32_t mode : 3; /**< [ 2: 0](RO) Operation mode: 0x1: host-only. */ |
| 1802 | #else /* Word 0 - Little Endian */ |
| 1803 | uint32_t mode : 3; /**< [ 2: 0](RO) Operation mode: 0x1: host-only. */ |
| 1804 | uint32_t mbus_type : 3; /**< [ 5: 3](RO) USB core bus master type: AXI. */ |
| 1805 | uint32_t sbus_type : 2; /**< [ 7: 6](RO) USB core bus slave type: AXI. */ |
| 1806 | uint32_t mdwidth : 8; /**< [ 15: 8](RO) USB core bus master-data width. */ |
| 1807 | uint32_t sdwidth : 8; /**< [ 23: 16](RO) USB core bus slave-data width. */ |
| 1808 | uint32_t awidth : 8; /**< [ 31: 24](RO) USB core bus-address width. */ |
| 1809 | #endif /* Word 0 - End */ |
| 1810 | } s; |
| 1811 | /* struct bdk_usbhx_uahc_ghwparams0_s cn; */ |
| 1812 | }; |
| 1813 | typedef union bdk_usbhx_uahc_ghwparams0 bdk_usbhx_uahc_ghwparams0_t; |
| 1814 | |
| 1815 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS0(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1816 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS0(unsigned long a) |
| 1817 | { |
| 1818 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 1819 | return 0x86800000c140ll + 0x1000000000ll * ((a) & 0x1); |
| 1820 | __bdk_csr_fatal("USBHX_UAHC_GHWPARAMS0", 1, a, 0, 0, 0); |
| 1821 | } |
| 1822 | |
| 1823 | #define typedef_BDK_USBHX_UAHC_GHWPARAMS0(a) bdk_usbhx_uahc_ghwparams0_t |
| 1824 | #define bustype_BDK_USBHX_UAHC_GHWPARAMS0(a) BDK_CSR_TYPE_NCB32b |
| 1825 | #define basename_BDK_USBHX_UAHC_GHWPARAMS0(a) "USBHX_UAHC_GHWPARAMS0" |
| 1826 | #define device_bar_BDK_USBHX_UAHC_GHWPARAMS0(a) 0x0 /* PF_BAR0 */ |
| 1827 | #define busnum_BDK_USBHX_UAHC_GHWPARAMS0(a) (a) |
| 1828 | #define arguments_BDK_USBHX_UAHC_GHWPARAMS0(a) (a),-1,-1,-1 |
| 1829 | |
| 1830 | /** |
| 1831 | * Register (NCB32b) usbh#_uahc_ghwparams1 |
| 1832 | * |
| 1833 | * UAHC Hardware Parameters Register 1 |
| 1834 | * This register contains the hardware configuration options selected at compile-time. |
| 1835 | * Internal: |
| 1836 | * Register field names refer to Synopsys DWC_USB3_* parameters of the same suffix. |
| 1837 | * INTERNAL: See Synopsys DWC_usb3 Databook v2.50a, section 6.2.3.2. |
| 1838 | */ |
| 1839 | union bdk_usbhx_uahc_ghwparams1 |
| 1840 | { |
| 1841 | uint32_t u; |
| 1842 | struct bdk_usbhx_uahc_ghwparams1_s |
| 1843 | { |
| 1844 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1845 | uint32_t en_dbc : 1; /**< [ 31: 31](RO) Enable debug capability. */ |
| 1846 | uint32_t rm_opt_features : 1; /**< [ 30: 30](RO) Remove optional features. */ |
| 1847 | uint32_t sync_rst : 1; /**< [ 29: 29](RO) Synchronous reset coding. */ |
| 1848 | uint32_t ram_bus_clks_sync : 1; /**< [ 28: 28](RO) RAM_CLK and BUS_CLK are synchronous. |
| 1849 | Internal: |
| 1850 | (appears to be orthogonal from the |
| 1851 | RAM_CLK_TO_BUS_CLK parameter) */ |
| 1852 | uint32_t mac_ram_clks_sync : 1; /**< [ 27: 27](RO) MAC3_CLK and RAM_CLK are synchronous. */ |
| 1853 | uint32_t mac_phy_clks_sync : 1; /**< [ 26: 26](RO) MAC3_CLK and PHY_CLK are synchronous. */ |
| 1854 | uint32_t en_pwropt : 2; /**< [ 25: 24](RO) Power optimization mode: |
| 1855 | bit\<0\> = Clock-gating feature available. |
| 1856 | bit\<1\> = Hibernation feature available. */ |
| 1857 | uint32_t spram_typ : 1; /**< [ 23: 23](RO) SRAM type: one-port RAMs. */ |
| 1858 | uint32_t num_rams : 2; /**< [ 22: 21](RO) Number of RAMs. */ |
| 1859 | uint32_t device_num_int : 6; /**< [ 20: 15](RO) Number of event buffers (and interrupts) in device-mode (unsupported). */ |
| 1860 | uint32_t aspacewidth : 3; /**< [ 14: 12](RO) Native interface address-space port width. */ |
| 1861 | uint32_t reqinfowidth : 3; /**< [ 11: 9](RO) Native interface request/response-info port width. */ |
| 1862 | uint32_t datainfowidth : 3; /**< [ 8: 6](RO) Native interface data-info port width. */ |
| 1863 | uint32_t burstwidth_m1 : 3; /**< [ 5: 3](RO) Width minus one of AXI length field. */ |
| 1864 | uint32_t idwidth_m1 : 3; /**< [ 2: 0](RO) Width minus one of AXI ID field. */ |
| 1865 | #else /* Word 0 - Little Endian */ |
| 1866 | uint32_t idwidth_m1 : 3; /**< [ 2: 0](RO) Width minus one of AXI ID field. */ |
| 1867 | uint32_t burstwidth_m1 : 3; /**< [ 5: 3](RO) Width minus one of AXI length field. */ |
| 1868 | uint32_t datainfowidth : 3; /**< [ 8: 6](RO) Native interface data-info port width. */ |
| 1869 | uint32_t reqinfowidth : 3; /**< [ 11: 9](RO) Native interface request/response-info port width. */ |
| 1870 | uint32_t aspacewidth : 3; /**< [ 14: 12](RO) Native interface address-space port width. */ |
| 1871 | uint32_t device_num_int : 6; /**< [ 20: 15](RO) Number of event buffers (and interrupts) in device-mode (unsupported). */ |
| 1872 | uint32_t num_rams : 2; /**< [ 22: 21](RO) Number of RAMs. */ |
| 1873 | uint32_t spram_typ : 1; /**< [ 23: 23](RO) SRAM type: one-port RAMs. */ |
| 1874 | uint32_t en_pwropt : 2; /**< [ 25: 24](RO) Power optimization mode: |
| 1875 | bit\<0\> = Clock-gating feature available. |
| 1876 | bit\<1\> = Hibernation feature available. */ |
| 1877 | uint32_t mac_phy_clks_sync : 1; /**< [ 26: 26](RO) MAC3_CLK and PHY_CLK are synchronous. */ |
| 1878 | uint32_t mac_ram_clks_sync : 1; /**< [ 27: 27](RO) MAC3_CLK and RAM_CLK are synchronous. */ |
| 1879 | uint32_t ram_bus_clks_sync : 1; /**< [ 28: 28](RO) RAM_CLK and BUS_CLK are synchronous. |
| 1880 | Internal: |
| 1881 | (appears to be orthogonal from the |
| 1882 | RAM_CLK_TO_BUS_CLK parameter) */ |
| 1883 | uint32_t sync_rst : 1; /**< [ 29: 29](RO) Synchronous reset coding. */ |
| 1884 | uint32_t rm_opt_features : 1; /**< [ 30: 30](RO) Remove optional features. */ |
| 1885 | uint32_t en_dbc : 1; /**< [ 31: 31](RO) Enable debug capability. */ |
| 1886 | #endif /* Word 0 - End */ |
| 1887 | } s; |
| 1888 | /* struct bdk_usbhx_uahc_ghwparams1_s cn; */ |
| 1889 | }; |
| 1890 | typedef union bdk_usbhx_uahc_ghwparams1 bdk_usbhx_uahc_ghwparams1_t; |
| 1891 | |
| 1892 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS1(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1893 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS1(unsigned long a) |
| 1894 | { |
| 1895 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 1896 | return 0x86800000c144ll + 0x1000000000ll * ((a) & 0x1); |
| 1897 | __bdk_csr_fatal("USBHX_UAHC_GHWPARAMS1", 1, a, 0, 0, 0); |
| 1898 | } |
| 1899 | |
| 1900 | #define typedef_BDK_USBHX_UAHC_GHWPARAMS1(a) bdk_usbhx_uahc_ghwparams1_t |
| 1901 | #define bustype_BDK_USBHX_UAHC_GHWPARAMS1(a) BDK_CSR_TYPE_NCB32b |
| 1902 | #define basename_BDK_USBHX_UAHC_GHWPARAMS1(a) "USBHX_UAHC_GHWPARAMS1" |
| 1903 | #define device_bar_BDK_USBHX_UAHC_GHWPARAMS1(a) 0x0 /* PF_BAR0 */ |
| 1904 | #define busnum_BDK_USBHX_UAHC_GHWPARAMS1(a) (a) |
| 1905 | #define arguments_BDK_USBHX_UAHC_GHWPARAMS1(a) (a),-1,-1,-1 |
| 1906 | |
| 1907 | /** |
| 1908 | * Register (NCB32b) usbh#_uahc_ghwparams2 |
| 1909 | * |
| 1910 | * UAHC Core GHW Parameters Register 2 |
| 1911 | * This register contains the hardware configuration options selected at compile-time. |
| 1912 | * Internal: |
| 1913 | * Register field names refer to Synopsys DWC_USB3_* parameters of the same suffix. |
| 1914 | * INTERNAL: See Synopsys DWC_usb3 Databook v2.50a, section 6.2.3.3. |
| 1915 | */ |
| 1916 | union bdk_usbhx_uahc_ghwparams2 |
| 1917 | { |
| 1918 | uint32_t u; |
| 1919 | struct bdk_usbhx_uahc_ghwparams2_s |
| 1920 | { |
| 1921 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1922 | uint32_t userid : 32; /**< [ 31: 0](RO) User ID. */ |
| 1923 | #else /* Word 0 - Little Endian */ |
| 1924 | uint32_t userid : 32; /**< [ 31: 0](RO) User ID. */ |
| 1925 | #endif /* Word 0 - End */ |
| 1926 | } s; |
| 1927 | /* struct bdk_usbhx_uahc_ghwparams2_s cn; */ |
| 1928 | }; |
| 1929 | typedef union bdk_usbhx_uahc_ghwparams2 bdk_usbhx_uahc_ghwparams2_t; |
| 1930 | |
| 1931 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS2(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1932 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS2(unsigned long a) |
| 1933 | { |
| 1934 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 1935 | return 0x86800000c148ll + 0x1000000000ll * ((a) & 0x1); |
| 1936 | __bdk_csr_fatal("USBHX_UAHC_GHWPARAMS2", 1, a, 0, 0, 0); |
| 1937 | } |
| 1938 | |
| 1939 | #define typedef_BDK_USBHX_UAHC_GHWPARAMS2(a) bdk_usbhx_uahc_ghwparams2_t |
| 1940 | #define bustype_BDK_USBHX_UAHC_GHWPARAMS2(a) BDK_CSR_TYPE_NCB32b |
| 1941 | #define basename_BDK_USBHX_UAHC_GHWPARAMS2(a) "USBHX_UAHC_GHWPARAMS2" |
| 1942 | #define device_bar_BDK_USBHX_UAHC_GHWPARAMS2(a) 0x0 /* PF_BAR0 */ |
| 1943 | #define busnum_BDK_USBHX_UAHC_GHWPARAMS2(a) (a) |
| 1944 | #define arguments_BDK_USBHX_UAHC_GHWPARAMS2(a) (a),-1,-1,-1 |
| 1945 | |
| 1946 | /** |
| 1947 | * Register (NCB32b) usbh#_uahc_ghwparams3 |
| 1948 | * |
| 1949 | * UAHC GHW Parameters Register 3 |
| 1950 | * This register contains the hardware configuration options selected at compile-time. |
| 1951 | * Internal: |
| 1952 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.3.4. |
| 1953 | */ |
| 1954 | union bdk_usbhx_uahc_ghwparams3 |
| 1955 | { |
| 1956 | uint32_t u; |
| 1957 | struct bdk_usbhx_uahc_ghwparams3_s |
| 1958 | { |
| 1959 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1960 | uint32_t reserved_31 : 1; |
| 1961 | uint32_t cache_total_xfer_resources : 8;/**< [ 30: 23](RO) Maximum number of transfer resources in the core. */ |
| 1962 | uint32_t num_in_eps : 5; /**< [ 22: 18](RO) Maximum number of device-mode (unsupported) IN endpoints active. */ |
| 1963 | uint32_t num_eps : 6; /**< [ 17: 12](RO) Number of device-mode (unsupported) single-directional endpoints. */ |
| 1964 | uint32_t ulpi_carkit : 1; /**< [ 11: 11](RO) ULPI carkit is not supported. */ |
| 1965 | uint32_t vendor_ctl_interface : 1; /**< [ 10: 10](RO) UTMI+ PHY vendor control interface enabled. */ |
| 1966 | uint32_t reserved_8_9 : 2; |
| 1967 | uint32_t hsphy_dwidth : 2; /**< [ 7: 6](RO) Data width of the UTMI+ PHY interface: 0x2 = 8-or-16 bits. */ |
| 1968 | uint32_t fsphy_interface : 2; /**< [ 5: 4](RO) USB 1.1 full-speed serial transceiver interface. */ |
| 1969 | uint32_t hsphy_interface : 2; /**< [ 3: 2](RO) High-speed PHY interface: 0x1 = UTMI+. */ |
| 1970 | uint32_t ssphy_interface : 2; /**< [ 1: 0](RO) SuperSpeed PHY interface: 0x1 = PIPE3. */ |
| 1971 | #else /* Word 0 - Little Endian */ |
| 1972 | uint32_t ssphy_interface : 2; /**< [ 1: 0](RO) SuperSpeed PHY interface: 0x1 = PIPE3. */ |
| 1973 | uint32_t hsphy_interface : 2; /**< [ 3: 2](RO) High-speed PHY interface: 0x1 = UTMI+. */ |
| 1974 | uint32_t fsphy_interface : 2; /**< [ 5: 4](RO) USB 1.1 full-speed serial transceiver interface. */ |
| 1975 | uint32_t hsphy_dwidth : 2; /**< [ 7: 6](RO) Data width of the UTMI+ PHY interface: 0x2 = 8-or-16 bits. */ |
| 1976 | uint32_t reserved_8_9 : 2; |
| 1977 | uint32_t vendor_ctl_interface : 1; /**< [ 10: 10](RO) UTMI+ PHY vendor control interface enabled. */ |
| 1978 | uint32_t ulpi_carkit : 1; /**< [ 11: 11](RO) ULPI carkit is not supported. */ |
| 1979 | uint32_t num_eps : 6; /**< [ 17: 12](RO) Number of device-mode (unsupported) single-directional endpoints. */ |
| 1980 | uint32_t num_in_eps : 5; /**< [ 22: 18](RO) Maximum number of device-mode (unsupported) IN endpoints active. */ |
| 1981 | uint32_t cache_total_xfer_resources : 8;/**< [ 30: 23](RO) Maximum number of transfer resources in the core. */ |
| 1982 | uint32_t reserved_31 : 1; |
| 1983 | #endif /* Word 0 - End */ |
| 1984 | } s; |
| 1985 | /* struct bdk_usbhx_uahc_ghwparams3_s cn; */ |
| 1986 | }; |
| 1987 | typedef union bdk_usbhx_uahc_ghwparams3 bdk_usbhx_uahc_ghwparams3_t; |
| 1988 | |
| 1989 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS3(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1990 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS3(unsigned long a) |
| 1991 | { |
| 1992 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 1993 | return 0x86800000c14cll + 0x1000000000ll * ((a) & 0x1); |
| 1994 | __bdk_csr_fatal("USBHX_UAHC_GHWPARAMS3", 1, a, 0, 0, 0); |
| 1995 | } |
| 1996 | |
| 1997 | #define typedef_BDK_USBHX_UAHC_GHWPARAMS3(a) bdk_usbhx_uahc_ghwparams3_t |
| 1998 | #define bustype_BDK_USBHX_UAHC_GHWPARAMS3(a) BDK_CSR_TYPE_NCB32b |
| 1999 | #define basename_BDK_USBHX_UAHC_GHWPARAMS3(a) "USBHX_UAHC_GHWPARAMS3" |
| 2000 | #define device_bar_BDK_USBHX_UAHC_GHWPARAMS3(a) 0x0 /* PF_BAR0 */ |
| 2001 | #define busnum_BDK_USBHX_UAHC_GHWPARAMS3(a) (a) |
| 2002 | #define arguments_BDK_USBHX_UAHC_GHWPARAMS3(a) (a),-1,-1,-1 |
| 2003 | |
| 2004 | /** |
| 2005 | * Register (NCB32b) usbh#_uahc_ghwparams4 |
| 2006 | * |
| 2007 | * UAHC GHW Parameters Register 4 |
| 2008 | * This register contains the hardware configuration options selected at compile-time. |
| 2009 | * Internal: |
| 2010 | * Register field names refer to Synopsys DWC_USB3_* parameters of the same suffix. |
| 2011 | * INTERNAL: See Synopsys DWC_usb3 Databook v2.50a, section 6.2.3.5. |
| 2012 | */ |
| 2013 | union bdk_usbhx_uahc_ghwparams4 |
| 2014 | { |
| 2015 | uint32_t u; |
| 2016 | struct bdk_usbhx_uahc_ghwparams4_s |
| 2017 | { |
| 2018 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2019 | uint32_t bmu_lsp_depth : 4; /**< [ 31: 28](RO) Depth of the BMU-LSP status buffer. */ |
| 2020 | uint32_t bmu_ptl_depth_m1 : 4; /**< [ 27: 24](RO) Depth of the BMU-PTL source/sink buffers minus 1. */ |
| 2021 | uint32_t en_isoc_supt : 1; /**< [ 23: 23](RO) Isochronous support enabled. */ |
| 2022 | uint32_t reserved_22 : 1; |
| 2023 | uint32_t ext_buff_control : 1; /**< [ 21: 21](RO) Enables device external buffer control sideband controls. */ |
| 2024 | uint32_t num_ss_usb_instances : 4; /**< [ 20: 17](RO) Number of SuperSpeed bus instances. */ |
| 2025 | uint32_t hiber_scratchbufs : 4; /**< [ 16: 13](RO) Number of hibernation scratchpad buffers. */ |
| 2026 | uint32_t reserved_6_12 : 7; |
| 2027 | uint32_t cache_trbs_per_transfer : 6;/**< [ 5: 0](RO) Number of TRBs per transfer that can be cached. */ |
| 2028 | #else /* Word 0 - Little Endian */ |
| 2029 | uint32_t cache_trbs_per_transfer : 6;/**< [ 5: 0](RO) Number of TRBs per transfer that can be cached. */ |
| 2030 | uint32_t reserved_6_12 : 7; |
| 2031 | uint32_t hiber_scratchbufs : 4; /**< [ 16: 13](RO) Number of hibernation scratchpad buffers. */ |
| 2032 | uint32_t num_ss_usb_instances : 4; /**< [ 20: 17](RO) Number of SuperSpeed bus instances. */ |
| 2033 | uint32_t ext_buff_control : 1; /**< [ 21: 21](RO) Enables device external buffer control sideband controls. */ |
| 2034 | uint32_t reserved_22 : 1; |
| 2035 | uint32_t en_isoc_supt : 1; /**< [ 23: 23](RO) Isochronous support enabled. */ |
| 2036 | uint32_t bmu_ptl_depth_m1 : 4; /**< [ 27: 24](RO) Depth of the BMU-PTL source/sink buffers minus 1. */ |
| 2037 | uint32_t bmu_lsp_depth : 4; /**< [ 31: 28](RO) Depth of the BMU-LSP status buffer. */ |
| 2038 | #endif /* Word 0 - End */ |
| 2039 | } s; |
| 2040 | /* struct bdk_usbhx_uahc_ghwparams4_s cn; */ |
| 2041 | }; |
| 2042 | typedef union bdk_usbhx_uahc_ghwparams4 bdk_usbhx_uahc_ghwparams4_t; |
| 2043 | |
| 2044 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS4(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2045 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS4(unsigned long a) |
| 2046 | { |
| 2047 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 2048 | return 0x86800000c150ll + 0x1000000000ll * ((a) & 0x1); |
| 2049 | __bdk_csr_fatal("USBHX_UAHC_GHWPARAMS4", 1, a, 0, 0, 0); |
| 2050 | } |
| 2051 | |
| 2052 | #define typedef_BDK_USBHX_UAHC_GHWPARAMS4(a) bdk_usbhx_uahc_ghwparams4_t |
| 2053 | #define bustype_BDK_USBHX_UAHC_GHWPARAMS4(a) BDK_CSR_TYPE_NCB32b |
| 2054 | #define basename_BDK_USBHX_UAHC_GHWPARAMS4(a) "USBHX_UAHC_GHWPARAMS4" |
| 2055 | #define device_bar_BDK_USBHX_UAHC_GHWPARAMS4(a) 0x0 /* PF_BAR0 */ |
| 2056 | #define busnum_BDK_USBHX_UAHC_GHWPARAMS4(a) (a) |
| 2057 | #define arguments_BDK_USBHX_UAHC_GHWPARAMS4(a) (a),-1,-1,-1 |
| 2058 | |
| 2059 | /** |
| 2060 | * Register (NCB32b) usbh#_uahc_ghwparams5 |
| 2061 | * |
| 2062 | * UAHC GHW Parameters Register 5 |
| 2063 | * This register contains the hardware configuration options selected at compile-time. |
| 2064 | * Internal: |
| 2065 | * Register field names refer to Synopsys DWC_USB3_* parameters of the same suffix. |
| 2066 | * INTERNAL: See Synopsys DWC_usb3 Databook v2.50a, section 6.2.3.6. |
| 2067 | */ |
| 2068 | union bdk_usbhx_uahc_ghwparams5 |
| 2069 | { |
| 2070 | uint32_t u; |
| 2071 | struct bdk_usbhx_uahc_ghwparams5_s |
| 2072 | { |
| 2073 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2074 | uint32_t reserved_28_31 : 4; |
| 2075 | uint32_t dfq_fifo_depth : 6; /**< [ 27: 22](RO) Size of the BMU descriptor fetch-request queue. */ |
| 2076 | uint32_t dwq_fifo_depth : 6; /**< [ 21: 16](RO) Size of the BMU descriptor write queue. */ |
| 2077 | uint32_t txq_fifo_depth : 6; /**< [ 15: 10](RO) Size of the BMU TX request queue. */ |
| 2078 | uint32_t rxq_fifo_depth : 6; /**< [ 9: 4](RO) Size of the BMU RX request queue. */ |
| 2079 | uint32_t bmu_busgm_depth : 4; /**< [ 3: 0](RO) Depth of the BMU-BUSGM source/sink buffers. */ |
| 2080 | #else /* Word 0 - Little Endian */ |
| 2081 | uint32_t bmu_busgm_depth : 4; /**< [ 3: 0](RO) Depth of the BMU-BUSGM source/sink buffers. */ |
| 2082 | uint32_t rxq_fifo_depth : 6; /**< [ 9: 4](RO) Size of the BMU RX request queue. */ |
| 2083 | uint32_t txq_fifo_depth : 6; /**< [ 15: 10](RO) Size of the BMU TX request queue. */ |
| 2084 | uint32_t dwq_fifo_depth : 6; /**< [ 21: 16](RO) Size of the BMU descriptor write queue. */ |
| 2085 | uint32_t dfq_fifo_depth : 6; /**< [ 27: 22](RO) Size of the BMU descriptor fetch-request queue. */ |
| 2086 | uint32_t reserved_28_31 : 4; |
| 2087 | #endif /* Word 0 - End */ |
| 2088 | } s; |
| 2089 | /* struct bdk_usbhx_uahc_ghwparams5_s cn; */ |
| 2090 | }; |
| 2091 | typedef union bdk_usbhx_uahc_ghwparams5 bdk_usbhx_uahc_ghwparams5_t; |
| 2092 | |
| 2093 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS5(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2094 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS5(unsigned long a) |
| 2095 | { |
| 2096 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 2097 | return 0x86800000c154ll + 0x1000000000ll * ((a) & 0x1); |
| 2098 | __bdk_csr_fatal("USBHX_UAHC_GHWPARAMS5", 1, a, 0, 0, 0); |
| 2099 | } |
| 2100 | |
| 2101 | #define typedef_BDK_USBHX_UAHC_GHWPARAMS5(a) bdk_usbhx_uahc_ghwparams5_t |
| 2102 | #define bustype_BDK_USBHX_UAHC_GHWPARAMS5(a) BDK_CSR_TYPE_NCB32b |
| 2103 | #define basename_BDK_USBHX_UAHC_GHWPARAMS5(a) "USBHX_UAHC_GHWPARAMS5" |
| 2104 | #define device_bar_BDK_USBHX_UAHC_GHWPARAMS5(a) 0x0 /* PF_BAR0 */ |
| 2105 | #define busnum_BDK_USBHX_UAHC_GHWPARAMS5(a) (a) |
| 2106 | #define arguments_BDK_USBHX_UAHC_GHWPARAMS5(a) (a),-1,-1,-1 |
| 2107 | |
| 2108 | /** |
| 2109 | * Register (NCB32b) usbh#_uahc_ghwparams6 |
| 2110 | * |
| 2111 | * UAHC GHW Parameters Register 6 |
| 2112 | * This register contains the hardware configuration options selected at compile-time. |
| 2113 | * Internal: |
| 2114 | * Register field names refer to Synopsys DWC_USB3_* parameters of the same suffix. |
| 2115 | * INTERNAL: See Synopsys DWC_usb3 Databook v2.50a, section 6.2.3.7. |
| 2116 | */ |
| 2117 | union bdk_usbhx_uahc_ghwparams6 |
| 2118 | { |
| 2119 | uint32_t u; |
| 2120 | struct bdk_usbhx_uahc_ghwparams6_s |
| 2121 | { |
| 2122 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2123 | uint32_t ram0_depth : 16; /**< [ 31: 16](RO) RAM0 depth. */ |
| 2124 | uint32_t en_bus_filters : 1; /**< [ 15: 15](RO) Enable VBus filters support. */ |
| 2125 | uint32_t en_bc : 1; /**< [ 14: 14](RO) Enable battery charging support. */ |
| 2126 | uint32_t en_otg_ss : 1; /**< [ 13: 13](RO) Enable OTG SuperSpeed support. */ |
| 2127 | uint32_t en_adp : 1; /**< [ 12: 12](RO) Enable ADP support. */ |
| 2128 | uint32_t hnp_support : 1; /**< [ 11: 11](RO) HNP support. */ |
| 2129 | uint32_t srp_support : 1; /**< [ 10: 10](RO) SRP support. */ |
| 2130 | uint32_t reserved_8_9 : 2; |
| 2131 | uint32_t en_fpga : 1; /**< [ 7: 7](RO) Enable FPGA implementation. */ |
| 2132 | uint32_t en_dbg_ports : 1; /**< [ 6: 6](RO) Enable debug ports for FGPA. */ |
| 2133 | uint32_t psq_fifo_depth : 6; /**< [ 5: 0](RO) Size of the BMU protocol status queue. */ |
| 2134 | #else /* Word 0 - Little Endian */ |
| 2135 | uint32_t psq_fifo_depth : 6; /**< [ 5: 0](RO) Size of the BMU protocol status queue. */ |
| 2136 | uint32_t en_dbg_ports : 1; /**< [ 6: 6](RO) Enable debug ports for FGPA. */ |
| 2137 | uint32_t en_fpga : 1; /**< [ 7: 7](RO) Enable FPGA implementation. */ |
| 2138 | uint32_t reserved_8_9 : 2; |
| 2139 | uint32_t srp_support : 1; /**< [ 10: 10](RO) SRP support. */ |
| 2140 | uint32_t hnp_support : 1; /**< [ 11: 11](RO) HNP support. */ |
| 2141 | uint32_t en_adp : 1; /**< [ 12: 12](RO) Enable ADP support. */ |
| 2142 | uint32_t en_otg_ss : 1; /**< [ 13: 13](RO) Enable OTG SuperSpeed support. */ |
| 2143 | uint32_t en_bc : 1; /**< [ 14: 14](RO) Enable battery charging support. */ |
| 2144 | uint32_t en_bus_filters : 1; /**< [ 15: 15](RO) Enable VBus filters support. */ |
| 2145 | uint32_t ram0_depth : 16; /**< [ 31: 16](RO) RAM0 depth. */ |
| 2146 | #endif /* Word 0 - End */ |
| 2147 | } s; |
| 2148 | /* struct bdk_usbhx_uahc_ghwparams6_s cn; */ |
| 2149 | }; |
| 2150 | typedef union bdk_usbhx_uahc_ghwparams6 bdk_usbhx_uahc_ghwparams6_t; |
| 2151 | |
| 2152 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS6(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2153 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS6(unsigned long a) |
| 2154 | { |
| 2155 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 2156 | return 0x86800000c158ll + 0x1000000000ll * ((a) & 0x1); |
| 2157 | __bdk_csr_fatal("USBHX_UAHC_GHWPARAMS6", 1, a, 0, 0, 0); |
| 2158 | } |
| 2159 | |
| 2160 | #define typedef_BDK_USBHX_UAHC_GHWPARAMS6(a) bdk_usbhx_uahc_ghwparams6_t |
| 2161 | #define bustype_BDK_USBHX_UAHC_GHWPARAMS6(a) BDK_CSR_TYPE_NCB32b |
| 2162 | #define basename_BDK_USBHX_UAHC_GHWPARAMS6(a) "USBHX_UAHC_GHWPARAMS6" |
| 2163 | #define device_bar_BDK_USBHX_UAHC_GHWPARAMS6(a) 0x0 /* PF_BAR0 */ |
| 2164 | #define busnum_BDK_USBHX_UAHC_GHWPARAMS6(a) (a) |
| 2165 | #define arguments_BDK_USBHX_UAHC_GHWPARAMS6(a) (a),-1,-1,-1 |
| 2166 | |
| 2167 | /** |
| 2168 | * Register (NCB32b) usbh#_uahc_ghwparams7 |
| 2169 | * |
| 2170 | * UAHC GHW Parameters Register 7 |
| 2171 | * This register contains the hardware configuration options selected at compile-time. |
| 2172 | * Internal: |
| 2173 | * Register field names refer to Synopsys DWC_USB3_* parameters of the same suffix. |
| 2174 | * INTERNAL: See Synopsys DWC_usb3 Databook v2.50a, section 6.2.3.8. |
| 2175 | */ |
| 2176 | union bdk_usbhx_uahc_ghwparams7 |
| 2177 | { |
| 2178 | uint32_t u; |
| 2179 | struct bdk_usbhx_uahc_ghwparams7_s |
| 2180 | { |
| 2181 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2182 | uint32_t ram2_depth : 16; /**< [ 31: 16](RO) RAM2 depth. */ |
| 2183 | uint32_t ram1_depth : 16; /**< [ 15: 0](RO) RAM1 depth. */ |
| 2184 | #else /* Word 0 - Little Endian */ |
| 2185 | uint32_t ram1_depth : 16; /**< [ 15: 0](RO) RAM1 depth. */ |
| 2186 | uint32_t ram2_depth : 16; /**< [ 31: 16](RO) RAM2 depth. */ |
| 2187 | #endif /* Word 0 - End */ |
| 2188 | } s; |
| 2189 | /* struct bdk_usbhx_uahc_ghwparams7_s cn; */ |
| 2190 | }; |
| 2191 | typedef union bdk_usbhx_uahc_ghwparams7 bdk_usbhx_uahc_ghwparams7_t; |
| 2192 | |
| 2193 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS7(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2194 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS7(unsigned long a) |
| 2195 | { |
| 2196 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 2197 | return 0x86800000c15cll + 0x1000000000ll * ((a) & 0x1); |
| 2198 | __bdk_csr_fatal("USBHX_UAHC_GHWPARAMS7", 1, a, 0, 0, 0); |
| 2199 | } |
| 2200 | |
| 2201 | #define typedef_BDK_USBHX_UAHC_GHWPARAMS7(a) bdk_usbhx_uahc_ghwparams7_t |
| 2202 | #define bustype_BDK_USBHX_UAHC_GHWPARAMS7(a) BDK_CSR_TYPE_NCB32b |
| 2203 | #define basename_BDK_USBHX_UAHC_GHWPARAMS7(a) "USBHX_UAHC_GHWPARAMS7" |
| 2204 | #define device_bar_BDK_USBHX_UAHC_GHWPARAMS7(a) 0x0 /* PF_BAR0 */ |
| 2205 | #define busnum_BDK_USBHX_UAHC_GHWPARAMS7(a) (a) |
| 2206 | #define arguments_BDK_USBHX_UAHC_GHWPARAMS7(a) (a),-1,-1,-1 |
| 2207 | |
| 2208 | /** |
| 2209 | * Register (NCB32b) usbh#_uahc_ghwparams8 |
| 2210 | * |
| 2211 | * UAHC GHW Parameters Register 8 |
| 2212 | * This register contains the hardware configuration options selected at compile-time. |
| 2213 | * Internal: |
| 2214 | * Register field names refer to Synopsys DWC_USB3_* parameters of the same suffix. |
| 2215 | * INTERNAL: See Synopsys DWC_usb3 Databook v2.20a, section 6.2.3.9. |
| 2216 | */ |
| 2217 | union bdk_usbhx_uahc_ghwparams8 |
| 2218 | { |
| 2219 | uint32_t u; |
| 2220 | struct bdk_usbhx_uahc_ghwparams8_s |
| 2221 | { |
| 2222 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2223 | uint32_t dcache_depth_info : 32; /**< [ 31: 0](RO) Dcache depth. */ |
| 2224 | #else /* Word 0 - Little Endian */ |
| 2225 | uint32_t dcache_depth_info : 32; /**< [ 31: 0](RO) Dcache depth. */ |
| 2226 | #endif /* Word 0 - End */ |
| 2227 | } s; |
| 2228 | /* struct bdk_usbhx_uahc_ghwparams8_s cn; */ |
| 2229 | }; |
| 2230 | typedef union bdk_usbhx_uahc_ghwparams8 bdk_usbhx_uahc_ghwparams8_t; |
| 2231 | |
| 2232 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS8(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2233 | static inline uint64_t BDK_USBHX_UAHC_GHWPARAMS8(unsigned long a) |
| 2234 | { |
| 2235 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 2236 | return 0x86800000c600ll + 0x1000000000ll * ((a) & 0x1); |
| 2237 | __bdk_csr_fatal("USBHX_UAHC_GHWPARAMS8", 1, a, 0, 0, 0); |
| 2238 | } |
| 2239 | |
| 2240 | #define typedef_BDK_USBHX_UAHC_GHWPARAMS8(a) bdk_usbhx_uahc_ghwparams8_t |
| 2241 | #define bustype_BDK_USBHX_UAHC_GHWPARAMS8(a) BDK_CSR_TYPE_NCB32b |
| 2242 | #define basename_BDK_USBHX_UAHC_GHWPARAMS8(a) "USBHX_UAHC_GHWPARAMS8" |
| 2243 | #define device_bar_BDK_USBHX_UAHC_GHWPARAMS8(a) 0x0 /* PF_BAR0 */ |
| 2244 | #define busnum_BDK_USBHX_UAHC_GHWPARAMS8(a) (a) |
| 2245 | #define arguments_BDK_USBHX_UAHC_GHWPARAMS8(a) (a),-1,-1,-1 |
| 2246 | |
| 2247 | /** |
| 2248 | * Register (NCB32b) usbh#_uahc_gpmsts |
| 2249 | * |
| 2250 | * UAHC Global Power Management Status Register |
| 2251 | * This debug register gives information on which event caused the hibernation exit. These |
| 2252 | * registers are for debug purposes. They provide debug information on the internal status and |
| 2253 | * state machines. Global debug registers have design-specific information, and are used by for |
| 2254 | * debugging purposes. These registers are not intended to be used by the customer. If any debug |
| 2255 | * assistance is needed for the silicon, contact customer support with a dump of these registers. |
| 2256 | * |
| 2257 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 2258 | * |
| 2259 | * Internal: |
| 2260 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.4.1. |
| 2261 | * INTERNAL: Contact Synopsys directly. |
| 2262 | */ |
| 2263 | union bdk_usbhx_uahc_gpmsts |
| 2264 | { |
| 2265 | uint32_t u; |
| 2266 | struct bdk_usbhx_uahc_gpmsts_s |
| 2267 | { |
| 2268 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2269 | uint32_t portsel : 4; /**< [ 31: 28](WO) This field selects the port number. Always 0x0. */ |
| 2270 | uint32_t reserved_17_27 : 11; |
| 2271 | uint32_t u3wakeup : 5; /**< [ 16: 12](RO/H) This field gives the USB 3.0 port wakeup conditions. |
| 2272 | bit\<12\> = Overcurrent detected. |
| 2273 | bit\<13\> = Resume detected. |
| 2274 | bit\<14\> = Connect detected. |
| 2275 | bit\<15\> = Disconnect detected. |
| 2276 | bit\<16\> = Last connection state. */ |
| 2277 | uint32_t reserved_10_11 : 2; |
| 2278 | uint32_t u2wakeup : 10; /**< [ 9: 0](RO/H) This field indicates the USB 2.0 port wakeup conditions. |
| 2279 | bit\<0\> = Overcurrent detected. |
| 2280 | bit\<1\> = Resume detected. |
| 2281 | bit\<2\> = Connect detected. |
| 2282 | bit\<3\> = Disconnect detected. |
| 2283 | bit\<4\> = Last connection state. |
| 2284 | bit\<5\> = ID change detected. |
| 2285 | bit\<6\> = SRP request detected. |
| 2286 | bit\<7\> = ULPI interrupt detected. |
| 2287 | bit\<8\> = USB reset detected. |
| 2288 | bit\<9\> = Resume detected changed. */ |
| 2289 | #else /* Word 0 - Little Endian */ |
| 2290 | uint32_t u2wakeup : 10; /**< [ 9: 0](RO/H) This field indicates the USB 2.0 port wakeup conditions. |
| 2291 | bit\<0\> = Overcurrent detected. |
| 2292 | bit\<1\> = Resume detected. |
| 2293 | bit\<2\> = Connect detected. |
| 2294 | bit\<3\> = Disconnect detected. |
| 2295 | bit\<4\> = Last connection state. |
| 2296 | bit\<5\> = ID change detected. |
| 2297 | bit\<6\> = SRP request detected. |
| 2298 | bit\<7\> = ULPI interrupt detected. |
| 2299 | bit\<8\> = USB reset detected. |
| 2300 | bit\<9\> = Resume detected changed. */ |
| 2301 | uint32_t reserved_10_11 : 2; |
| 2302 | uint32_t u3wakeup : 5; /**< [ 16: 12](RO/H) This field gives the USB 3.0 port wakeup conditions. |
| 2303 | bit\<12\> = Overcurrent detected. |
| 2304 | bit\<13\> = Resume detected. |
| 2305 | bit\<14\> = Connect detected. |
| 2306 | bit\<15\> = Disconnect detected. |
| 2307 | bit\<16\> = Last connection state. */ |
| 2308 | uint32_t reserved_17_27 : 11; |
| 2309 | uint32_t portsel : 4; /**< [ 31: 28](WO) This field selects the port number. Always 0x0. */ |
| 2310 | #endif /* Word 0 - End */ |
| 2311 | } s; |
| 2312 | /* struct bdk_usbhx_uahc_gpmsts_s cn; */ |
| 2313 | }; |
| 2314 | typedef union bdk_usbhx_uahc_gpmsts bdk_usbhx_uahc_gpmsts_t; |
| 2315 | |
| 2316 | static inline uint64_t BDK_USBHX_UAHC_GPMSTS(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2317 | static inline uint64_t BDK_USBHX_UAHC_GPMSTS(unsigned long a) |
| 2318 | { |
| 2319 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 2320 | return 0x86800000c114ll + 0x1000000000ll * ((a) & 0x1); |
| 2321 | __bdk_csr_fatal("USBHX_UAHC_GPMSTS", 1, a, 0, 0, 0); |
| 2322 | } |
| 2323 | |
| 2324 | #define typedef_BDK_USBHX_UAHC_GPMSTS(a) bdk_usbhx_uahc_gpmsts_t |
| 2325 | #define bustype_BDK_USBHX_UAHC_GPMSTS(a) BDK_CSR_TYPE_NCB32b |
| 2326 | #define basename_BDK_USBHX_UAHC_GPMSTS(a) "USBHX_UAHC_GPMSTS" |
| 2327 | #define device_bar_BDK_USBHX_UAHC_GPMSTS(a) 0x0 /* PF_BAR0 */ |
| 2328 | #define busnum_BDK_USBHX_UAHC_GPMSTS(a) (a) |
| 2329 | #define arguments_BDK_USBHX_UAHC_GPMSTS(a) (a),-1,-1,-1 |
| 2330 | |
| 2331 | /** |
| 2332 | * Register (NCB) usbh#_uahc_gprtbimap |
| 2333 | * |
| 2334 | * UAHC SuperSpeed Port-to-Bus Instance Mapping Register |
| 2335 | * This register specifies the SuperSpeed USB instance number to which each USB 3.0 port is |
| 2336 | * connected. By default, USB 3.0 ports are evenly distributed among all SuperSpeed USB |
| 2337 | * instances. Software can program this register to specify how USB 3.0 ports are connected to |
| 2338 | * SuperSpeed USB instances. The UAHC only implements one SuperSpeed bus-instance, so this |
| 2339 | * register should always be 0. |
| 2340 | * |
| 2341 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 2342 | * |
| 2343 | * Internal: |
| 2344 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.2.1. |
| 2345 | */ |
| 2346 | union bdk_usbhx_uahc_gprtbimap |
| 2347 | { |
| 2348 | uint64_t u; |
| 2349 | struct bdk_usbhx_uahc_gprtbimap_s |
| 2350 | { |
| 2351 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2352 | uint64_t reserved_4_63 : 60; |
| 2353 | uint64_t binum1 : 4; /**< [ 3: 0](R/W) SuperSpeed USB instance number for port 1. */ |
| 2354 | #else /* Word 0 - Little Endian */ |
| 2355 | uint64_t binum1 : 4; /**< [ 3: 0](R/W) SuperSpeed USB instance number for port 1. */ |
| 2356 | uint64_t reserved_4_63 : 60; |
| 2357 | #endif /* Word 0 - End */ |
| 2358 | } s; |
| 2359 | /* struct bdk_usbhx_uahc_gprtbimap_s cn; */ |
| 2360 | }; |
| 2361 | typedef union bdk_usbhx_uahc_gprtbimap bdk_usbhx_uahc_gprtbimap_t; |
| 2362 | |
| 2363 | static inline uint64_t BDK_USBHX_UAHC_GPRTBIMAP(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2364 | static inline uint64_t BDK_USBHX_UAHC_GPRTBIMAP(unsigned long a) |
| 2365 | { |
| 2366 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 2367 | return 0x86800000c138ll + 0x1000000000ll * ((a) & 0x1); |
| 2368 | __bdk_csr_fatal("USBHX_UAHC_GPRTBIMAP", 1, a, 0, 0, 0); |
| 2369 | } |
| 2370 | |
| 2371 | #define typedef_BDK_USBHX_UAHC_GPRTBIMAP(a) bdk_usbhx_uahc_gprtbimap_t |
| 2372 | #define bustype_BDK_USBHX_UAHC_GPRTBIMAP(a) BDK_CSR_TYPE_NCB |
| 2373 | #define basename_BDK_USBHX_UAHC_GPRTBIMAP(a) "USBHX_UAHC_GPRTBIMAP" |
| 2374 | #define device_bar_BDK_USBHX_UAHC_GPRTBIMAP(a) 0x0 /* PF_BAR0 */ |
| 2375 | #define busnum_BDK_USBHX_UAHC_GPRTBIMAP(a) (a) |
| 2376 | #define arguments_BDK_USBHX_UAHC_GPRTBIMAP(a) (a),-1,-1,-1 |
| 2377 | |
| 2378 | /** |
| 2379 | * Register (NCB) usbh#_uahc_gprtbimap_fs |
| 2380 | * |
| 2381 | * UAHC Full/LowSpeed Port-to-Bus Instance Mapping Register |
| 2382 | * This register specifies the full-speed/low-speed USB instance number to which each USB 1.1 |
| 2383 | * port is connected. By default, USB 1.1 ports are evenly distributed among all full-speed/ |
| 2384 | * low-speed USB instances. Software can program this register to specify how USB 1.1 ports are |
| 2385 | * connected to full-speed/low-speed USB instances. The UAHC only implements one full-speed/ |
| 2386 | * low-speed bus-instance, so this register should always be 0x0. |
| 2387 | * |
| 2388 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 2389 | * |
| 2390 | * Internal: |
| 2391 | * See Synopsys DWC_usb3 Databook v2.20a, section 6.2.2.3. |
| 2392 | */ |
| 2393 | union bdk_usbhx_uahc_gprtbimap_fs |
| 2394 | { |
| 2395 | uint64_t u; |
| 2396 | struct bdk_usbhx_uahc_gprtbimap_fs_s |
| 2397 | { |
| 2398 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2399 | uint64_t reserved_4_63 : 60; |
| 2400 | uint64_t binum1 : 4; /**< [ 3: 0](R/W) Full-speed USB instance number for port 1. */ |
| 2401 | #else /* Word 0 - Little Endian */ |
| 2402 | uint64_t binum1 : 4; /**< [ 3: 0](R/W) Full-speed USB instance number for port 1. */ |
| 2403 | uint64_t reserved_4_63 : 60; |
| 2404 | #endif /* Word 0 - End */ |
| 2405 | } s; |
| 2406 | /* struct bdk_usbhx_uahc_gprtbimap_fs_s cn; */ |
| 2407 | }; |
| 2408 | typedef union bdk_usbhx_uahc_gprtbimap_fs bdk_usbhx_uahc_gprtbimap_fs_t; |
| 2409 | |
| 2410 | static inline uint64_t BDK_USBHX_UAHC_GPRTBIMAP_FS(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2411 | static inline uint64_t BDK_USBHX_UAHC_GPRTBIMAP_FS(unsigned long a) |
| 2412 | { |
| 2413 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 2414 | return 0x86800000c188ll + 0x1000000000ll * ((a) & 0x1); |
| 2415 | __bdk_csr_fatal("USBHX_UAHC_GPRTBIMAP_FS", 1, a, 0, 0, 0); |
| 2416 | } |
| 2417 | |
| 2418 | #define typedef_BDK_USBHX_UAHC_GPRTBIMAP_FS(a) bdk_usbhx_uahc_gprtbimap_fs_t |
| 2419 | #define bustype_BDK_USBHX_UAHC_GPRTBIMAP_FS(a) BDK_CSR_TYPE_NCB |
| 2420 | #define basename_BDK_USBHX_UAHC_GPRTBIMAP_FS(a) "USBHX_UAHC_GPRTBIMAP_FS" |
| 2421 | #define device_bar_BDK_USBHX_UAHC_GPRTBIMAP_FS(a) 0x0 /* PF_BAR0 */ |
| 2422 | #define busnum_BDK_USBHX_UAHC_GPRTBIMAP_FS(a) (a) |
| 2423 | #define arguments_BDK_USBHX_UAHC_GPRTBIMAP_FS(a) (a),-1,-1,-1 |
| 2424 | |
| 2425 | /** |
| 2426 | * Register (NCB) usbh#_uahc_gprtbimap_hs |
| 2427 | * |
| 2428 | * UAHC High-Speed Port-to-Bus Instance Mapping Register |
| 2429 | * This register specifies the high-speed USB instance number to which each USB 2.0 port is |
| 2430 | * connected. By default, USB 2.0 ports are evenly distributed among all high-speed USB |
| 2431 | * instances. Software can program this register to specify how USB 2.0 ports are connected to |
| 2432 | * high-speed USB instances. The UAHC only implements one high-speed bus-instance, so this |
| 2433 | * register should always be 0. |
| 2434 | * |
| 2435 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 2436 | * |
| 2437 | * Internal: |
| 2438 | * See Synopsys DWC_usb3 Databook v2.20a, section 6.2.2.2. |
| 2439 | */ |
| 2440 | union bdk_usbhx_uahc_gprtbimap_hs |
| 2441 | { |
| 2442 | uint64_t u; |
| 2443 | struct bdk_usbhx_uahc_gprtbimap_hs_s |
| 2444 | { |
| 2445 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2446 | uint64_t reserved_4_63 : 60; |
| 2447 | uint64_t binum1 : 4; /**< [ 3: 0](R/W) High-speed USB instance number for port 1. */ |
| 2448 | #else /* Word 0 - Little Endian */ |
| 2449 | uint64_t binum1 : 4; /**< [ 3: 0](R/W) High-speed USB instance number for port 1. */ |
| 2450 | uint64_t reserved_4_63 : 60; |
| 2451 | #endif /* Word 0 - End */ |
| 2452 | } s; |
| 2453 | /* struct bdk_usbhx_uahc_gprtbimap_hs_s cn; */ |
| 2454 | }; |
| 2455 | typedef union bdk_usbhx_uahc_gprtbimap_hs bdk_usbhx_uahc_gprtbimap_hs_t; |
| 2456 | |
| 2457 | static inline uint64_t BDK_USBHX_UAHC_GPRTBIMAP_HS(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2458 | static inline uint64_t BDK_USBHX_UAHC_GPRTBIMAP_HS(unsigned long a) |
| 2459 | { |
| 2460 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 2461 | return 0x86800000c180ll + 0x1000000000ll * ((a) & 0x1); |
| 2462 | __bdk_csr_fatal("USBHX_UAHC_GPRTBIMAP_HS", 1, a, 0, 0, 0); |
| 2463 | } |
| 2464 | |
| 2465 | #define typedef_BDK_USBHX_UAHC_GPRTBIMAP_HS(a) bdk_usbhx_uahc_gprtbimap_hs_t |
| 2466 | #define bustype_BDK_USBHX_UAHC_GPRTBIMAP_HS(a) BDK_CSR_TYPE_NCB |
| 2467 | #define basename_BDK_USBHX_UAHC_GPRTBIMAP_HS(a) "USBHX_UAHC_GPRTBIMAP_HS" |
| 2468 | #define device_bar_BDK_USBHX_UAHC_GPRTBIMAP_HS(a) 0x0 /* PF_BAR0 */ |
| 2469 | #define busnum_BDK_USBHX_UAHC_GPRTBIMAP_HS(a) (a) |
| 2470 | #define arguments_BDK_USBHX_UAHC_GPRTBIMAP_HS(a) (a),-1,-1,-1 |
| 2471 | |
| 2472 | /** |
| 2473 | * Register (NCB32b) usbh#_uahc_grlsid |
| 2474 | * |
| 2475 | * UAHC Release ID Register |
| 2476 | * This is a read-only register that contains the release number of the core. |
| 2477 | * Internal: |
| 2478 | * Original name: GSNPSID = Synopsys ID. |
| 2479 | * INTERNAL: See Synopsys DWC_usb3 Databook v2.50a, section 6.2.1.8. |
| 2480 | */ |
| 2481 | union bdk_usbhx_uahc_grlsid |
| 2482 | { |
| 2483 | uint32_t u; |
| 2484 | struct bdk_usbhx_uahc_grlsid_s |
| 2485 | { |
| 2486 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2487 | uint32_t releaseid : 32; /**< [ 31: 0](RO) Software can use this register to configure release-specific features in the driver. |
| 2488 | Internal: |
| 2489 | Synopsys ID |
| 2490 | * SynopsysID[31:16] indicates Core Identification Number. 0x5533 is ASCII for |
| 2491 | U3 (DWC_usb3). |
| 2492 | * SynopsysID[15:0] indicates the release number. Current Release is 2.50a. */ |
| 2493 | #else /* Word 0 - Little Endian */ |
| 2494 | uint32_t releaseid : 32; /**< [ 31: 0](RO) Software can use this register to configure release-specific features in the driver. |
| 2495 | Internal: |
| 2496 | Synopsys ID |
| 2497 | * SynopsysID[31:16] indicates Core Identification Number. 0x5533 is ASCII for |
| 2498 | U3 (DWC_usb3). |
| 2499 | * SynopsysID[15:0] indicates the release number. Current Release is 2.50a. */ |
| 2500 | #endif /* Word 0 - End */ |
| 2501 | } s; |
| 2502 | /* struct bdk_usbhx_uahc_grlsid_s cn; */ |
| 2503 | }; |
| 2504 | typedef union bdk_usbhx_uahc_grlsid bdk_usbhx_uahc_grlsid_t; |
| 2505 | |
| 2506 | static inline uint64_t BDK_USBHX_UAHC_GRLSID(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2507 | static inline uint64_t BDK_USBHX_UAHC_GRLSID(unsigned long a) |
| 2508 | { |
| 2509 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 2510 | return 0x86800000c120ll + 0x1000000000ll * ((a) & 0x1); |
| 2511 | __bdk_csr_fatal("USBHX_UAHC_GRLSID", 1, a, 0, 0, 0); |
| 2512 | } |
| 2513 | |
| 2514 | #define typedef_BDK_USBHX_UAHC_GRLSID(a) bdk_usbhx_uahc_grlsid_t |
| 2515 | #define bustype_BDK_USBHX_UAHC_GRLSID(a) BDK_CSR_TYPE_NCB32b |
| 2516 | #define basename_BDK_USBHX_UAHC_GRLSID(a) "USBHX_UAHC_GRLSID" |
| 2517 | #define device_bar_BDK_USBHX_UAHC_GRLSID(a) 0x0 /* PF_BAR0 */ |
| 2518 | #define busnum_BDK_USBHX_UAHC_GRLSID(a) (a) |
| 2519 | #define arguments_BDK_USBHX_UAHC_GRLSID(a) (a),-1,-1,-1 |
| 2520 | |
| 2521 | /** |
| 2522 | * Register (NCB32b) usbh#_uahc_grxfifoprihst |
| 2523 | * |
| 2524 | * UAHC RX FIFOs DMA Priority Register |
| 2525 | * This register specifies the relative DMA priority level among the host RXFIFOs (one per USB |
| 2526 | * bus instance) within the associated speed group (SuperSpeed or high-speed/full-speed/ |
| 2527 | * low-speed). When multiple RXFIFOs compete for DMA service at a given time, the RXDMA arbiter |
| 2528 | * grants access on a packet-basis in the following manner: |
| 2529 | * |
| 2530 | * Among the FIFOs in the same speed group (SuperSpeed or high-speed/full-speed/low-speed): |
| 2531 | * * High-priority RXFIFOs are granted access using round-robin arbitration. |
| 2532 | * * Low-priority RXFIFOs are granted access using round-robin arbitration only after high- |
| 2533 | * priority |
| 2534 | * RXFIFOs have no further processing to do (i.e., either the RXQs are empty or the corresponding |
| 2535 | * RXFIFOs do not have the required data). |
| 2536 | * |
| 2537 | * The RX DMA arbiter prioritizes the SuperSpeed group or high-speed/full-speed/low-speed group |
| 2538 | * according to the ratio programmed in |
| 2539 | * USBH()_UAHC_GDMAHLRATIO. |
| 2540 | * |
| 2541 | * For scatter-gather packets, the arbiter grants successive DMA requests to the same FIFO until |
| 2542 | * the entire packet is completed. The register size corresponds to the number of configured USB |
| 2543 | * bus instances; for example, in the default configuration, there are 3 USB bus instances (1 |
| 2544 | * SuperSpeed, 1 high-speed, and 1 full-speed/low-speed). |
| 2545 | * |
| 2546 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 2547 | * |
| 2548 | * Internal: |
| 2549 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.9.3. |
| 2550 | */ |
| 2551 | union bdk_usbhx_uahc_grxfifoprihst |
| 2552 | { |
| 2553 | uint32_t u; |
| 2554 | struct bdk_usbhx_uahc_grxfifoprihst_s |
| 2555 | { |
| 2556 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2557 | uint32_t reserved_3_31 : 29; |
| 2558 | uint32_t rx_priority : 3; /**< [ 2: 0](R/W) Each register bit[n] controls the priority (1 = high, 0 = low) of RXFIFO[n] within a speed group. */ |
| 2559 | #else /* Word 0 - Little Endian */ |
| 2560 | uint32_t rx_priority : 3; /**< [ 2: 0](R/W) Each register bit[n] controls the priority (1 = high, 0 = low) of RXFIFO[n] within a speed group. */ |
| 2561 | uint32_t reserved_3_31 : 29; |
| 2562 | #endif /* Word 0 - End */ |
| 2563 | } s; |
| 2564 | /* struct bdk_usbhx_uahc_grxfifoprihst_s cn; */ |
| 2565 | }; |
| 2566 | typedef union bdk_usbhx_uahc_grxfifoprihst bdk_usbhx_uahc_grxfifoprihst_t; |
| 2567 | |
| 2568 | static inline uint64_t BDK_USBHX_UAHC_GRXFIFOPRIHST(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2569 | static inline uint64_t BDK_USBHX_UAHC_GRXFIFOPRIHST(unsigned long a) |
| 2570 | { |
| 2571 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 2572 | return 0x86800000c61cll + 0x1000000000ll * ((a) & 0x1); |
| 2573 | __bdk_csr_fatal("USBHX_UAHC_GRXFIFOPRIHST", 1, a, 0, 0, 0); |
| 2574 | } |
| 2575 | |
| 2576 | #define typedef_BDK_USBHX_UAHC_GRXFIFOPRIHST(a) bdk_usbhx_uahc_grxfifoprihst_t |
| 2577 | #define bustype_BDK_USBHX_UAHC_GRXFIFOPRIHST(a) BDK_CSR_TYPE_NCB32b |
| 2578 | #define basename_BDK_USBHX_UAHC_GRXFIFOPRIHST(a) "USBHX_UAHC_GRXFIFOPRIHST" |
| 2579 | #define device_bar_BDK_USBHX_UAHC_GRXFIFOPRIHST(a) 0x0 /* PF_BAR0 */ |
| 2580 | #define busnum_BDK_USBHX_UAHC_GRXFIFOPRIHST(a) (a) |
| 2581 | #define arguments_BDK_USBHX_UAHC_GRXFIFOPRIHST(a) (a),-1,-1,-1 |
| 2582 | |
| 2583 | /** |
| 2584 | * Register (NCB32b) usbh#_uahc_grxfifosiz# |
| 2585 | * |
| 2586 | * UAHC RX FIFO Size Register |
| 2587 | * The application can program the internal RAM start address/depth of the each RxFIFO as shown |
| 2588 | * below. It is recommended that software use the default value. In Host mode, per-port registers |
| 2589 | * are implemented. One register per FIFO. |
| 2590 | * |
| 2591 | * Reset values = 0:{0x0000_0084} 1:{0x0084_0104} 2:{0x0188_0180}. |
| 2592 | * |
| 2593 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 2594 | * |
| 2595 | * Internal: |
| 2596 | * See Synopsys DWC_usb3 Databook v2.20a, section 6.2.6.2. |
| 2597 | * INTERNAL: For more information, see the BMU section in Block Descriptions on Synopsys Databook |
| 2598 | * page 238. |
| 2599 | */ |
| 2600 | union bdk_usbhx_uahc_grxfifosizx |
| 2601 | { |
| 2602 | uint32_t u; |
| 2603 | struct bdk_usbhx_uahc_grxfifosizx_s |
| 2604 | { |
| 2605 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2606 | uint32_t rxfstaddr : 16; /**< [ 31: 16](R/W) RxFIFOn RAM start address. This field contains the memory start address for RxFIFOn. The |
| 2607 | reset value is derived from configuration parameters. */ |
| 2608 | uint32_t rxfdep : 16; /**< [ 15: 0](R/W) RxFIFOn depth. This value is in terms of RX RAM Data width. |
| 2609 | minimum value = 0x20, maximum value = 0x4000. |
| 2610 | |
| 2611 | Internal: |
| 2612 | For more information, see the Hardware Integration chapter of the Synopsys |
| 2613 | Databook. |
| 2614 | The reset value is derived from configuration parameters. */ |
| 2615 | #else /* Word 0 - Little Endian */ |
| 2616 | uint32_t rxfdep : 16; /**< [ 15: 0](R/W) RxFIFOn depth. This value is in terms of RX RAM Data width. |
| 2617 | minimum value = 0x20, maximum value = 0x4000. |
| 2618 | |
| 2619 | Internal: |
| 2620 | For more information, see the Hardware Integration chapter of the Synopsys |
| 2621 | Databook. |
| 2622 | The reset value is derived from configuration parameters. */ |
| 2623 | uint32_t rxfstaddr : 16; /**< [ 31: 16](R/W) RxFIFOn RAM start address. This field contains the memory start address for RxFIFOn. The |
| 2624 | reset value is derived from configuration parameters. */ |
| 2625 | #endif /* Word 0 - End */ |
| 2626 | } s; |
| 2627 | /* struct bdk_usbhx_uahc_grxfifosizx_s cn; */ |
| 2628 | }; |
| 2629 | typedef union bdk_usbhx_uahc_grxfifosizx bdk_usbhx_uahc_grxfifosizx_t; |
| 2630 | |
| 2631 | static inline uint64_t BDK_USBHX_UAHC_GRXFIFOSIZX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 2632 | static inline uint64_t BDK_USBHX_UAHC_GRXFIFOSIZX(unsigned long a, unsigned long b) |
| 2633 | { |
| 2634 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b<=2))) |
| 2635 | return 0x86800000c380ll + 0x1000000000ll * ((a) & 0x1) + 4ll * ((b) & 0x3); |
| 2636 | __bdk_csr_fatal("USBHX_UAHC_GRXFIFOSIZX", 2, a, b, 0, 0); |
| 2637 | } |
| 2638 | |
| 2639 | #define typedef_BDK_USBHX_UAHC_GRXFIFOSIZX(a,b) bdk_usbhx_uahc_grxfifosizx_t |
| 2640 | #define bustype_BDK_USBHX_UAHC_GRXFIFOSIZX(a,b) BDK_CSR_TYPE_NCB32b |
| 2641 | #define basename_BDK_USBHX_UAHC_GRXFIFOSIZX(a,b) "USBHX_UAHC_GRXFIFOSIZX" |
| 2642 | #define device_bar_BDK_USBHX_UAHC_GRXFIFOSIZX(a,b) 0x0 /* PF_BAR0 */ |
| 2643 | #define busnum_BDK_USBHX_UAHC_GRXFIFOSIZX(a,b) (a) |
| 2644 | #define arguments_BDK_USBHX_UAHC_GRXFIFOSIZX(a,b) (a),(b),-1,-1 |
| 2645 | |
| 2646 | /** |
| 2647 | * Register (NCB32b) usbh#_uahc_grxthrcfg |
| 2648 | * |
| 2649 | * UAHC RX Threshold Control Register |
| 2650 | * In a normal case, an RX burst starts as soon as 1-packet space is available. This works well |
| 2651 | * as long as the system bus is faster than the USB3.0 bus (a 1024-bytes packet takes ~2.2 us on |
| 2652 | * the USB bus in SuperSpeed mode). If the system bus latency is larger than 2.2 us to access a |
| 2653 | * 1024-byte packet, then starting a burst on 1-packet condition leads to an early abort of the |
| 2654 | * burst causing unnecessary performance reduction. This register allows the configuration of |
| 2655 | * threshold and burst size control. This feature is enabled by USBRXPKTCNTSEL. |
| 2656 | * |
| 2657 | * Receive Path: |
| 2658 | * * The RX threshold is controlled by USBRXPKTCNT and the RX burst size is controlled by |
| 2659 | * USBMAXRXBURSTSIZE. |
| 2660 | * * Selecting optimal RX FIFO size, RX threshold, and RX burst size avoids RX burst aborts due |
| 2661 | * to overrun if the system bus is slower than USB. Once in a while overrun is OK, and there is |
| 2662 | * no functional issue. |
| 2663 | * * Some devices do not support terminating ACK retry. With these devices, host cannot set ACK=0 |
| 2664 | * and Retry=0 and do retry later and you have to retry immediately. For such devices, minimize |
| 2665 | * retry due to underrun. Setting threshold and burst size guarantees this. |
| 2666 | * A larger RX threshold affects the performance since the scheduler is idle during this time. |
| 2667 | * |
| 2668 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 2669 | * |
| 2670 | * Internal: |
| 2671 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.1.4. |
| 2672 | */ |
| 2673 | union bdk_usbhx_uahc_grxthrcfg |
| 2674 | { |
| 2675 | uint32_t u; |
| 2676 | struct bdk_usbhx_uahc_grxthrcfg_s |
| 2677 | { |
| 2678 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2679 | uint32_t reserved_30_31 : 2; |
| 2680 | uint32_t usbrxpktcntsel : 1; /**< [ 29: 29](R/W) USB receive-packet-count enable. Enables/disables the USB reception multipacket |
| 2681 | thresholding: |
| 2682 | 0 = the core can only start reception on the USB when the RX FIFO has space for at least |
| 2683 | one packet. |
| 2684 | 1 = the core can only start reception on the USB when the RX FIFO has space for at least |
| 2685 | USBRXPKTCNT amount of packets. |
| 2686 | This mode is only used for SuperSpeed. */ |
| 2687 | uint32_t reserved_28 : 1; |
| 2688 | uint32_t usbrxpktcnt : 4; /**< [ 27: 24](R/W) USB receive-packet count. In host-mode, specifies space (in number of packets) that must |
| 2689 | be available in the RX FIFO before the core can start the corresponding USB RX transaction |
| 2690 | (burst). |
| 2691 | |
| 2692 | This field is only valid when [USBRXPKTCNTSEL] = 1. The valid values are from 0x1 to 0xF. |
| 2693 | This field must be \<= [USBMAXRXBURSTSIZE]. */ |
| 2694 | uint32_t usbmaxrxburstsize : 5; /**< [ 23: 19](R/W) USB maximum receive-burst size. Specifies the maximum bulk IN burst the core |
| 2695 | should do. When the system bus is slower than the USB, RX FIFO can overrun during a long |
| 2696 | burst. |
| 2697 | |
| 2698 | Program a smaller value to this field to limit the RX burst size that the core can do. It |
| 2699 | only applies to SuperSpeed Bulk, Isochronous, and Interrupt IN endpoints. |
| 2700 | This field is only valid when [USBRXPKTCNTSEL] = 1. The valid values are from 0x1 to 0x10. */ |
| 2701 | uint32_t reserved_0_18 : 19; |
| 2702 | #else /* Word 0 - Little Endian */ |
| 2703 | uint32_t reserved_0_18 : 19; |
| 2704 | uint32_t usbmaxrxburstsize : 5; /**< [ 23: 19](R/W) USB maximum receive-burst size. Specifies the maximum bulk IN burst the core |
| 2705 | should do. When the system bus is slower than the USB, RX FIFO can overrun during a long |
| 2706 | burst. |
| 2707 | |
| 2708 | Program a smaller value to this field to limit the RX burst size that the core can do. It |
| 2709 | only applies to SuperSpeed Bulk, Isochronous, and Interrupt IN endpoints. |
| 2710 | This field is only valid when [USBRXPKTCNTSEL] = 1. The valid values are from 0x1 to 0x10. */ |
| 2711 | uint32_t usbrxpktcnt : 4; /**< [ 27: 24](R/W) USB receive-packet count. In host-mode, specifies space (in number of packets) that must |
| 2712 | be available in the RX FIFO before the core can start the corresponding USB RX transaction |
| 2713 | (burst). |
| 2714 | |
| 2715 | This field is only valid when [USBRXPKTCNTSEL] = 1. The valid values are from 0x1 to 0xF. |
| 2716 | This field must be \<= [USBMAXRXBURSTSIZE]. */ |
| 2717 | uint32_t reserved_28 : 1; |
| 2718 | uint32_t usbrxpktcntsel : 1; /**< [ 29: 29](R/W) USB receive-packet-count enable. Enables/disables the USB reception multipacket |
| 2719 | thresholding: |
| 2720 | 0 = the core can only start reception on the USB when the RX FIFO has space for at least |
| 2721 | one packet. |
| 2722 | 1 = the core can only start reception on the USB when the RX FIFO has space for at least |
| 2723 | USBRXPKTCNT amount of packets. |
| 2724 | This mode is only used for SuperSpeed. */ |
| 2725 | uint32_t reserved_30_31 : 2; |
| 2726 | #endif /* Word 0 - End */ |
| 2727 | } s; |
| 2728 | struct bdk_usbhx_uahc_grxthrcfg_cn |
| 2729 | { |
| 2730 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2731 | uint32_t reserved_30_31 : 2; |
| 2732 | uint32_t usbrxpktcntsel : 1; /**< [ 29: 29](R/W) USB receive-packet-count enable. Enables/disables the USB reception multipacket |
| 2733 | thresholding: |
| 2734 | 0 = the core can only start reception on the USB when the RX FIFO has space for at least |
| 2735 | one packet. |
| 2736 | 1 = the core can only start reception on the USB when the RX FIFO has space for at least |
| 2737 | USBRXPKTCNT amount of packets. |
| 2738 | This mode is only used for SuperSpeed. */ |
| 2739 | uint32_t reserved_28 : 1; |
| 2740 | uint32_t usbrxpktcnt : 4; /**< [ 27: 24](R/W) USB receive-packet count. In host-mode, specifies space (in number of packets) that must |
| 2741 | be available in the RX FIFO before the core can start the corresponding USB RX transaction |
| 2742 | (burst). |
| 2743 | |
| 2744 | This field is only valid when [USBRXPKTCNTSEL] = 1. The valid values are from 0x1 to 0xF. |
| 2745 | This field must be \<= [USBMAXRXBURSTSIZE]. */ |
| 2746 | uint32_t usbmaxrxburstsize : 5; /**< [ 23: 19](R/W) USB maximum receive-burst size. Specifies the maximum bulk IN burst the core |
| 2747 | should do. When the system bus is slower than the USB, RX FIFO can overrun during a long |
| 2748 | burst. |
| 2749 | |
| 2750 | Program a smaller value to this field to limit the RX burst size that the core can do. It |
| 2751 | only applies to SuperSpeed Bulk, Isochronous, and Interrupt IN endpoints. |
| 2752 | This field is only valid when [USBRXPKTCNTSEL] = 1. The valid values are from 0x1 to 0x10. */ |
| 2753 | uint32_t reserved_16_18 : 3; |
| 2754 | uint32_t reserved_15 : 1; |
| 2755 | uint32_t reserved_11_14 : 4; |
| 2756 | uint32_t reserved_0_10 : 11; |
| 2757 | #else /* Word 0 - Little Endian */ |
| 2758 | uint32_t reserved_0_10 : 11; |
| 2759 | uint32_t reserved_11_14 : 4; |
| 2760 | uint32_t reserved_15 : 1; |
| 2761 | uint32_t reserved_16_18 : 3; |
| 2762 | uint32_t usbmaxrxburstsize : 5; /**< [ 23: 19](R/W) USB maximum receive-burst size. Specifies the maximum bulk IN burst the core |
| 2763 | should do. When the system bus is slower than the USB, RX FIFO can overrun during a long |
| 2764 | burst. |
| 2765 | |
| 2766 | Program a smaller value to this field to limit the RX burst size that the core can do. It |
| 2767 | only applies to SuperSpeed Bulk, Isochronous, and Interrupt IN endpoints. |
| 2768 | This field is only valid when [USBRXPKTCNTSEL] = 1. The valid values are from 0x1 to 0x10. */ |
| 2769 | uint32_t usbrxpktcnt : 4; /**< [ 27: 24](R/W) USB receive-packet count. In host-mode, specifies space (in number of packets) that must |
| 2770 | be available in the RX FIFO before the core can start the corresponding USB RX transaction |
| 2771 | (burst). |
| 2772 | |
| 2773 | This field is only valid when [USBRXPKTCNTSEL] = 1. The valid values are from 0x1 to 0xF. |
| 2774 | This field must be \<= [USBMAXRXBURSTSIZE]. */ |
| 2775 | uint32_t reserved_28 : 1; |
| 2776 | uint32_t usbrxpktcntsel : 1; /**< [ 29: 29](R/W) USB receive-packet-count enable. Enables/disables the USB reception multipacket |
| 2777 | thresholding: |
| 2778 | 0 = the core can only start reception on the USB when the RX FIFO has space for at least |
| 2779 | one packet. |
| 2780 | 1 = the core can only start reception on the USB when the RX FIFO has space for at least |
| 2781 | USBRXPKTCNT amount of packets. |
| 2782 | This mode is only used for SuperSpeed. */ |
| 2783 | uint32_t reserved_30_31 : 2; |
| 2784 | #endif /* Word 0 - End */ |
| 2785 | } cn; |
| 2786 | }; |
| 2787 | typedef union bdk_usbhx_uahc_grxthrcfg bdk_usbhx_uahc_grxthrcfg_t; |
| 2788 | |
| 2789 | static inline uint64_t BDK_USBHX_UAHC_GRXTHRCFG(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2790 | static inline uint64_t BDK_USBHX_UAHC_GRXTHRCFG(unsigned long a) |
| 2791 | { |
| 2792 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 2793 | return 0x86800000c10cll + 0x1000000000ll * ((a) & 0x1); |
| 2794 | __bdk_csr_fatal("USBHX_UAHC_GRXTHRCFG", 1, a, 0, 0, 0); |
| 2795 | } |
| 2796 | |
| 2797 | #define typedef_BDK_USBHX_UAHC_GRXTHRCFG(a) bdk_usbhx_uahc_grxthrcfg_t |
| 2798 | #define bustype_BDK_USBHX_UAHC_GRXTHRCFG(a) BDK_CSR_TYPE_NCB32b |
| 2799 | #define basename_BDK_USBHX_UAHC_GRXTHRCFG(a) "USBHX_UAHC_GRXTHRCFG" |
| 2800 | #define device_bar_BDK_USBHX_UAHC_GRXTHRCFG(a) 0x0 /* PF_BAR0 */ |
| 2801 | #define busnum_BDK_USBHX_UAHC_GRXTHRCFG(a) (a) |
| 2802 | #define arguments_BDK_USBHX_UAHC_GRXTHRCFG(a) (a),-1,-1,-1 |
| 2803 | |
| 2804 | /** |
| 2805 | * Register (NCB32b) usbh#_uahc_gsbuscfg0 |
| 2806 | * |
| 2807 | * UAHC Bus Configuration Register 0 |
| 2808 | * This register can be used to configure the core after power-on or a change in mode of |
| 2809 | * operation. This register mainly contains AXI system-related configuration parameters. Do not |
| 2810 | * change this register after the initial programming. The application must program this register |
| 2811 | * before starting any transactions on AXI. When [INCRBRSTENA] is enabled, it has the highest |
| 2812 | * priority over other burst lengths. The core always performs the largest burst when enabled. |
| 2813 | * |
| 2814 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 2815 | * |
| 2816 | * Internal: |
| 2817 | * The AXI cache signals are not connected in Cavium's hookup, so the *REQINFO fields |
| 2818 | * can be ignored. |
| 2819 | * INTERNAL: See Synopsys DWC_usb3 Databook v2.50a, section 6.2.1.1. |
| 2820 | */ |
| 2821 | union bdk_usbhx_uahc_gsbuscfg0 |
| 2822 | { |
| 2823 | uint32_t u; |
| 2824 | struct bdk_usbhx_uahc_gsbuscfg0_s |
| 2825 | { |
| 2826 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2827 | uint32_t datrdreqinfo : 4; /**< [ 31: 28](R/W) AXI-cache for data-read operations. Always set to 0x0. */ |
| 2828 | uint32_t desrdreqinfo : 4; /**< [ 27: 24](R/W) AXI-cache for descriptor-read operations. Always set to 0x0. */ |
| 2829 | uint32_t datwrreqinfo : 4; /**< [ 23: 20](R/W) AXI-cache for data-write operations. Always set to 0x0. */ |
| 2830 | uint32_t deswrreqinfo : 4; /**< [ 19: 16](R/W) AXI-cache for descriptor-write operations. Always set to 0x0. */ |
| 2831 | uint32_t reserved_12_15 : 4; |
| 2832 | uint32_t datbigend : 1; /**< [ 11: 11](R/W) Data access is big-endian. Keep this set to 0 (little-endian) and use the |
| 2833 | USBH()_UCTL_SHIM_CFG[DMA_ENDIAN_MODE] setting instead. |
| 2834 | |
| 2835 | For diagnostic use only, drivers should be written assuming little-endian. */ |
| 2836 | uint32_t descbigend : 1; /**< [ 10: 10](R/W) Descriptor access is big-endian. Keep this set to 0 (little-endian) and use the |
| 2837 | USBH()_UCTL_SHIM_CFG[DMA_ENDIAN_MODE] setting instead. |
| 2838 | |
| 2839 | For diagnostic use only, drivers should be written assuming little-endian. */ |
| 2840 | uint32_t reserved_8_9 : 2; |
| 2841 | uint32_t incr256brstena : 1; /**< [ 7: 7](R/W) INCR256 burst-type enable. Always set to 0. */ |
| 2842 | uint32_t incr128brstena : 1; /**< [ 6: 6](R/W) INCR128 burst-type enable. Always set to 0. */ |
| 2843 | uint32_t incr64brstena : 1; /**< [ 5: 5](R/W) INCR64 burst-type enable. Always set to 0. */ |
| 2844 | uint32_t incr32brstena : 1; /**< [ 4: 4](R/W) INCR32 burst-type enable. Always set to 0. */ |
| 2845 | uint32_t incr16brstena : 1; /**< [ 3: 3](R/W) INCR16 burst-type enable. Allows the AXI master to generate INCR 16-beat bursts. */ |
| 2846 | uint32_t incr8brstena : 1; /**< [ 2: 2](R/W) INCR8 burst-type enable. Allows the AXI master to generate INCR eight-beat bursts. */ |
| 2847 | uint32_t incr4brstena : 1; /**< [ 1: 1](R/W) INCR4 burst-type enable. Allows the AXI master to generate INCR four-beat bursts. */ |
| 2848 | uint32_t incrbrstena : 1; /**< [ 0: 0](R/W) Undefined-length INCR burst-type enable. |
| 2849 | This bit determines the set of burst lengths to be utilized by the master interface. It |
| 2850 | works in conjunction with the GSBUSCFG0[7:1] enables (INCR*BRSTENA). |
| 2851 | |
| 2852 | If disabled, the AXI master will use only the burst lengths |
| 2853 | 1, 4, 8, 16 (assuming the INCR*BRSTENA are set to their reset values). |
| 2854 | |
| 2855 | If enabled, the AXI master uses any length less than or equal to the largest-enabled burst |
| 2856 | length based on the INCR*BRSTENA fields. */ |
| 2857 | #else /* Word 0 - Little Endian */ |
| 2858 | uint32_t incrbrstena : 1; /**< [ 0: 0](R/W) Undefined-length INCR burst-type enable. |
| 2859 | This bit determines the set of burst lengths to be utilized by the master interface. It |
| 2860 | works in conjunction with the GSBUSCFG0[7:1] enables (INCR*BRSTENA). |
| 2861 | |
| 2862 | If disabled, the AXI master will use only the burst lengths |
| 2863 | 1, 4, 8, 16 (assuming the INCR*BRSTENA are set to their reset values). |
| 2864 | |
| 2865 | If enabled, the AXI master uses any length less than or equal to the largest-enabled burst |
| 2866 | length based on the INCR*BRSTENA fields. */ |
| 2867 | uint32_t incr4brstena : 1; /**< [ 1: 1](R/W) INCR4 burst-type enable. Allows the AXI master to generate INCR four-beat bursts. */ |
| 2868 | uint32_t incr8brstena : 1; /**< [ 2: 2](R/W) INCR8 burst-type enable. Allows the AXI master to generate INCR eight-beat bursts. */ |
| 2869 | uint32_t incr16brstena : 1; /**< [ 3: 3](R/W) INCR16 burst-type enable. Allows the AXI master to generate INCR 16-beat bursts. */ |
| 2870 | uint32_t incr32brstena : 1; /**< [ 4: 4](R/W) INCR32 burst-type enable. Always set to 0. */ |
| 2871 | uint32_t incr64brstena : 1; /**< [ 5: 5](R/W) INCR64 burst-type enable. Always set to 0. */ |
| 2872 | uint32_t incr128brstena : 1; /**< [ 6: 6](R/W) INCR128 burst-type enable. Always set to 0. */ |
| 2873 | uint32_t incr256brstena : 1; /**< [ 7: 7](R/W) INCR256 burst-type enable. Always set to 0. */ |
| 2874 | uint32_t reserved_8_9 : 2; |
| 2875 | uint32_t descbigend : 1; /**< [ 10: 10](R/W) Descriptor access is big-endian. Keep this set to 0 (little-endian) and use the |
| 2876 | USBH()_UCTL_SHIM_CFG[DMA_ENDIAN_MODE] setting instead. |
| 2877 | |
| 2878 | For diagnostic use only, drivers should be written assuming little-endian. */ |
| 2879 | uint32_t datbigend : 1; /**< [ 11: 11](R/W) Data access is big-endian. Keep this set to 0 (little-endian) and use the |
| 2880 | USBH()_UCTL_SHIM_CFG[DMA_ENDIAN_MODE] setting instead. |
| 2881 | |
| 2882 | For diagnostic use only, drivers should be written assuming little-endian. */ |
| 2883 | uint32_t reserved_12_15 : 4; |
| 2884 | uint32_t deswrreqinfo : 4; /**< [ 19: 16](R/W) AXI-cache for descriptor-write operations. Always set to 0x0. */ |
| 2885 | uint32_t datwrreqinfo : 4; /**< [ 23: 20](R/W) AXI-cache for data-write operations. Always set to 0x0. */ |
| 2886 | uint32_t desrdreqinfo : 4; /**< [ 27: 24](R/W) AXI-cache for descriptor-read operations. Always set to 0x0. */ |
| 2887 | uint32_t datrdreqinfo : 4; /**< [ 31: 28](R/W) AXI-cache for data-read operations. Always set to 0x0. */ |
| 2888 | #endif /* Word 0 - End */ |
| 2889 | } s; |
| 2890 | /* struct bdk_usbhx_uahc_gsbuscfg0_s cn; */ |
| 2891 | }; |
| 2892 | typedef union bdk_usbhx_uahc_gsbuscfg0 bdk_usbhx_uahc_gsbuscfg0_t; |
| 2893 | |
| 2894 | static inline uint64_t BDK_USBHX_UAHC_GSBUSCFG0(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2895 | static inline uint64_t BDK_USBHX_UAHC_GSBUSCFG0(unsigned long a) |
| 2896 | { |
| 2897 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 2898 | return 0x86800000c100ll + 0x1000000000ll * ((a) & 0x1); |
| 2899 | __bdk_csr_fatal("USBHX_UAHC_GSBUSCFG0", 1, a, 0, 0, 0); |
| 2900 | } |
| 2901 | |
| 2902 | #define typedef_BDK_USBHX_UAHC_GSBUSCFG0(a) bdk_usbhx_uahc_gsbuscfg0_t |
| 2903 | #define bustype_BDK_USBHX_UAHC_GSBUSCFG0(a) BDK_CSR_TYPE_NCB32b |
| 2904 | #define basename_BDK_USBHX_UAHC_GSBUSCFG0(a) "USBHX_UAHC_GSBUSCFG0" |
| 2905 | #define device_bar_BDK_USBHX_UAHC_GSBUSCFG0(a) 0x0 /* PF_BAR0 */ |
| 2906 | #define busnum_BDK_USBHX_UAHC_GSBUSCFG0(a) (a) |
| 2907 | #define arguments_BDK_USBHX_UAHC_GSBUSCFG0(a) (a),-1,-1,-1 |
| 2908 | |
| 2909 | /** |
| 2910 | * Register (NCB32b) usbh#_uahc_gsbuscfg1 |
| 2911 | * |
| 2912 | * UAHC Bus Configuration Register 1 |
| 2913 | * This register can be used to configure the core after power-on or a change in mode of |
| 2914 | * operation. This register mainly contains AXI system-related configuration parameters. Do not |
| 2915 | * change this register after the initial programming. The application must program this register |
| 2916 | * before starting any transactions on AXI. |
| 2917 | * |
| 2918 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 2919 | * |
| 2920 | * Internal: |
| 2921 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.1.2. |
| 2922 | */ |
| 2923 | union bdk_usbhx_uahc_gsbuscfg1 |
| 2924 | { |
| 2925 | uint32_t u; |
| 2926 | struct bdk_usbhx_uahc_gsbuscfg1_s |
| 2927 | { |
| 2928 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2929 | uint32_t reserved_13_31 : 19; |
| 2930 | uint32_t en1kpage : 1; /**< [ 12: 12](R/W) 1K page-boundary enable. |
| 2931 | 0 = Break transfers at the 4K page boundary (default). |
| 2932 | 1 = Break transfers at the 1K page boundary. */ |
| 2933 | uint32_t pipetranslimit : 4; /**< [ 11: 8](R/W) AXI pipelined transfers burst-request limit. Controls the number of outstanding pipelined |
| 2934 | transfers requests the AXI master will push to the AXI slave. Once the AXI master reaches |
| 2935 | this limit, it does not make more requests on the AXI ARADDR and AWADDR buses until the |
| 2936 | associated data phases complete. This field is encoded as follows: |
| 2937 | 0x0 = 1 request. 0x8 = 9 requests. |
| 2938 | 0x1 = 2 requests. 0x9 = 10 requests. |
| 2939 | 0x2 = 3 requests. 0xA = 11 requests. |
| 2940 | 0x3 = 4 requests. 0xB = 12 requests. |
| 2941 | 0x4 = 5 requests. 0xC = 13 requests. |
| 2942 | 0x5 = 6 requests. 0xD = 14 requests. |
| 2943 | 0x6 = 7 requests. 0xE = 15 requests. |
| 2944 | 0x7 = 8 requests. 0xF = 16 requests. */ |
| 2945 | uint32_t reserved_0_7 : 8; |
| 2946 | #else /* Word 0 - Little Endian */ |
| 2947 | uint32_t reserved_0_7 : 8; |
| 2948 | uint32_t pipetranslimit : 4; /**< [ 11: 8](R/W) AXI pipelined transfers burst-request limit. Controls the number of outstanding pipelined |
| 2949 | transfers requests the AXI master will push to the AXI slave. Once the AXI master reaches |
| 2950 | this limit, it does not make more requests on the AXI ARADDR and AWADDR buses until the |
| 2951 | associated data phases complete. This field is encoded as follows: |
| 2952 | 0x0 = 1 request. 0x8 = 9 requests. |
| 2953 | 0x1 = 2 requests. 0x9 = 10 requests. |
| 2954 | 0x2 = 3 requests. 0xA = 11 requests. |
| 2955 | 0x3 = 4 requests. 0xB = 12 requests. |
| 2956 | 0x4 = 5 requests. 0xC = 13 requests. |
| 2957 | 0x5 = 6 requests. 0xD = 14 requests. |
| 2958 | 0x6 = 7 requests. 0xE = 15 requests. |
| 2959 | 0x7 = 8 requests. 0xF = 16 requests. */ |
| 2960 | uint32_t en1kpage : 1; /**< [ 12: 12](R/W) 1K page-boundary enable. |
| 2961 | 0 = Break transfers at the 4K page boundary (default). |
| 2962 | 1 = Break transfers at the 1K page boundary. */ |
| 2963 | uint32_t reserved_13_31 : 19; |
| 2964 | #endif /* Word 0 - End */ |
| 2965 | } s; |
| 2966 | /* struct bdk_usbhx_uahc_gsbuscfg1_s cn; */ |
| 2967 | }; |
| 2968 | typedef union bdk_usbhx_uahc_gsbuscfg1 bdk_usbhx_uahc_gsbuscfg1_t; |
| 2969 | |
| 2970 | static inline uint64_t BDK_USBHX_UAHC_GSBUSCFG1(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2971 | static inline uint64_t BDK_USBHX_UAHC_GSBUSCFG1(unsigned long a) |
| 2972 | { |
| 2973 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 2974 | return 0x86800000c104ll + 0x1000000000ll * ((a) & 0x1); |
| 2975 | __bdk_csr_fatal("USBHX_UAHC_GSBUSCFG1", 1, a, 0, 0, 0); |
| 2976 | } |
| 2977 | |
| 2978 | #define typedef_BDK_USBHX_UAHC_GSBUSCFG1(a) bdk_usbhx_uahc_gsbuscfg1_t |
| 2979 | #define bustype_BDK_USBHX_UAHC_GSBUSCFG1(a) BDK_CSR_TYPE_NCB32b |
| 2980 | #define basename_BDK_USBHX_UAHC_GSBUSCFG1(a) "USBHX_UAHC_GSBUSCFG1" |
| 2981 | #define device_bar_BDK_USBHX_UAHC_GSBUSCFG1(a) 0x0 /* PF_BAR0 */ |
| 2982 | #define busnum_BDK_USBHX_UAHC_GSBUSCFG1(a) (a) |
| 2983 | #define arguments_BDK_USBHX_UAHC_GSBUSCFG1(a) (a),-1,-1,-1 |
| 2984 | |
| 2985 | /** |
| 2986 | * Register (NCB32b) usbh#_uahc_gsts |
| 2987 | * |
| 2988 | * UAHC Core Status Register |
| 2989 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 2990 | * Internal: |
| 2991 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.1.6. |
| 2992 | */ |
| 2993 | union bdk_usbhx_uahc_gsts |
| 2994 | { |
| 2995 | uint32_t u; |
| 2996 | struct bdk_usbhx_uahc_gsts_s |
| 2997 | { |
| 2998 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2999 | uint32_t cbelt : 12; /**< [ 31: 20](RO/H) Current BELT value. In host mode, indicates the minimum value of all received device BELT |
| 3000 | values and the BELT value that is set by the set latency tolerance value command. */ |
| 3001 | uint32_t reserved_8_19 : 12; |
| 3002 | uint32_t host_ip : 1; /**< [ 7: 7](RO/H) Host interrupt pending. Indicates that there is a pending interrupt pertaining to xHC in |
| 3003 | the host-event queue. */ |
| 3004 | uint32_t reserved_6 : 1; |
| 3005 | uint32_t csrtimeout : 1; /**< [ 5: 5](R/W1C/H) CSR timeout. When set to 1, indicates that software performed a write or read operation to |
| 3006 | a core register that could not be completed within 0xFFFF controller-clock cycles. */ |
| 3007 | uint32_t buserraddrvld : 1; /**< [ 4: 4](R/W1C/H) Bus-error address valid. Indicates that USBH()_UAHC_GBUSERRADDR is valid and reports the |
| 3008 | first bus address that encounters a bus error. */ |
| 3009 | uint32_t reserved_2_3 : 2; |
| 3010 | uint32_t curmod : 2; /**< [ 1: 0](RO) Current mode of operation. Always 0x1. |
| 3011 | Internal: |
| 3012 | May vary from 0x1 if you write |
| 3013 | USBH()_UAHC_GCTL[PRTCAPDIR]!=0x1. */ |
| 3014 | #else /* Word 0 - Little Endian */ |
| 3015 | uint32_t curmod : 2; /**< [ 1: 0](RO) Current mode of operation. Always 0x1. |
| 3016 | Internal: |
| 3017 | May vary from 0x1 if you write |
| 3018 | USBH()_UAHC_GCTL[PRTCAPDIR]!=0x1. */ |
| 3019 | uint32_t reserved_2_3 : 2; |
| 3020 | uint32_t buserraddrvld : 1; /**< [ 4: 4](R/W1C/H) Bus-error address valid. Indicates that USBH()_UAHC_GBUSERRADDR is valid and reports the |
| 3021 | first bus address that encounters a bus error. */ |
| 3022 | uint32_t csrtimeout : 1; /**< [ 5: 5](R/W1C/H) CSR timeout. When set to 1, indicates that software performed a write or read operation to |
| 3023 | a core register that could not be completed within 0xFFFF controller-clock cycles. */ |
| 3024 | uint32_t reserved_6 : 1; |
| 3025 | uint32_t host_ip : 1; /**< [ 7: 7](RO/H) Host interrupt pending. Indicates that there is a pending interrupt pertaining to xHC in |
| 3026 | the host-event queue. */ |
| 3027 | uint32_t reserved_8_19 : 12; |
| 3028 | uint32_t cbelt : 12; /**< [ 31: 20](RO/H) Current BELT value. In host mode, indicates the minimum value of all received device BELT |
| 3029 | values and the BELT value that is set by the set latency tolerance value command. */ |
| 3030 | #endif /* Word 0 - End */ |
| 3031 | } s; |
| 3032 | /* struct bdk_usbhx_uahc_gsts_s cn; */ |
| 3033 | }; |
| 3034 | typedef union bdk_usbhx_uahc_gsts bdk_usbhx_uahc_gsts_t; |
| 3035 | |
| 3036 | static inline uint64_t BDK_USBHX_UAHC_GSTS(unsigned long a) __attribute__ ((pure, always_inline)); |
| 3037 | static inline uint64_t BDK_USBHX_UAHC_GSTS(unsigned long a) |
| 3038 | { |
| 3039 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 3040 | return 0x86800000c118ll + 0x1000000000ll * ((a) & 0x1); |
| 3041 | __bdk_csr_fatal("USBHX_UAHC_GSTS", 1, a, 0, 0, 0); |
| 3042 | } |
| 3043 | |
| 3044 | #define typedef_BDK_USBHX_UAHC_GSTS(a) bdk_usbhx_uahc_gsts_t |
| 3045 | #define bustype_BDK_USBHX_UAHC_GSTS(a) BDK_CSR_TYPE_NCB32b |
| 3046 | #define basename_BDK_USBHX_UAHC_GSTS(a) "USBHX_UAHC_GSTS" |
| 3047 | #define device_bar_BDK_USBHX_UAHC_GSTS(a) 0x0 /* PF_BAR0 */ |
| 3048 | #define busnum_BDK_USBHX_UAHC_GSTS(a) (a) |
| 3049 | #define arguments_BDK_USBHX_UAHC_GSTS(a) (a),-1,-1,-1 |
| 3050 | |
| 3051 | /** |
| 3052 | * Register (NCB32b) usbh#_uahc_gtxfifoprihst |
| 3053 | * |
| 3054 | * UAHC TX FIFOs DMA Priority Register |
| 3055 | * This register specifies the relative DMA priority level among the host TXFIFOs (one per USB |
| 3056 | * bus instance) within the associated speed group (SuperSpeed or high-speed/full-speed/ |
| 3057 | * low-speed). When multiple TXFIFOs compete for DMA service at a given time, the TXDMA arbiter |
| 3058 | * grants access on a packet-basis in the following manner: |
| 3059 | * |
| 3060 | * Among the FIFOs in the same speed group (SuperSpeed or high-speed/full-speed/low-speed): |
| 3061 | * |
| 3062 | * * High-priority TXFIFOs are granted access using round-robin arbitration. |
| 3063 | * * Low-priority TXFIFOs are granted access using round-robin arbitration only after high- |
| 3064 | * priority |
| 3065 | * TXFIFOs have no further processing to do (i.e., either the TXQs are empty or the corresponding |
| 3066 | * TXFIFOs do not have the required data). |
| 3067 | * |
| 3068 | * The TX DMA arbiter prioritizes the SuperSpeed group or high-speed/full-speed/low-speed group |
| 3069 | * according to the ratio programmed in |
| 3070 | * USBH()_UAHC_GDMAHLRATIO. |
| 3071 | * |
| 3072 | * For scatter-gather packets, the arbiter grants successive DMA requests to the same FIFO until |
| 3073 | * the entire packet is completed. The register size corresponds to the number of configured USB |
| 3074 | * bus instances; for example, in the default configuration, there are 3 USB bus instances (1 |
| 3075 | * SuperSpeed, 1 high-speed, and 1 full-speed/low-speed). |
| 3076 | * |
| 3077 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 3078 | * |
| 3079 | * Internal: |
| 3080 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.9.2. |
| 3081 | */ |
| 3082 | union bdk_usbhx_uahc_gtxfifoprihst |
| 3083 | { |
| 3084 | uint32_t u; |
| 3085 | struct bdk_usbhx_uahc_gtxfifoprihst_s |
| 3086 | { |
| 3087 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 3088 | uint32_t reserved_3_31 : 29; |
| 3089 | uint32_t tx_priority : 3; /**< [ 2: 0](R/W) Each register bit n controls the priority (1: high, 0: low) of TX FIFO\<n\> within a speed |
| 3090 | group. */ |
| 3091 | #else /* Word 0 - Little Endian */ |
| 3092 | uint32_t tx_priority : 3; /**< [ 2: 0](R/W) Each register bit n controls the priority (1: high, 0: low) of TX FIFO\<n\> within a speed |
| 3093 | group. */ |
| 3094 | uint32_t reserved_3_31 : 29; |
| 3095 | #endif /* Word 0 - End */ |
| 3096 | } s; |
| 3097 | /* struct bdk_usbhx_uahc_gtxfifoprihst_s cn; */ |
| 3098 | }; |
| 3099 | typedef union bdk_usbhx_uahc_gtxfifoprihst bdk_usbhx_uahc_gtxfifoprihst_t; |
| 3100 | |
| 3101 | static inline uint64_t BDK_USBHX_UAHC_GTXFIFOPRIHST(unsigned long a) __attribute__ ((pure, always_inline)); |
| 3102 | static inline uint64_t BDK_USBHX_UAHC_GTXFIFOPRIHST(unsigned long a) |
| 3103 | { |
| 3104 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 3105 | return 0x86800000c618ll + 0x1000000000ll * ((a) & 0x1); |
| 3106 | __bdk_csr_fatal("USBHX_UAHC_GTXFIFOPRIHST", 1, a, 0, 0, 0); |
| 3107 | } |
| 3108 | |
| 3109 | #define typedef_BDK_USBHX_UAHC_GTXFIFOPRIHST(a) bdk_usbhx_uahc_gtxfifoprihst_t |
| 3110 | #define bustype_BDK_USBHX_UAHC_GTXFIFOPRIHST(a) BDK_CSR_TYPE_NCB32b |
| 3111 | #define basename_BDK_USBHX_UAHC_GTXFIFOPRIHST(a) "USBHX_UAHC_GTXFIFOPRIHST" |
| 3112 | #define device_bar_BDK_USBHX_UAHC_GTXFIFOPRIHST(a) 0x0 /* PF_BAR0 */ |
| 3113 | #define busnum_BDK_USBHX_UAHC_GTXFIFOPRIHST(a) (a) |
| 3114 | #define arguments_BDK_USBHX_UAHC_GTXFIFOPRIHST(a) (a),-1,-1,-1 |
| 3115 | |
| 3116 | /** |
| 3117 | * Register (NCB32b) usbh#_uahc_gtxfifosiz# |
| 3118 | * |
| 3119 | * UAHC TX FIFO Size Registers |
| 3120 | * This register holds the internal RAM start address/depth of each TxFIFO implemented. Unless |
| 3121 | * packet size/buffer size for each endpoint is different and application-specific, it is |
| 3122 | * recommended that the software use the default value. One register per FIFO. One register per |
| 3123 | * FIFO. |
| 3124 | * |
| 3125 | * Reset values = 0:{0x0000_0082} 1:{0x0082_0103} 2:{0x0185_0205}. |
| 3126 | * |
| 3127 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 3128 | * |
| 3129 | * Internal: |
| 3130 | * See Synopsys DWC_usb3 Databook v2.20a, section 6.2.6.1. |
| 3131 | * INTERNAL: For more information, refer to the BMU section in Block Descriptions on Synopsys |
| 3132 | * Databook page 238. |
| 3133 | */ |
| 3134 | union bdk_usbhx_uahc_gtxfifosizx |
| 3135 | { |
| 3136 | uint32_t u; |
| 3137 | struct bdk_usbhx_uahc_gtxfifosizx_s |
| 3138 | { |
| 3139 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 3140 | uint32_t txfstaddr : 16; /**< [ 31: 16](R/W) Transmit FIFOn RAM start address. Contains the memory start address for TxFIFOn. The reset |
| 3141 | is value derived from configuration parameters. */ |
| 3142 | uint32_t txfdep : 16; /**< [ 15: 0](R/W) TxFIFOn depth. This value is in terms of TX RAM data width. |
| 3143 | minimum value = 0x20, maximum value = 0x8000. |
| 3144 | |
| 3145 | Internal: |
| 3146 | For more information, see the Hardware Integration chapter of the Synopsys |
| 3147 | Databook. |
| 3148 | The reset value derived from configuration parameters. */ |
| 3149 | #else /* Word 0 - Little Endian */ |
| 3150 | uint32_t txfdep : 16; /**< [ 15: 0](R/W) TxFIFOn depth. This value is in terms of TX RAM data width. |
| 3151 | minimum value = 0x20, maximum value = 0x8000. |
| 3152 | |
| 3153 | Internal: |
| 3154 | For more information, see the Hardware Integration chapter of the Synopsys |
| 3155 | Databook. |
| 3156 | The reset value derived from configuration parameters. */ |
| 3157 | uint32_t txfstaddr : 16; /**< [ 31: 16](R/W) Transmit FIFOn RAM start address. Contains the memory start address for TxFIFOn. The reset |
| 3158 | is value derived from configuration parameters. */ |
| 3159 | #endif /* Word 0 - End */ |
| 3160 | } s; |
| 3161 | /* struct bdk_usbhx_uahc_gtxfifosizx_s cn; */ |
| 3162 | }; |
| 3163 | typedef union bdk_usbhx_uahc_gtxfifosizx bdk_usbhx_uahc_gtxfifosizx_t; |
| 3164 | |
| 3165 | static inline uint64_t BDK_USBHX_UAHC_GTXFIFOSIZX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 3166 | static inline uint64_t BDK_USBHX_UAHC_GTXFIFOSIZX(unsigned long a, unsigned long b) |
| 3167 | { |
| 3168 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b<=2))) |
| 3169 | return 0x86800000c300ll + 0x1000000000ll * ((a) & 0x1) + 4ll * ((b) & 0x3); |
| 3170 | __bdk_csr_fatal("USBHX_UAHC_GTXFIFOSIZX", 2, a, b, 0, 0); |
| 3171 | } |
| 3172 | |
| 3173 | #define typedef_BDK_USBHX_UAHC_GTXFIFOSIZX(a,b) bdk_usbhx_uahc_gtxfifosizx_t |
| 3174 | #define bustype_BDK_USBHX_UAHC_GTXFIFOSIZX(a,b) BDK_CSR_TYPE_NCB32b |
| 3175 | #define basename_BDK_USBHX_UAHC_GTXFIFOSIZX(a,b) "USBHX_UAHC_GTXFIFOSIZX" |
| 3176 | #define device_bar_BDK_USBHX_UAHC_GTXFIFOSIZX(a,b) 0x0 /* PF_BAR0 */ |
| 3177 | #define busnum_BDK_USBHX_UAHC_GTXFIFOSIZX(a,b) (a) |
| 3178 | #define arguments_BDK_USBHX_UAHC_GTXFIFOSIZX(a,b) (a),(b),-1,-1 |
| 3179 | |
| 3180 | /** |
| 3181 | * Register (NCB32b) usbh#_uahc_gtxthrcfg |
| 3182 | * |
| 3183 | * UAHC TX Threshold Control Register |
| 3184 | * In a normal case, a TX burst starts as soon as one packet is prefetched. This works well as |
| 3185 | * long as the system bus is faster than the USB3.0 bus (a 1024-bytes packet takes ~2.2 us on the |
| 3186 | * USB bus in SuperSpeed mode). If the system bus latency is larger than 2.2 us to access a |
| 3187 | * 1024-byte packet, then starting a burst on 1-packet condition leads to an early abort of the |
| 3188 | * burst causing unnecessary performance reduction. This register allows the configuration of |
| 3189 | * threshold and burst size control. This feature is enabled by [USBTXPKTCNTSEL]. |
| 3190 | * |
| 3191 | * Transmit path: |
| 3192 | * * The TX threshold is controlled by [USBTXPKTCNT], and the TX burst size is controlled by |
| 3193 | * [USBMAXTXBURSTSIZE]. |
| 3194 | * * Selecting optimal TX FIFO size, TX threshold, and TX burst size avoids TX burst aborts due |
| 3195 | * to an underrun if the system bus is slower than USB. Once in a while an underrun is OK, and |
| 3196 | * there is no functional issue. |
| 3197 | * * A larger threshold affects the performance, since the scheduler is idle during this time. |
| 3198 | * |
| 3199 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 3200 | * |
| 3201 | * Internal: |
| 3202 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.1.3. |
| 3203 | */ |
| 3204 | union bdk_usbhx_uahc_gtxthrcfg |
| 3205 | { |
| 3206 | uint32_t u; |
| 3207 | struct bdk_usbhx_uahc_gtxthrcfg_s |
| 3208 | { |
| 3209 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 3210 | uint32_t reserved_30_31 : 2; |
| 3211 | uint32_t usbtxpktcntsel : 1; /**< [ 29: 29](R/W) USB transmit packet-count enable. Enables/disables the USB transmission multipacket |
| 3212 | thresholding: |
| 3213 | 0 = USB transmission multipacket thresholding is disabled, the core can only start |
| 3214 | transmission on the USB after the entire packet has been fetched into the corresponding |
| 3215 | TXFIFO. |
| 3216 | 1 = USB transmission multipacket thresholding is enabled. The core can only start |
| 3217 | transmission on the USB after USBTXPKTCNT amount of packets for the USB transaction |
| 3218 | (burst) are already in the corresponding TXFIFO. |
| 3219 | This mode is only used for SuperSpeed. */ |
| 3220 | uint32_t reserved_28 : 1; |
| 3221 | uint32_t usbtxpktcnt : 4; /**< [ 27: 24](R/W) USB transmit-packet count. Specifies the number of packets that must be in the TXFIFO |
| 3222 | before the core can start transmission for the corresponding USB transaction (burst). This |
| 3223 | field is only valid when [USBTXPKTCNTSEL] = 1. Valid values are from 0x1 to 0xF. |
| 3224 | This field must be \<= [USBMAXTXBURSTSIZE]. */ |
| 3225 | uint32_t usbmaxtxburstsize : 8; /**< [ 23: 16](R/W) USB maximum TX burst size. When [USBTXPKTCNTSEL] = 1, this field specifies the |
| 3226 | maximum bulk OUT burst the core should do. When the system bus is slower than |
| 3227 | the USB, TX FIFO can underrun during a long burst. Program a smaller value to |
| 3228 | this field to limit the TX burst size that the core can do. It only applies to |
| 3229 | SuperSpeed bulk, isochronous, and interrupt OUT endpoints in the host |
| 3230 | mode. Valid values are from 0x1 to 0x10. */ |
| 3231 | uint32_t reserved_0_15 : 16; |
| 3232 | #else /* Word 0 - Little Endian */ |
| 3233 | uint32_t reserved_0_15 : 16; |
| 3234 | uint32_t usbmaxtxburstsize : 8; /**< [ 23: 16](R/W) USB maximum TX burst size. When [USBTXPKTCNTSEL] = 1, this field specifies the |
| 3235 | maximum bulk OUT burst the core should do. When the system bus is slower than |
| 3236 | the USB, TX FIFO can underrun during a long burst. Program a smaller value to |
| 3237 | this field to limit the TX burst size that the core can do. It only applies to |
| 3238 | SuperSpeed bulk, isochronous, and interrupt OUT endpoints in the host |
| 3239 | mode. Valid values are from 0x1 to 0x10. */ |
| 3240 | uint32_t usbtxpktcnt : 4; /**< [ 27: 24](R/W) USB transmit-packet count. Specifies the number of packets that must be in the TXFIFO |
| 3241 | before the core can start transmission for the corresponding USB transaction (burst). This |
| 3242 | field is only valid when [USBTXPKTCNTSEL] = 1. Valid values are from 0x1 to 0xF. |
| 3243 | This field must be \<= [USBMAXTXBURSTSIZE]. */ |
| 3244 | uint32_t reserved_28 : 1; |
| 3245 | uint32_t usbtxpktcntsel : 1; /**< [ 29: 29](R/W) USB transmit packet-count enable. Enables/disables the USB transmission multipacket |
| 3246 | thresholding: |
| 3247 | 0 = USB transmission multipacket thresholding is disabled, the core can only start |
| 3248 | transmission on the USB after the entire packet has been fetched into the corresponding |
| 3249 | TXFIFO. |
| 3250 | 1 = USB transmission multipacket thresholding is enabled. The core can only start |
| 3251 | transmission on the USB after USBTXPKTCNT amount of packets for the USB transaction |
| 3252 | (burst) are already in the corresponding TXFIFO. |
| 3253 | This mode is only used for SuperSpeed. */ |
| 3254 | uint32_t reserved_30_31 : 2; |
| 3255 | #endif /* Word 0 - End */ |
| 3256 | } s; |
| 3257 | struct bdk_usbhx_uahc_gtxthrcfg_cn |
| 3258 | { |
| 3259 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 3260 | uint32_t reserved_30_31 : 2; |
| 3261 | uint32_t usbtxpktcntsel : 1; /**< [ 29: 29](R/W) USB transmit packet-count enable. Enables/disables the USB transmission multipacket |
| 3262 | thresholding: |
| 3263 | 0 = USB transmission multipacket thresholding is disabled, the core can only start |
| 3264 | transmission on the USB after the entire packet has been fetched into the corresponding |
| 3265 | TXFIFO. |
| 3266 | 1 = USB transmission multipacket thresholding is enabled. The core can only start |
| 3267 | transmission on the USB after USBTXPKTCNT amount of packets for the USB transaction |
| 3268 | (burst) are already in the corresponding TXFIFO. |
| 3269 | This mode is only used for SuperSpeed. */ |
| 3270 | uint32_t reserved_28 : 1; |
| 3271 | uint32_t usbtxpktcnt : 4; /**< [ 27: 24](R/W) USB transmit-packet count. Specifies the number of packets that must be in the TXFIFO |
| 3272 | before the core can start transmission for the corresponding USB transaction (burst). This |
| 3273 | field is only valid when [USBTXPKTCNTSEL] = 1. Valid values are from 0x1 to 0xF. |
| 3274 | This field must be \<= [USBMAXTXBURSTSIZE]. */ |
| 3275 | uint32_t usbmaxtxburstsize : 8; /**< [ 23: 16](R/W) USB maximum TX burst size. When [USBTXPKTCNTSEL] = 1, this field specifies the |
| 3276 | maximum bulk OUT burst the core should do. When the system bus is slower than |
| 3277 | the USB, TX FIFO can underrun during a long burst. Program a smaller value to |
| 3278 | this field to limit the TX burst size that the core can do. It only applies to |
| 3279 | SuperSpeed bulk, isochronous, and interrupt OUT endpoints in the host |
| 3280 | mode. Valid values are from 0x1 to 0x10. */ |
| 3281 | uint32_t reserved_14_15 : 2; |
| 3282 | uint32_t reserved_10_13 : 4; |
| 3283 | uint32_t reserved_0_9 : 10; |
| 3284 | #else /* Word 0 - Little Endian */ |
| 3285 | uint32_t reserved_0_9 : 10; |
| 3286 | uint32_t reserved_10_13 : 4; |
| 3287 | uint32_t reserved_14_15 : 2; |
| 3288 | uint32_t usbmaxtxburstsize : 8; /**< [ 23: 16](R/W) USB maximum TX burst size. When [USBTXPKTCNTSEL] = 1, this field specifies the |
| 3289 | maximum bulk OUT burst the core should do. When the system bus is slower than |
| 3290 | the USB, TX FIFO can underrun during a long burst. Program a smaller value to |
| 3291 | this field to limit the TX burst size that the core can do. It only applies to |
| 3292 | SuperSpeed bulk, isochronous, and interrupt OUT endpoints in the host |
| 3293 | mode. Valid values are from 0x1 to 0x10. */ |
| 3294 | uint32_t usbtxpktcnt : 4; /**< [ 27: 24](R/W) USB transmit-packet count. Specifies the number of packets that must be in the TXFIFO |
| 3295 | before the core can start transmission for the corresponding USB transaction (burst). This |
| 3296 | field is only valid when [USBTXPKTCNTSEL] = 1. Valid values are from 0x1 to 0xF. |
| 3297 | This field must be \<= [USBMAXTXBURSTSIZE]. */ |
| 3298 | uint32_t reserved_28 : 1; |
| 3299 | uint32_t usbtxpktcntsel : 1; /**< [ 29: 29](R/W) USB transmit packet-count enable. Enables/disables the USB transmission multipacket |
| 3300 | thresholding: |
| 3301 | 0 = USB transmission multipacket thresholding is disabled, the core can only start |
| 3302 | transmission on the USB after the entire packet has been fetched into the corresponding |
| 3303 | TXFIFO. |
| 3304 | 1 = USB transmission multipacket thresholding is enabled. The core can only start |
| 3305 | transmission on the USB after USBTXPKTCNT amount of packets for the USB transaction |
| 3306 | (burst) are already in the corresponding TXFIFO. |
| 3307 | This mode is only used for SuperSpeed. */ |
| 3308 | uint32_t reserved_30_31 : 2; |
| 3309 | #endif /* Word 0 - End */ |
| 3310 | } cn; |
| 3311 | }; |
| 3312 | typedef union bdk_usbhx_uahc_gtxthrcfg bdk_usbhx_uahc_gtxthrcfg_t; |
| 3313 | |
| 3314 | static inline uint64_t BDK_USBHX_UAHC_GTXTHRCFG(unsigned long a) __attribute__ ((pure, always_inline)); |
| 3315 | static inline uint64_t BDK_USBHX_UAHC_GTXTHRCFG(unsigned long a) |
| 3316 | { |
| 3317 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 3318 | return 0x86800000c108ll + 0x1000000000ll * ((a) & 0x1); |
| 3319 | __bdk_csr_fatal("USBHX_UAHC_GTXTHRCFG", 1, a, 0, 0, 0); |
| 3320 | } |
| 3321 | |
| 3322 | #define typedef_BDK_USBHX_UAHC_GTXTHRCFG(a) bdk_usbhx_uahc_gtxthrcfg_t |
| 3323 | #define bustype_BDK_USBHX_UAHC_GTXTHRCFG(a) BDK_CSR_TYPE_NCB32b |
| 3324 | #define basename_BDK_USBHX_UAHC_GTXTHRCFG(a) "USBHX_UAHC_GTXTHRCFG" |
| 3325 | #define device_bar_BDK_USBHX_UAHC_GTXTHRCFG(a) 0x0 /* PF_BAR0 */ |
| 3326 | #define busnum_BDK_USBHX_UAHC_GTXTHRCFG(a) (a) |
| 3327 | #define arguments_BDK_USBHX_UAHC_GTXTHRCFG(a) (a),-1,-1,-1 |
| 3328 | |
| 3329 | /** |
| 3330 | * Register (NCB32b) usbh#_uahc_guctl |
| 3331 | * |
| 3332 | * UAHC Core User-Control Register |
| 3333 | * This register provides a few options for the software to control the core behavior in the host |
| 3334 | * mode. Most of the options are used to improve host inter-operability with different devices. |
| 3335 | * |
| 3336 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 3337 | * |
| 3338 | * Internal: |
| 3339 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.1.11. |
| 3340 | */ |
| 3341 | union bdk_usbhx_uahc_guctl |
| 3342 | { |
| 3343 | uint32_t u; |
| 3344 | struct bdk_usbhx_uahc_guctl_s |
| 3345 | { |
| 3346 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 3347 | uint32_t refclkper : 10; /**< [ 31: 22](R/W) Reference-clock period. Indicates (in terms of ns) the period of REF_CLK. The default |
| 3348 | value is set to 0x8 |
| 3349 | (8 ns/125 MHz). This field must be updated during power on initialization if |
| 3350 | USBH()_UAHC_GCTL[SOFITPSYNC] = 1 or USBH()_UAHC_GFLADJ [GFLADJ_REFCLK_LPM_SEL] = 1. The |
| 3351 | programmable maximum value 62 ns, and the minimum value is 8 ns. You use a reference clock |
| 3352 | with a period that is a integer multiple, so that ITP can meet the jitter margin of 32 ns. |
| 3353 | The allowable REF_CLK frequencies whose period is not integer multiples are |
| 3354 | 16/17/19.2/24/39.7 MHz. |
| 3355 | |
| 3356 | This field should not be set to 0x0 at any time. If you do not plan to use this feature, |
| 3357 | then you need to set this field to 0x8, the default value. */ |
| 3358 | uint32_t noextrdl : 1; /**< [ 21: 21](R/W) No extra delay between SOF and the first packet. |
| 3359 | Some high-speed devices misbehave when the host sends a packet immediately after an SOF. |
| 3360 | However, adding an extra delay between an SOF and the first packet can reduce the USB data |
| 3361 | rate and performance. |
| 3362 | |
| 3363 | This bit is used to control whether the host should wait for 2 us before it sends the |
| 3364 | first packet after a SOF, or not. You can set this bit to 1 to improve the performance if |
| 3365 | those problematic devices are not a concern in your host environment. |
| 3366 | 0 = host waits for 2 us after an SOF before it sends the first USB packet. |
| 3367 | 1 = host does not wait after an SOF before it sends the first USB packet. */ |
| 3368 | uint32_t psqextrressp : 3; /**< [ 20: 18](R/W) PSQ extra reserved space. This is a debug feature, and is not intended for normal usage. |
| 3369 | This parameter specifies how much additional space in the PSQ (protocol-status queue) must |
| 3370 | be reserved before the U3PTL initiates a new USB transaction and burst beats. */ |
| 3371 | uint32_t sprsctrltransen : 1; /**< [ 17: 17](R/W) Sparse control transaction enable. Some devices are slow in responding to control |
| 3372 | transfers. Scheduling multiple transactions in one microframe/frame can cause these |
| 3373 | devices to misbehave. If this bit is set to 1, the host controller schedules transactions |
| 3374 | for a control transfer in different microframes/frames. */ |
| 3375 | uint32_t resbwhseps : 1; /**< [ 16: 16](R/W) Reserving 85% bandwidth for high-speed periodic EPs. By default, host controller reserves |
| 3376 | 80% of the bandwidth for periodic EPs. If this bit is set, the bandwidth is relaxed to 85% |
| 3377 | to accommodate two high-speed, high-bandwidth ISOC EPs. |
| 3378 | |
| 3379 | USB 2.0 required 80% bandwidth allocated for ISOC traffic. If two high bandwidth ISOC |
| 3380 | devices (HD webcams) are connected, and if each requires 1024-bytes * 3 packets per |
| 3381 | microframe, then the bandwidth required is around 82%. If this bit is set to 1, it is |
| 3382 | possible to connect two webcams of 1024 bytes * 3 payload per microframe each. Otherwise, |
| 3383 | you may have to reduce the resolution of the webcams. */ |
| 3384 | uint32_t cmdevaddr : 1; /**< [ 15: 15](R/W) Compliance mode for device address. When set to 1, slot ID can have different value than |
| 3385 | device address if max_slot_enabled \< 128. |
| 3386 | 0 = Device address is equal to slot ID. |
| 3387 | 1 = Increment device address on each address device command. |
| 3388 | |
| 3389 | The xHCI compliance requires this bit to be set to 1. The 0 mode is for debug purpose |
| 3390 | only. This allows you to easily identify a device connected to a port in the Lecroy or |
| 3391 | Eliisys trace during hardware debug. */ |
| 3392 | uint32_t usbhstinautoretryen : 1; /**< [ 14: 14](R/W) Host IN auto-retry enable. When set, this field enables the auto-retry feature. For IN |
| 3393 | transfers (non-isochronous) that encounter data packets with CRC errors or internal |
| 3394 | overrun scenarios, the auto-retry feature causes the host core to reply to the device with |
| 3395 | a non-terminating retry ACK (i.e. an ACK transaction packet with Retry = 1 and NumP != 0). |
| 3396 | If the auto-retry feature is disabled (default), the core responds with a terminating |
| 3397 | retry ACK (i.e. an ACK transaction packet with Retry = 1 and NumP = 0). */ |
| 3398 | uint32_t enoverlapchk : 1; /**< [ 13: 13](R/W) Enable check for LFPS overlap during remote Ux Exit. If this bit is set to: |
| 3399 | 0 = When the link exists U1/U2/U3 because of a remote exit, it does not look for an LFPS |
| 3400 | overlap. |
| 3401 | 1 = The SuperSpeed link, when exiting U1/U2/U3, waits for either the remote link LFPS or |
| 3402 | TS1/TS2 training symbols before it confirms that the LFPS handshake is complete. This is |
| 3403 | done to handle the case where the LFPS glitch causes the link to start exiting from the |
| 3404 | low power state. Looking for the LFPS overlap makes sure that the link partner also sees |
| 3405 | the LFPS. */ |
| 3406 | uint32_t extcapsupten : 1; /**< [ 12: 12](R/W) External extended capability support enable. If disabled, a read USBH()_UAHC_SUPTPRT3_DW0 |
| 3407 | [NEXTCAPPTR] returns 0 in the next capability pointer field. This indicates there are no |
| 3408 | more capabilities. If enabled, a read to USBH()_UAHC_SUPTPRT3_DW0[NEXTCAPPTR] returns 4 in |
| 3409 | the |
| 3410 | next capability pointer field. |
| 3411 | Always set to 0x0. */ |
| 3412 | uint32_t insrtextrfsbodi : 1; /**< [ 11: 11](R/W) Insert extra delay between full-speed bulk OUT transactions. Some full-speed devices are |
| 3413 | slow to receive bulk OUT data and can get stuck when there are consecutive bulk OUT |
| 3414 | transactions with short inter-transaction delays. This bit is used to control whether the |
| 3415 | host inserts extra delay between consecutive bulk OUT transactions to a full-speed |
| 3416 | endpoint. |
| 3417 | 0 = Host does not insert extra delay. |
| 3418 | Setting this bit to 1 reduces the bulk OUT transfer performance for most of the full-speed |
| 3419 | devices. |
| 3420 | 1 = Host inserts about 12 us extra delay between consecutive bulk OUT transactions to an |
| 3421 | full-speed endpoint to work around the device issue. */ |
| 3422 | uint32_t dtct : 2; /**< [ 10: 9](R/W) Device timeout coarse tuning. This field determines how long the host waits for a response |
| 3423 | from device before considering a timeout. |
| 3424 | The core first checks the [DTCT] value. If it is 0, then the timeout value is defined by |
| 3425 | the |
| 3426 | [DTFT]. If it is nonzero, then it uses the following timeout values: |
| 3427 | 0x0 = 0 us; use [DTFT] value instead. |
| 3428 | 0x1 = 500 us. |
| 3429 | 0x2 = 1.5 ms. |
| 3430 | 0x3 = 6.5 ms. */ |
| 3431 | uint32_t dtft : 9; /**< [ 8: 0](R/W) Device timeout fine tuning. This field determines how long the host waits for a response |
| 3432 | from a device before considering a timeout. For [DTFT] to take effect, [DTCT] must be set |
| 3433 | to |
| 3434 | 0x0. |
| 3435 | The [DTFT] value specifies the number of 125 MHz clock cycles * 256 to count before |
| 3436 | considering a device timeout. For the 125 MHz clock cycles (8 ns period), this is |
| 3437 | calculated as follows: |
| 3438 | _ [DTFT value] * 256 * 8 (ns) |
| 3439 | 0x2 = 2 * 256 * 8 -\> 4 us. |
| 3440 | 0x5 = 5 * 256 * 8 -\> 10 us. |
| 3441 | 0xA = 10 * 256 * 8 -\> 20 us. |
| 3442 | 0x10 = 16 * 256 * 8 -\> 32 us. |
| 3443 | 0x19 = 25 * 256 * 8 -\> 51 us. |
| 3444 | 0x31 = 49 * 256 * 8 -\> 100 us. |
| 3445 | 0x62 = 98 * 256 * 8 -\> 200 us. */ |
| 3446 | #else /* Word 0 - Little Endian */ |
| 3447 | uint32_t dtft : 9; /**< [ 8: 0](R/W) Device timeout fine tuning. This field determines how long the host waits for a response |
| 3448 | from a device before considering a timeout. For [DTFT] to take effect, [DTCT] must be set |
| 3449 | to |
| 3450 | 0x0. |
| 3451 | The [DTFT] value specifies the number of 125 MHz clock cycles * 256 to count before |
| 3452 | considering a device timeout. For the 125 MHz clock cycles (8 ns period), this is |
| 3453 | calculated as follows: |
| 3454 | _ [DTFT value] * 256 * 8 (ns) |
| 3455 | 0x2 = 2 * 256 * 8 -\> 4 us. |
| 3456 | 0x5 = 5 * 256 * 8 -\> 10 us. |
| 3457 | 0xA = 10 * 256 * 8 -\> 20 us. |
| 3458 | 0x10 = 16 * 256 * 8 -\> 32 us. |
| 3459 | 0x19 = 25 * 256 * 8 -\> 51 us. |
| 3460 | 0x31 = 49 * 256 * 8 -\> 100 us. |
| 3461 | 0x62 = 98 * 256 * 8 -\> 200 us. */ |
| 3462 | uint32_t dtct : 2; /**< [ 10: 9](R/W) Device timeout coarse tuning. This field determines how long the host waits for a response |
| 3463 | from device before considering a timeout. |
| 3464 | The core first checks the [DTCT] value. If it is 0, then the timeout value is defined by |
| 3465 | the |
| 3466 | [DTFT]. If it is nonzero, then it uses the following timeout values: |
| 3467 | 0x0 = 0 us; use [DTFT] value instead. |
| 3468 | 0x1 = 500 us. |
| 3469 | 0x2 = 1.5 ms. |
| 3470 | 0x3 = 6.5 ms. */ |
| 3471 | uint32_t insrtextrfsbodi : 1; /**< [ 11: 11](R/W) Insert extra delay between full-speed bulk OUT transactions. Some full-speed devices are |
| 3472 | slow to receive bulk OUT data and can get stuck when there are consecutive bulk OUT |
| 3473 | transactions with short inter-transaction delays. This bit is used to control whether the |
| 3474 | host inserts extra delay between consecutive bulk OUT transactions to a full-speed |
| 3475 | endpoint. |
| 3476 | 0 = Host does not insert extra delay. |
| 3477 | Setting this bit to 1 reduces the bulk OUT transfer performance for most of the full-speed |
| 3478 | devices. |
| 3479 | 1 = Host inserts about 12 us extra delay between consecutive bulk OUT transactions to an |
| 3480 | full-speed endpoint to work around the device issue. */ |
| 3481 | uint32_t extcapsupten : 1; /**< [ 12: 12](R/W) External extended capability support enable. If disabled, a read USBH()_UAHC_SUPTPRT3_DW0 |
| 3482 | [NEXTCAPPTR] returns 0 in the next capability pointer field. This indicates there are no |
| 3483 | more capabilities. If enabled, a read to USBH()_UAHC_SUPTPRT3_DW0[NEXTCAPPTR] returns 4 in |
| 3484 | the |
| 3485 | next capability pointer field. |
| 3486 | Always set to 0x0. */ |
| 3487 | uint32_t enoverlapchk : 1; /**< [ 13: 13](R/W) Enable check for LFPS overlap during remote Ux Exit. If this bit is set to: |
| 3488 | 0 = When the link exists U1/U2/U3 because of a remote exit, it does not look for an LFPS |
| 3489 | overlap. |
| 3490 | 1 = The SuperSpeed link, when exiting U1/U2/U3, waits for either the remote link LFPS or |
| 3491 | TS1/TS2 training symbols before it confirms that the LFPS handshake is complete. This is |
| 3492 | done to handle the case where the LFPS glitch causes the link to start exiting from the |
| 3493 | low power state. Looking for the LFPS overlap makes sure that the link partner also sees |
| 3494 | the LFPS. */ |
| 3495 | uint32_t usbhstinautoretryen : 1; /**< [ 14: 14](R/W) Host IN auto-retry enable. When set, this field enables the auto-retry feature. For IN |
| 3496 | transfers (non-isochronous) that encounter data packets with CRC errors or internal |
| 3497 | overrun scenarios, the auto-retry feature causes the host core to reply to the device with |
| 3498 | a non-terminating retry ACK (i.e. an ACK transaction packet with Retry = 1 and NumP != 0). |
| 3499 | If the auto-retry feature is disabled (default), the core responds with a terminating |
| 3500 | retry ACK (i.e. an ACK transaction packet with Retry = 1 and NumP = 0). */ |
| 3501 | uint32_t cmdevaddr : 1; /**< [ 15: 15](R/W) Compliance mode for device address. When set to 1, slot ID can have different value than |
| 3502 | device address if max_slot_enabled \< 128. |
| 3503 | 0 = Device address is equal to slot ID. |
| 3504 | 1 = Increment device address on each address device command. |
| 3505 | |
| 3506 | The xHCI compliance requires this bit to be set to 1. The 0 mode is for debug purpose |
| 3507 | only. This allows you to easily identify a device connected to a port in the Lecroy or |
| 3508 | Eliisys trace during hardware debug. */ |
| 3509 | uint32_t resbwhseps : 1; /**< [ 16: 16](R/W) Reserving 85% bandwidth for high-speed periodic EPs. By default, host controller reserves |
| 3510 | 80% of the bandwidth for periodic EPs. If this bit is set, the bandwidth is relaxed to 85% |
| 3511 | to accommodate two high-speed, high-bandwidth ISOC EPs. |
| 3512 | |
| 3513 | USB 2.0 required 80% bandwidth allocated for ISOC traffic. If two high bandwidth ISOC |
| 3514 | devices (HD webcams) are connected, and if each requires 1024-bytes * 3 packets per |
| 3515 | microframe, then the bandwidth required is around 82%. If this bit is set to 1, it is |
| 3516 | possible to connect two webcams of 1024 bytes * 3 payload per microframe each. Otherwise, |
| 3517 | you may have to reduce the resolution of the webcams. */ |
| 3518 | uint32_t sprsctrltransen : 1; /**< [ 17: 17](R/W) Sparse control transaction enable. Some devices are slow in responding to control |
| 3519 | transfers. Scheduling multiple transactions in one microframe/frame can cause these |
| 3520 | devices to misbehave. If this bit is set to 1, the host controller schedules transactions |
| 3521 | for a control transfer in different microframes/frames. */ |
| 3522 | uint32_t psqextrressp : 3; /**< [ 20: 18](R/W) PSQ extra reserved space. This is a debug feature, and is not intended for normal usage. |
| 3523 | This parameter specifies how much additional space in the PSQ (protocol-status queue) must |
| 3524 | be reserved before the U3PTL initiates a new USB transaction and burst beats. */ |
| 3525 | uint32_t noextrdl : 1; /**< [ 21: 21](R/W) No extra delay between SOF and the first packet. |
| 3526 | Some high-speed devices misbehave when the host sends a packet immediately after an SOF. |
| 3527 | However, adding an extra delay between an SOF and the first packet can reduce the USB data |
| 3528 | rate and performance. |
| 3529 | |
| 3530 | This bit is used to control whether the host should wait for 2 us before it sends the |
| 3531 | first packet after a SOF, or not. You can set this bit to 1 to improve the performance if |
| 3532 | those problematic devices are not a concern in your host environment. |
| 3533 | 0 = host waits for 2 us after an SOF before it sends the first USB packet. |
| 3534 | 1 = host does not wait after an SOF before it sends the first USB packet. */ |
| 3535 | uint32_t refclkper : 10; /**< [ 31: 22](R/W) Reference-clock period. Indicates (in terms of ns) the period of REF_CLK. The default |
| 3536 | value is set to 0x8 |
| 3537 | (8 ns/125 MHz). This field must be updated during power on initialization if |
| 3538 | USBH()_UAHC_GCTL[SOFITPSYNC] = 1 or USBH()_UAHC_GFLADJ [GFLADJ_REFCLK_LPM_SEL] = 1. The |
| 3539 | programmable maximum value 62 ns, and the minimum value is 8 ns. You use a reference clock |
| 3540 | with a period that is a integer multiple, so that ITP can meet the jitter margin of 32 ns. |
| 3541 | The allowable REF_CLK frequencies whose period is not integer multiples are |
| 3542 | 16/17/19.2/24/39.7 MHz. |
| 3543 | |
| 3544 | This field should not be set to 0x0 at any time. If you do not plan to use this feature, |
| 3545 | then you need to set this field to 0x8, the default value. */ |
| 3546 | #endif /* Word 0 - End */ |
| 3547 | } s; |
| 3548 | /* struct bdk_usbhx_uahc_guctl_s cn; */ |
| 3549 | }; |
| 3550 | typedef union bdk_usbhx_uahc_guctl bdk_usbhx_uahc_guctl_t; |
| 3551 | |
| 3552 | static inline uint64_t BDK_USBHX_UAHC_GUCTL(unsigned long a) __attribute__ ((pure, always_inline)); |
| 3553 | static inline uint64_t BDK_USBHX_UAHC_GUCTL(unsigned long a) |
| 3554 | { |
| 3555 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 3556 | return 0x86800000c12cll + 0x1000000000ll * ((a) & 0x1); |
| 3557 | __bdk_csr_fatal("USBHX_UAHC_GUCTL", 1, a, 0, 0, 0); |
| 3558 | } |
| 3559 | |
| 3560 | #define typedef_BDK_USBHX_UAHC_GUCTL(a) bdk_usbhx_uahc_guctl_t |
| 3561 | #define bustype_BDK_USBHX_UAHC_GUCTL(a) BDK_CSR_TYPE_NCB32b |
| 3562 | #define basename_BDK_USBHX_UAHC_GUCTL(a) "USBHX_UAHC_GUCTL" |
| 3563 | #define device_bar_BDK_USBHX_UAHC_GUCTL(a) 0x0 /* PF_BAR0 */ |
| 3564 | #define busnum_BDK_USBHX_UAHC_GUCTL(a) (a) |
| 3565 | #define arguments_BDK_USBHX_UAHC_GUCTL(a) (a),-1,-1,-1 |
| 3566 | |
| 3567 | /** |
| 3568 | * Register (NCB32b) usbh#_uahc_guctl1 |
| 3569 | * |
| 3570 | * UAHC Global User Control Register 1 |
| 3571 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 3572 | * Internal: |
| 3573 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.1.7. |
| 3574 | */ |
| 3575 | union bdk_usbhx_uahc_guctl1 |
| 3576 | { |
| 3577 | uint32_t u; |
| 3578 | struct bdk_usbhx_uahc_guctl1_s |
| 3579 | { |
| 3580 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 3581 | uint32_t reserved_18_31 : 14; |
| 3582 | uint32_t parkmode_disable_ss : 1; /**< [ 17: 17](R/W) This bit is for debug purpose only. |
| 3583 | When this bit is set to 1 all SS bus instances in park mode are |
| 3584 | disabled. */ |
| 3585 | uint32_t parkmode_disable_hs : 1; /**< [ 16: 16](R/W) When this bit is set to 1 all HS bus instances park mode are |
| 3586 | disabled. */ |
| 3587 | uint32_t parkmode_disable_fsls : 1; /**< [ 15: 15](R/W) When this bit is set to 1 all FS/LS bus instances park mode are |
| 3588 | disabled. */ |
| 3589 | uint32_t reserved_9_14 : 6; |
| 3590 | uint32_t l1_susp_thrld_en_for_host : 1;/**< [ 8: 8](R/W) The controller puts the PHY into deep low-power mode in L1 when both of the |
| 3591 | following are true: |
| 3592 | |
| 3593 | * The HIRD/BESL value used is greater than or equal to the |
| 3594 | value in [L1_SUSP_THRLD_FOR_HOST]. |
| 3595 | * The [L1_SUSP_THRLD_EN_FOR_HOST] bit is set. |
| 3596 | |
| 3597 | The controller the UTMI PHY transitions to shallow low-power |
| 3598 | mode in L1 by powering down necessary blocks when one of the |
| 3599 | following is true: |
| 3600 | |
| 3601 | * The HIRD/BESL value used is less than the value in |
| 3602 | [L1_SUSP_THRLD_FOR_HOST]. |
| 3603 | * [L1_SUSP_THRLD_EN_FOR_HOST] is clear. */ |
| 3604 | uint32_t l1_susp_thrld_for_host : 4; /**< [ 7: 4](R/W) This field is effective only when the [L1_SUSP_THRLD_EN_FOR_HOST] is set to 1. */ |
| 3605 | uint32_t helden : 1; /**< [ 3: 3](R/W) When this bit is set to 1, it enables the exit latency delta (ELD) |
| 3606 | support defined in the xHCI 1.0 Errata. */ |
| 3607 | uint32_t hparchkdisable : 1; /**< [ 2: 2](R/W) When this bit is set to 0 (by default), the xHC checks that the input |
| 3608 | slot/EP context fields comply to the xHCI Specification. Upon |
| 3609 | detection of a parameter error during command execution, the |
| 3610 | xHC generates an event TRB with completion code indicating |
| 3611 | 'PARAMETER ERROR'. |
| 3612 | When the bit is set to 1, the xHC does not perform parameter |
| 3613 | checks and does not generate 'PARAMETER ERROR' completion |
| 3614 | code. */ |
| 3615 | uint32_t ovrld_l1_susp_com : 1; /**< [ 1: 1](R/W) Always set to 0. */ |
| 3616 | uint32_t loa_filter_en : 1; /**< [ 0: 0](R/W) If this bit is set, the USB 2.0 port babble is checked at least three consecutive times |
| 3617 | before the port is disabled. This prevents false triggering of the babble condition when |
| 3618 | using low quality cables. */ |
| 3619 | #else /* Word 0 - Little Endian */ |
| 3620 | uint32_t loa_filter_en : 1; /**< [ 0: 0](R/W) If this bit is set, the USB 2.0 port babble is checked at least three consecutive times |
| 3621 | before the port is disabled. This prevents false triggering of the babble condition when |
| 3622 | using low quality cables. */ |
| 3623 | uint32_t ovrld_l1_susp_com : 1; /**< [ 1: 1](R/W) Always set to 0. */ |
| 3624 | uint32_t hparchkdisable : 1; /**< [ 2: 2](R/W) When this bit is set to 0 (by default), the xHC checks that the input |
| 3625 | slot/EP context fields comply to the xHCI Specification. Upon |
| 3626 | detection of a parameter error during command execution, the |
| 3627 | xHC generates an event TRB with completion code indicating |
| 3628 | 'PARAMETER ERROR'. |
| 3629 | When the bit is set to 1, the xHC does not perform parameter |
| 3630 | checks and does not generate 'PARAMETER ERROR' completion |
| 3631 | code. */ |
| 3632 | uint32_t helden : 1; /**< [ 3: 3](R/W) When this bit is set to 1, it enables the exit latency delta (ELD) |
| 3633 | support defined in the xHCI 1.0 Errata. */ |
| 3634 | uint32_t l1_susp_thrld_for_host : 4; /**< [ 7: 4](R/W) This field is effective only when the [L1_SUSP_THRLD_EN_FOR_HOST] is set to 1. */ |
| 3635 | uint32_t l1_susp_thrld_en_for_host : 1;/**< [ 8: 8](R/W) The controller puts the PHY into deep low-power mode in L1 when both of the |
| 3636 | following are true: |
| 3637 | |
| 3638 | * The HIRD/BESL value used is greater than or equal to the |
| 3639 | value in [L1_SUSP_THRLD_FOR_HOST]. |
| 3640 | * The [L1_SUSP_THRLD_EN_FOR_HOST] bit is set. |
| 3641 | |
| 3642 | The controller the UTMI PHY transitions to shallow low-power |
| 3643 | mode in L1 by powering down necessary blocks when one of the |
| 3644 | following is true: |
| 3645 | |
| 3646 | * The HIRD/BESL value used is less than the value in |
| 3647 | [L1_SUSP_THRLD_FOR_HOST]. |
| 3648 | * [L1_SUSP_THRLD_EN_FOR_HOST] is clear. */ |
| 3649 | uint32_t reserved_9_14 : 6; |
| 3650 | uint32_t parkmode_disable_fsls : 1; /**< [ 15: 15](R/W) When this bit is set to 1 all FS/LS bus instances park mode are |
| 3651 | disabled. */ |
| 3652 | uint32_t parkmode_disable_hs : 1; /**< [ 16: 16](R/W) When this bit is set to 1 all HS bus instances park mode are |
| 3653 | disabled. */ |
| 3654 | uint32_t parkmode_disable_ss : 1; /**< [ 17: 17](R/W) This bit is for debug purpose only. |
| 3655 | When this bit is set to 1 all SS bus instances in park mode are |
| 3656 | disabled. */ |
| 3657 | uint32_t reserved_18_31 : 14; |
| 3658 | #endif /* Word 0 - End */ |
| 3659 | } s; |
| 3660 | /* struct bdk_usbhx_uahc_guctl1_s cn; */ |
| 3661 | }; |
| 3662 | typedef union bdk_usbhx_uahc_guctl1 bdk_usbhx_uahc_guctl1_t; |
| 3663 | |
| 3664 | static inline uint64_t BDK_USBHX_UAHC_GUCTL1(unsigned long a) __attribute__ ((pure, always_inline)); |
| 3665 | static inline uint64_t BDK_USBHX_UAHC_GUCTL1(unsigned long a) |
| 3666 | { |
| 3667 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 3668 | return 0x86800000c11cll + 0x1000000000ll * ((a) & 0x1); |
| 3669 | __bdk_csr_fatal("USBHX_UAHC_GUCTL1", 1, a, 0, 0, 0); |
| 3670 | } |
| 3671 | |
| 3672 | #define typedef_BDK_USBHX_UAHC_GUCTL1(a) bdk_usbhx_uahc_guctl1_t |
| 3673 | #define bustype_BDK_USBHX_UAHC_GUCTL1(a) BDK_CSR_TYPE_NCB32b |
| 3674 | #define basename_BDK_USBHX_UAHC_GUCTL1(a) "USBHX_UAHC_GUCTL1" |
| 3675 | #define device_bar_BDK_USBHX_UAHC_GUCTL1(a) 0x0 /* PF_BAR0 */ |
| 3676 | #define busnum_BDK_USBHX_UAHC_GUCTL1(a) (a) |
| 3677 | #define arguments_BDK_USBHX_UAHC_GUCTL1(a) (a),-1,-1,-1 |
| 3678 | |
| 3679 | /** |
| 3680 | * Register (NCB32b) usbh#_uahc_guid |
| 3681 | * |
| 3682 | * UAHC Core User ID Register |
| 3683 | * This is a read/write register containing the User ID. The power-on value for this register is |
| 3684 | * specified as the user identification register. This register can be used in the following |
| 3685 | * ways: |
| 3686 | * * To store the version or revision of your system. |
| 3687 | * * To store hardware configurations that are outside of the core. |
| 3688 | * * As a scratch register. |
| 3689 | * |
| 3690 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 3691 | * |
| 3692 | * Internal: |
| 3693 | * See Synopsys DWC_usb3 Databook v2.50a, section 6.2.1.10. |
| 3694 | */ |
| 3695 | union bdk_usbhx_uahc_guid |
| 3696 | { |
| 3697 | uint32_t u; |
| 3698 | struct bdk_usbhx_uahc_guid_s |
| 3699 | { |
| 3700 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 3701 | uint32_t userid : 32; /**< [ 31: 0](R/W) User ID. Application-programmable ID field. */ |
| 3702 | #else /* Word 0 - Little Endian */ |
| 3703 | uint32_t userid : 32; /**< [ 31: 0](R/W) User ID. Application-programmable ID field. */ |
| 3704 | #endif /* Word 0 - End */ |
| 3705 | } s; |
| 3706 | /* struct bdk_usbhx_uahc_guid_s cn; */ |
| 3707 | }; |
| 3708 | typedef union bdk_usbhx_uahc_guid bdk_usbhx_uahc_guid_t; |
| 3709 | |
| 3710 | static inline uint64_t BDK_USBHX_UAHC_GUID(unsigned long a) __attribute__ ((pure, always_inline)); |
| 3711 | static inline uint64_t BDK_USBHX_UAHC_GUID(unsigned long a) |
| 3712 | { |
| 3713 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 3714 | return 0x86800000c128ll + 0x1000000000ll * ((a) & 0x1); |
| 3715 | __bdk_csr_fatal("USBHX_UAHC_GUID", 1, a, 0, 0, 0); |
| 3716 | } |
| 3717 | |
| 3718 | #define typedef_BDK_USBHX_UAHC_GUID(a) bdk_usbhx_uahc_guid_t |
| 3719 | #define bustype_BDK_USBHX_UAHC_GUID(a) BDK_CSR_TYPE_NCB32b |
| 3720 | #define basename_BDK_USBHX_UAHC_GUID(a) "USBHX_UAHC_GUID" |
| 3721 | #define device_bar_BDK_USBHX_UAHC_GUID(a) 0x0 /* PF_BAR0 */ |
| 3722 | #define busnum_BDK_USBHX_UAHC_GUID(a) (a) |
| 3723 | #define arguments_BDK_USBHX_UAHC_GUID(a) (a),-1,-1,-1 |
| 3724 | |
| 3725 | /** |
| 3726 | * Register (NCB32b) usbh#_uahc_gusb2i2cctl# |
| 3727 | * |
| 3728 | * UAHC USB2 I2C Control Register |
| 3729 | * This register is reserved for future use. |
| 3730 | * |
| 3731 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 3732 | * |
| 3733 | * Internal: |
| 3734 | * See Synopsys DWC_usb3 Databook v2.20a, section 6.2.5.2. |
| 3735 | */ |
| 3736 | union bdk_usbhx_uahc_gusb2i2cctlx |
| 3737 | { |
| 3738 | uint32_t u; |
| 3739 | struct bdk_usbhx_uahc_gusb2i2cctlx_s |
| 3740 | { |
| 3741 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 3742 | uint32_t reserved_0_31 : 32; |
| 3743 | #else /* Word 0 - Little Endian */ |
| 3744 | uint32_t reserved_0_31 : 32; |
| 3745 | #endif /* Word 0 - End */ |
| 3746 | } s; |
| 3747 | /* struct bdk_usbhx_uahc_gusb2i2cctlx_s cn; */ |
| 3748 | }; |
| 3749 | typedef union bdk_usbhx_uahc_gusb2i2cctlx bdk_usbhx_uahc_gusb2i2cctlx_t; |
| 3750 | |
| 3751 | static inline uint64_t BDK_USBHX_UAHC_GUSB2I2CCTLX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 3752 | static inline uint64_t BDK_USBHX_UAHC_GUSB2I2CCTLX(unsigned long a, unsigned long b) |
| 3753 | { |
| 3754 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==0))) |
| 3755 | return 0x86800000c240ll + 0x1000000000ll * ((a) & 0x1) + 4ll * ((b) & 0x0); |
| 3756 | __bdk_csr_fatal("USBHX_UAHC_GUSB2I2CCTLX", 2, a, b, 0, 0); |
| 3757 | } |
| 3758 | |
| 3759 | #define typedef_BDK_USBHX_UAHC_GUSB2I2CCTLX(a,b) bdk_usbhx_uahc_gusb2i2cctlx_t |
| 3760 | #define bustype_BDK_USBHX_UAHC_GUSB2I2CCTLX(a,b) BDK_CSR_TYPE_NCB32b |
| 3761 | #define basename_BDK_USBHX_UAHC_GUSB2I2CCTLX(a,b) "USBHX_UAHC_GUSB2I2CCTLX" |
| 3762 | #define device_bar_BDK_USBHX_UAHC_GUSB2I2CCTLX(a,b) 0x0 /* PF_BAR0 */ |
| 3763 | #define busnum_BDK_USBHX_UAHC_GUSB2I2CCTLX(a,b) (a) |
| 3764 | #define arguments_BDK_USBHX_UAHC_GUSB2I2CCTLX(a,b) (a),(b),-1,-1 |
| 3765 | |
| 3766 | /** |
| 3767 | * Register (NCB32b) usbh#_uahc_gusb2phycfg# |
| 3768 | * |
| 3769 | * UAHC USB2 PHY-Configuration Register |
| 3770 | * This register is used to configure the core after power-on. It contains USB 2.0 and USB 2.0 |
| 3771 | * PHY-related configuration parameters. The application must program this register before |
| 3772 | * starting any transactions on either the SoC bus or the USB. Per-port registers are |
| 3773 | * implemented. |
| 3774 | * |
| 3775 | * Do not make changes to this register after the initial programming. |
| 3776 | * |
| 3777 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 3778 | * |
| 3779 | * Internal: |
| 3780 | * See Synopsys DWC_usb3 Databook v2.20a, section 6.2.5.1. |
| 3781 | */ |
| 3782 | union bdk_usbhx_uahc_gusb2phycfgx |
| 3783 | { |
| 3784 | uint32_t u; |
| 3785 | struct bdk_usbhx_uahc_gusb2phycfgx_s |
| 3786 | { |
| 3787 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 3788 | uint32_t physoftrst : 1; /**< [ 31: 31](R/W) PHY soft reset. Causes the usb2phy_reset signal to be asserted to reset a UTMI PHY. */ |
| 3789 | uint32_t u2_freeclk_exists : 1; /**< [ 30: 30](R/W) Specifies whether your USB 2.0 PHY provides a free-running PHY clock, which is active when |
| 3790 | the clock control input is active. If your USB 2.0 PHY provides a free-running PHY clock, |
| 3791 | it must be connected to the utmi_clk[0] input. The remaining utmi_clk[n] must be connected |
| 3792 | to the respective port clocks. The core uses the Port-0 clock for generating the internal |
| 3793 | mac2 clock. |
| 3794 | 0 = USB 2.0 free clock does not exist. |
| 3795 | 1 = USB 2.0 free clock exists. |
| 3796 | |
| 3797 | This field must be set to zero if you enable ITP generation based on the REF_CLK |
| 3798 | counter, USBH()_UAHC_GCTL[SOFITPSYNC] = 1, or USBH()_UAHC_GFLADJ [GFLADJ_REFCLK_LPM_SEL] = |
| 3799 | 1. */ |
| 3800 | uint32_t ulpi_lpm_with_opmode_chk : 1;/**< [ 29: 29](R/W) Support the LPM over ULPI without NOPID token to the ULPI PHY. Always 0x0. */ |
| 3801 | uint32_t hsic_con_width_adj : 2; /**< [ 28: 27](RO) This bit is used in the HSIC device mode of operation. Always 0x0 */ |
| 3802 | uint32_t inv_sel_hsic : 1; /**< [ 26: 26](RO) The application driver uses this bit to control the HSIC enable/disable function. */ |
| 3803 | uint32_t reserved_19_25 : 7; |
| 3804 | uint32_t ulpiextvbusindicator : 1; /**< [ 18: 18](R/W) Reserved (unused in this configuration). */ |
| 3805 | uint32_t ulpiextvbusdrv : 1; /**< [ 17: 17](R/W) Reserved (unused in this configuration). */ |
| 3806 | uint32_t ulpiclksusm : 1; /**< [ 16: 16](R/W) Reserved (unused in this configuration). */ |
| 3807 | uint32_t ulpiautores : 1; /**< [ 15: 15](R/W) Reserved (unused in this configuration). */ |
| 3808 | uint32_t reserved_14 : 1; |
| 3809 | uint32_t usbtrdtim : 4; /**< [ 13: 10](R/W) USB 2.0 turnaround time. Sets the turnaround time in PHY clock cycles. Specifies the |
| 3810 | response time for a MAC request to the packet FIFO controller (PFC) to fetch data from the |
| 3811 | DFIFO (SPRAM). |
| 3812 | USB turnaround time is a critical certification criteria when using long cables and five |
| 3813 | hub levels. |
| 3814 | When the MAC interface is 8-bit UTMI+/ULPI, the required values for this field is 0x9. */ |
| 3815 | uint32_t reserved_9 : 1; |
| 3816 | uint32_t enblslpm : 1; /**< [ 8: 8](R/W) Enable utmi_sleep_n and utmi_l1_suspend_n. The application uses this field to control |
| 3817 | utmi_sleep_n and utmi_l1_suspend_n assertion to the PHY in the L1 state. |
| 3818 | 0 = utmi_sleep_n and utmi_l1_suspend_n assertion from the core is not transferred to the |
| 3819 | external PHY. |
| 3820 | 1 = utmi_sleep_n and utmi_l1_suspend_n assertion from the core is transferred to the |
| 3821 | external PHY. |
| 3822 | |
| 3823 | When hardware LPM is enabled, this bit should be set high for Port0. */ |
| 3824 | uint32_t physel : 1; /**< [ 7: 7](WO) USB 2.0 high-speed PHY or USB 1.1 full-speed serial transceiver select. */ |
| 3825 | uint32_t susphy : 1; /**< [ 6: 6](R/W) Suspend USB2.0 high-speed/full-speed/low-speed PHY. When set, USB2.0 PHY enters suspend |
| 3826 | mode if suspend conditions are valid. */ |
| 3827 | uint32_t fsintf : 1; /**< [ 5: 5](RO) Full-speed serial-interface select. Always reads as 0x0. */ |
| 3828 | uint32_t ulpi_utmi_sel : 1; /**< [ 4: 4](RO) ULPI or UTMI+ select. Always reads as 0x0, indicating UTMI+. */ |
| 3829 | uint32_t phyif : 1; /**< [ 3: 3](R/W) PHY interface width: 1 = 16-bit, 0 = 8-bit. |
| 3830 | All the enabled 2.0 ports should have the same clock frequency as Port0 clock frequency |
| 3831 | (utmi_clk[0]). |
| 3832 | The UTMI 8-bit and 16-bit modes cannot be used together for different ports at the same |
| 3833 | time (i.e., all the ports should be in 8-bit mode, or all of them should be in 16-bit |
| 3834 | mode). */ |
| 3835 | uint32_t toutcal : 3; /**< [ 2: 0](R/W) High-speed/full-speed timeout calibration. |
| 3836 | The number of PHY clock cycles, as indicated by the application in this field, is |
| 3837 | multiplied by a bit-time factor; this factor is added to the high-speed/full-speed |
| 3838 | interpacket timeout duration in the core to account for additional delays introduced by |
| 3839 | the PHY. This might be required, since the delay introduced by the PHY in generating the |
| 3840 | linestate condition can vary among PHYs. |
| 3841 | |
| 3842 | The USB standard timeout value for high-speed operation is 736 to 816 (inclusive) bit |
| 3843 | times. The USB standard timeout value for full-speed operation is 16 to 18 (inclusive) bit |
| 3844 | times. The application must program this field based on the speed of connection. |
| 3845 | |
| 3846 | The number of bit times added per PHY clock are: |
| 3847 | * High-speed operation: |
| 3848 | _ one 30-MHz PHY clock = 16 bit times. |
| 3849 | _ one 60-MHz PHY clock = 8 bit times. |
| 3850 | |
| 3851 | * Full-speed operation: |
| 3852 | _ one 30-MHz PHY clock = 0.4 bit times. |
| 3853 | _ one 60-MHz PHY clock = 0.2 bit times. |
| 3854 | _ one 48-MHz PHY clock = 0.25 bit times. */ |
| 3855 | #else /* Word 0 - Little Endian */ |
| 3856 | uint32_t toutcal : 3; /**< [ 2: 0](R/W) High-speed/full-speed timeout calibration. |
| 3857 | The number of PHY clock cycles, as indicated by the application in this field, is |
| 3858 | multiplied by a bit-time factor; this factor is added to the high-speed/full-speed |
| 3859 | interpacket timeout duration in the core to account for additional delays introduced by |
| 3860 | the PHY. This might be required, since the delay introduced by the PHY in generating the |
| 3861 | linestate condition can vary among PHYs. |
| 3862 | |
| 3863 | The USB standard timeout value for high-speed operation is 736 to 816 (inclusive) bit |
| 3864 | times. The USB standard timeout value for full-speed operation is 16 to 18 (inclusive) bit |
| 3865 | times. The application must program this field based on the speed of connection. |
| 3866 | |
| 3867 | The number of bit times added per PHY clock are: |
| 3868 | * High-speed operation: |
| 3869 | _ one 30-MHz PHY clock = 16 bit times. |
| 3870 | _ one 60-MHz PHY clock = 8 bit times. |
| 3871 | |
| 3872 | * Full-speed operation: |
| 3873 | _ one 30-MHz PHY clock = 0.4 bit times. |
| 3874 | _ one 60-MHz PHY clock = 0.2 bit times. |
| 3875 | _ one 48-MHz PHY clock = 0.25 bit times. */ |
| 3876 | uint32_t phyif : 1; /**< [ 3: 3](R/W) PHY interface width: 1 = 16-bit, 0 = 8-bit. |
| 3877 | All the enabled 2.0 ports should have the same clock frequency as Port0 clock frequency |
| 3878 | (utmi_clk[0]). |
| 3879 | The UTMI 8-bit and 16-bit modes cannot be used together for different ports at the same |
| 3880 | time (i.e., all the ports should be in 8-bit mode, or all of them should be in 16-bit |
| 3881 | mode). */ |
| 3882 | uint32_t ulpi_utmi_sel : 1; /**< [ 4: 4](RO) ULPI or UTMI+ select. Always reads as 0x0, indicating UTMI+. */ |
| 3883 | uint32_t fsintf : 1; /**< [ 5: 5](RO) Full-speed serial-interface select. Always reads as 0x0. */ |
| 3884 | uint32_t susphy : 1; /**< [ 6: 6](R/W) Suspend USB2.0 high-speed/full-speed/low-speed PHY. When set, USB2.0 PHY enters suspend |
| 3885 | mode if suspend conditions are valid. */ |
| 3886 | uint32_t physel : 1; /**< [ 7: 7](WO) USB 2.0 high-speed PHY or USB 1.1 full-speed serial transceiver select. */ |
| 3887 | uint32_t enblslpm : 1; /**< [ 8: 8](R/W) Enable utmi_sleep_n and utmi_l1_suspend_n. The application uses this field to control |
| 3888 | utmi_sleep_n and utmi_l1_suspend_n assertion to the PHY in the L1 state. |
| 3889 | 0 = utmi_sleep_n and utmi_l1_suspend_n assertion from the core is not transferred to the |
| 3890 | external PHY. |
| 3891 | 1 = utmi_sleep_n and utmi_l1_suspend_n assertion from the core is transferred to the |
| 3892 | external PHY. |
| 3893 | |
| 3894 | When hardware LPM is enabled, this bit should be set high for Port0. */ |
| 3895 | uint32_t reserved_9 : 1; |
| 3896 | uint32_t usbtrdtim : 4; /**< [ 13: 10](R/W) USB 2.0 turnaround time. Sets the turnaround time in PHY clock cycles. Specifies the |
| 3897 | response time for a MAC request to the packet FIFO controller (PFC) to fetch data from the |
| 3898 | DFIFO (SPRAM). |
| 3899 | USB turnaround time is a critical certification criteria when using long cables and five |
| 3900 | hub levels. |
| 3901 | When the MAC interface is 8-bit UTMI+/ULPI, the required values for this field is 0x9. */ |
| 3902 | uint32_t reserved_14 : 1; |
| 3903 | uint32_t ulpiautores : 1; /**< [ 15: 15](R/W) Reserved (unused in this configuration). */ |
| 3904 | uint32_t ulpiclksusm : 1; /**< [ 16: 16](R/W) Reserved (unused in this configuration). */ |
| 3905 | uint32_t ulpiextvbusdrv : 1; /**< [ 17: 17](R/W) Reserved (unused in this configuration). */ |
| 3906 | uint32_t ulpiextvbusindicator : 1; /**< [ 18: 18](R/W) Reserved (unused in this configuration). */ |
| 3907 | uint32_t reserved_19_25 : 7; |
| 3908 | uint32_t inv_sel_hsic : 1; /**< [ 26: 26](RO) The application driver uses this bit to control the HSIC enable/disable function. */ |
| 3909 | uint32_t hsic_con_width_adj : 2; /**< [ 28: 27](RO) This bit is used in the HSIC device mode of operation. Always 0x0 */ |
| 3910 | uint32_t ulpi_lpm_with_opmode_chk : 1;/**< [ 29: 29](R/W) Support the LPM over ULPI without NOPID token to the ULPI PHY. Always 0x0. */ |
| 3911 | uint32_t u2_freeclk_exists : 1; /**< [ 30: 30](R/W) Specifies whether your USB 2.0 PHY provides a free-running PHY clock, which is active when |
| 3912 | the clock control input is active. If your USB 2.0 PHY provides a free-running PHY clock, |
| 3913 | it must be connected to the utmi_clk[0] input. The remaining utmi_clk[n] must be connected |
| 3914 | to the respective port clocks. The core uses the Port-0 clock for generating the internal |
| 3915 | mac2 clock. |
| 3916 | 0 = USB 2.0 free clock does not exist. |
| 3917 | 1 = USB 2.0 free clock exists. |
| 3918 | |
| 3919 | This field must be set to zero if you enable ITP generation based on the REF_CLK |
| 3920 | counter, USBH()_UAHC_GCTL[SOFITPSYNC] = 1, or USBH()_UAHC_GFLADJ [GFLADJ_REFCLK_LPM_SEL] = |
| 3921 | 1. */ |
| 3922 | uint32_t physoftrst : 1; /**< [ 31: 31](R/W) PHY soft reset. Causes the usb2phy_reset signal to be asserted to reset a UTMI PHY. */ |
| 3923 | #endif /* Word 0 - End */ |
| 3924 | } s; |
| 3925 | struct bdk_usbhx_uahc_gusb2phycfgx_cn |
| 3926 | { |
| 3927 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 3928 | uint32_t physoftrst : 1; /**< [ 31: 31](R/W) PHY soft reset. Causes the usb2phy_reset signal to be asserted to reset a UTMI PHY. */ |
| 3929 | uint32_t u2_freeclk_exists : 1; /**< [ 30: 30](R/W) Specifies whether your USB 2.0 PHY provides a free-running PHY clock, which is active when |
| 3930 | the clock control input is active. If your USB 2.0 PHY provides a free-running PHY clock, |
| 3931 | it must be connected to the utmi_clk[0] input. The remaining utmi_clk[n] must be connected |
| 3932 | to the respective port clocks. The core uses the Port-0 clock for generating the internal |
| 3933 | mac2 clock. |
| 3934 | 0 = USB 2.0 free clock does not exist. |
| 3935 | 1 = USB 2.0 free clock exists. |
| 3936 | |
| 3937 | This field must be set to zero if you enable ITP generation based on the REF_CLK |
| 3938 | counter, USBH()_UAHC_GCTL[SOFITPSYNC] = 1, or USBH()_UAHC_GFLADJ [GFLADJ_REFCLK_LPM_SEL] = |
| 3939 | 1. */ |
| 3940 | uint32_t ulpi_lpm_with_opmode_chk : 1;/**< [ 29: 29](R/W) Support the LPM over ULPI without NOPID token to the ULPI PHY. Always 0x0. */ |
| 3941 | uint32_t hsic_con_width_adj : 2; /**< [ 28: 27](RO) This bit is used in the HSIC device mode of operation. Always 0x0 */ |
| 3942 | uint32_t inv_sel_hsic : 1; /**< [ 26: 26](RO) The application driver uses this bit to control the HSIC enable/disable function. */ |
| 3943 | uint32_t reserved_25 : 1; |
| 3944 | uint32_t reserved_19_24 : 6; |
| 3945 | uint32_t ulpiextvbusindicator : 1; /**< [ 18: 18](R/W) Reserved (unused in this configuration). */ |
| 3946 | uint32_t ulpiextvbusdrv : 1; /**< [ 17: 17](R/W) Reserved (unused in this configuration). */ |
| 3947 | uint32_t ulpiclksusm : 1; /**< [ 16: 16](R/W) Reserved (unused in this configuration). */ |
| 3948 | uint32_t ulpiautores : 1; /**< [ 15: 15](R/W) Reserved (unused in this configuration). */ |
| 3949 | uint32_t reserved_14 : 1; |
| 3950 | uint32_t usbtrdtim : 4; /**< [ 13: 10](R/W) USB 2.0 turnaround time. Sets the turnaround time in PHY clock cycles. Specifies the |
| 3951 | response time for a MAC request to the packet FIFO controller (PFC) to fetch data from the |
| 3952 | DFIFO (SPRAM). |
| 3953 | USB turnaround time is a critical certification criteria when using long cables and five |
| 3954 | hub levels. |
| 3955 | When the MAC interface is 8-bit UTMI+/ULPI, the required values for this field is 0x9. */ |
| 3956 | uint32_t reserved_9 : 1; |
| 3957 | uint32_t enblslpm : 1; /**< [ 8: 8](R/W) Enable utmi_sleep_n and utmi_l1_suspend_n. The application uses this field to control |
| 3958 | utmi_sleep_n and utmi_l1_suspend_n assertion to the PHY in the L1 state. |
| 3959 | 0 = utmi_sleep_n and utmi_l1_suspend_n assertion from the core is not transferred to the |
| 3960 | external PHY. |
| 3961 | 1 = utmi_sleep_n and utmi_l1_suspend_n assertion from the core is transferred to the |
| 3962 | external PHY. |
| 3963 | |
| 3964 | When hardware LPM is enabled, this bit should be set high for Port0. */ |
| 3965 | uint32_t physel : 1; /**< [ 7: 7](WO) USB 2.0 high-speed PHY or USB 1.1 full-speed serial transceiver select. */ |
| 3966 | uint32_t susphy : 1; /**< [ 6: 6](R/W) Suspend USB2.0 high-speed/full-speed/low-speed PHY. When set, USB2.0 PHY enters suspend |
| 3967 | mode if suspend conditions are valid. */ |
| 3968 | uint32_t fsintf : 1; /**< [ 5: 5](RO) Full-speed serial-interface select. Always reads as 0x0. */ |
| 3969 | uint32_t ulpi_utmi_sel : 1; /**< [ 4: 4](RO) ULPI or UTMI+ select. Always reads as 0x0, indicating UTMI+. */ |
| 3970 | uint32_t phyif : 1; /**< [ 3: 3](R/W) PHY interface width: 1 = 16-bit, 0 = 8-bit. |
| 3971 | All the enabled 2.0 ports should have the same clock frequency as Port0 clock frequency |
| 3972 | (utmi_clk[0]). |
| 3973 | The UTMI 8-bit and 16-bit modes cannot be used together for different ports at the same |
| 3974 | time (i.e., all the ports should be in 8-bit mode, or all of them should be in 16-bit |
| 3975 | mode). */ |
| 3976 | uint32_t toutcal : 3; /**< [ 2: 0](R/W) High-speed/full-speed timeout calibration. |
| 3977 | The number of PHY clock cycles, as indicated by the application in this field, is |
| 3978 | multiplied by a bit-time factor; this factor is added to the high-speed/full-speed |
| 3979 | interpacket timeout duration in the core to account for additional delays introduced by |
| 3980 | the PHY. This might be required, since the delay introduced by the PHY in generating the |
| 3981 | linestate condition can vary among PHYs. |
| 3982 | |
| 3983 | The USB standard timeout value for high-speed operation is 736 to 816 (inclusive) bit |
| 3984 | times. The USB standard timeout value for full-speed operation is 16 to 18 (inclusive) bit |
| 3985 | times. The application must program this field based on the speed of connection. |
| 3986 | |
| 3987 | The number of bit times added per PHY clock are: |
| 3988 | * High-speed operation: |
| 3989 | _ one 30-MHz PHY clock = 16 bit times. |
| 3990 | _ one 60-MHz PHY clock = 8 bit times. |
| 3991 | |
| 3992 | * Full-speed operation: |
| 3993 | _ one 30-MHz PHY clock = 0.4 bit times. |
| 3994 | _ one 60-MHz PHY clock = 0.2 bit times. |
| 3995 | _ one 48-MHz PHY clock = 0.25 bit times. */ |
| 3996 | #else /* Word 0 - Little Endian */ |
| 3997 | uint32_t toutcal : 3; /**< [ 2: 0](R/W) High-speed/full-speed timeout calibration. |
| 3998 | The number of PHY clock cycles, as indicated by the application in this field, is |
| 3999 | multiplied by a bit-time factor; this factor is added to the high-speed/full-speed |
| 4000 | interpacket timeout duration in the core to account for additional delays introduced by |
| 4001 | the PHY. This might be required, since the delay introduced by the PHY in generating the |
| 4002 | linestate condition can vary among PHYs. |
| 4003 | |
| 4004 | The USB standard timeout value for high-speed operation is 736 to 816 (inclusive) bit |
| 4005 | times. The USB standard timeout value for full-speed operation is 16 to 18 (inclusive) bit |
| 4006 | times. The application must program this field based on the speed of connection. |
| 4007 | |
| 4008 | The number of bit times added per PHY clock are: |
| 4009 | * High-speed operation: |
| 4010 | _ one 30-MHz PHY clock = 16 bit times. |
| 4011 | _ one 60-MHz PHY clock = 8 bit times. |
| 4012 | |
| 4013 | * Full-speed operation: |
| 4014 | _ one 30-MHz PHY clock = 0.4 bit times. |
| 4015 | _ one 60-MHz PHY clock = 0.2 bit times. |
| 4016 | _ one 48-MHz PHY clock = 0.25 bit times. */ |
| 4017 | uint32_t phyif : 1; /**< [ 3: 3](R/W) PHY interface width: 1 = 16-bit, 0 = 8-bit. |
| 4018 | All the enabled 2.0 ports should have the same clock frequency as Port0 clock frequency |
| 4019 | (utmi_clk[0]). |
| 4020 | The UTMI 8-bit and 16-bit modes cannot be used together for different ports at the same |
| 4021 | time (i.e., all the ports should be in 8-bit mode, or all of them should be in 16-bit |
| 4022 | mode). */ |
| 4023 | uint32_t ulpi_utmi_sel : 1; /**< [ 4: 4](RO) ULPI or UTMI+ select. Always reads as 0x0, indicating UTMI+. */ |
| 4024 | uint32_t fsintf : 1; /**< [ 5: 5](RO) Full-speed serial-interface select. Always reads as 0x0. */ |
| 4025 | uint32_t susphy : 1; /**< [ 6: 6](R/W) Suspend USB2.0 high-speed/full-speed/low-speed PHY. When set, USB2.0 PHY enters suspend |
| 4026 | mode if suspend conditions are valid. */ |
| 4027 | uint32_t physel : 1; /**< [ 7: 7](WO) USB 2.0 high-speed PHY or USB 1.1 full-speed serial transceiver select. */ |
| 4028 | uint32_t enblslpm : 1; /**< [ 8: 8](R/W) Enable utmi_sleep_n and utmi_l1_suspend_n. The application uses this field to control |
| 4029 | utmi_sleep_n and utmi_l1_suspend_n assertion to the PHY in the L1 state. |
| 4030 | 0 = utmi_sleep_n and utmi_l1_suspend_n assertion from the core is not transferred to the |
| 4031 | external PHY. |
| 4032 | 1 = utmi_sleep_n and utmi_l1_suspend_n assertion from the core is transferred to the |
| 4033 | external PHY. |
| 4034 | |
| 4035 | When hardware LPM is enabled, this bit should be set high for Port0. */ |
| 4036 | uint32_t reserved_9 : 1; |
| 4037 | uint32_t usbtrdtim : 4; /**< [ 13: 10](R/W) USB 2.0 turnaround time. Sets the turnaround time in PHY clock cycles. Specifies the |
| 4038 | response time for a MAC request to the packet FIFO controller (PFC) to fetch data from the |
| 4039 | DFIFO (SPRAM). |
| 4040 | USB turnaround time is a critical certification criteria when using long cables and five |
| 4041 | hub levels. |
| 4042 | When the MAC interface is 8-bit UTMI+/ULPI, the required values for this field is 0x9. */ |
| 4043 | uint32_t reserved_14 : 1; |
| 4044 | uint32_t ulpiautores : 1; /**< [ 15: 15](R/W) Reserved (unused in this configuration). */ |
| 4045 | uint32_t ulpiclksusm : 1; /**< [ 16: 16](R/W) Reserved (unused in this configuration). */ |
| 4046 | uint32_t ulpiextvbusdrv : 1; /**< [ 17: 17](R/W) Reserved (unused in this configuration). */ |
| 4047 | uint32_t ulpiextvbusindicator : 1; /**< [ 18: 18](R/W) Reserved (unused in this configuration). */ |
| 4048 | uint32_t reserved_19_24 : 6; |
| 4049 | uint32_t reserved_25 : 1; |
| 4050 | uint32_t inv_sel_hsic : 1; /**< [ 26: 26](RO) The application driver uses this bit to control the HSIC enable/disable function. */ |
| 4051 | uint32_t hsic_con_width_adj : 2; /**< [ 28: 27](RO) This bit is used in the HSIC device mode of operation. Always 0x0 */ |
| 4052 | uint32_t ulpi_lpm_with_opmode_chk : 1;/**< [ 29: 29](R/W) Support the LPM over ULPI without NOPID token to the ULPI PHY. Always 0x0. */ |
| 4053 | uint32_t u2_freeclk_exists : 1; /**< [ 30: 30](R/W) Specifies whether your USB 2.0 PHY provides a free-running PHY clock, which is active when |
| 4054 | the clock control input is active. If your USB 2.0 PHY provides a free-running PHY clock, |
| 4055 | it must be connected to the utmi_clk[0] input. The remaining utmi_clk[n] must be connected |
| 4056 | to the respective port clocks. The core uses the Port-0 clock for generating the internal |
| 4057 | mac2 clock. |
| 4058 | 0 = USB 2.0 free clock does not exist. |
| 4059 | 1 = USB 2.0 free clock exists. |
| 4060 | |
| 4061 | This field must be set to zero if you enable ITP generation based on the REF_CLK |
| 4062 | counter, USBH()_UAHC_GCTL[SOFITPSYNC] = 1, or USBH()_UAHC_GFLADJ [GFLADJ_REFCLK_LPM_SEL] = |
| 4063 | 1. */ |
| 4064 | uint32_t physoftrst : 1; /**< [ 31: 31](R/W) PHY soft reset. Causes the usb2phy_reset signal to be asserted to reset a UTMI PHY. */ |
| 4065 | #endif /* Word 0 - End */ |
| 4066 | } cn; |
| 4067 | }; |
| 4068 | typedef union bdk_usbhx_uahc_gusb2phycfgx bdk_usbhx_uahc_gusb2phycfgx_t; |
| 4069 | |
| 4070 | static inline uint64_t BDK_USBHX_UAHC_GUSB2PHYCFGX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 4071 | static inline uint64_t BDK_USBHX_UAHC_GUSB2PHYCFGX(unsigned long a, unsigned long b) |
| 4072 | { |
| 4073 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==0))) |
| 4074 | return 0x86800000c200ll + 0x1000000000ll * ((a) & 0x1) + 4ll * ((b) & 0x0); |
| 4075 | __bdk_csr_fatal("USBHX_UAHC_GUSB2PHYCFGX", 2, a, b, 0, 0); |
| 4076 | } |
| 4077 | |
| 4078 | #define typedef_BDK_USBHX_UAHC_GUSB2PHYCFGX(a,b) bdk_usbhx_uahc_gusb2phycfgx_t |
| 4079 | #define bustype_BDK_USBHX_UAHC_GUSB2PHYCFGX(a,b) BDK_CSR_TYPE_NCB32b |
| 4080 | #define basename_BDK_USBHX_UAHC_GUSB2PHYCFGX(a,b) "USBHX_UAHC_GUSB2PHYCFGX" |
| 4081 | #define device_bar_BDK_USBHX_UAHC_GUSB2PHYCFGX(a,b) 0x0 /* PF_BAR0 */ |
| 4082 | #define busnum_BDK_USBHX_UAHC_GUSB2PHYCFGX(a,b) (a) |
| 4083 | #define arguments_BDK_USBHX_UAHC_GUSB2PHYCFGX(a,b) (a),(b),-1,-1 |
| 4084 | |
| 4085 | /** |
| 4086 | * Register (NCB32b) usbh#_uahc_gusb3pipectl# |
| 4087 | * |
| 4088 | * UAHC USB3 Pipe-Control Register |
| 4089 | * This register is used to configure the core after power-on. It contains USB 3.0 and USB 3.0 |
| 4090 | * PHY-related configuration parameters. The application must program this register before |
| 4091 | * starting any transactions on either the SoC bus or the USB. Per-port registers are |
| 4092 | * implemented. |
| 4093 | * |
| 4094 | * Do not make changes to this register after the initial programming. |
| 4095 | * |
| 4096 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UAHC_RST]. |
| 4097 | * |
| 4098 | * Internal: |
| 4099 | * See Synopsys DWC_usb3 Databook v2.20a, section 6.2.5.4. |
| 4100 | */ |
| 4101 | union bdk_usbhx_uahc_gusb3pipectlx |
| 4102 | { |
| 4103 | uint32_t u; |
| 4104 | struct bdk_usbhx_uahc_gusb3pipectlx_s |
| 4105 | { |
| 4106 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 4107 | uint32_t physoftrst : 1; /**< [ 31: 31](R/W) USB3 PHY soft reset (PHYSoftRst). When set to 1, initiates a PHY soft reset. After setting |
| 4108 | this bit to 1, the software needs to clear this bit. */ |
| 4109 | uint32_t hstprtcmpl : 1; /**< [ 30: 30](R/W) Host port compliance. Setting this bit to 1 enables placing the SuperSpeed port link into |
| 4110 | a compliance state, which allows testing of the PIPE PHY compliance patterns without |
| 4111 | having to have a test fixture on the USB 3.0 cable. By default, this bit should be set to |
| 4112 | 0. |
| 4113 | |
| 4114 | In compliance-lab testing, the SuperSpeed port link enters compliance after failing the |
| 4115 | first polling sequence after power on. Set this bit to 0 when you run compliance tests. |
| 4116 | |
| 4117 | The sequence for using this functionality is as follows: |
| 4118 | * Disconnect any plugged-in devices. |
| 4119 | * Set USBH()_UAHC_USBCMD[HCRST] = 1 or power-on-chip reset. |
| 4120 | * Set USBH()_UAHC_PORTSC()[PP] = 0. |
| 4121 | * Set HSTPRTCMPL = 1. This places the link into compliance state. |
| 4122 | |
| 4123 | To advance the compliance pattern, follow this sequence (toggle HSTPRTCMPL): |
| 4124 | * Set HSTPRTCMPL = 0. |
| 4125 | * Set HSTPRTCMPL = 1. This advances the link to the next compliance pattern. |
| 4126 | |
| 4127 | To exit from the compliance state, set USBH()_UAHC_USBCMD[HCRST] = 1 or power-on-chip |
| 4128 | reset. */ |
| 4129 | uint32_t u2ssinactp3ok : 1; /**< [ 29: 29](R/W) P3 OK for U2/SS.Inactive: |
| 4130 | 0 = During link state U2/SS.Inactive, put PHY in P2 (default). |
| 4131 | 1 = During link state U2/SS.Inactive, put PHY in P3. */ |
| 4132 | uint32_t disrxdetp3 : 1; /**< [ 28: 28](R/W) Disables receiver detection in P3. If PHY is in P3 and the core needs to perform receiver |
| 4133 | detection: |
| 4134 | 0 = Core performs receiver detection in P3 (default). |
| 4135 | 1 = Core changes the PHY power state to P2 and then performs receiver detection. After |
| 4136 | receiver detection, core changes PHY power state to P3. */ |
| 4137 | uint32_t ux_exit_in_px : 1; /**< [ 27: 27](R/W) UX exit in Px: |
| 4138 | 0 = Core does U1/U2/U3 exit in PHY power state P0 (default behavior). |
| 4139 | 1 = Core does U1/U2/U3 exit in PHY power state P1/P2/P3 respectively. |
| 4140 | |
| 4141 | This bit is added for SuperSpeed PHY workaround where SuperSpeed PHY injects a glitch on |
| 4142 | pipe3_RxElecIdle while receiving Ux exit LFPS, and pipe3_PowerDown change is in progress. |
| 4143 | |
| 4144 | Internal: |
| 4145 | Note: This bit is used by third-party SuperSpeed PHY. It should be set to 0 for |
| 4146 | Synopsys PHY. */ |
| 4147 | uint32_t ping_enchance_en : 1; /**< [ 26: 26](R/W) Ping enhancement enable. When set to 1, the downstream-port U1-ping-receive timeout |
| 4148 | becomes 500 ms instead of 300 ms. Minimum Ping.LFPS receive duration is 8 ns (one mac3_clk |
| 4149 | cycle). This field is valid for the downstream port only. |
| 4150 | |
| 4151 | Internal: |
| 4152 | Note: This bit is used by third-party SuperSpeed PHY. It should be set to 0 for |
| 4153 | Synopsys PHY. */ |
| 4154 | uint32_t u1u2exitfail_to_recov : 1; /**< [ 25: 25](R/W) U1U2exit fail to recovery. When set to 1, and U1/U2 LFPS handshake fails, the LTSSM |
| 4155 | transitions from U1/U2 to recovery instead of SS.inactive. |
| 4156 | If recovery fails, then the LTSSM can enter SS.Inactive. This is an enhancement only. It |
| 4157 | prevents interoperability issue if the remote link does not do the proper handshake. */ |
| 4158 | uint32_t request_p1p2p3 : 1; /**< [ 24: 24](R/W) Always request P1/P2/P3 for U1/U2/U3. |
| 4159 | 0 = if immediate Ux exit (remotely initiated, or locally initiated) happens, the core does |
| 4160 | not request P1/P2/P3 power state change. |
| 4161 | 1 = the core always requests PHY power change from P0 to P1/P2/P3 during U0 to U1/U2/U3 |
| 4162 | transition. |
| 4163 | |
| 4164 | Internal: |
| 4165 | Note: This bit should be set to 1 for Synopsys PHY. For third-party SuperSpeed |
| 4166 | PHY, check with your PHY vendor. */ |
| 4167 | uint32_t startrxdetu3rxdet : 1; /**< [ 23: 23](WO) Start receiver detection in U3/Rx.Detect. |
| 4168 | If DISRXDETU3RXDET is set to 1 during reset, and the link is in U3 or Rx.Detect state, the |
| 4169 | core starts receiver detection on rising edge of this bit. |
| 4170 | This bit is valid for downstream ports only, and this feature must not be enabled for |
| 4171 | normal operation. |
| 4172 | |
| 4173 | Internal: |
| 4174 | If have to use this feature, contact Synopsys. */ |
| 4175 | uint32_t disrxdetu3rxdet : 1; /**< [ 22: 22](R/W) Disable receiver detection in U3/Rx.Detect. When set to 1, the core does not do receiver |
| 4176 | detection in U3 or Rx.Detect state. If STARTRXDETU3RXDET is set to 1 during reset, |
| 4177 | receiver detection starts manually. |
| 4178 | This bit is valid for downstream ports only, and this feature must not be enabled for |
| 4179 | normal operation. |
| 4180 | |
| 4181 | Internal: |
| 4182 | If have to use this feature, contact Synopsys. */ |
| 4183 | uint32_t delaypx : 3; /**< [ 21: 19](R/W) Delay P1P2P3. Delay P0 to P1/P2/P3 request when entering U1/U2/U3 until (DELAYPX * 8) |
| 4184 | 8B10B error occurs, or Pipe3_RxValid drops to 0. |
| 4185 | DELAYPXTRANSENTERUX must reset to 1 to enable this functionality. |
| 4186 | |
| 4187 | Internal: |
| 4188 | Should always be 0x1 for a Synopsys PHY. */ |
| 4189 | uint32_t delaypxtransenterux : 1; /**< [ 18: 18](R/W) Delay PHY power change from P0 to P1/P2/P3 when link state changing from U0 to U1/U2/U3 |
| 4190 | respectively. |
| 4191 | 0 = when entering U1/U2/U3, transition to P1/P2/P3 without checking for Pipe3_RxElecIlde |
| 4192 | and pipe3_RxValid. |
| 4193 | 1 = when entering U1/U2/U3, delay the transition to P1/P2/P3 until the pipe3 signals, |
| 4194 | Pipe3_RxElecIlde is 1 and pipe3_RxValid is 0. |
| 4195 | |
| 4196 | Internal: |
| 4197 | Note: This bit should be set to '1' for Synopsys PHY. It is also used by third- |
| 4198 | party SuperSpeed PHY. */ |
| 4199 | uint32_t suspend_en : 1; /**< [ 17: 17](R/W) Suspend USB3.0 SuperSpeed PHY (Suspend_en). When set to 1, and if suspend conditions are |
| 4200 | valid, the USB 3.0 PHY enters suspend mode. */ |
| 4201 | uint32_t datwidth : 2; /**< [ 16: 15](RO) PIPE data width. |
| 4202 | 0x0 = 32 bits. |
| 4203 | 0x1 = 16 bits. |
| 4204 | 0x2 = 8 bits. |
| 4205 | 0x3 = reserved. |
| 4206 | |
| 4207 | One clock cycle after reset, these bits receive the value seen on the pipe3_DataBusWidth. |
| 4208 | This will always be 0x0. |
| 4209 | |
| 4210 | Internal: |
| 4211 | The simulation testbench uses the coreConsultant parameter to configure the VIP. |
| 4212 | INTERNAL: These bits in the coreConsultant parameter should match your PHY data width and |
| 4213 | the pipe3_DataBusWidth port. */ |
| 4214 | uint32_t abortrxdetinu2 : 1; /**< [ 14: 14](R/W) Abort RX Detect in U2. When set to 1, and the link state is U2, the core aborts receiver |
| 4215 | detection if it receives U2 exit LFPS from the remote link partner. |
| 4216 | |
| 4217 | This bit is for downstream port only. |
| 4218 | |
| 4219 | Internal: |
| 4220 | Note: This bit is used by third-party SuperSpeed PHY. It should be set to 0 for |
| 4221 | Synopsys PHY. */ |
| 4222 | uint32_t skiprxdet : 1; /**< [ 13: 13](R/W) Skip RX detect. When set to 1, the core skips RX detection if pipe3_RxElecIdle is low. |
| 4223 | Skip is defined as waiting for the appropriate timeout, then repeating the operation. */ |
| 4224 | uint32_t lfpsp0algn : 1; /**< [ 12: 12](R/W) LFPS P0 align. When set to 1: |
| 4225 | * the core deasserts LFPS transmission on the clock edge that it requests Phy power state |
| 4226 | 0 when exiting U1, U2, or U3 low power states. Otherwise, LFPS transmission is asserted |
| 4227 | one clock earlier. |
| 4228 | * the core requests symbol transmission two pipe3_rx_pclks periods after the PHY asserts |
| 4229 | PhyStatus as a result of the PHY switching from P1 or P2 state to P0 state. |
| 4230 | For USB 3.0 host, this is not required. */ |
| 4231 | uint32_t p3p2tranok : 1; /**< [ 11: 11](R/W) P3 P2 transitions OK. |
| 4232 | 0 = P0 is always entered as an intermediate state during transitions between P2 and P3, as |
| 4233 | defined in the PIPE3 specification. |
| 4234 | 1 = the core transitions directly from Phy power state P2 to P3 or from state P3 to P2. |
| 4235 | |
| 4236 | According to PIPE3 specification, any direct transition between P3 and P2 is illegal. |
| 4237 | |
| 4238 | Internal: |
| 4239 | This bit is used only for some non-Synopsys PHYs that cannot do LFPS in P3. |
| 4240 | INTERNAL: Note: This bit is used by third-party SuperSpeed PHY. It should be set to 0 for |
| 4241 | Synopsys PHY. */ |
| 4242 | uint32_t p3exsigp2 : 1; /**< [ 10: 10](R/W) P3 exit signal in P2. When set to 1, the core always changes the PHY power state to P2, |
| 4243 | before attempting a U3 exit handshake. |
| 4244 | |
| 4245 | Internal: |
| 4246 | Note: This bit is used by third-party SuperSpeed PHY. It should be set to 0 for |
| 4247 | Synopsys PHY. */ |
| 4248 | uint32_t lfpsfilt : 1; /**< [ 9: 9](R/W) LFPS filter. When set to 1, filter LFPS reception with pipe3_RxValid in PHY power state |
| 4249 | P0, ignore LFPS reception from the PHY unless both pipe3_Rxelecidle and pipe3_RxValid are |
| 4250 | deasserted. */ |
| 4251 | uint32_t rxdet2polllfpsctrl : 1; /**< [ 8: 8](R/W) RX_DETECT to Polling. |
| 4252 | 0 = Enables a 400 us delay to start polling LFPS after RX_DETECT. This allows VCM offset |
| 4253 | to settle to a proper level. |
| 4254 | 1 = Disables the 400 us delay to start polling LFPS after RX_DETECT. */ |
| 4255 | uint32_t ssicen : 1; /**< [ 7: 7](R/W) SSIC is not supported. This bit must be set to 0. */ |
| 4256 | uint32_t txswing : 1; /**< [ 6: 6](R/W) TX swing. Refer to the PIPE3 specification. */ |
| 4257 | uint32_t txmargin : 3; /**< [ 5: 3](R/W) TX margin. Refer to the PIPE3 specification, table 5-3. */ |
| 4258 | uint32_t txdeemphasis : 2; /**< [ 2: 1](R/W) TX de-emphasis. The value driven to the PHY is controlled by the LTSSM during USB3 |
| 4259 | compliance mode. Refer to the PIPE3 specification, table 5-3. |
| 4260 | |
| 4261 | Use the following values for the appropriate level of de-emphasis (From pipe3 spec): |
| 4262 | 0x0 = -6 dB de-emphasis, use USBH()_UCTL_PORT()_CFG_SS[PCS_TX_DEEMPH_6DB]. |
| 4263 | 0x1 = -3.5 dB de-emphasis, use USBH()_UCTL_PORT()_CFG_SS[PCS_TX_DEEMPH_3P5DB]. |
| 4264 | 0x2 = No de-emphasis. |
| 4265 | 0x3 = Reserved. */ |
| 4266 | uint32_t elasticbuffermode : 1; /**< [ 0: 0](R/W) Elastic buffer mode. Refer to the PIPE3 specification, table 5-3. */ |
| 4267 | #else /* Word 0 - Little Endian */ |
| 4268 | uint32_t elasticbuffermode : 1; /**< [ 0: 0](R/W) Elastic buffer mode. Refer to the PIPE3 specification, table 5-3. */ |
| 4269 | uint32_t txdeemphasis : 2; /**< [ 2: 1](R/W) TX de-emphasis. The value driven to the PHY is controlled by the LTSSM during USB3 |
| 4270 | compliance mode. Refer to the PIPE3 specification, table 5-3. |
| 4271 | |
| 4272 | Use the following values for the appropriate level of de-emphasis (From pipe3 spec): |
| 4273 | 0x0 = -6 dB de-emphasis, use USBH()_UCTL_PORT()_CFG_SS[PCS_TX_DEEMPH_6DB]. |
| 4274 | 0x1 = -3.5 dB de-emphasis, use USBH()_UCTL_PORT()_CFG_SS[PCS_TX_DEEMPH_3P5DB]. |
| 4275 | 0x2 = No de-emphasis. |
| 4276 | 0x3 = Reserved. */ |
| 4277 | uint32_t txmargin : 3; /**< [ 5: 3](R/W) TX margin. Refer to the PIPE3 specification, table 5-3. */ |
| 4278 | uint32_t txswing : 1; /**< [ 6: 6](R/W) TX swing. Refer to the PIPE3 specification. */ |
| 4279 | uint32_t ssicen : 1; /**< [ 7: 7](R/W) SSIC is not supported. This bit must be set to 0. */ |
| 4280 | uint32_t rxdet2polllfpsctrl : 1; /**< [ 8: 8](R/W) RX_DETECT to Polling. |
| 4281 | 0 = Enables a 400 us delay to start polling LFPS after RX_DETECT. This allows VCM offset |
| 4282 | to settle to a proper level. |
| 4283 | 1 = Disables the 400 us delay to start polling LFPS after RX_DETECT. */ |
| 4284 | uint32_t lfpsfilt : 1; /**< [ 9: 9](R/W) LFPS filter. When set to 1, filter LFPS reception with pipe3_RxValid in PHY power state |
| 4285 | P0, ignore LFPS reception from the PHY unless both pipe3_Rxelecidle and pipe3_RxValid are |
| 4286 | deasserted. */ |
| 4287 | uint32_t p3exsigp2 : 1; /**< [ 10: 10](R/W) P3 exit signal in P2. When set to 1, the core always changes the PHY power state to P2, |
| 4288 | before attempting a U3 exit handshake. |
| 4289 | |
| 4290 | Internal: |
| 4291 | Note: This bit is used by third-party SuperSpeed PHY. It should be set to 0 for |
| 4292 | Synopsys PHY. */ |
| 4293 | uint32_t p3p2tranok : 1; /**< [ 11: 11](R/W) P3 P2 transitions OK. |
| 4294 | 0 = P0 is always entered as an intermediate state during transitions between P2 and P3, as |
| 4295 | defined in the PIPE3 specification. |
| 4296 | 1 = the core transitions directly from Phy power state P2 to P3 or from state P3 to P2. |
| 4297 | |
| 4298 | According to PIPE3 specification, any direct transition between P3 and P2 is illegal. |
| 4299 | |
| 4300 | Internal: |
| 4301 | This bit is used only for some non-Synopsys PHYs that cannot do LFPS in P3. |
| 4302 | INTERNAL: Note: This bit is used by third-party SuperSpeed PHY. It should be set to 0 for |
| 4303 | Synopsys PHY. */ |
| 4304 | uint32_t lfpsp0algn : 1; /**< [ 12: 12](R/W) LFPS P0 align. When set to 1: |
| 4305 | * the core deasserts LFPS transmission on the clock edge that it requests Phy power state |
| 4306 | 0 when exiting U1, U2, or U3 low power states. Otherwise, LFPS transmission is asserted |
| 4307 | one clock earlier. |
| 4308 | * the core requests symbol transmission two pipe3_rx_pclks periods after the PHY asserts |
| 4309 | PhyStatus as a result of the PHY switching from P1 or P2 state to P0 state. |
| 4310 | For USB 3.0 host, this is not required. */ |
| 4311 | uint32_t skiprxdet : 1; /**< [ 13: 13](R/W) Skip RX detect. When set to 1, the core skips RX detection if pipe3_RxElecIdle is low. |
| 4312 | Skip is defined as waiting for the appropriate timeout, then repeating the operation. */ |
| 4313 | uint32_t abortrxdetinu2 : 1; /**< [ 14: 14](R/W) Abort RX Detect in U2. When set to 1, and the link state is U2, the core aborts receiver |
| 4314 | detection if it receives U2 exit LFPS from the remote link partner. |
| 4315 | |
| 4316 | This bit is for downstream port only. |
| 4317 | |
| 4318 | Internal: |
| 4319 | Note: This bit is used by third-party SuperSpeed PHY. It should be set to 0 for |
| 4320 | Synopsys PHY. */ |
| 4321 | uint32_t datwidth : 2; /**< [ 16: 15](RO) PIPE data width. |
| 4322 | 0x0 = 32 bits. |
| 4323 | 0x1 = 16 bits. |
| 4324 | 0x2 = 8 bits. |
| 4325 | 0x3 = reserved. |
| 4326 | |
| 4327 | One clock cycle after reset, these bits receive the value seen on the pipe3_DataBusWidth. |
| 4328 | This will always be 0x0. |
| 4329 | |
| 4330 | Internal: |
| 4331 | The simulation testbench uses the coreConsultant parameter to configure the VIP. |
| 4332 | INTERNAL: These bits in the coreConsultant parameter should match your PHY data width and |
| 4333 | the pipe3_DataBusWidth port. */ |
| 4334 | uint32_t suspend_en : 1; /**< [ 17: 17](R/W) Suspend USB3.0 SuperSpeed PHY (Suspend_en). When set to 1, and if suspend conditions are |
| 4335 | valid, the USB 3.0 PHY enters suspend mode. */ |
| 4336 | uint32_t delaypxtransenterux : 1; /**< [ 18: 18](R/W) Delay PHY power change from P0 to P1/P2/P3 when link state changing from U0 to U1/U2/U3 |
| 4337 | respectively. |
| 4338 | 0 = when entering U1/U2/U3, transition to P1/P2/P3 without checking for Pipe3_RxElecIlde |
| 4339 | and pipe3_RxValid. |
| 4340 | 1 = when entering U1/U2/U3, delay the transition to P1/P2/P3 until the pipe3 signals, |
| 4341 | Pipe3_RxElecIlde is 1 and pipe3_RxValid is 0. |
| 4342 | |
| 4343 | Internal: |
| 4344 | Note: This bit should be set to '1' for Synopsys PHY. It is also used by third- |
| 4345 | party SuperSpeed PHY. */ |
| 4346 | uint32_t delaypx : 3; /**< [ 21: 19](R/W) Delay P1P2P3. Delay P0 to P1/P2/P3 request when entering U1/U2/U3 until (DELAYPX * 8) |
| 4347 | 8B10B error occurs, or Pipe3_RxValid drops to 0. |
| 4348 | DELAYPXTRANSENTERUX must reset to 1 to enable this functionality. |
| 4349 | |
| 4350 | Internal: |
| 4351 | Should always be 0x1 for a Synopsys PHY. */ |
| 4352 | uint32_t disrxdetu3rxdet : 1; /**< [ 22: 22](R/W) Disable receiver detection in U3/Rx.Detect. When set to 1, the core does not do receiver |
| 4353 | detection in U3 or Rx.Detect state. If STARTRXDETU3RXDET is set to 1 during reset, |
| 4354 | receiver detection starts manually. |
| 4355 | This bit is valid for downstream ports only, and this feature must not be enabled for |
| 4356 | normal operation. |
| 4357 | |
| 4358 | Internal: |
| 4359 | If have to use this feature, contact Synopsys. */ |
| 4360 | uint32_t startrxdetu3rxdet : 1; /**< [ 23: 23](WO) Start receiver detection in U3/Rx.Detect. |
| 4361 | If DISRXDETU3RXDET is set to 1 during reset, and the link is in U3 or Rx.Detect state, the |
| 4362 | core starts receiver detection on rising edge of this bit. |
| 4363 | This bit is valid for downstream ports only, and this feature must not be enabled for |
| 4364 | normal operation. |
| 4365 | |
| 4366 | Internal: |
| 4367 | If have to use this feature, contact Synopsys. */ |
| 4368 | uint32_t request_p1p2p3 : 1; /**< [ 24: 24](R/W) Always request P1/P2/P3 for U1/U2/U3. |
| 4369 | 0 = if immediate Ux exit (remotely initiated, or locally initiated) happens, the core does |
| 4370 | not request P1/P2/P3 power state change. |
| 4371 | 1 = the core always requests PHY power change from P0 to P1/P2/P3 during U0 to U1/U2/U3 |
| 4372 | transition. |
| 4373 | |
| 4374 | Internal: |
| 4375 | Note: This bit should be set to 1 for Synopsys PHY. For third-party SuperSpeed |
| 4376 | PHY, check with your PHY vendor. */ |
| 4377 | uint32_t u1u2exitfail_to_recov : 1; /**< [ 25: 25](R/W) U1U2exit fail to recovery. When set to 1, and U1/U2 LFPS handshake fails, the LTSSM |
| 4378 | transitions from U1/U2 to recovery instead of SS.inactive. |
| 4379 | If recovery fails, then the LTSSM can enter SS.Inactive. This is an enhancement only. It |
| 4380 | prevents interoperability issue if the remote link does not do the proper handshake. */ |
| 4381 | uint32_t ping_enchance_en : 1; /**< [ 26: 26](R/W) Ping enhancement enable. When set to 1, the downstream-port U1-ping-receive timeout |
| 4382 | becomes 500 ms instead of 300 ms. Minimum Ping.LFPS receive duration is 8 ns (one mac3_clk |
| 4383 | cycle). This field is valid for the downstream port only. |
| 4384 | |
| 4385 | Internal: |
| 4386 | Note: This bit is used by third-party SuperSpeed PHY. It should be set to 0 for |
| 4387 | Synopsys PHY. */ |
| 4388 | uint32_t ux_exit_in_px : 1; /**< [ 27: 27](R/W) UX exit in Px: |
| 4389 | 0 = Core does U1/U2/U3 exit in PHY power state P0 (default behavior). |
| 4390 | 1 = Core does U1/U2/U3 exit in PHY power state P1/P2/P3 respectively. |
| 4391 | |
| 4392 | This bit is added for SuperSpeed PHY workaround where SuperSpeed PHY injects a glitch on |
| 4393 | pipe3_RxElecIdle while receiving Ux exit LFPS, and pipe3_PowerDown change is in progress. |
| 4394 | |
| 4395 | Internal: |
| 4396 | Note: This bit is used by third-party SuperSpeed PHY. It should be set to 0 for |
| 4397 | Synopsys PHY. */ |
| 4398 | uint32_t disrxdetp3 : 1; /**< [ 28: 28](R/W) Disables receiver detection in P3. If PHY is in P3 and the core needs to perform receiver |
| 4399 | detection: |
| 4400 | 0 = Core performs receiver detection in P3 (default). |
| 4401 | 1 = Core changes the PHY power state to P2 and then performs receiver detection. After |
| 4402 | receiver detection, core changes PHY power state to P3. */ |
| 4403 | uint32_t u2ssinactp3ok : 1; /**< [ 29: 29](R/W) P3 OK for U2/SS.Inactive: |
| 4404 | 0 = During link state U2/SS.Inactive, put PHY in P2 (default). |
| 4405 | 1 = During link state U2/SS.Inactive, put PHY in P3. */ |
| 4406 | uint32_t hstprtcmpl : 1; /**< [ 30: 30](R/W) Host port compliance. Setting this bit to 1 enables placing the SuperSpeed port link into |
| 4407 | a compliance state, which allows testing of the PIPE PHY compliance patterns without |
| 4408 | having to have a test fixture on the USB 3.0 cable. By default, this bit should be set to |
| 4409 | 0. |
| 4410 | |
| 4411 | In compliance-lab testing, the SuperSpeed port link enters compliance after failing the |
| 4412 | first polling sequence after power on. Set this bit to 0 when you run compliance tests. |
| 4413 | |
| 4414 | The sequence for using this functionality is as follows: |
| 4415 | * Disconnect any plugged-in devices. |
| 4416 | * Set USBH()_UAHC_USBCMD[HCRST] = 1 or power-on-chip reset. |
| 4417 | * Set USBH()_UAHC_PORTSC()[PP] = 0. |
| 4418 | * Set HSTPRTCMPL = 1. This places the link into compliance state. |
| 4419 | |
| 4420 | To advance the compliance pattern, follow this sequence (toggle HSTPRTCMPL): |
| 4421 | * Set HSTPRTCMPL = 0. |
| 4422 | * Set HSTPRTCMPL = 1. This advances the link to the next compliance pattern. |
| 4423 | |
| 4424 | To exit from the compliance state, set USBH()_UAHC_USBCMD[HCRST] = 1 or power-on-chip |
| 4425 | reset. */ |
| 4426 | uint32_t physoftrst : 1; /**< [ 31: 31](R/W) USB3 PHY soft reset (PHYSoftRst). When set to 1, initiates a PHY soft reset. After setting |
| 4427 | this bit to 1, the software needs to clear this bit. */ |
| 4428 | #endif /* Word 0 - End */ |
| 4429 | } s; |
| 4430 | /* struct bdk_usbhx_uahc_gusb3pipectlx_s cn; */ |
| 4431 | }; |
| 4432 | typedef union bdk_usbhx_uahc_gusb3pipectlx bdk_usbhx_uahc_gusb3pipectlx_t; |
| 4433 | |
| 4434 | static inline uint64_t BDK_USBHX_UAHC_GUSB3PIPECTLX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 4435 | static inline uint64_t BDK_USBHX_UAHC_GUSB3PIPECTLX(unsigned long a, unsigned long b) |
| 4436 | { |
| 4437 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==0))) |
| 4438 | return 0x86800000c2c0ll + 0x1000000000ll * ((a) & 0x1) + 4ll * ((b) & 0x0); |
| 4439 | __bdk_csr_fatal("USBHX_UAHC_GUSB3PIPECTLX", 2, a, b, 0, 0); |
| 4440 | } |
| 4441 | |
| 4442 | #define typedef_BDK_USBHX_UAHC_GUSB3PIPECTLX(a,b) bdk_usbhx_uahc_gusb3pipectlx_t |
| 4443 | #define bustype_BDK_USBHX_UAHC_GUSB3PIPECTLX(a,b) BDK_CSR_TYPE_NCB32b |
| 4444 | #define basename_BDK_USBHX_UAHC_GUSB3PIPECTLX(a,b) "USBHX_UAHC_GUSB3PIPECTLX" |
| 4445 | #define device_bar_BDK_USBHX_UAHC_GUSB3PIPECTLX(a,b) 0x0 /* PF_BAR0 */ |
| 4446 | #define busnum_BDK_USBHX_UAHC_GUSB3PIPECTLX(a,b) (a) |
| 4447 | #define arguments_BDK_USBHX_UAHC_GUSB3PIPECTLX(a,b) (a),(b),-1,-1 |
| 4448 | |
| 4449 | /** |
| 4450 | * Register (NCB32b) usbh#_uahc_hccparams |
| 4451 | * |
| 4452 | * XHCI Controller Capability Parameters Register |
| 4453 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.3.6. |
| 4454 | */ |
| 4455 | union bdk_usbhx_uahc_hccparams |
| 4456 | { |
| 4457 | uint32_t u; |
| 4458 | struct bdk_usbhx_uahc_hccparams_s |
| 4459 | { |
| 4460 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 4461 | uint32_t xecp : 16; /**< [ 31: 16](RO) xHCI extended capabilities pointer. */ |
| 4462 | uint32_t maxpsasize : 4; /**< [ 15: 12](RO) Maximum primary-stream-array size. */ |
| 4463 | uint32_t reserved_11 : 1; |
| 4464 | uint32_t sec : 1; /**< [ 10: 10](RO/H) Stopped EDLTA Capability */ |
| 4465 | uint32_t spc : 1; /**< [ 9: 9](RO/H) Stopped - short packet Capability */ |
| 4466 | uint32_t pae : 1; /**< [ 8: 8](RO) Parse all event data. */ |
| 4467 | uint32_t nss : 1; /**< [ 7: 7](RO) No secondary SID support. */ |
| 4468 | uint32_t ltc : 1; /**< [ 6: 6](RO) Latency tolerance messaging capability. */ |
| 4469 | uint32_t lhrc : 1; /**< [ 5: 5](RO) Light HC reset capability. */ |
| 4470 | uint32_t pind : 1; /**< [ 4: 4](RO) Port indicators. */ |
| 4471 | uint32_t ppc : 1; /**< [ 3: 3](RO) Port power control. Value is based on USBH()_UCTL_HOST_CFG[PPC_EN]. */ |
| 4472 | uint32_t csz : 1; /**< [ 2: 2](RO) Context size. */ |
| 4473 | uint32_t bnc : 1; /**< [ 1: 1](RO) BW negotiation capability. */ |
| 4474 | uint32_t ac64 : 1; /**< [ 0: 0](RO) 64-bit addressing capability. */ |
| 4475 | #else /* Word 0 - Little Endian */ |
| 4476 | uint32_t ac64 : 1; /**< [ 0: 0](RO) 64-bit addressing capability. */ |
| 4477 | uint32_t bnc : 1; /**< [ 1: 1](RO) BW negotiation capability. */ |
| 4478 | uint32_t csz : 1; /**< [ 2: 2](RO) Context size. */ |
| 4479 | uint32_t ppc : 1; /**< [ 3: 3](RO) Port power control. Value is based on USBH()_UCTL_HOST_CFG[PPC_EN]. */ |
| 4480 | uint32_t pind : 1; /**< [ 4: 4](RO) Port indicators. */ |
| 4481 | uint32_t lhrc : 1; /**< [ 5: 5](RO) Light HC reset capability. */ |
| 4482 | uint32_t ltc : 1; /**< [ 6: 6](RO) Latency tolerance messaging capability. */ |
| 4483 | uint32_t nss : 1; /**< [ 7: 7](RO) No secondary SID support. */ |
| 4484 | uint32_t pae : 1; /**< [ 8: 8](RO) Parse all event data. */ |
| 4485 | uint32_t spc : 1; /**< [ 9: 9](RO/H) Stopped - short packet Capability */ |
| 4486 | uint32_t sec : 1; /**< [ 10: 10](RO/H) Stopped EDLTA Capability */ |
| 4487 | uint32_t reserved_11 : 1; |
| 4488 | uint32_t maxpsasize : 4; /**< [ 15: 12](RO) Maximum primary-stream-array size. */ |
| 4489 | uint32_t xecp : 16; /**< [ 31: 16](RO) xHCI extended capabilities pointer. */ |
| 4490 | #endif /* Word 0 - End */ |
| 4491 | } s; |
| 4492 | /* struct bdk_usbhx_uahc_hccparams_s cn; */ |
| 4493 | }; |
| 4494 | typedef union bdk_usbhx_uahc_hccparams bdk_usbhx_uahc_hccparams_t; |
| 4495 | |
| 4496 | static inline uint64_t BDK_USBHX_UAHC_HCCPARAMS(unsigned long a) __attribute__ ((pure, always_inline)); |
| 4497 | static inline uint64_t BDK_USBHX_UAHC_HCCPARAMS(unsigned long a) |
| 4498 | { |
| 4499 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 4500 | return 0x868000000010ll + 0x1000000000ll * ((a) & 0x1); |
| 4501 | __bdk_csr_fatal("USBHX_UAHC_HCCPARAMS", 1, a, 0, 0, 0); |
| 4502 | } |
| 4503 | |
| 4504 | #define typedef_BDK_USBHX_UAHC_HCCPARAMS(a) bdk_usbhx_uahc_hccparams_t |
| 4505 | #define bustype_BDK_USBHX_UAHC_HCCPARAMS(a) BDK_CSR_TYPE_NCB32b |
| 4506 | #define basename_BDK_USBHX_UAHC_HCCPARAMS(a) "USBHX_UAHC_HCCPARAMS" |
| 4507 | #define device_bar_BDK_USBHX_UAHC_HCCPARAMS(a) 0x0 /* PF_BAR0 */ |
| 4508 | #define busnum_BDK_USBHX_UAHC_HCCPARAMS(a) (a) |
| 4509 | #define arguments_BDK_USBHX_UAHC_HCCPARAMS(a) (a),-1,-1,-1 |
| 4510 | |
| 4511 | /** |
| 4512 | * Register (NCB32b) usbh#_uahc_hcsparams1 |
| 4513 | * |
| 4514 | * XHCI Controller Structural Parameters Register 1 |
| 4515 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.3.3. |
| 4516 | */ |
| 4517 | union bdk_usbhx_uahc_hcsparams1 |
| 4518 | { |
| 4519 | uint32_t u; |
| 4520 | struct bdk_usbhx_uahc_hcsparams1_s |
| 4521 | { |
| 4522 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 4523 | uint32_t maxports : 8; /**< [ 31: 24](RO) Maximum number of ports. */ |
| 4524 | uint32_t reserved_19_23 : 5; |
| 4525 | uint32_t maxintrs : 11; /**< [ 18: 8](RO) Maximum number of interrupters. */ |
| 4526 | uint32_t maxslots : 8; /**< [ 7: 0](RO) Maximum number of device slots. */ |
| 4527 | #else /* Word 0 - Little Endian */ |
| 4528 | uint32_t maxslots : 8; /**< [ 7: 0](RO) Maximum number of device slots. */ |
| 4529 | uint32_t maxintrs : 11; /**< [ 18: 8](RO) Maximum number of interrupters. */ |
| 4530 | uint32_t reserved_19_23 : 5; |
| 4531 | uint32_t maxports : 8; /**< [ 31: 24](RO) Maximum number of ports. */ |
| 4532 | #endif /* Word 0 - End */ |
| 4533 | } s; |
| 4534 | /* struct bdk_usbhx_uahc_hcsparams1_s cn; */ |
| 4535 | }; |
| 4536 | typedef union bdk_usbhx_uahc_hcsparams1 bdk_usbhx_uahc_hcsparams1_t; |
| 4537 | |
| 4538 | static inline uint64_t BDK_USBHX_UAHC_HCSPARAMS1(unsigned long a) __attribute__ ((pure, always_inline)); |
| 4539 | static inline uint64_t BDK_USBHX_UAHC_HCSPARAMS1(unsigned long a) |
| 4540 | { |
| 4541 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 4542 | return 0x868000000004ll + 0x1000000000ll * ((a) & 0x1); |
| 4543 | __bdk_csr_fatal("USBHX_UAHC_HCSPARAMS1", 1, a, 0, 0, 0); |
| 4544 | } |
| 4545 | |
| 4546 | #define typedef_BDK_USBHX_UAHC_HCSPARAMS1(a) bdk_usbhx_uahc_hcsparams1_t |
| 4547 | #define bustype_BDK_USBHX_UAHC_HCSPARAMS1(a) BDK_CSR_TYPE_NCB32b |
| 4548 | #define basename_BDK_USBHX_UAHC_HCSPARAMS1(a) "USBHX_UAHC_HCSPARAMS1" |
| 4549 | #define device_bar_BDK_USBHX_UAHC_HCSPARAMS1(a) 0x0 /* PF_BAR0 */ |
| 4550 | #define busnum_BDK_USBHX_UAHC_HCSPARAMS1(a) (a) |
| 4551 | #define arguments_BDK_USBHX_UAHC_HCSPARAMS1(a) (a),-1,-1,-1 |
| 4552 | |
| 4553 | /** |
| 4554 | * Register (NCB32b) usbh#_uahc_hcsparams2 |
| 4555 | * |
| 4556 | * XHCI Controller Structural Parameters Register 2 |
| 4557 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.3.4. |
| 4558 | */ |
| 4559 | union bdk_usbhx_uahc_hcsparams2 |
| 4560 | { |
| 4561 | uint32_t u; |
| 4562 | struct bdk_usbhx_uahc_hcsparams2_s |
| 4563 | { |
| 4564 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 4565 | uint32_t maxscratchpadbufs_l : 5; /**< [ 31: 27](RO) Maximum number of scratchpad buffers[4:0]. */ |
| 4566 | uint32_t spr : 1; /**< [ 26: 26](RO) Scratchpad restore. */ |
| 4567 | uint32_t maxscratchpadbufs_h : 5; /**< [ 25: 21](RO) Maximum number of scratchpad buffers[9:5]. */ |
| 4568 | uint32_t reserved_8_20 : 13; |
| 4569 | uint32_t erst_max : 4; /**< [ 7: 4](RO) Event ring segment table maximum. */ |
| 4570 | uint32_t ist : 4; /**< [ 3: 0](RO) Isochronous scheduling threshold. */ |
| 4571 | #else /* Word 0 - Little Endian */ |
| 4572 | uint32_t ist : 4; /**< [ 3: 0](RO) Isochronous scheduling threshold. */ |
| 4573 | uint32_t erst_max : 4; /**< [ 7: 4](RO) Event ring segment table maximum. */ |
| 4574 | uint32_t reserved_8_20 : 13; |
| 4575 | uint32_t maxscratchpadbufs_h : 5; /**< [ 25: 21](RO) Maximum number of scratchpad buffers[9:5]. */ |
| 4576 | uint32_t spr : 1; /**< [ 26: 26](RO) Scratchpad restore. */ |
| 4577 | uint32_t maxscratchpadbufs_l : 5; /**< [ 31: 27](RO) Maximum number of scratchpad buffers[4:0]. */ |
| 4578 | #endif /* Word 0 - End */ |
| 4579 | } s; |
| 4580 | /* struct bdk_usbhx_uahc_hcsparams2_s cn; */ |
| 4581 | }; |
| 4582 | typedef union bdk_usbhx_uahc_hcsparams2 bdk_usbhx_uahc_hcsparams2_t; |
| 4583 | |
| 4584 | static inline uint64_t BDK_USBHX_UAHC_HCSPARAMS2(unsigned long a) __attribute__ ((pure, always_inline)); |
| 4585 | static inline uint64_t BDK_USBHX_UAHC_HCSPARAMS2(unsigned long a) |
| 4586 | { |
| 4587 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 4588 | return 0x868000000008ll + 0x1000000000ll * ((a) & 0x1); |
| 4589 | __bdk_csr_fatal("USBHX_UAHC_HCSPARAMS2", 1, a, 0, 0, 0); |
| 4590 | } |
| 4591 | |
| 4592 | #define typedef_BDK_USBHX_UAHC_HCSPARAMS2(a) bdk_usbhx_uahc_hcsparams2_t |
| 4593 | #define bustype_BDK_USBHX_UAHC_HCSPARAMS2(a) BDK_CSR_TYPE_NCB32b |
| 4594 | #define basename_BDK_USBHX_UAHC_HCSPARAMS2(a) "USBHX_UAHC_HCSPARAMS2" |
| 4595 | #define device_bar_BDK_USBHX_UAHC_HCSPARAMS2(a) 0x0 /* PF_BAR0 */ |
| 4596 | #define busnum_BDK_USBHX_UAHC_HCSPARAMS2(a) (a) |
| 4597 | #define arguments_BDK_USBHX_UAHC_HCSPARAMS2(a) (a),-1,-1,-1 |
| 4598 | |
| 4599 | /** |
| 4600 | * Register (NCB32b) usbh#_uahc_hcsparams3 |
| 4601 | * |
| 4602 | * XHCI Controller Structural Parameters Register 3 |
| 4603 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.3.5. |
| 4604 | */ |
| 4605 | union bdk_usbhx_uahc_hcsparams3 |
| 4606 | { |
| 4607 | uint32_t u; |
| 4608 | struct bdk_usbhx_uahc_hcsparams3_s |
| 4609 | { |
| 4610 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 4611 | uint32_t u2_device_exit_latency : 16;/**< [ 31: 16](RO) U2 device exit latency. */ |
| 4612 | uint32_t reserved_8_15 : 8; |
| 4613 | uint32_t u1_device_exit_latency : 8; /**< [ 7: 0](RO) U1 device exit latency. */ |
| 4614 | #else /* Word 0 - Little Endian */ |
| 4615 | uint32_t u1_device_exit_latency : 8; /**< [ 7: 0](RO) U1 device exit latency. */ |
| 4616 | uint32_t reserved_8_15 : 8; |
| 4617 | uint32_t u2_device_exit_latency : 16;/**< [ 31: 16](RO) U2 device exit latency. */ |
| 4618 | #endif /* Word 0 - End */ |
| 4619 | } s; |
| 4620 | /* struct bdk_usbhx_uahc_hcsparams3_s cn; */ |
| 4621 | }; |
| 4622 | typedef union bdk_usbhx_uahc_hcsparams3 bdk_usbhx_uahc_hcsparams3_t; |
| 4623 | |
| 4624 | static inline uint64_t BDK_USBHX_UAHC_HCSPARAMS3(unsigned long a) __attribute__ ((pure, always_inline)); |
| 4625 | static inline uint64_t BDK_USBHX_UAHC_HCSPARAMS3(unsigned long a) |
| 4626 | { |
| 4627 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 4628 | return 0x86800000000cll + 0x1000000000ll * ((a) & 0x1); |
| 4629 | __bdk_csr_fatal("USBHX_UAHC_HCSPARAMS3", 1, a, 0, 0, 0); |
| 4630 | } |
| 4631 | |
| 4632 | #define typedef_BDK_USBHX_UAHC_HCSPARAMS3(a) bdk_usbhx_uahc_hcsparams3_t |
| 4633 | #define bustype_BDK_USBHX_UAHC_HCSPARAMS3(a) BDK_CSR_TYPE_NCB32b |
| 4634 | #define basename_BDK_USBHX_UAHC_HCSPARAMS3(a) "USBHX_UAHC_HCSPARAMS3" |
| 4635 | #define device_bar_BDK_USBHX_UAHC_HCSPARAMS3(a) 0x0 /* PF_BAR0 */ |
| 4636 | #define busnum_BDK_USBHX_UAHC_HCSPARAMS3(a) (a) |
| 4637 | #define arguments_BDK_USBHX_UAHC_HCSPARAMS3(a) (a),-1,-1,-1 |
| 4638 | |
| 4639 | /** |
| 4640 | * Register (NCB32b) usbh#_uahc_iman# |
| 4641 | * |
| 4642 | * XHCI Interrupt Management Register |
| 4643 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.5.2.1. |
| 4644 | * |
| 4645 | * This register can be reset by NCB reset, |
| 4646 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 4647 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 4648 | * or USBH()_UAHC_USBCMD[HCRST], or USBH()_UAHC_USBCMD[LHCRST]. |
| 4649 | */ |
| 4650 | union bdk_usbhx_uahc_imanx |
| 4651 | { |
| 4652 | uint32_t u; |
| 4653 | struct bdk_usbhx_uahc_imanx_s |
| 4654 | { |
| 4655 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 4656 | uint32_t reserved_2_31 : 30; |
| 4657 | uint32_t ie : 1; /**< [ 1: 1](R/W) Interrupt enable. */ |
| 4658 | uint32_t ip : 1; /**< [ 0: 0](R/W1C/H) Interrupt pending. */ |
| 4659 | #else /* Word 0 - Little Endian */ |
| 4660 | uint32_t ip : 1; /**< [ 0: 0](R/W1C/H) Interrupt pending. */ |
| 4661 | uint32_t ie : 1; /**< [ 1: 1](R/W) Interrupt enable. */ |
| 4662 | uint32_t reserved_2_31 : 30; |
| 4663 | #endif /* Word 0 - End */ |
| 4664 | } s; |
| 4665 | /* struct bdk_usbhx_uahc_imanx_s cn; */ |
| 4666 | }; |
| 4667 | typedef union bdk_usbhx_uahc_imanx bdk_usbhx_uahc_imanx_t; |
| 4668 | |
| 4669 | static inline uint64_t BDK_USBHX_UAHC_IMANX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 4670 | static inline uint64_t BDK_USBHX_UAHC_IMANX(unsigned long a, unsigned long b) |
| 4671 | { |
| 4672 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==0))) |
| 4673 | return 0x868000000460ll + 0x1000000000ll * ((a) & 0x1) + 0ll * ((b) & 0x0); |
| 4674 | __bdk_csr_fatal("USBHX_UAHC_IMANX", 2, a, b, 0, 0); |
| 4675 | } |
| 4676 | |
| 4677 | #define typedef_BDK_USBHX_UAHC_IMANX(a,b) bdk_usbhx_uahc_imanx_t |
| 4678 | #define bustype_BDK_USBHX_UAHC_IMANX(a,b) BDK_CSR_TYPE_NCB32b |
| 4679 | #define basename_BDK_USBHX_UAHC_IMANX(a,b) "USBHX_UAHC_IMANX" |
| 4680 | #define device_bar_BDK_USBHX_UAHC_IMANX(a,b) 0x0 /* PF_BAR0 */ |
| 4681 | #define busnum_BDK_USBHX_UAHC_IMANX(a,b) (a) |
| 4682 | #define arguments_BDK_USBHX_UAHC_IMANX(a,b) (a),(b),-1,-1 |
| 4683 | |
| 4684 | /** |
| 4685 | * Register (NCB32b) usbh#_uahc_imod# |
| 4686 | * |
| 4687 | * XHCI Interrupt Moderation Register |
| 4688 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.5.2.2. |
| 4689 | * |
| 4690 | * This register can be reset by NCB reset, |
| 4691 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 4692 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 4693 | * or USBH()_UAHC_USBCMD[HCRST], or USBH()_UAHC_USBCMD[LHCRST]. |
| 4694 | */ |
| 4695 | union bdk_usbhx_uahc_imodx |
| 4696 | { |
| 4697 | uint32_t u; |
| 4698 | struct bdk_usbhx_uahc_imodx_s |
| 4699 | { |
| 4700 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 4701 | uint32_t imodc : 16; /**< [ 31: 16](R/W) Interrupt moderation counter. */ |
| 4702 | uint32_t imodi : 16; /**< [ 15: 0](R/W) Interrupt moderation interval. */ |
| 4703 | #else /* Word 0 - Little Endian */ |
| 4704 | uint32_t imodi : 16; /**< [ 15: 0](R/W) Interrupt moderation interval. */ |
| 4705 | uint32_t imodc : 16; /**< [ 31: 16](R/W) Interrupt moderation counter. */ |
| 4706 | #endif /* Word 0 - End */ |
| 4707 | } s; |
| 4708 | /* struct bdk_usbhx_uahc_imodx_s cn; */ |
| 4709 | }; |
| 4710 | typedef union bdk_usbhx_uahc_imodx bdk_usbhx_uahc_imodx_t; |
| 4711 | |
| 4712 | static inline uint64_t BDK_USBHX_UAHC_IMODX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 4713 | static inline uint64_t BDK_USBHX_UAHC_IMODX(unsigned long a, unsigned long b) |
| 4714 | { |
| 4715 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==0))) |
| 4716 | return 0x868000000464ll + 0x1000000000ll * ((a) & 0x1) + 0ll * ((b) & 0x0); |
| 4717 | __bdk_csr_fatal("USBHX_UAHC_IMODX", 2, a, b, 0, 0); |
| 4718 | } |
| 4719 | |
| 4720 | #define typedef_BDK_USBHX_UAHC_IMODX(a,b) bdk_usbhx_uahc_imodx_t |
| 4721 | #define bustype_BDK_USBHX_UAHC_IMODX(a,b) BDK_CSR_TYPE_NCB32b |
| 4722 | #define basename_BDK_USBHX_UAHC_IMODX(a,b) "USBHX_UAHC_IMODX" |
| 4723 | #define device_bar_BDK_USBHX_UAHC_IMODX(a,b) 0x0 /* PF_BAR0 */ |
| 4724 | #define busnum_BDK_USBHX_UAHC_IMODX(a,b) (a) |
| 4725 | #define arguments_BDK_USBHX_UAHC_IMODX(a,b) (a),(b),-1,-1 |
| 4726 | |
| 4727 | /** |
| 4728 | * Register (NCB32b) usbh#_uahc_mfindex |
| 4729 | * |
| 4730 | * XHCI Microframe Index Register |
| 4731 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.5.1. |
| 4732 | * |
| 4733 | * This register can be reset by NCB reset, |
| 4734 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 4735 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 4736 | * or USBH()_UAHC_USBCMD[HCRST], or USBH()_UAHC_USBCMD[LHCRST]. |
| 4737 | */ |
| 4738 | union bdk_usbhx_uahc_mfindex |
| 4739 | { |
| 4740 | uint32_t u; |
| 4741 | struct bdk_usbhx_uahc_mfindex_s |
| 4742 | { |
| 4743 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 4744 | uint32_t reserved_14_31 : 18; |
| 4745 | uint32_t mfindex : 14; /**< [ 13: 0](RO/H) Microframe index. */ |
| 4746 | #else /* Word 0 - Little Endian */ |
| 4747 | uint32_t mfindex : 14; /**< [ 13: 0](RO/H) Microframe index. */ |
| 4748 | uint32_t reserved_14_31 : 18; |
| 4749 | #endif /* Word 0 - End */ |
| 4750 | } s; |
| 4751 | /* struct bdk_usbhx_uahc_mfindex_s cn; */ |
| 4752 | }; |
| 4753 | typedef union bdk_usbhx_uahc_mfindex bdk_usbhx_uahc_mfindex_t; |
| 4754 | |
| 4755 | static inline uint64_t BDK_USBHX_UAHC_MFINDEX(unsigned long a) __attribute__ ((pure, always_inline)); |
| 4756 | static inline uint64_t BDK_USBHX_UAHC_MFINDEX(unsigned long a) |
| 4757 | { |
| 4758 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 4759 | return 0x868000000440ll + 0x1000000000ll * ((a) & 0x1); |
| 4760 | __bdk_csr_fatal("USBHX_UAHC_MFINDEX", 1, a, 0, 0, 0); |
| 4761 | } |
| 4762 | |
| 4763 | #define typedef_BDK_USBHX_UAHC_MFINDEX(a) bdk_usbhx_uahc_mfindex_t |
| 4764 | #define bustype_BDK_USBHX_UAHC_MFINDEX(a) BDK_CSR_TYPE_NCB32b |
| 4765 | #define basename_BDK_USBHX_UAHC_MFINDEX(a) "USBHX_UAHC_MFINDEX" |
| 4766 | #define device_bar_BDK_USBHX_UAHC_MFINDEX(a) 0x0 /* PF_BAR0 */ |
| 4767 | #define busnum_BDK_USBHX_UAHC_MFINDEX(a) (a) |
| 4768 | #define arguments_BDK_USBHX_UAHC_MFINDEX(a) (a),-1,-1,-1 |
| 4769 | |
| 4770 | /** |
| 4771 | * Register (NCB32b) usbh#_uahc_pagesize |
| 4772 | * |
| 4773 | * XHCI Page-Size Register |
| 4774 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.4.3. |
| 4775 | */ |
| 4776 | union bdk_usbhx_uahc_pagesize |
| 4777 | { |
| 4778 | uint32_t u; |
| 4779 | struct bdk_usbhx_uahc_pagesize_s |
| 4780 | { |
| 4781 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 4782 | uint32_t reserved_16_31 : 16; |
| 4783 | uint32_t pagesize : 16; /**< [ 15: 0](RO) Page size. */ |
| 4784 | #else /* Word 0 - Little Endian */ |
| 4785 | uint32_t pagesize : 16; /**< [ 15: 0](RO) Page size. */ |
| 4786 | uint32_t reserved_16_31 : 16; |
| 4787 | #endif /* Word 0 - End */ |
| 4788 | } s; |
| 4789 | /* struct bdk_usbhx_uahc_pagesize_s cn; */ |
| 4790 | }; |
| 4791 | typedef union bdk_usbhx_uahc_pagesize bdk_usbhx_uahc_pagesize_t; |
| 4792 | |
| 4793 | static inline uint64_t BDK_USBHX_UAHC_PAGESIZE(unsigned long a) __attribute__ ((pure, always_inline)); |
| 4794 | static inline uint64_t BDK_USBHX_UAHC_PAGESIZE(unsigned long a) |
| 4795 | { |
| 4796 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 4797 | return 0x868000000028ll + 0x1000000000ll * ((a) & 0x1); |
| 4798 | __bdk_csr_fatal("USBHX_UAHC_PAGESIZE", 1, a, 0, 0, 0); |
| 4799 | } |
| 4800 | |
| 4801 | #define typedef_BDK_USBHX_UAHC_PAGESIZE(a) bdk_usbhx_uahc_pagesize_t |
| 4802 | #define bustype_BDK_USBHX_UAHC_PAGESIZE(a) BDK_CSR_TYPE_NCB32b |
| 4803 | #define basename_BDK_USBHX_UAHC_PAGESIZE(a) "USBHX_UAHC_PAGESIZE" |
| 4804 | #define device_bar_BDK_USBHX_UAHC_PAGESIZE(a) 0x0 /* PF_BAR0 */ |
| 4805 | #define busnum_BDK_USBHX_UAHC_PAGESIZE(a) (a) |
| 4806 | #define arguments_BDK_USBHX_UAHC_PAGESIZE(a) (a),-1,-1,-1 |
| 4807 | |
| 4808 | /** |
| 4809 | * Register (NCB32b) usbh#_uahc_porthlpmc_20# |
| 4810 | * |
| 4811 | * XHCI Port Hardware LPM Control (High-Speed) Register |
| 4812 | * For information on this register, refer to the xHCI Specification, v1.1, section 5.4.11.2. |
| 4813 | * |
| 4814 | * This register can be reset by NCB reset, |
| 4815 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 4816 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 4817 | * or USBH()_UAHC_USBCMD[HCRST], or USBH()_UAHC_USBCMD[LHCRST]. |
| 4818 | */ |
| 4819 | union bdk_usbhx_uahc_porthlpmc_20x |
| 4820 | { |
| 4821 | uint32_t u; |
| 4822 | struct bdk_usbhx_uahc_porthlpmc_20x_s |
| 4823 | { |
| 4824 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 4825 | uint32_t reserved_14_31 : 18; |
| 4826 | uint32_t hirdd : 4; /**< [ 13: 10](R/W) See section 5.4.11.2 of the XHCI Spec 1.1. |
| 4827 | If USBH()_UAHC_SUPTPRT2_DW2[BLC] = 0, then HIRD timing is applied to this field. |
| 4828 | If USBH()_UAHC_SUPTPRT2_DW2[BLC] = 1, then BESL timing is applied to this field. */ |
| 4829 | uint32_t l1_timeout : 8; /**< [ 9: 2](R/W) Timeout value for the L1 inactivity timer (LPM timer). This field is set to 0x0 by the |
| 4830 | assertion of PR to 1. Refer to section 4.23.5.1.1.1 (in XHCI spec 1.1) for more |
| 4831 | information on L1 Timeout operation. |
| 4832 | The following are permissible values: |
| 4833 | 0x0 = 128 us. (default). |
| 4834 | 0x1 = 256 us. |
| 4835 | 0x2 = 512 us. |
| 4836 | 0x3 = 768 us. |
| 4837 | _ ... |
| 4838 | 0xFF = 65280 us. */ |
| 4839 | uint32_t hirdm : 2; /**< [ 1: 0](R/W) Host-initiated resume-duration mode. */ |
| 4840 | #else /* Word 0 - Little Endian */ |
| 4841 | uint32_t hirdm : 2; /**< [ 1: 0](R/W) Host-initiated resume-duration mode. */ |
| 4842 | uint32_t l1_timeout : 8; /**< [ 9: 2](R/W) Timeout value for the L1 inactivity timer (LPM timer). This field is set to 0x0 by the |
| 4843 | assertion of PR to 1. Refer to section 4.23.5.1.1.1 (in XHCI spec 1.1) for more |
| 4844 | information on L1 Timeout operation. |
| 4845 | The following are permissible values: |
| 4846 | 0x0 = 128 us. (default). |
| 4847 | 0x1 = 256 us. |
| 4848 | 0x2 = 512 us. |
| 4849 | 0x3 = 768 us. |
| 4850 | _ ... |
| 4851 | 0xFF = 65280 us. */ |
| 4852 | uint32_t hirdd : 4; /**< [ 13: 10](R/W) See section 5.4.11.2 of the XHCI Spec 1.1. |
| 4853 | If USBH()_UAHC_SUPTPRT2_DW2[BLC] = 0, then HIRD timing is applied to this field. |
| 4854 | If USBH()_UAHC_SUPTPRT2_DW2[BLC] = 1, then BESL timing is applied to this field. */ |
| 4855 | uint32_t reserved_14_31 : 18; |
| 4856 | #endif /* Word 0 - End */ |
| 4857 | } s; |
| 4858 | /* struct bdk_usbhx_uahc_porthlpmc_20x_s cn; */ |
| 4859 | }; |
| 4860 | typedef union bdk_usbhx_uahc_porthlpmc_20x bdk_usbhx_uahc_porthlpmc_20x_t; |
| 4861 | |
| 4862 | static inline uint64_t BDK_USBHX_UAHC_PORTHLPMC_20X(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 4863 | static inline uint64_t BDK_USBHX_UAHC_PORTHLPMC_20X(unsigned long a, unsigned long b) |
| 4864 | { |
| 4865 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==0))) |
| 4866 | return 0x86800000042cll + 0x1000000000ll * ((a) & 0x1) + 0x10ll * ((b) & 0x0); |
| 4867 | __bdk_csr_fatal("USBHX_UAHC_PORTHLPMC_20X", 2, a, b, 0, 0); |
| 4868 | } |
| 4869 | |
| 4870 | #define typedef_BDK_USBHX_UAHC_PORTHLPMC_20X(a,b) bdk_usbhx_uahc_porthlpmc_20x_t |
| 4871 | #define bustype_BDK_USBHX_UAHC_PORTHLPMC_20X(a,b) BDK_CSR_TYPE_NCB32b |
| 4872 | #define basename_BDK_USBHX_UAHC_PORTHLPMC_20X(a,b) "USBHX_UAHC_PORTHLPMC_20X" |
| 4873 | #define device_bar_BDK_USBHX_UAHC_PORTHLPMC_20X(a,b) 0x0 /* PF_BAR0 */ |
| 4874 | #define busnum_BDK_USBHX_UAHC_PORTHLPMC_20X(a,b) (a) |
| 4875 | #define arguments_BDK_USBHX_UAHC_PORTHLPMC_20X(a,b) (a),(b),-1,-1 |
| 4876 | |
| 4877 | /** |
| 4878 | * Register (NCB32b) usbh#_uahc_porthlpmc_ss# |
| 4879 | * |
| 4880 | * XHCI Port Hardware LPM Control (SuperSpeed) Register |
| 4881 | * The USB3 port hardware LPM control register is reserved and shall be treated as RsvdP by |
| 4882 | * software. See xHCI specification v1.1 section 5.4.11.1. |
| 4883 | * |
| 4884 | * This register can be reset by NCB reset, |
| 4885 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 4886 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 4887 | * or USBH()_UAHC_USBCMD[HCRST]. |
| 4888 | */ |
| 4889 | union bdk_usbhx_uahc_porthlpmc_ssx |
| 4890 | { |
| 4891 | uint32_t u; |
| 4892 | struct bdk_usbhx_uahc_porthlpmc_ssx_s |
| 4893 | { |
| 4894 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 4895 | uint32_t reserved_0_31 : 32; |
| 4896 | #else /* Word 0 - Little Endian */ |
| 4897 | uint32_t reserved_0_31 : 32; |
| 4898 | #endif /* Word 0 - End */ |
| 4899 | } s; |
| 4900 | /* struct bdk_usbhx_uahc_porthlpmc_ssx_s cn; */ |
| 4901 | }; |
| 4902 | typedef union bdk_usbhx_uahc_porthlpmc_ssx bdk_usbhx_uahc_porthlpmc_ssx_t; |
| 4903 | |
| 4904 | static inline uint64_t BDK_USBHX_UAHC_PORTHLPMC_SSX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 4905 | static inline uint64_t BDK_USBHX_UAHC_PORTHLPMC_SSX(unsigned long a, unsigned long b) |
| 4906 | { |
| 4907 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==1))) |
| 4908 | return 0x86800000042cll + 0x1000000000ll * ((a) & 0x1) + 0x10ll * ((b) & 0x1); |
| 4909 | __bdk_csr_fatal("USBHX_UAHC_PORTHLPMC_SSX", 2, a, b, 0, 0); |
| 4910 | } |
| 4911 | |
| 4912 | #define typedef_BDK_USBHX_UAHC_PORTHLPMC_SSX(a,b) bdk_usbhx_uahc_porthlpmc_ssx_t |
| 4913 | #define bustype_BDK_USBHX_UAHC_PORTHLPMC_SSX(a,b) BDK_CSR_TYPE_NCB32b |
| 4914 | #define basename_BDK_USBHX_UAHC_PORTHLPMC_SSX(a,b) "USBHX_UAHC_PORTHLPMC_SSX" |
| 4915 | #define device_bar_BDK_USBHX_UAHC_PORTHLPMC_SSX(a,b) 0x0 /* PF_BAR0 */ |
| 4916 | #define busnum_BDK_USBHX_UAHC_PORTHLPMC_SSX(a,b) (a) |
| 4917 | #define arguments_BDK_USBHX_UAHC_PORTHLPMC_SSX(a,b) (a),(b),-1,-1 |
| 4918 | |
| 4919 | /** |
| 4920 | * Register (NCB32b) usbh#_uahc_portli_20# |
| 4921 | * |
| 4922 | * XHCI Port Link (High-Speed) Register |
| 4923 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.4.10. |
| 4924 | */ |
| 4925 | union bdk_usbhx_uahc_portli_20x |
| 4926 | { |
| 4927 | uint32_t u; |
| 4928 | struct bdk_usbhx_uahc_portli_20x_s |
| 4929 | { |
| 4930 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 4931 | uint32_t reserved_0_31 : 32; |
| 4932 | #else /* Word 0 - Little Endian */ |
| 4933 | uint32_t reserved_0_31 : 32; |
| 4934 | #endif /* Word 0 - End */ |
| 4935 | } s; |
| 4936 | /* struct bdk_usbhx_uahc_portli_20x_s cn; */ |
| 4937 | }; |
| 4938 | typedef union bdk_usbhx_uahc_portli_20x bdk_usbhx_uahc_portli_20x_t; |
| 4939 | |
| 4940 | static inline uint64_t BDK_USBHX_UAHC_PORTLI_20X(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 4941 | static inline uint64_t BDK_USBHX_UAHC_PORTLI_20X(unsigned long a, unsigned long b) |
| 4942 | { |
| 4943 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==0))) |
| 4944 | return 0x868000000428ll + 0x1000000000ll * ((a) & 0x1) + 0x10ll * ((b) & 0x0); |
| 4945 | __bdk_csr_fatal("USBHX_UAHC_PORTLI_20X", 2, a, b, 0, 0); |
| 4946 | } |
| 4947 | |
| 4948 | #define typedef_BDK_USBHX_UAHC_PORTLI_20X(a,b) bdk_usbhx_uahc_portli_20x_t |
| 4949 | #define bustype_BDK_USBHX_UAHC_PORTLI_20X(a,b) BDK_CSR_TYPE_NCB32b |
| 4950 | #define basename_BDK_USBHX_UAHC_PORTLI_20X(a,b) "USBHX_UAHC_PORTLI_20X" |
| 4951 | #define device_bar_BDK_USBHX_UAHC_PORTLI_20X(a,b) 0x0 /* PF_BAR0 */ |
| 4952 | #define busnum_BDK_USBHX_UAHC_PORTLI_20X(a,b) (a) |
| 4953 | #define arguments_BDK_USBHX_UAHC_PORTLI_20X(a,b) (a),(b),-1,-1 |
| 4954 | |
| 4955 | /** |
| 4956 | * Register (NCB32b) usbh#_uahc_portli_ss# |
| 4957 | * |
| 4958 | * XHCI Port Link (SuperSpeed) Register |
| 4959 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.4.10. |
| 4960 | */ |
| 4961 | union bdk_usbhx_uahc_portli_ssx |
| 4962 | { |
| 4963 | uint32_t u; |
| 4964 | struct bdk_usbhx_uahc_portli_ssx_s |
| 4965 | { |
| 4966 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 4967 | uint32_t reserved_16_31 : 16; |
| 4968 | uint32_t linkerrorcount : 16; /**< [ 15: 0](RO/H) Link error count. */ |
| 4969 | #else /* Word 0 - Little Endian */ |
| 4970 | uint32_t linkerrorcount : 16; /**< [ 15: 0](RO/H) Link error count. */ |
| 4971 | uint32_t reserved_16_31 : 16; |
| 4972 | #endif /* Word 0 - End */ |
| 4973 | } s; |
| 4974 | /* struct bdk_usbhx_uahc_portli_ssx_s cn; */ |
| 4975 | }; |
| 4976 | typedef union bdk_usbhx_uahc_portli_ssx bdk_usbhx_uahc_portli_ssx_t; |
| 4977 | |
| 4978 | static inline uint64_t BDK_USBHX_UAHC_PORTLI_SSX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 4979 | static inline uint64_t BDK_USBHX_UAHC_PORTLI_SSX(unsigned long a, unsigned long b) |
| 4980 | { |
| 4981 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==1))) |
| 4982 | return 0x868000000428ll + 0x1000000000ll * ((a) & 0x1) + 0x10ll * ((b) & 0x1); |
| 4983 | __bdk_csr_fatal("USBHX_UAHC_PORTLI_SSX", 2, a, b, 0, 0); |
| 4984 | } |
| 4985 | |
| 4986 | #define typedef_BDK_USBHX_UAHC_PORTLI_SSX(a,b) bdk_usbhx_uahc_portli_ssx_t |
| 4987 | #define bustype_BDK_USBHX_UAHC_PORTLI_SSX(a,b) BDK_CSR_TYPE_NCB32b |
| 4988 | #define basename_BDK_USBHX_UAHC_PORTLI_SSX(a,b) "USBHX_UAHC_PORTLI_SSX" |
| 4989 | #define device_bar_BDK_USBHX_UAHC_PORTLI_SSX(a,b) 0x0 /* PF_BAR0 */ |
| 4990 | #define busnum_BDK_USBHX_UAHC_PORTLI_SSX(a,b) (a) |
| 4991 | #define arguments_BDK_USBHX_UAHC_PORTLI_SSX(a,b) (a),(b),-1,-1 |
| 4992 | |
| 4993 | /** |
| 4994 | * Register (NCB32b) usbh#_uahc_portpmsc_20# |
| 4995 | * |
| 4996 | * XHCI Port Power Management Status/Control (High-Speed) Register |
| 4997 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.4.9. |
| 4998 | * |
| 4999 | * This register can be reset by NCB reset, |
| 5000 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 5001 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 5002 | * or USBH()_UAHC_USBCMD[HCRST]. |
| 5003 | */ |
| 5004 | union bdk_usbhx_uahc_portpmsc_20x |
| 5005 | { |
| 5006 | uint32_t u; |
| 5007 | struct bdk_usbhx_uahc_portpmsc_20x_s |
| 5008 | { |
| 5009 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5010 | uint32_t port_test_control : 4; /**< [ 31: 28](R/W) Port test control. */ |
| 5011 | uint32_t reserved_17_27 : 11; |
| 5012 | uint32_t hle : 1; /**< [ 16: 16](R/W) Hardware LPM enable. */ |
| 5013 | uint32_t l1_device_slot : 8; /**< [ 15: 8](R/W) L1 device slot. */ |
| 5014 | uint32_t hird : 4; /**< [ 7: 4](R/W) Host-initiated resume duration. */ |
| 5015 | uint32_t rwe : 1; /**< [ 3: 3](R/W) Remove wake enable. */ |
| 5016 | uint32_t l1s : 3; /**< [ 2: 0](RO/H) L1 status. */ |
| 5017 | #else /* Word 0 - Little Endian */ |
| 5018 | uint32_t l1s : 3; /**< [ 2: 0](RO/H) L1 status. */ |
| 5019 | uint32_t rwe : 1; /**< [ 3: 3](R/W) Remove wake enable. */ |
| 5020 | uint32_t hird : 4; /**< [ 7: 4](R/W) Host-initiated resume duration. */ |
| 5021 | uint32_t l1_device_slot : 8; /**< [ 15: 8](R/W) L1 device slot. */ |
| 5022 | uint32_t hle : 1; /**< [ 16: 16](R/W) Hardware LPM enable. */ |
| 5023 | uint32_t reserved_17_27 : 11; |
| 5024 | uint32_t port_test_control : 4; /**< [ 31: 28](R/W) Port test control. */ |
| 5025 | #endif /* Word 0 - End */ |
| 5026 | } s; |
| 5027 | /* struct bdk_usbhx_uahc_portpmsc_20x_s cn; */ |
| 5028 | }; |
| 5029 | typedef union bdk_usbhx_uahc_portpmsc_20x bdk_usbhx_uahc_portpmsc_20x_t; |
| 5030 | |
| 5031 | static inline uint64_t BDK_USBHX_UAHC_PORTPMSC_20X(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 5032 | static inline uint64_t BDK_USBHX_UAHC_PORTPMSC_20X(unsigned long a, unsigned long b) |
| 5033 | { |
| 5034 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==0))) |
| 5035 | return 0x868000000424ll + 0x1000000000ll * ((a) & 0x1) + 0x10ll * ((b) & 0x0); |
| 5036 | __bdk_csr_fatal("USBHX_UAHC_PORTPMSC_20X", 2, a, b, 0, 0); |
| 5037 | } |
| 5038 | |
| 5039 | #define typedef_BDK_USBHX_UAHC_PORTPMSC_20X(a,b) bdk_usbhx_uahc_portpmsc_20x_t |
| 5040 | #define bustype_BDK_USBHX_UAHC_PORTPMSC_20X(a,b) BDK_CSR_TYPE_NCB32b |
| 5041 | #define basename_BDK_USBHX_UAHC_PORTPMSC_20X(a,b) "USBHX_UAHC_PORTPMSC_20X" |
| 5042 | #define device_bar_BDK_USBHX_UAHC_PORTPMSC_20X(a,b) 0x0 /* PF_BAR0 */ |
| 5043 | #define busnum_BDK_USBHX_UAHC_PORTPMSC_20X(a,b) (a) |
| 5044 | #define arguments_BDK_USBHX_UAHC_PORTPMSC_20X(a,b) (a),(b),-1,-1 |
| 5045 | |
| 5046 | /** |
| 5047 | * Register (NCB32b) usbh#_uahc_portpmsc_ss# |
| 5048 | * |
| 5049 | * XHCI Port Power Management Status/Control (SuperSpeed) Register |
| 5050 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.4.9. |
| 5051 | * |
| 5052 | * This register can be reset by NCB reset, |
| 5053 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 5054 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 5055 | * or USBH()_UAHC_USBCMD[HCRST]. |
| 5056 | */ |
| 5057 | union bdk_usbhx_uahc_portpmsc_ssx |
| 5058 | { |
| 5059 | uint32_t u; |
| 5060 | struct bdk_usbhx_uahc_portpmsc_ssx_s |
| 5061 | { |
| 5062 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5063 | uint32_t reserved_17_31 : 15; |
| 5064 | uint32_t fla : 1; /**< [ 16: 16](R/W/H) Force link PM accept. */ |
| 5065 | uint32_t u2_timeout : 8; /**< [ 15: 8](R/W/H) U2 timeout. */ |
| 5066 | uint32_t u1_timeout : 8; /**< [ 7: 0](R/W/H) U1 timeout. */ |
| 5067 | #else /* Word 0 - Little Endian */ |
| 5068 | uint32_t u1_timeout : 8; /**< [ 7: 0](R/W/H) U1 timeout. */ |
| 5069 | uint32_t u2_timeout : 8; /**< [ 15: 8](R/W/H) U2 timeout. */ |
| 5070 | uint32_t fla : 1; /**< [ 16: 16](R/W/H) Force link PM accept. */ |
| 5071 | uint32_t reserved_17_31 : 15; |
| 5072 | #endif /* Word 0 - End */ |
| 5073 | } s; |
| 5074 | /* struct bdk_usbhx_uahc_portpmsc_ssx_s cn; */ |
| 5075 | }; |
| 5076 | typedef union bdk_usbhx_uahc_portpmsc_ssx bdk_usbhx_uahc_portpmsc_ssx_t; |
| 5077 | |
| 5078 | static inline uint64_t BDK_USBHX_UAHC_PORTPMSC_SSX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 5079 | static inline uint64_t BDK_USBHX_UAHC_PORTPMSC_SSX(unsigned long a, unsigned long b) |
| 5080 | { |
| 5081 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==1))) |
| 5082 | return 0x868000000424ll + 0x1000000000ll * ((a) & 0x1) + 0x10ll * ((b) & 0x1); |
| 5083 | __bdk_csr_fatal("USBHX_UAHC_PORTPMSC_SSX", 2, a, b, 0, 0); |
| 5084 | } |
| 5085 | |
| 5086 | #define typedef_BDK_USBHX_UAHC_PORTPMSC_SSX(a,b) bdk_usbhx_uahc_portpmsc_ssx_t |
| 5087 | #define bustype_BDK_USBHX_UAHC_PORTPMSC_SSX(a,b) BDK_CSR_TYPE_NCB32b |
| 5088 | #define basename_BDK_USBHX_UAHC_PORTPMSC_SSX(a,b) "USBHX_UAHC_PORTPMSC_SSX" |
| 5089 | #define device_bar_BDK_USBHX_UAHC_PORTPMSC_SSX(a,b) 0x0 /* PF_BAR0 */ |
| 5090 | #define busnum_BDK_USBHX_UAHC_PORTPMSC_SSX(a,b) (a) |
| 5091 | #define arguments_BDK_USBHX_UAHC_PORTPMSC_SSX(a,b) (a),(b),-1,-1 |
| 5092 | |
| 5093 | /** |
| 5094 | * Register (NCB32b) usbh#_uahc_portsc# |
| 5095 | * |
| 5096 | * XHCI Port Status and Control Registers |
| 5097 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.4.8. Port 1 |
| 5098 | * is USB3.0 SuperSpeed link, Port 0 is USB2.0 high-speed/full-speed/low-speed link. |
| 5099 | * |
| 5100 | * This register can be reset by NCB reset, |
| 5101 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 5102 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 5103 | * or USBH()_UAHC_USBCMD[HCRST]. |
| 5104 | */ |
| 5105 | union bdk_usbhx_uahc_portscx |
| 5106 | { |
| 5107 | uint32_t u; |
| 5108 | struct bdk_usbhx_uahc_portscx_s |
| 5109 | { |
| 5110 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5111 | uint32_t wpr : 1; /**< [ 31: 31](WO) Warm port reset. */ |
| 5112 | uint32_t dr : 1; /**< [ 30: 30](RO/H) Device removable. */ |
| 5113 | uint32_t reserved_28_29 : 2; |
| 5114 | uint32_t woe : 1; /**< [ 27: 27](R/W) Wake on overcurrent enable. */ |
| 5115 | uint32_t wde : 1; /**< [ 26: 26](R/W) Wake on disconnect enable. */ |
| 5116 | uint32_t wce : 1; /**< [ 25: 25](R/W) Wake on connect enable. */ |
| 5117 | uint32_t cas : 1; /**< [ 24: 24](RO/H) Cold attach status. */ |
| 5118 | uint32_t cec : 1; /**< [ 23: 23](R/W1C/H) Port configuration error change. */ |
| 5119 | uint32_t plc : 1; /**< [ 22: 22](R/W1C/H) Port link state change. */ |
| 5120 | uint32_t prc : 1; /**< [ 21: 21](R/W1C/H) Port reset change. */ |
| 5121 | uint32_t occ : 1; /**< [ 20: 20](R/W1C/H) Overcurrent change. */ |
| 5122 | uint32_t wrc : 1; /**< [ 19: 19](R/W1C/H) Warm port reset change. */ |
| 5123 | uint32_t pec : 1; /**< [ 18: 18](R/W1C/H) Port enabled/disabled change. */ |
| 5124 | uint32_t csc : 1; /**< [ 17: 17](R/W1C/H) Connect status change. */ |
| 5125 | uint32_t lws : 1; /**< [ 16: 16](WO) Port link state write strobe. */ |
| 5126 | uint32_t pic : 2; /**< [ 15: 14](R/W/H) Port indicator control. */ |
| 5127 | uint32_t portspeed : 4; /**< [ 13: 10](RO/H) Port speed. */ |
| 5128 | uint32_t pp : 1; /**< [ 9: 9](R/W/H) Port power. */ |
| 5129 | uint32_t pls : 4; /**< [ 8: 5](R/W/H) Port link state. */ |
| 5130 | uint32_t pr : 1; /**< [ 4: 4](R/W1S/H) Port reset. */ |
| 5131 | uint32_t oca : 1; /**< [ 3: 3](RO/H) Overcurrent active. */ |
| 5132 | uint32_t reserved_2 : 1; |
| 5133 | uint32_t ped : 1; /**< [ 1: 1](R/W1C/H) Port enabled/disabled. */ |
| 5134 | uint32_t ccs : 1; /**< [ 0: 0](RO/H) Current connect status. */ |
| 5135 | #else /* Word 0 - Little Endian */ |
| 5136 | uint32_t ccs : 1; /**< [ 0: 0](RO/H) Current connect status. */ |
| 5137 | uint32_t ped : 1; /**< [ 1: 1](R/W1C/H) Port enabled/disabled. */ |
| 5138 | uint32_t reserved_2 : 1; |
| 5139 | uint32_t oca : 1; /**< [ 3: 3](RO/H) Overcurrent active. */ |
| 5140 | uint32_t pr : 1; /**< [ 4: 4](R/W1S/H) Port reset. */ |
| 5141 | uint32_t pls : 4; /**< [ 8: 5](R/W/H) Port link state. */ |
| 5142 | uint32_t pp : 1; /**< [ 9: 9](R/W/H) Port power. */ |
| 5143 | uint32_t portspeed : 4; /**< [ 13: 10](RO/H) Port speed. */ |
| 5144 | uint32_t pic : 2; /**< [ 15: 14](R/W/H) Port indicator control. */ |
| 5145 | uint32_t lws : 1; /**< [ 16: 16](WO) Port link state write strobe. */ |
| 5146 | uint32_t csc : 1; /**< [ 17: 17](R/W1C/H) Connect status change. */ |
| 5147 | uint32_t pec : 1; /**< [ 18: 18](R/W1C/H) Port enabled/disabled change. */ |
| 5148 | uint32_t wrc : 1; /**< [ 19: 19](R/W1C/H) Warm port reset change. */ |
| 5149 | uint32_t occ : 1; /**< [ 20: 20](R/W1C/H) Overcurrent change. */ |
| 5150 | uint32_t prc : 1; /**< [ 21: 21](R/W1C/H) Port reset change. */ |
| 5151 | uint32_t plc : 1; /**< [ 22: 22](R/W1C/H) Port link state change. */ |
| 5152 | uint32_t cec : 1; /**< [ 23: 23](R/W1C/H) Port configuration error change. */ |
| 5153 | uint32_t cas : 1; /**< [ 24: 24](RO/H) Cold attach status. */ |
| 5154 | uint32_t wce : 1; /**< [ 25: 25](R/W) Wake on connect enable. */ |
| 5155 | uint32_t wde : 1; /**< [ 26: 26](R/W) Wake on disconnect enable. */ |
| 5156 | uint32_t woe : 1; /**< [ 27: 27](R/W) Wake on overcurrent enable. */ |
| 5157 | uint32_t reserved_28_29 : 2; |
| 5158 | uint32_t dr : 1; /**< [ 30: 30](RO/H) Device removable. */ |
| 5159 | uint32_t wpr : 1; /**< [ 31: 31](WO) Warm port reset. */ |
| 5160 | #endif /* Word 0 - End */ |
| 5161 | } s; |
| 5162 | /* struct bdk_usbhx_uahc_portscx_s cn; */ |
| 5163 | }; |
| 5164 | typedef union bdk_usbhx_uahc_portscx bdk_usbhx_uahc_portscx_t; |
| 5165 | |
| 5166 | static inline uint64_t BDK_USBHX_UAHC_PORTSCX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 5167 | static inline uint64_t BDK_USBHX_UAHC_PORTSCX(unsigned long a, unsigned long b) |
| 5168 | { |
| 5169 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b<=1))) |
| 5170 | return 0x868000000420ll + 0x1000000000ll * ((a) & 0x1) + 0x10ll * ((b) & 0x1); |
| 5171 | __bdk_csr_fatal("USBHX_UAHC_PORTSCX", 2, a, b, 0, 0); |
| 5172 | } |
| 5173 | |
| 5174 | #define typedef_BDK_USBHX_UAHC_PORTSCX(a,b) bdk_usbhx_uahc_portscx_t |
| 5175 | #define bustype_BDK_USBHX_UAHC_PORTSCX(a,b) BDK_CSR_TYPE_NCB32b |
| 5176 | #define basename_BDK_USBHX_UAHC_PORTSCX(a,b) "USBHX_UAHC_PORTSCX" |
| 5177 | #define device_bar_BDK_USBHX_UAHC_PORTSCX(a,b) 0x0 /* PF_BAR0 */ |
| 5178 | #define busnum_BDK_USBHX_UAHC_PORTSCX(a,b) (a) |
| 5179 | #define arguments_BDK_USBHX_UAHC_PORTSCX(a,b) (a),(b),-1,-1 |
| 5180 | |
| 5181 | /** |
| 5182 | * Register (NCB32b) usbh#_uahc_rtsoff |
| 5183 | * |
| 5184 | * XHCI Runtime Register-Space Offset Register |
| 5185 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.3.8. |
| 5186 | */ |
| 5187 | union bdk_usbhx_uahc_rtsoff |
| 5188 | { |
| 5189 | uint32_t u; |
| 5190 | struct bdk_usbhx_uahc_rtsoff_s |
| 5191 | { |
| 5192 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5193 | uint32_t rtsoff : 27; /**< [ 31: 5](RO) Runtime register-space offset. */ |
| 5194 | uint32_t reserved_0_4 : 5; |
| 5195 | #else /* Word 0 - Little Endian */ |
| 5196 | uint32_t reserved_0_4 : 5; |
| 5197 | uint32_t rtsoff : 27; /**< [ 31: 5](RO) Runtime register-space offset. */ |
| 5198 | #endif /* Word 0 - End */ |
| 5199 | } s; |
| 5200 | /* struct bdk_usbhx_uahc_rtsoff_s cn; */ |
| 5201 | }; |
| 5202 | typedef union bdk_usbhx_uahc_rtsoff bdk_usbhx_uahc_rtsoff_t; |
| 5203 | |
| 5204 | static inline uint64_t BDK_USBHX_UAHC_RTSOFF(unsigned long a) __attribute__ ((pure, always_inline)); |
| 5205 | static inline uint64_t BDK_USBHX_UAHC_RTSOFF(unsigned long a) |
| 5206 | { |
| 5207 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 5208 | return 0x868000000018ll + 0x1000000000ll * ((a) & 0x1); |
| 5209 | __bdk_csr_fatal("USBHX_UAHC_RTSOFF", 1, a, 0, 0, 0); |
| 5210 | } |
| 5211 | |
| 5212 | #define typedef_BDK_USBHX_UAHC_RTSOFF(a) bdk_usbhx_uahc_rtsoff_t |
| 5213 | #define bustype_BDK_USBHX_UAHC_RTSOFF(a) BDK_CSR_TYPE_NCB32b |
| 5214 | #define basename_BDK_USBHX_UAHC_RTSOFF(a) "USBHX_UAHC_RTSOFF" |
| 5215 | #define device_bar_BDK_USBHX_UAHC_RTSOFF(a) 0x0 /* PF_BAR0 */ |
| 5216 | #define busnum_BDK_USBHX_UAHC_RTSOFF(a) (a) |
| 5217 | #define arguments_BDK_USBHX_UAHC_RTSOFF(a) (a),-1,-1,-1 |
| 5218 | |
| 5219 | /** |
| 5220 | * Register (NCB32b) usbh#_uahc_suptprt2_dw0 |
| 5221 | * |
| 5222 | * XHCI Supported-Protocol-Capability (USB 2.0) Register 0 |
| 5223 | * For information on this register, refer to the xHCI Specification, v1.0, section 7.2. |
| 5224 | */ |
| 5225 | union bdk_usbhx_uahc_suptprt2_dw0 |
| 5226 | { |
| 5227 | uint32_t u; |
| 5228 | struct bdk_usbhx_uahc_suptprt2_dw0_s |
| 5229 | { |
| 5230 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5231 | uint32_t majorrev : 8; /**< [ 31: 24](RO) Major revision. */ |
| 5232 | uint32_t minorrev : 8; /**< [ 23: 16](RO) Minor revision. */ |
| 5233 | uint32_t nextcapptr : 8; /**< [ 15: 8](RO) Next capability pointer. */ |
| 5234 | uint32_t capid : 8; /**< [ 7: 0](RO) Capability ID = supported protocol. */ |
| 5235 | #else /* Word 0 - Little Endian */ |
| 5236 | uint32_t capid : 8; /**< [ 7: 0](RO) Capability ID = supported protocol. */ |
| 5237 | uint32_t nextcapptr : 8; /**< [ 15: 8](RO) Next capability pointer. */ |
| 5238 | uint32_t minorrev : 8; /**< [ 23: 16](RO) Minor revision. */ |
| 5239 | uint32_t majorrev : 8; /**< [ 31: 24](RO) Major revision. */ |
| 5240 | #endif /* Word 0 - End */ |
| 5241 | } s; |
| 5242 | /* struct bdk_usbhx_uahc_suptprt2_dw0_s cn; */ |
| 5243 | }; |
| 5244 | typedef union bdk_usbhx_uahc_suptprt2_dw0 bdk_usbhx_uahc_suptprt2_dw0_t; |
| 5245 | |
| 5246 | static inline uint64_t BDK_USBHX_UAHC_SUPTPRT2_DW0(unsigned long a) __attribute__ ((pure, always_inline)); |
| 5247 | static inline uint64_t BDK_USBHX_UAHC_SUPTPRT2_DW0(unsigned long a) |
| 5248 | { |
| 5249 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 5250 | return 0x868000000890ll + 0x1000000000ll * ((a) & 0x1); |
| 5251 | __bdk_csr_fatal("USBHX_UAHC_SUPTPRT2_DW0", 1, a, 0, 0, 0); |
| 5252 | } |
| 5253 | |
| 5254 | #define typedef_BDK_USBHX_UAHC_SUPTPRT2_DW0(a) bdk_usbhx_uahc_suptprt2_dw0_t |
| 5255 | #define bustype_BDK_USBHX_UAHC_SUPTPRT2_DW0(a) BDK_CSR_TYPE_NCB32b |
| 5256 | #define basename_BDK_USBHX_UAHC_SUPTPRT2_DW0(a) "USBHX_UAHC_SUPTPRT2_DW0" |
| 5257 | #define device_bar_BDK_USBHX_UAHC_SUPTPRT2_DW0(a) 0x0 /* PF_BAR0 */ |
| 5258 | #define busnum_BDK_USBHX_UAHC_SUPTPRT2_DW0(a) (a) |
| 5259 | #define arguments_BDK_USBHX_UAHC_SUPTPRT2_DW0(a) (a),-1,-1,-1 |
| 5260 | |
| 5261 | /** |
| 5262 | * Register (NCB32b) usbh#_uahc_suptprt2_dw1 |
| 5263 | * |
| 5264 | * XHCI Supported-Protocol-Capability (USB 2.0) Register 1 |
| 5265 | * For information on this register, refer to the xHCI Specification, v1.0, section 7.2. |
| 5266 | */ |
| 5267 | union bdk_usbhx_uahc_suptprt2_dw1 |
| 5268 | { |
| 5269 | uint32_t u; |
| 5270 | struct bdk_usbhx_uahc_suptprt2_dw1_s |
| 5271 | { |
| 5272 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5273 | uint32_t name : 32; /**< [ 31: 0](RO) Name string: 'USB'. */ |
| 5274 | #else /* Word 0 - Little Endian */ |
| 5275 | uint32_t name : 32; /**< [ 31: 0](RO) Name string: 'USB'. */ |
| 5276 | #endif /* Word 0 - End */ |
| 5277 | } s; |
| 5278 | /* struct bdk_usbhx_uahc_suptprt2_dw1_s cn; */ |
| 5279 | }; |
| 5280 | typedef union bdk_usbhx_uahc_suptprt2_dw1 bdk_usbhx_uahc_suptprt2_dw1_t; |
| 5281 | |
| 5282 | static inline uint64_t BDK_USBHX_UAHC_SUPTPRT2_DW1(unsigned long a) __attribute__ ((pure, always_inline)); |
| 5283 | static inline uint64_t BDK_USBHX_UAHC_SUPTPRT2_DW1(unsigned long a) |
| 5284 | { |
| 5285 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 5286 | return 0x868000000894ll + 0x1000000000ll * ((a) & 0x1); |
| 5287 | __bdk_csr_fatal("USBHX_UAHC_SUPTPRT2_DW1", 1, a, 0, 0, 0); |
| 5288 | } |
| 5289 | |
| 5290 | #define typedef_BDK_USBHX_UAHC_SUPTPRT2_DW1(a) bdk_usbhx_uahc_suptprt2_dw1_t |
| 5291 | #define bustype_BDK_USBHX_UAHC_SUPTPRT2_DW1(a) BDK_CSR_TYPE_NCB32b |
| 5292 | #define basename_BDK_USBHX_UAHC_SUPTPRT2_DW1(a) "USBHX_UAHC_SUPTPRT2_DW1" |
| 5293 | #define device_bar_BDK_USBHX_UAHC_SUPTPRT2_DW1(a) 0x0 /* PF_BAR0 */ |
| 5294 | #define busnum_BDK_USBHX_UAHC_SUPTPRT2_DW1(a) (a) |
| 5295 | #define arguments_BDK_USBHX_UAHC_SUPTPRT2_DW1(a) (a),-1,-1,-1 |
| 5296 | |
| 5297 | /** |
| 5298 | * Register (NCB32b) usbh#_uahc_suptprt2_dw2 |
| 5299 | * |
| 5300 | * XHCI Supported-Protocol-Capability (USB 2.0) Register 2 |
| 5301 | * For information on this register, refer to the xHCI Specification, v1.0, section 7.2. |
| 5302 | */ |
| 5303 | union bdk_usbhx_uahc_suptprt2_dw2 |
| 5304 | { |
| 5305 | uint32_t u; |
| 5306 | struct bdk_usbhx_uahc_suptprt2_dw2_s |
| 5307 | { |
| 5308 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5309 | uint32_t psic : 4; /**< [ 31: 28](RO) Protocol speed ID count. */ |
| 5310 | uint32_t reserved_21_27 : 7; |
| 5311 | uint32_t blc : 1; /**< [ 20: 20](RO) BESL LPM capability. */ |
| 5312 | uint32_t hlc : 1; /**< [ 19: 19](RO) Hardware LMP capability. */ |
| 5313 | uint32_t ihi : 1; /**< [ 18: 18](RO) Integrated hub implemented. */ |
| 5314 | uint32_t hso : 1; /**< [ 17: 17](RO) High-speed only. */ |
| 5315 | uint32_t reserved_16 : 1; |
| 5316 | uint32_t compatprtcnt : 8; /**< [ 15: 8](RO) Compatible port count. */ |
| 5317 | uint32_t compatprtoff : 8; /**< [ 7: 0](RO) Compatible port offset. */ |
| 5318 | #else /* Word 0 - Little Endian */ |
| 5319 | uint32_t compatprtoff : 8; /**< [ 7: 0](RO) Compatible port offset. */ |
| 5320 | uint32_t compatprtcnt : 8; /**< [ 15: 8](RO) Compatible port count. */ |
| 5321 | uint32_t reserved_16 : 1; |
| 5322 | uint32_t hso : 1; /**< [ 17: 17](RO) High-speed only. */ |
| 5323 | uint32_t ihi : 1; /**< [ 18: 18](RO) Integrated hub implemented. */ |
| 5324 | uint32_t hlc : 1; /**< [ 19: 19](RO) Hardware LMP capability. */ |
| 5325 | uint32_t blc : 1; /**< [ 20: 20](RO) BESL LPM capability. */ |
| 5326 | uint32_t reserved_21_27 : 7; |
| 5327 | uint32_t psic : 4; /**< [ 31: 28](RO) Protocol speed ID count. */ |
| 5328 | #endif /* Word 0 - End */ |
| 5329 | } s; |
| 5330 | /* struct bdk_usbhx_uahc_suptprt2_dw2_s cn; */ |
| 5331 | }; |
| 5332 | typedef union bdk_usbhx_uahc_suptprt2_dw2 bdk_usbhx_uahc_suptprt2_dw2_t; |
| 5333 | |
| 5334 | static inline uint64_t BDK_USBHX_UAHC_SUPTPRT2_DW2(unsigned long a) __attribute__ ((pure, always_inline)); |
| 5335 | static inline uint64_t BDK_USBHX_UAHC_SUPTPRT2_DW2(unsigned long a) |
| 5336 | { |
| 5337 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 5338 | return 0x868000000898ll + 0x1000000000ll * ((a) & 0x1); |
| 5339 | __bdk_csr_fatal("USBHX_UAHC_SUPTPRT2_DW2", 1, a, 0, 0, 0); |
| 5340 | } |
| 5341 | |
| 5342 | #define typedef_BDK_USBHX_UAHC_SUPTPRT2_DW2(a) bdk_usbhx_uahc_suptprt2_dw2_t |
| 5343 | #define bustype_BDK_USBHX_UAHC_SUPTPRT2_DW2(a) BDK_CSR_TYPE_NCB32b |
| 5344 | #define basename_BDK_USBHX_UAHC_SUPTPRT2_DW2(a) "USBHX_UAHC_SUPTPRT2_DW2" |
| 5345 | #define device_bar_BDK_USBHX_UAHC_SUPTPRT2_DW2(a) 0x0 /* PF_BAR0 */ |
| 5346 | #define busnum_BDK_USBHX_UAHC_SUPTPRT2_DW2(a) (a) |
| 5347 | #define arguments_BDK_USBHX_UAHC_SUPTPRT2_DW2(a) (a),-1,-1,-1 |
| 5348 | |
| 5349 | /** |
| 5350 | * Register (NCB32b) usbh#_uahc_suptprt2_dw3 |
| 5351 | * |
| 5352 | * XHCI Supported-Protocol-Capability (USB 2.0) Register 3 |
| 5353 | * For information on this register, refer to the xHCI Specification, v1.1, section 7.2. |
| 5354 | */ |
| 5355 | union bdk_usbhx_uahc_suptprt2_dw3 |
| 5356 | { |
| 5357 | uint32_t u; |
| 5358 | struct bdk_usbhx_uahc_suptprt2_dw3_s |
| 5359 | { |
| 5360 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5361 | uint32_t reserved_5_31 : 27; |
| 5362 | uint32_t protslottype : 5; /**< [ 4: 0](RO) Protocol slot type. */ |
| 5363 | #else /* Word 0 - Little Endian */ |
| 5364 | uint32_t protslottype : 5; /**< [ 4: 0](RO) Protocol slot type. */ |
| 5365 | uint32_t reserved_5_31 : 27; |
| 5366 | #endif /* Word 0 - End */ |
| 5367 | } s; |
| 5368 | /* struct bdk_usbhx_uahc_suptprt2_dw3_s cn; */ |
| 5369 | }; |
| 5370 | typedef union bdk_usbhx_uahc_suptprt2_dw3 bdk_usbhx_uahc_suptprt2_dw3_t; |
| 5371 | |
| 5372 | static inline uint64_t BDK_USBHX_UAHC_SUPTPRT2_DW3(unsigned long a) __attribute__ ((pure, always_inline)); |
| 5373 | static inline uint64_t BDK_USBHX_UAHC_SUPTPRT2_DW3(unsigned long a) |
| 5374 | { |
| 5375 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 5376 | return 0x86800000089cll + 0x1000000000ll * ((a) & 0x1); |
| 5377 | __bdk_csr_fatal("USBHX_UAHC_SUPTPRT2_DW3", 1, a, 0, 0, 0); |
| 5378 | } |
| 5379 | |
| 5380 | #define typedef_BDK_USBHX_UAHC_SUPTPRT2_DW3(a) bdk_usbhx_uahc_suptprt2_dw3_t |
| 5381 | #define bustype_BDK_USBHX_UAHC_SUPTPRT2_DW3(a) BDK_CSR_TYPE_NCB32b |
| 5382 | #define basename_BDK_USBHX_UAHC_SUPTPRT2_DW3(a) "USBHX_UAHC_SUPTPRT2_DW3" |
| 5383 | #define device_bar_BDK_USBHX_UAHC_SUPTPRT2_DW3(a) 0x0 /* PF_BAR0 */ |
| 5384 | #define busnum_BDK_USBHX_UAHC_SUPTPRT2_DW3(a) (a) |
| 5385 | #define arguments_BDK_USBHX_UAHC_SUPTPRT2_DW3(a) (a),-1,-1,-1 |
| 5386 | |
| 5387 | /** |
| 5388 | * Register (NCB32b) usbh#_uahc_suptprt3_dw0 |
| 5389 | * |
| 5390 | * XHCI Supported-Protocol-Capability (USB 3.0) Register 0 |
| 5391 | * For information on this register, refer to the xHCI Specification, v1.0, section 7.2. |
| 5392 | */ |
| 5393 | union bdk_usbhx_uahc_suptprt3_dw0 |
| 5394 | { |
| 5395 | uint32_t u; |
| 5396 | struct bdk_usbhx_uahc_suptprt3_dw0_s |
| 5397 | { |
| 5398 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5399 | uint32_t majorrev : 8; /**< [ 31: 24](RO) Major revision. */ |
| 5400 | uint32_t minorrev : 8; /**< [ 23: 16](RO) Minor revision. */ |
| 5401 | uint32_t nextcapptr : 8; /**< [ 15: 8](RO/H) Next capability pointer. Value depends on USBH()_UAHC_GUCTL[EXTCAPSUPTEN]. If EXTCAPSUPTEN |
| 5402 | = |
| 5403 | 0, value is 0x0. If EXTCAPSUPTEN = 1, value is 0x4. */ |
| 5404 | uint32_t capid : 8; /**< [ 7: 0](RO) Capability ID = supported protocol. */ |
| 5405 | #else /* Word 0 - Little Endian */ |
| 5406 | uint32_t capid : 8; /**< [ 7: 0](RO) Capability ID = supported protocol. */ |
| 5407 | uint32_t nextcapptr : 8; /**< [ 15: 8](RO/H) Next capability pointer. Value depends on USBH()_UAHC_GUCTL[EXTCAPSUPTEN]. If EXTCAPSUPTEN |
| 5408 | = |
| 5409 | 0, value is 0x0. If EXTCAPSUPTEN = 1, value is 0x4. */ |
| 5410 | uint32_t minorrev : 8; /**< [ 23: 16](RO) Minor revision. */ |
| 5411 | uint32_t majorrev : 8; /**< [ 31: 24](RO) Major revision. */ |
| 5412 | #endif /* Word 0 - End */ |
| 5413 | } s; |
| 5414 | /* struct bdk_usbhx_uahc_suptprt3_dw0_s cn; */ |
| 5415 | }; |
| 5416 | typedef union bdk_usbhx_uahc_suptprt3_dw0 bdk_usbhx_uahc_suptprt3_dw0_t; |
| 5417 | |
| 5418 | static inline uint64_t BDK_USBHX_UAHC_SUPTPRT3_DW0(unsigned long a) __attribute__ ((pure, always_inline)); |
| 5419 | static inline uint64_t BDK_USBHX_UAHC_SUPTPRT3_DW0(unsigned long a) |
| 5420 | { |
| 5421 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 5422 | return 0x8680000008a0ll + 0x1000000000ll * ((a) & 0x1); |
| 5423 | __bdk_csr_fatal("USBHX_UAHC_SUPTPRT3_DW0", 1, a, 0, 0, 0); |
| 5424 | } |
| 5425 | |
| 5426 | #define typedef_BDK_USBHX_UAHC_SUPTPRT3_DW0(a) bdk_usbhx_uahc_suptprt3_dw0_t |
| 5427 | #define bustype_BDK_USBHX_UAHC_SUPTPRT3_DW0(a) BDK_CSR_TYPE_NCB32b |
| 5428 | #define basename_BDK_USBHX_UAHC_SUPTPRT3_DW0(a) "USBHX_UAHC_SUPTPRT3_DW0" |
| 5429 | #define device_bar_BDK_USBHX_UAHC_SUPTPRT3_DW0(a) 0x0 /* PF_BAR0 */ |
| 5430 | #define busnum_BDK_USBHX_UAHC_SUPTPRT3_DW0(a) (a) |
| 5431 | #define arguments_BDK_USBHX_UAHC_SUPTPRT3_DW0(a) (a),-1,-1,-1 |
| 5432 | |
| 5433 | /** |
| 5434 | * Register (NCB32b) usbh#_uahc_suptprt3_dw1 |
| 5435 | * |
| 5436 | * XHCI Supported-Protocol-Capability (USB 3.0) Register 1 |
| 5437 | * For information on this register, refer to the xHCI Specification, v1.0, section 7.2. |
| 5438 | */ |
| 5439 | union bdk_usbhx_uahc_suptprt3_dw1 |
| 5440 | { |
| 5441 | uint32_t u; |
| 5442 | struct bdk_usbhx_uahc_suptprt3_dw1_s |
| 5443 | { |
| 5444 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5445 | uint32_t name : 32; /**< [ 31: 0](RO) Name string: 'USB'. */ |
| 5446 | #else /* Word 0 - Little Endian */ |
| 5447 | uint32_t name : 32; /**< [ 31: 0](RO) Name string: 'USB'. */ |
| 5448 | #endif /* Word 0 - End */ |
| 5449 | } s; |
| 5450 | /* struct bdk_usbhx_uahc_suptprt3_dw1_s cn; */ |
| 5451 | }; |
| 5452 | typedef union bdk_usbhx_uahc_suptprt3_dw1 bdk_usbhx_uahc_suptprt3_dw1_t; |
| 5453 | |
| 5454 | static inline uint64_t BDK_USBHX_UAHC_SUPTPRT3_DW1(unsigned long a) __attribute__ ((pure, always_inline)); |
| 5455 | static inline uint64_t BDK_USBHX_UAHC_SUPTPRT3_DW1(unsigned long a) |
| 5456 | { |
| 5457 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 5458 | return 0x8680000008a4ll + 0x1000000000ll * ((a) & 0x1); |
| 5459 | __bdk_csr_fatal("USBHX_UAHC_SUPTPRT3_DW1", 1, a, 0, 0, 0); |
| 5460 | } |
| 5461 | |
| 5462 | #define typedef_BDK_USBHX_UAHC_SUPTPRT3_DW1(a) bdk_usbhx_uahc_suptprt3_dw1_t |
| 5463 | #define bustype_BDK_USBHX_UAHC_SUPTPRT3_DW1(a) BDK_CSR_TYPE_NCB32b |
| 5464 | #define basename_BDK_USBHX_UAHC_SUPTPRT3_DW1(a) "USBHX_UAHC_SUPTPRT3_DW1" |
| 5465 | #define device_bar_BDK_USBHX_UAHC_SUPTPRT3_DW1(a) 0x0 /* PF_BAR0 */ |
| 5466 | #define busnum_BDK_USBHX_UAHC_SUPTPRT3_DW1(a) (a) |
| 5467 | #define arguments_BDK_USBHX_UAHC_SUPTPRT3_DW1(a) (a),-1,-1,-1 |
| 5468 | |
| 5469 | /** |
| 5470 | * Register (NCB32b) usbh#_uahc_suptprt3_dw2 |
| 5471 | * |
| 5472 | * XHCI Supported-Protocol-Capability (USB 3.0) Register 2 |
| 5473 | * For information on this register, refer to the xHCI Specification, v1.0, section 7.2. |
| 5474 | */ |
| 5475 | union bdk_usbhx_uahc_suptprt3_dw2 |
| 5476 | { |
| 5477 | uint32_t u; |
| 5478 | struct bdk_usbhx_uahc_suptprt3_dw2_s |
| 5479 | { |
| 5480 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5481 | uint32_t psic : 4; /**< [ 31: 28](RO) Protocol speed ID count. */ |
| 5482 | uint32_t reserved_16_27 : 12; |
| 5483 | uint32_t compatprtcnt : 8; /**< [ 15: 8](RO) Compatible port count. */ |
| 5484 | uint32_t compatprtoff : 8; /**< [ 7: 0](RO) Compatible port offset. */ |
| 5485 | #else /* Word 0 - Little Endian */ |
| 5486 | uint32_t compatprtoff : 8; /**< [ 7: 0](RO) Compatible port offset. */ |
| 5487 | uint32_t compatprtcnt : 8; /**< [ 15: 8](RO) Compatible port count. */ |
| 5488 | uint32_t reserved_16_27 : 12; |
| 5489 | uint32_t psic : 4; /**< [ 31: 28](RO) Protocol speed ID count. */ |
| 5490 | #endif /* Word 0 - End */ |
| 5491 | } s; |
| 5492 | /* struct bdk_usbhx_uahc_suptprt3_dw2_s cn; */ |
| 5493 | }; |
| 5494 | typedef union bdk_usbhx_uahc_suptprt3_dw2 bdk_usbhx_uahc_suptprt3_dw2_t; |
| 5495 | |
| 5496 | static inline uint64_t BDK_USBHX_UAHC_SUPTPRT3_DW2(unsigned long a) __attribute__ ((pure, always_inline)); |
| 5497 | static inline uint64_t BDK_USBHX_UAHC_SUPTPRT3_DW2(unsigned long a) |
| 5498 | { |
| 5499 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 5500 | return 0x8680000008a8ll + 0x1000000000ll * ((a) & 0x1); |
| 5501 | __bdk_csr_fatal("USBHX_UAHC_SUPTPRT3_DW2", 1, a, 0, 0, 0); |
| 5502 | } |
| 5503 | |
| 5504 | #define typedef_BDK_USBHX_UAHC_SUPTPRT3_DW2(a) bdk_usbhx_uahc_suptprt3_dw2_t |
| 5505 | #define bustype_BDK_USBHX_UAHC_SUPTPRT3_DW2(a) BDK_CSR_TYPE_NCB32b |
| 5506 | #define basename_BDK_USBHX_UAHC_SUPTPRT3_DW2(a) "USBHX_UAHC_SUPTPRT3_DW2" |
| 5507 | #define device_bar_BDK_USBHX_UAHC_SUPTPRT3_DW2(a) 0x0 /* PF_BAR0 */ |
| 5508 | #define busnum_BDK_USBHX_UAHC_SUPTPRT3_DW2(a) (a) |
| 5509 | #define arguments_BDK_USBHX_UAHC_SUPTPRT3_DW2(a) (a),-1,-1,-1 |
| 5510 | |
| 5511 | /** |
| 5512 | * Register (NCB32b) usbh#_uahc_suptprt3_dw3 |
| 5513 | * |
| 5514 | * XHCI Supported-Protocol-Capability (USB 3.0) Register 3 |
| 5515 | * For information on this register, refer to the xHCI Specification, v1.1, section 7.2. |
| 5516 | */ |
| 5517 | union bdk_usbhx_uahc_suptprt3_dw3 |
| 5518 | { |
| 5519 | uint32_t u; |
| 5520 | struct bdk_usbhx_uahc_suptprt3_dw3_s |
| 5521 | { |
| 5522 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5523 | uint32_t reserved_5_31 : 27; |
| 5524 | uint32_t protslottype : 5; /**< [ 4: 0](RO) Protocol slot type. */ |
| 5525 | #else /* Word 0 - Little Endian */ |
| 5526 | uint32_t protslottype : 5; /**< [ 4: 0](RO) Protocol slot type. */ |
| 5527 | uint32_t reserved_5_31 : 27; |
| 5528 | #endif /* Word 0 - End */ |
| 5529 | } s; |
| 5530 | /* struct bdk_usbhx_uahc_suptprt3_dw3_s cn; */ |
| 5531 | }; |
| 5532 | typedef union bdk_usbhx_uahc_suptprt3_dw3 bdk_usbhx_uahc_suptprt3_dw3_t; |
| 5533 | |
| 5534 | static inline uint64_t BDK_USBHX_UAHC_SUPTPRT3_DW3(unsigned long a) __attribute__ ((pure, always_inline)); |
| 5535 | static inline uint64_t BDK_USBHX_UAHC_SUPTPRT3_DW3(unsigned long a) |
| 5536 | { |
| 5537 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 5538 | return 0x8680000008acll + 0x1000000000ll * ((a) & 0x1); |
| 5539 | __bdk_csr_fatal("USBHX_UAHC_SUPTPRT3_DW3", 1, a, 0, 0, 0); |
| 5540 | } |
| 5541 | |
| 5542 | #define typedef_BDK_USBHX_UAHC_SUPTPRT3_DW3(a) bdk_usbhx_uahc_suptprt3_dw3_t |
| 5543 | #define bustype_BDK_USBHX_UAHC_SUPTPRT3_DW3(a) BDK_CSR_TYPE_NCB32b |
| 5544 | #define basename_BDK_USBHX_UAHC_SUPTPRT3_DW3(a) "USBHX_UAHC_SUPTPRT3_DW3" |
| 5545 | #define device_bar_BDK_USBHX_UAHC_SUPTPRT3_DW3(a) 0x0 /* PF_BAR0 */ |
| 5546 | #define busnum_BDK_USBHX_UAHC_SUPTPRT3_DW3(a) (a) |
| 5547 | #define arguments_BDK_USBHX_UAHC_SUPTPRT3_DW3(a) (a),-1,-1,-1 |
| 5548 | |
| 5549 | /** |
| 5550 | * Register (NCB32b) usbh#_uahc_usbcmd |
| 5551 | * |
| 5552 | * XHCI Command Register |
| 5553 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.4.1. |
| 5554 | * |
| 5555 | * This register can be reset by NCB reset, |
| 5556 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 5557 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 5558 | * or USBH()_UAHC_USBCMD[HCRST], or USBH()_UAHC_USBCMD[LHCRST]. |
| 5559 | */ |
| 5560 | union bdk_usbhx_uahc_usbcmd |
| 5561 | { |
| 5562 | uint32_t u; |
| 5563 | struct bdk_usbhx_uahc_usbcmd_s |
| 5564 | { |
| 5565 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5566 | uint32_t reserved_12_31 : 20; |
| 5567 | uint32_t eu3s : 1; /**< [ 11: 11](R/W) Enable U3 MFINDEX stop. */ |
| 5568 | uint32_t ewe : 1; /**< [ 10: 10](R/W) Enable wrap event. */ |
| 5569 | uint32_t crs : 1; /**< [ 9: 9](WO) Controller restore state. */ |
| 5570 | uint32_t css : 1; /**< [ 8: 8](WO) Controller save state. */ |
| 5571 | uint32_t lhcrst : 1; /**< [ 7: 7](R/W1S/H) Light host controller reset. */ |
| 5572 | uint32_t reserved_4_6 : 3; |
| 5573 | uint32_t hsee : 1; /**< [ 3: 3](R/W) Host system error enable. */ |
| 5574 | uint32_t inte : 1; /**< [ 2: 2](R/W) Interrupter enable. */ |
| 5575 | uint32_t hcrst : 1; /**< [ 1: 1](R/W1S/H) Host controller reset. */ |
| 5576 | uint32_t r_s : 1; /**< [ 0: 0](R/W) Run/stop. */ |
| 5577 | #else /* Word 0 - Little Endian */ |
| 5578 | uint32_t r_s : 1; /**< [ 0: 0](R/W) Run/stop. */ |
| 5579 | uint32_t hcrst : 1; /**< [ 1: 1](R/W1S/H) Host controller reset. */ |
| 5580 | uint32_t inte : 1; /**< [ 2: 2](R/W) Interrupter enable. */ |
| 5581 | uint32_t hsee : 1; /**< [ 3: 3](R/W) Host system error enable. */ |
| 5582 | uint32_t reserved_4_6 : 3; |
| 5583 | uint32_t lhcrst : 1; /**< [ 7: 7](R/W1S/H) Light host controller reset. */ |
| 5584 | uint32_t css : 1; /**< [ 8: 8](WO) Controller save state. */ |
| 5585 | uint32_t crs : 1; /**< [ 9: 9](WO) Controller restore state. */ |
| 5586 | uint32_t ewe : 1; /**< [ 10: 10](R/W) Enable wrap event. */ |
| 5587 | uint32_t eu3s : 1; /**< [ 11: 11](R/W) Enable U3 MFINDEX stop. */ |
| 5588 | uint32_t reserved_12_31 : 20; |
| 5589 | #endif /* Word 0 - End */ |
| 5590 | } s; |
| 5591 | /* struct bdk_usbhx_uahc_usbcmd_s cn; */ |
| 5592 | }; |
| 5593 | typedef union bdk_usbhx_uahc_usbcmd bdk_usbhx_uahc_usbcmd_t; |
| 5594 | |
| 5595 | static inline uint64_t BDK_USBHX_UAHC_USBCMD(unsigned long a) __attribute__ ((pure, always_inline)); |
| 5596 | static inline uint64_t BDK_USBHX_UAHC_USBCMD(unsigned long a) |
| 5597 | { |
| 5598 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 5599 | return 0x868000000020ll + 0x1000000000ll * ((a) & 0x1); |
| 5600 | __bdk_csr_fatal("USBHX_UAHC_USBCMD", 1, a, 0, 0, 0); |
| 5601 | } |
| 5602 | |
| 5603 | #define typedef_BDK_USBHX_UAHC_USBCMD(a) bdk_usbhx_uahc_usbcmd_t |
| 5604 | #define bustype_BDK_USBHX_UAHC_USBCMD(a) BDK_CSR_TYPE_NCB32b |
| 5605 | #define basename_BDK_USBHX_UAHC_USBCMD(a) "USBHX_UAHC_USBCMD" |
| 5606 | #define device_bar_BDK_USBHX_UAHC_USBCMD(a) 0x0 /* PF_BAR0 */ |
| 5607 | #define busnum_BDK_USBHX_UAHC_USBCMD(a) (a) |
| 5608 | #define arguments_BDK_USBHX_UAHC_USBCMD(a) (a),-1,-1,-1 |
| 5609 | |
| 5610 | /** |
| 5611 | * Register (NCB32b) usbh#_uahc_usblegctlsts |
| 5612 | * |
| 5613 | * XHCI Legacy Support Control/Status Register |
| 5614 | * For information on this register, refer to the xHCI Specification, v1.0, section 7.1.2. Note |
| 5615 | * that the SMI interrupts are not connected to anything in a CNXXXX configuration. |
| 5616 | * |
| 5617 | * This register can be reset by NCB reset, |
| 5618 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 5619 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 5620 | * or USBH()_UAHC_USBCMD[HCRST], or USBH()_UAHC_USBCMD[LHCRST]. |
| 5621 | */ |
| 5622 | union bdk_usbhx_uahc_usblegctlsts |
| 5623 | { |
| 5624 | uint32_t u; |
| 5625 | struct bdk_usbhx_uahc_usblegctlsts_s |
| 5626 | { |
| 5627 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5628 | uint32_t smi_on_bar : 1; /**< [ 31: 31](R/W1C/H) System management interrupt on BAR. Never generated. */ |
| 5629 | uint32_t smi_on_pci_command : 1; /**< [ 30: 30](R/W1C/H) System management interrupt on PCI command. Never generated. */ |
| 5630 | uint32_t smi_on_os_ownership : 1; /**< [ 29: 29](R/W1C/H) System management interrupt on OS ownership change. This bit is set to 1 whenever |
| 5631 | USBH()_UAHC_USBLEGSUP[HC_OS_OWNED_SEMAPHORES] transitions. */ |
| 5632 | uint32_t reserved_21_28 : 8; |
| 5633 | uint32_t smi_on_hostsystemerr : 1; /**< [ 20: 20](RO/H) System-management interrupt on host-system error. Shadow bit of USBH()_UAHC_USBSTS[HSE]. |
| 5634 | Refer to |
| 5635 | xHCI Section 5.4.2 for definition and effects of the events associated with this bit being |
| 5636 | set to 1. |
| 5637 | |
| 5638 | To clear this bit to a 0, system software must write a 1 to USBH()_UAHC_USBSTS[HSE]. */ |
| 5639 | uint32_t reserved_17_19 : 3; |
| 5640 | uint32_t smi_on_event_interrupt : 1; /**< [ 16: 16](RO/H) System-management interrupt on event interrupt. Shadow bit of USBH()_UAHC_USBSTS[EINT]. |
| 5641 | Refer to |
| 5642 | xHCI Section 5.4.2 for definition. This bit automatically clears when [EINT] clears and |
| 5643 | sets when [EINT] sets. */ |
| 5644 | uint32_t smi_on_bar_en : 1; /**< [ 15: 15](R/W) System-management interrupt on BAR enable. */ |
| 5645 | uint32_t smi_on_pci_command_en : 1; /**< [ 14: 14](R/W) System-management interrupt on PCI command enable. */ |
| 5646 | uint32_t smi_on_os_ownership_en : 1; /**< [ 13: 13](R/W) System-management interrupt on OS ownership enable. */ |
| 5647 | uint32_t reserved_5_12 : 8; |
| 5648 | uint32_t smi_on_hostsystemerr_en : 1;/**< [ 4: 4](R/W) System-management interrupt on host-system error enable */ |
| 5649 | uint32_t reserved_1_3 : 3; |
| 5650 | uint32_t usb_smi_en : 1; /**< [ 0: 0](R/W) USB system-management interrupt enable. */ |
| 5651 | #else /* Word 0 - Little Endian */ |
| 5652 | uint32_t usb_smi_en : 1; /**< [ 0: 0](R/W) USB system-management interrupt enable. */ |
| 5653 | uint32_t reserved_1_3 : 3; |
| 5654 | uint32_t smi_on_hostsystemerr_en : 1;/**< [ 4: 4](R/W) System-management interrupt on host-system error enable */ |
| 5655 | uint32_t reserved_5_12 : 8; |
| 5656 | uint32_t smi_on_os_ownership_en : 1; /**< [ 13: 13](R/W) System-management interrupt on OS ownership enable. */ |
| 5657 | uint32_t smi_on_pci_command_en : 1; /**< [ 14: 14](R/W) System-management interrupt on PCI command enable. */ |
| 5658 | uint32_t smi_on_bar_en : 1; /**< [ 15: 15](R/W) System-management interrupt on BAR enable. */ |
| 5659 | uint32_t smi_on_event_interrupt : 1; /**< [ 16: 16](RO/H) System-management interrupt on event interrupt. Shadow bit of USBH()_UAHC_USBSTS[EINT]. |
| 5660 | Refer to |
| 5661 | xHCI Section 5.4.2 for definition. This bit automatically clears when [EINT] clears and |
| 5662 | sets when [EINT] sets. */ |
| 5663 | uint32_t reserved_17_19 : 3; |
| 5664 | uint32_t smi_on_hostsystemerr : 1; /**< [ 20: 20](RO/H) System-management interrupt on host-system error. Shadow bit of USBH()_UAHC_USBSTS[HSE]. |
| 5665 | Refer to |
| 5666 | xHCI Section 5.4.2 for definition and effects of the events associated with this bit being |
| 5667 | set to 1. |
| 5668 | |
| 5669 | To clear this bit to a 0, system software must write a 1 to USBH()_UAHC_USBSTS[HSE]. */ |
| 5670 | uint32_t reserved_21_28 : 8; |
| 5671 | uint32_t smi_on_os_ownership : 1; /**< [ 29: 29](R/W1C/H) System management interrupt on OS ownership change. This bit is set to 1 whenever |
| 5672 | USBH()_UAHC_USBLEGSUP[HC_OS_OWNED_SEMAPHORES] transitions. */ |
| 5673 | uint32_t smi_on_pci_command : 1; /**< [ 30: 30](R/W1C/H) System management interrupt on PCI command. Never generated. */ |
| 5674 | uint32_t smi_on_bar : 1; /**< [ 31: 31](R/W1C/H) System management interrupt on BAR. Never generated. */ |
| 5675 | #endif /* Word 0 - End */ |
| 5676 | } s; |
| 5677 | /* struct bdk_usbhx_uahc_usblegctlsts_s cn; */ |
| 5678 | }; |
| 5679 | typedef union bdk_usbhx_uahc_usblegctlsts bdk_usbhx_uahc_usblegctlsts_t; |
| 5680 | |
| 5681 | static inline uint64_t BDK_USBHX_UAHC_USBLEGCTLSTS(unsigned long a) __attribute__ ((pure, always_inline)); |
| 5682 | static inline uint64_t BDK_USBHX_UAHC_USBLEGCTLSTS(unsigned long a) |
| 5683 | { |
| 5684 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 5685 | return 0x868000000884ll + 0x1000000000ll * ((a) & 0x1); |
| 5686 | __bdk_csr_fatal("USBHX_UAHC_USBLEGCTLSTS", 1, a, 0, 0, 0); |
| 5687 | } |
| 5688 | |
| 5689 | #define typedef_BDK_USBHX_UAHC_USBLEGCTLSTS(a) bdk_usbhx_uahc_usblegctlsts_t |
| 5690 | #define bustype_BDK_USBHX_UAHC_USBLEGCTLSTS(a) BDK_CSR_TYPE_NCB32b |
| 5691 | #define basename_BDK_USBHX_UAHC_USBLEGCTLSTS(a) "USBHX_UAHC_USBLEGCTLSTS" |
| 5692 | #define device_bar_BDK_USBHX_UAHC_USBLEGCTLSTS(a) 0x0 /* PF_BAR0 */ |
| 5693 | #define busnum_BDK_USBHX_UAHC_USBLEGCTLSTS(a) (a) |
| 5694 | #define arguments_BDK_USBHX_UAHC_USBLEGCTLSTS(a) (a),-1,-1,-1 |
| 5695 | |
| 5696 | /** |
| 5697 | * Register (NCB32b) usbh#_uahc_usblegsup |
| 5698 | * |
| 5699 | * XHCI Legacy Support Capability Register |
| 5700 | * For information on this register, refer to the xHCI Specification, v1.0, section 7.1.1. |
| 5701 | * |
| 5702 | * This register can be reset by NCB reset, |
| 5703 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 5704 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 5705 | * or USBH()_UAHC_USBCMD[HCRST], or USBH()_UAHC_USBCMD[LHCRST]. |
| 5706 | */ |
| 5707 | union bdk_usbhx_uahc_usblegsup |
| 5708 | { |
| 5709 | uint32_t u; |
| 5710 | struct bdk_usbhx_uahc_usblegsup_s |
| 5711 | { |
| 5712 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5713 | uint32_t reserved_25_31 : 7; |
| 5714 | uint32_t hc_os_owned_semaphores : 1; /**< [ 24: 24](R/W) HC OS-owned semaphore. */ |
| 5715 | uint32_t reserved_17_23 : 7; |
| 5716 | uint32_t hc_bios_owned_semaphores : 1;/**< [ 16: 16](R/W) HC BIOS-owned semaphore. */ |
| 5717 | uint32_t nextcapptr : 8; /**< [ 15: 8](RO) Next xHCI extended-capability pointer. */ |
| 5718 | uint32_t capid : 8; /**< [ 7: 0](RO) Capability ID = USB legacy support. */ |
| 5719 | #else /* Word 0 - Little Endian */ |
| 5720 | uint32_t capid : 8; /**< [ 7: 0](RO) Capability ID = USB legacy support. */ |
| 5721 | uint32_t nextcapptr : 8; /**< [ 15: 8](RO) Next xHCI extended-capability pointer. */ |
| 5722 | uint32_t hc_bios_owned_semaphores : 1;/**< [ 16: 16](R/W) HC BIOS-owned semaphore. */ |
| 5723 | uint32_t reserved_17_23 : 7; |
| 5724 | uint32_t hc_os_owned_semaphores : 1; /**< [ 24: 24](R/W) HC OS-owned semaphore. */ |
| 5725 | uint32_t reserved_25_31 : 7; |
| 5726 | #endif /* Word 0 - End */ |
| 5727 | } s; |
| 5728 | /* struct bdk_usbhx_uahc_usblegsup_s cn; */ |
| 5729 | }; |
| 5730 | typedef union bdk_usbhx_uahc_usblegsup bdk_usbhx_uahc_usblegsup_t; |
| 5731 | |
| 5732 | static inline uint64_t BDK_USBHX_UAHC_USBLEGSUP(unsigned long a) __attribute__ ((pure, always_inline)); |
| 5733 | static inline uint64_t BDK_USBHX_UAHC_USBLEGSUP(unsigned long a) |
| 5734 | { |
| 5735 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 5736 | return 0x868000000880ll + 0x1000000000ll * ((a) & 0x1); |
| 5737 | __bdk_csr_fatal("USBHX_UAHC_USBLEGSUP", 1, a, 0, 0, 0); |
| 5738 | } |
| 5739 | |
| 5740 | #define typedef_BDK_USBHX_UAHC_USBLEGSUP(a) bdk_usbhx_uahc_usblegsup_t |
| 5741 | #define bustype_BDK_USBHX_UAHC_USBLEGSUP(a) BDK_CSR_TYPE_NCB32b |
| 5742 | #define basename_BDK_USBHX_UAHC_USBLEGSUP(a) "USBHX_UAHC_USBLEGSUP" |
| 5743 | #define device_bar_BDK_USBHX_UAHC_USBLEGSUP(a) 0x0 /* PF_BAR0 */ |
| 5744 | #define busnum_BDK_USBHX_UAHC_USBLEGSUP(a) (a) |
| 5745 | #define arguments_BDK_USBHX_UAHC_USBLEGSUP(a) (a),-1,-1,-1 |
| 5746 | |
| 5747 | /** |
| 5748 | * Register (NCB32b) usbh#_uahc_usbsts |
| 5749 | * |
| 5750 | * XHCI Status Register |
| 5751 | * For information on this register, refer to the xHCI Specification, v1.0, section 5.4.2. |
| 5752 | * |
| 5753 | * This register can be reset by NCB reset, |
| 5754 | * or USBH()_UCTL_CTL[UAHC_RST], |
| 5755 | * or USBH()_UAHC_GCTL[CORESOFTRESET], |
| 5756 | * or USBH()_UAHC_USBCMD[HCRST], or USBH()_UAHC_USBCMD[LHCRST]. |
| 5757 | */ |
| 5758 | union bdk_usbhx_uahc_usbsts |
| 5759 | { |
| 5760 | uint32_t u; |
| 5761 | struct bdk_usbhx_uahc_usbsts_s |
| 5762 | { |
| 5763 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5764 | uint32_t reserved_13_31 : 19; |
| 5765 | uint32_t hce : 1; /**< [ 12: 12](RO/H) Host controller error. */ |
| 5766 | uint32_t cnr : 1; /**< [ 11: 11](RO/H) Controller not ready. */ |
| 5767 | uint32_t sre : 1; /**< [ 10: 10](R/W1C/H) Save/restore error. */ |
| 5768 | uint32_t rss : 1; /**< [ 9: 9](RO/H) Restore state status. */ |
| 5769 | uint32_t sss : 1; /**< [ 8: 8](RO/H) Save state status. */ |
| 5770 | uint32_t reserved_5_7 : 3; |
| 5771 | uint32_t pcd : 1; /**< [ 4: 4](R/W1C/H) Port change detect. */ |
| 5772 | uint32_t eint : 1; /**< [ 3: 3](R/W1C/H) Event interrupt. */ |
| 5773 | uint32_t hse : 1; /**< [ 2: 2](R/W1C/H) Host system error. The typical software response to an HSE is to reset the core. */ |
| 5774 | uint32_t reserved_1 : 1; |
| 5775 | uint32_t hch : 1; /**< [ 0: 0](RO/H) HC halted. */ |
| 5776 | #else /* Word 0 - Little Endian */ |
| 5777 | uint32_t hch : 1; /**< [ 0: 0](RO/H) HC halted. */ |
| 5778 | uint32_t reserved_1 : 1; |
| 5779 | uint32_t hse : 1; /**< [ 2: 2](R/W1C/H) Host system error. The typical software response to an HSE is to reset the core. */ |
| 5780 | uint32_t eint : 1; /**< [ 3: 3](R/W1C/H) Event interrupt. */ |
| 5781 | uint32_t pcd : 1; /**< [ 4: 4](R/W1C/H) Port change detect. */ |
| 5782 | uint32_t reserved_5_7 : 3; |
| 5783 | uint32_t sss : 1; /**< [ 8: 8](RO/H) Save state status. */ |
| 5784 | uint32_t rss : 1; /**< [ 9: 9](RO/H) Restore state status. */ |
| 5785 | uint32_t sre : 1; /**< [ 10: 10](R/W1C/H) Save/restore error. */ |
| 5786 | uint32_t cnr : 1; /**< [ 11: 11](RO/H) Controller not ready. */ |
| 5787 | uint32_t hce : 1; /**< [ 12: 12](RO/H) Host controller error. */ |
| 5788 | uint32_t reserved_13_31 : 19; |
| 5789 | #endif /* Word 0 - End */ |
| 5790 | } s; |
| 5791 | /* struct bdk_usbhx_uahc_usbsts_s cn; */ |
| 5792 | }; |
| 5793 | typedef union bdk_usbhx_uahc_usbsts bdk_usbhx_uahc_usbsts_t; |
| 5794 | |
| 5795 | static inline uint64_t BDK_USBHX_UAHC_USBSTS(unsigned long a) __attribute__ ((pure, always_inline)); |
| 5796 | static inline uint64_t BDK_USBHX_UAHC_USBSTS(unsigned long a) |
| 5797 | { |
| 5798 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 5799 | return 0x868000000024ll + 0x1000000000ll * ((a) & 0x1); |
| 5800 | __bdk_csr_fatal("USBHX_UAHC_USBSTS", 1, a, 0, 0, 0); |
| 5801 | } |
| 5802 | |
| 5803 | #define typedef_BDK_USBHX_UAHC_USBSTS(a) bdk_usbhx_uahc_usbsts_t |
| 5804 | #define bustype_BDK_USBHX_UAHC_USBSTS(a) BDK_CSR_TYPE_NCB32b |
| 5805 | #define basename_BDK_USBHX_UAHC_USBSTS(a) "USBHX_UAHC_USBSTS" |
| 5806 | #define device_bar_BDK_USBHX_UAHC_USBSTS(a) 0x0 /* PF_BAR0 */ |
| 5807 | #define busnum_BDK_USBHX_UAHC_USBSTS(a) (a) |
| 5808 | #define arguments_BDK_USBHX_UAHC_USBSTS(a) (a),-1,-1,-1 |
| 5809 | |
| 5810 | /** |
| 5811 | * Register (NCB) usbh#_uctl_bist_status |
| 5812 | * |
| 5813 | * UCTL BIST Status Register |
| 5814 | * This register indicates the results from the built-in self-test (BIST) runs of USBH memories. |
| 5815 | * A 0 indicates pass or never run, a 1 indicates fail. This register can be reset by NCB reset. |
| 5816 | */ |
| 5817 | union bdk_usbhx_uctl_bist_status |
| 5818 | { |
| 5819 | uint64_t u; |
| 5820 | struct bdk_usbhx_uctl_bist_status_s |
| 5821 | { |
| 5822 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5823 | uint64_t reserved_42_63 : 22; |
| 5824 | uint64_t uctl_xm_r_bist_ndone : 1; /**< [ 41: 41](RO/H) BIST is not complete for the UCTL AxiMaster read-data FIFO. */ |
| 5825 | uint64_t uctl_xm_w_bist_ndone : 1; /**< [ 40: 40](RO/H) BIST is not complete for the UCTL AxiMaster write-data FIFO. */ |
| 5826 | uint64_t reserved_35_39 : 5; |
| 5827 | uint64_t uahc_ram2_bist_ndone : 1; /**< [ 34: 34](RO/H) BIST is not complete for the UAHC RxFIFO RAM (RAM2). */ |
| 5828 | uint64_t uahc_ram1_bist_ndone : 1; /**< [ 33: 33](RO/H) BIST is not complete for the UAHC TxFIFO RAM (RAM1). */ |
| 5829 | uint64_t uahc_ram0_bist_ndone : 1; /**< [ 32: 32](RO/H) BIST is not complete for the UAHC descriptor/register cache (RAM0). */ |
| 5830 | uint64_t reserved_10_31 : 22; |
| 5831 | uint64_t uctl_xm_r_bist_status : 1; /**< [ 9: 9](RO/H) BIST status of the UCTL AxiMaster read-data FIFO. */ |
| 5832 | uint64_t uctl_xm_w_bist_status : 1; /**< [ 8: 8](RO/H) BIST status of the UCTL AxiMaster write-data FIFO. */ |
| 5833 | uint64_t reserved_3_7 : 5; |
| 5834 | uint64_t uahc_ram2_bist_status : 1; /**< [ 2: 2](RO/H) BIST status of the UAHC RxFIFO RAM (RAM2). */ |
| 5835 | uint64_t uahc_ram1_bist_status : 1; /**< [ 1: 1](RO/H) BIST status of the UAHC TxFIFO RAM (RAM1). */ |
| 5836 | uint64_t uahc_ram0_bist_status : 1; /**< [ 0: 0](RO/H) BIST status of the UAHC descriptor/register cache (RAM0). */ |
| 5837 | #else /* Word 0 - Little Endian */ |
| 5838 | uint64_t uahc_ram0_bist_status : 1; /**< [ 0: 0](RO/H) BIST status of the UAHC descriptor/register cache (RAM0). */ |
| 5839 | uint64_t uahc_ram1_bist_status : 1; /**< [ 1: 1](RO/H) BIST status of the UAHC TxFIFO RAM (RAM1). */ |
| 5840 | uint64_t uahc_ram2_bist_status : 1; /**< [ 2: 2](RO/H) BIST status of the UAHC RxFIFO RAM (RAM2). */ |
| 5841 | uint64_t reserved_3_7 : 5; |
| 5842 | uint64_t uctl_xm_w_bist_status : 1; /**< [ 8: 8](RO/H) BIST status of the UCTL AxiMaster write-data FIFO. */ |
| 5843 | uint64_t uctl_xm_r_bist_status : 1; /**< [ 9: 9](RO/H) BIST status of the UCTL AxiMaster read-data FIFO. */ |
| 5844 | uint64_t reserved_10_31 : 22; |
| 5845 | uint64_t uahc_ram0_bist_ndone : 1; /**< [ 32: 32](RO/H) BIST is not complete for the UAHC descriptor/register cache (RAM0). */ |
| 5846 | uint64_t uahc_ram1_bist_ndone : 1; /**< [ 33: 33](RO/H) BIST is not complete for the UAHC TxFIFO RAM (RAM1). */ |
| 5847 | uint64_t uahc_ram2_bist_ndone : 1; /**< [ 34: 34](RO/H) BIST is not complete for the UAHC RxFIFO RAM (RAM2). */ |
| 5848 | uint64_t reserved_35_39 : 5; |
| 5849 | uint64_t uctl_xm_w_bist_ndone : 1; /**< [ 40: 40](RO/H) BIST is not complete for the UCTL AxiMaster write-data FIFO. */ |
| 5850 | uint64_t uctl_xm_r_bist_ndone : 1; /**< [ 41: 41](RO/H) BIST is not complete for the UCTL AxiMaster read-data FIFO. */ |
| 5851 | uint64_t reserved_42_63 : 22; |
| 5852 | #endif /* Word 0 - End */ |
| 5853 | } s; |
| 5854 | /* struct bdk_usbhx_uctl_bist_status_s cn; */ |
| 5855 | }; |
| 5856 | typedef union bdk_usbhx_uctl_bist_status bdk_usbhx_uctl_bist_status_t; |
| 5857 | |
| 5858 | static inline uint64_t BDK_USBHX_UCTL_BIST_STATUS(unsigned long a) __attribute__ ((pure, always_inline)); |
| 5859 | static inline uint64_t BDK_USBHX_UCTL_BIST_STATUS(unsigned long a) |
| 5860 | { |
| 5861 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 5862 | return 0x868000100008ll + 0x1000000000ll * ((a) & 0x1); |
| 5863 | __bdk_csr_fatal("USBHX_UCTL_BIST_STATUS", 1, a, 0, 0, 0); |
| 5864 | } |
| 5865 | |
| 5866 | #define typedef_BDK_USBHX_UCTL_BIST_STATUS(a) bdk_usbhx_uctl_bist_status_t |
| 5867 | #define bustype_BDK_USBHX_UCTL_BIST_STATUS(a) BDK_CSR_TYPE_NCB |
| 5868 | #define basename_BDK_USBHX_UCTL_BIST_STATUS(a) "USBHX_UCTL_BIST_STATUS" |
| 5869 | #define device_bar_BDK_USBHX_UCTL_BIST_STATUS(a) 0x0 /* PF_BAR0 */ |
| 5870 | #define busnum_BDK_USBHX_UCTL_BIST_STATUS(a) (a) |
| 5871 | #define arguments_BDK_USBHX_UCTL_BIST_STATUS(a) (a),-1,-1,-1 |
| 5872 | |
| 5873 | /** |
| 5874 | * Register (NCB) usbh#_uctl_ctl |
| 5875 | * |
| 5876 | * UCTL Control Register |
| 5877 | * This register controls clocks, resets, power, and BIST. |
| 5878 | * |
| 5879 | * This register can be reset by NCB reset. |
| 5880 | */ |
| 5881 | union bdk_usbhx_uctl_ctl |
| 5882 | { |
| 5883 | uint64_t u; |
| 5884 | struct bdk_usbhx_uctl_ctl_s |
| 5885 | { |
| 5886 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 5887 | uint64_t clear_bist : 1; /**< [ 63: 63](R/W) BIST fast-clear mode select. A BIST run with this bit set clears all entries in USBH RAMs |
| 5888 | to 0x0. |
| 5889 | |
| 5890 | There are two major modes of BIST: full and clear. Full BIST is run by the BIST state |
| 5891 | machine when [CLEAR_BIST] is deasserted during BIST. Clear BIST is run if [CLEAR_BIST] is |
| 5892 | asserted during BIST. |
| 5893 | |
| 5894 | To avoid race conditions, software must first perform a CSR write operation that puts the |
| 5895 | [CLEAR_BIST] setting into the correct state and then perform another CSR write operation |
| 5896 | to |
| 5897 | set the BIST trigger (keeping the [CLEAR_BIST] state constant). |
| 5898 | CLEAR BIST completion is indicated by USBH()_UCTL_BIST_STATUS. A BIST clear operation |
| 5899 | takes almost 2,000 controller-clock cycles for the largest RAM. */ |
| 5900 | uint64_t start_bist : 1; /**< [ 62: 62](R/W) Rising edge starts BIST on the memories in USBH. |
| 5901 | To run BIST, the controller clock must be both configured and enabled, and should be |
| 5902 | configured to the maximum available frequency given the available coprocessor clock and |
| 5903 | dividers. |
| 5904 | Also, the UCTL, UAHC, and UPHY should be held in software- initiated reset (using |
| 5905 | [UPHY_RST], [UAHC_RST], [UCTL_RST]) until BIST is complete. |
| 5906 | BIST defect status can be checked after FULL BIST completion, both of which are indicated |
| 5907 | in USBH()_UCTL_BIST_STATUS. The full BIST run takes almost 80,000 controller-clock cycles |
| 5908 | for |
| 5909 | the largest RAM. */ |
| 5910 | uint64_t ref_clk_sel : 2; /**< [ 61: 60](R/W) Reference clock select. Choose reference-clock source for the SuperSpeed and high-speed |
| 5911 | PLL blocks. |
| 5912 | 0x0 = Reference clock source for both PLLs come from the USB pads. |
| 5913 | 0x1 = Reserved. |
| 5914 | 0x2 = Reserved. |
| 5915 | 0x3 = Reserved. |
| 5916 | |
| 5917 | This value can be changed only during UPHY_RST. |
| 5918 | |
| 5919 | If REF_CLK_SEL = 0x0, then the reference clock input cannot be spread-spectrum. |
| 5920 | |
| 5921 | Internal: |
| 5922 | For the 0x1 selection, reference clock source for SuperSpeed PLL is from the USB |
| 5923 | pads, reference clock source for HighSpeed PLL is PLL_REF_CLK. But in 78xx, PLL_REF_CLK |
| 5924 | cannot be routed to USB without violating jitter requirements */ |
| 5925 | uint64_t ssc_en : 1; /**< [ 59: 59](R/W) Spread-spectrum clock enable. Enables spread-spectrum clock production in the SuperSpeed |
| 5926 | function. If the input reference clock for the SuperSpeed PLL is already spread-spectrum, |
| 5927 | then do not enable this feature. The clocks sourced to the SuperSpeed function must have |
| 5928 | spread-spectrum to be compliant with the USB specification. |
| 5929 | The high-speed PLL cannot support a spread-spectrum input, so REF_CLK_SEL = 0x0 must |
| 5930 | enable this feature. |
| 5931 | This value may only be changed during [UPHY_RST]. */ |
| 5932 | uint64_t ssc_range : 3; /**< [ 58: 56](R/W) Spread-spectrum clock range. Selects the range of spread-spectrum modulation when SSC_EN |
| 5933 | is asserted and the PHY is spreading the SuperSpeed transmit clocks. |
| 5934 | Applies a fixed offset to the phase accumulator. |
| 5935 | 0x0 = -4980 ppm downspread of clock. |
| 5936 | 0x1 = -4492 ppm. |
| 5937 | 0x2 = -4003 ppm. |
| 5938 | 0x3-0x7 = reserved. |
| 5939 | |
| 5940 | All of these settings are within the USB 3.0 specification. The amount of EMI emission |
| 5941 | reduction might decrease as the [SSC_RANGE] increases; therefore, the [SSC_RANGE] settings |
| 5942 | can |
| 5943 | be registered to enable the amount of spreading to be adjusted on a per-application basis. |
| 5944 | This value can be changed only during UPHY_RST. */ |
| 5945 | uint64_t ssc_ref_clk_sel : 9; /**< [ 55: 47](R/W) Enables non-standard oscillator frequencies to generate targeted MPLL output rates. Input |
| 5946 | corresponds to the frequency-synthesis coefficient. |
| 5947 | |
| 5948 | [55:53]: modulus - 1, |
| 5949 | [52:47]: 2's complement push amount |
| 5950 | |
| 5951 | Must leave at reset value of 0x0. |
| 5952 | This value may only be changed during [UPHY_RST]. */ |
| 5953 | uint64_t mpll_multiplier : 7; /**< [ 46: 40](R/W) Multiplies the reference clock to a frequency suitable for intended operating speed. Must |
| 5954 | leave at reset value of 0x0. This value may only be changed during [UPHY_RST]. |
| 5955 | This value is superseded by the [REF_CLK_FSEL]\<5:3\> selection. */ |
| 5956 | uint64_t ref_ssp_en : 1; /**< [ 39: 39](R/W) Enables reference clock to the prescaler for SuperSpeed function. This should always be |
| 5957 | enabled since this output clock is used to drive the UAHC suspend-mode clock during |
| 5958 | low-power states. |
| 5959 | |
| 5960 | This value can be changed only during UPHY_RST or during low-power states. |
| 5961 | The reference clock must be running and stable before [UPHY_RST] is deasserted and before |
| 5962 | [REF_SSP_EN] is asserted. */ |
| 5963 | uint64_t ref_clk_div2 : 1; /**< [ 38: 38](R/W) Divides the reference clock by 2 before feeding it into the REF_CLK_FSEL divider. Must |
| 5964 | leave at reset value of 0x0. |
| 5965 | |
| 5966 | This value can be changed only during UPHY_RST. */ |
| 5967 | uint64_t ref_clk_fsel : 6; /**< [ 37: 32](R/W) Selects the reference clock frequency for the SuperSpeed and high-speed PLL blocks. The |
| 5968 | legal values are as follows: |
| 5969 | 0x27 = External reference clock 100 MHz. |
| 5970 | |
| 5971 | All other values are reserved. |
| 5972 | This value may only be changed during [UPHY_RST]. |
| 5973 | |
| 5974 | Internal: |
| 5975 | 0x2A = External reference clock 24 MHz. |
| 5976 | 0x31 = External reference clock 20 MHz. |
| 5977 | 0x38 = External reference clock 19.2 MHz. */ |
| 5978 | uint64_t reserved_31 : 1; |
| 5979 | uint64_t h_clk_en : 1; /**< [ 30: 30](R/W) Controller-clock enable. When set to 1, the controller clock is generated. This also |
| 5980 | enables access to UCTL registers 0x30-0xF8. */ |
| 5981 | uint64_t h_clk_byp_sel : 1; /**< [ 29: 29](R/W) Select the bypass input to the controller-clock divider. |
| 5982 | 0 = Use the divided coprocessor clock from the H_CLKDIV divider. |
| 5983 | 1 = Use the bypass clock from the GPIO pins. |
| 5984 | |
| 5985 | This signal is just a multiplexer-select signal; it does not enable the controller clock. |
| 5986 | You must still set H_CLKDIV_EN separately. [H_CLK_BYP_SEL] select should not be changed |
| 5987 | unless H_CLKDIV_EN is disabled. |
| 5988 | |
| 5989 | The bypass clock can be selected and running even if the controller-clock dividers are not |
| 5990 | running. |
| 5991 | |
| 5992 | Internal: |
| 5993 | Generally bypass is only used for scan purposes. */ |
| 5994 | uint64_t h_clkdiv_rst : 1; /**< [ 28: 28](R/W) Controller clock divider reset. Divided clocks are not generated while the divider is |
| 5995 | being reset. |
| 5996 | This also resets the suspend-clock divider. */ |
| 5997 | uint64_t reserved_27 : 1; |
| 5998 | uint64_t h_clkdiv_sel : 3; /**< [ 26: 24](R/W) Controller clock-frequency-divider select. The controller-clock frequency is the |
| 5999 | coprocessor-clock frequency divided by [H_CLKDIV_SEL] and must be at or below 300 MHz. |
| 6000 | The divider values are the following: |
| 6001 | 0x0 = divide by 1. |
| 6002 | 0x1 = divide by 2. |
| 6003 | 0x2 = divide by 4. |
| 6004 | 0x3 = divide by 6. |
| 6005 | 0x4 = divide by 8. |
| 6006 | 0x5 = divide by 16. |
| 6007 | 0x6 = divide by 24. |
| 6008 | 0x7 = divide by 32. |
| 6009 | |
| 6010 | For USB3: |
| 6011 | * The controller-clock frequency must be at or above 125 MHz for any USB3 operation. |
| 6012 | * The controller-clock frequency must be at or above |
| 6013 | 150 MHz for full-rate USB3 operation. |
| 6014 | |
| 6015 | For USB2: |
| 6016 | * The controller-clock frequency must be at or above 62.5 MHz for any USB2 operation. |
| 6017 | * The controller-clock frequency must be at or above |
| 6018 | 90 MHz for full-rate USB2 operation. |
| 6019 | |
| 6020 | This field can be changed only when [H_CLKDIV_RST] = 1. |
| 6021 | |
| 6022 | Internal: |
| 6023 | 150MHz is from the maximum of Synopsys DWC_usb3 Databook v2.50a, table A-16, row |
| 6024 | 1, col 12. Synopsys DWC_usb3 Databook v2.50a, table A-17, row 7, col 9. Synopsys DWC_usb3 |
| 6025 | Databook v2.50a, table A-16, row 7, col 9. HOST2\>62.5MHz in HOST mode is from Synopsys |
| 6026 | DWC_usb3 Databook v2.50a, section A.12.5, 3rd bullet in Note on page 894. HOST2\>90MHz was |
| 6027 | arrived at from some math: 62.5MHz + (diff between row 1 and 2, col 12 of table A-16). */ |
| 6028 | uint64_t reserved_22_23 : 2; |
| 6029 | uint64_t usb3_port_perm_attach : 1; /**< [ 21: 21](R/W) Indicates this port is permanently attached. This is a strap signal; it should be modified |
| 6030 | only when [UPHY_RST] is asserted. */ |
| 6031 | uint64_t usb2_port_perm_attach : 1; /**< [ 20: 20](R/W) Indicates this port is permanently attached. This is a strap signal; it should be modified |
| 6032 | only when [UPHY_RST] is asserted. */ |
| 6033 | uint64_t reserved_19 : 1; |
| 6034 | uint64_t usb3_port_disable : 1; /**< [ 18: 18](R/W) Disables the USB3 (SuperSpeed) portion of this PHY. When set to 1, this signal stops |
| 6035 | reporting connect/disconnect events on the port and keeps the port in disabled state. This |
| 6036 | could be used for security reasons where hardware can disable a port regardless of whether |
| 6037 | xHCI driver enables a port or not. |
| 6038 | USBH()_UAHC_HCSPARAMS1[MAXPORTS] is not affected by this signal. |
| 6039 | |
| 6040 | This is a strap signal; it should be modified only when [UPHY_RST] is asserted. */ |
| 6041 | uint64_t reserved_17 : 1; |
| 6042 | uint64_t usb2_port_disable : 1; /**< [ 16: 16](R/W) Disables USB2 (high-speed/full-speed/low-speed) portion of this PHY. When set to 1, this |
| 6043 | signal stops reporting connect/disconnect events on the port and keeps the port in |
| 6044 | disabled state. This could be used for security reasons where hardware can disable a port |
| 6045 | regardless of whether xHCI driver enables a port or not. |
| 6046 | USBH()_UAHC_HCSPARAMS1[MAXPORTS] is not affected by this signal. |
| 6047 | |
| 6048 | This is a strap signal; it should only be modified when [UPHY_RST] is asserted. |
| 6049 | If Port0 is required to be disabled, ensure that the utmi_clk[0] is running at the normal |
| 6050 | speed. Also, all the enabled USB2.0 ports should have the same clock frequency as Port0. */ |
| 6051 | uint64_t reserved_15 : 1; |
| 6052 | uint64_t ss_power_en : 1; /**< [ 14: 14](R/W) PHY SuperSpeed block power enable. |
| 6053 | This is a strap signal; it should only be modified when [UPHY_RST] is asserted. */ |
| 6054 | uint64_t reserved_13 : 1; |
| 6055 | uint64_t hs_power_en : 1; /**< [ 12: 12](R/W) PHY high-speed block power enable. |
| 6056 | This is a strap signal; it should only be modified when [UPHY_RST] is asserted. */ |
| 6057 | uint64_t reserved_5_11 : 7; |
| 6058 | uint64_t csclk_en : 1; /**< [ 4: 4](R/W) Turns on the USB UCTL interface clock (coprocessor clock). This enables access to UAHC |
| 6059 | and UCTL registers starting from 0x30. */ |
| 6060 | uint64_t reserved_3 : 1; |
| 6061 | uint64_t uphy_rst : 1; /**< [ 2: 2](R/W) PHY reset; resets UPHY; active-high. */ |
| 6062 | uint64_t uahc_rst : 1; /**< [ 1: 1](R/W) Software reset; resets UAHC; active-high. |
| 6063 | Internal: |
| 6064 | Note that soft-resetting the UAHC while it is active may cause violations of RSL |
| 6065 | or NCB protocols. */ |
| 6066 | uint64_t uctl_rst : 1; /**< [ 0: 0](R/W) Software reset; resets UCTL; active-high. |
| 6067 | Resets UAHC DMA and register shims. Resets UCTL registers 0x30-0xF8. |
| 6068 | Does not reset UCTL registers 0x0-0x28. |
| 6069 | UCTL registers starting from 0x30 can be accessed only after the controller clock is |
| 6070 | active and [UCTL_RST] is deasserted. |
| 6071 | |
| 6072 | Internal: |
| 6073 | Note that soft-resetting the UCTL while it is active may cause violations of |
| 6074 | RSL, NCB, and CIB protocols. */ |
| 6075 | #else /* Word 0 - Little Endian */ |
| 6076 | uint64_t uctl_rst : 1; /**< [ 0: 0](R/W) Software reset; resets UCTL; active-high. |
| 6077 | Resets UAHC DMA and register shims. Resets UCTL registers 0x30-0xF8. |
| 6078 | Does not reset UCTL registers 0x0-0x28. |
| 6079 | UCTL registers starting from 0x30 can be accessed only after the controller clock is |
| 6080 | active and [UCTL_RST] is deasserted. |
| 6081 | |
| 6082 | Internal: |
| 6083 | Note that soft-resetting the UCTL while it is active may cause violations of |
| 6084 | RSL, NCB, and CIB protocols. */ |
| 6085 | uint64_t uahc_rst : 1; /**< [ 1: 1](R/W) Software reset; resets UAHC; active-high. |
| 6086 | Internal: |
| 6087 | Note that soft-resetting the UAHC while it is active may cause violations of RSL |
| 6088 | or NCB protocols. */ |
| 6089 | uint64_t uphy_rst : 1; /**< [ 2: 2](R/W) PHY reset; resets UPHY; active-high. */ |
| 6090 | uint64_t reserved_3 : 1; |
| 6091 | uint64_t csclk_en : 1; /**< [ 4: 4](R/W) Turns on the USB UCTL interface clock (coprocessor clock). This enables access to UAHC |
| 6092 | and UCTL registers starting from 0x30. */ |
| 6093 | uint64_t reserved_5_11 : 7; |
| 6094 | uint64_t hs_power_en : 1; /**< [ 12: 12](R/W) PHY high-speed block power enable. |
| 6095 | This is a strap signal; it should only be modified when [UPHY_RST] is asserted. */ |
| 6096 | uint64_t reserved_13 : 1; |
| 6097 | uint64_t ss_power_en : 1; /**< [ 14: 14](R/W) PHY SuperSpeed block power enable. |
| 6098 | This is a strap signal; it should only be modified when [UPHY_RST] is asserted. */ |
| 6099 | uint64_t reserved_15 : 1; |
| 6100 | uint64_t usb2_port_disable : 1; /**< [ 16: 16](R/W) Disables USB2 (high-speed/full-speed/low-speed) portion of this PHY. When set to 1, this |
| 6101 | signal stops reporting connect/disconnect events on the port and keeps the port in |
| 6102 | disabled state. This could be used for security reasons where hardware can disable a port |
| 6103 | regardless of whether xHCI driver enables a port or not. |
| 6104 | USBH()_UAHC_HCSPARAMS1[MAXPORTS] is not affected by this signal. |
| 6105 | |
| 6106 | This is a strap signal; it should only be modified when [UPHY_RST] is asserted. |
| 6107 | If Port0 is required to be disabled, ensure that the utmi_clk[0] is running at the normal |
| 6108 | speed. Also, all the enabled USB2.0 ports should have the same clock frequency as Port0. */ |
| 6109 | uint64_t reserved_17 : 1; |
| 6110 | uint64_t usb3_port_disable : 1; /**< [ 18: 18](R/W) Disables the USB3 (SuperSpeed) portion of this PHY. When set to 1, this signal stops |
| 6111 | reporting connect/disconnect events on the port and keeps the port in disabled state. This |
| 6112 | could be used for security reasons where hardware can disable a port regardless of whether |
| 6113 | xHCI driver enables a port or not. |
| 6114 | USBH()_UAHC_HCSPARAMS1[MAXPORTS] is not affected by this signal. |
| 6115 | |
| 6116 | This is a strap signal; it should be modified only when [UPHY_RST] is asserted. */ |
| 6117 | uint64_t reserved_19 : 1; |
| 6118 | uint64_t usb2_port_perm_attach : 1; /**< [ 20: 20](R/W) Indicates this port is permanently attached. This is a strap signal; it should be modified |
| 6119 | only when [UPHY_RST] is asserted. */ |
| 6120 | uint64_t usb3_port_perm_attach : 1; /**< [ 21: 21](R/W) Indicates this port is permanently attached. This is a strap signal; it should be modified |
| 6121 | only when [UPHY_RST] is asserted. */ |
| 6122 | uint64_t reserved_22_23 : 2; |
| 6123 | uint64_t h_clkdiv_sel : 3; /**< [ 26: 24](R/W) Controller clock-frequency-divider select. The controller-clock frequency is the |
| 6124 | coprocessor-clock frequency divided by [H_CLKDIV_SEL] and must be at or below 300 MHz. |
| 6125 | The divider values are the following: |
| 6126 | 0x0 = divide by 1. |
| 6127 | 0x1 = divide by 2. |
| 6128 | 0x2 = divide by 4. |
| 6129 | 0x3 = divide by 6. |
| 6130 | 0x4 = divide by 8. |
| 6131 | 0x5 = divide by 16. |
| 6132 | 0x6 = divide by 24. |
| 6133 | 0x7 = divide by 32. |
| 6134 | |
| 6135 | For USB3: |
| 6136 | * The controller-clock frequency must be at or above 125 MHz for any USB3 operation. |
| 6137 | * The controller-clock frequency must be at or above |
| 6138 | 150 MHz for full-rate USB3 operation. |
| 6139 | |
| 6140 | For USB2: |
| 6141 | * The controller-clock frequency must be at or above 62.5 MHz for any USB2 operation. |
| 6142 | * The controller-clock frequency must be at or above |
| 6143 | 90 MHz for full-rate USB2 operation. |
| 6144 | |
| 6145 | This field can be changed only when [H_CLKDIV_RST] = 1. |
| 6146 | |
| 6147 | Internal: |
| 6148 | 150MHz is from the maximum of Synopsys DWC_usb3 Databook v2.50a, table A-16, row |
| 6149 | 1, col 12. Synopsys DWC_usb3 Databook v2.50a, table A-17, row 7, col 9. Synopsys DWC_usb3 |
| 6150 | Databook v2.50a, table A-16, row 7, col 9. HOST2\>62.5MHz in HOST mode is from Synopsys |
| 6151 | DWC_usb3 Databook v2.50a, section A.12.5, 3rd bullet in Note on page 894. HOST2\>90MHz was |
| 6152 | arrived at from some math: 62.5MHz + (diff between row 1 and 2, col 12 of table A-16). */ |
| 6153 | uint64_t reserved_27 : 1; |
| 6154 | uint64_t h_clkdiv_rst : 1; /**< [ 28: 28](R/W) Controller clock divider reset. Divided clocks are not generated while the divider is |
| 6155 | being reset. |
| 6156 | This also resets the suspend-clock divider. */ |
| 6157 | uint64_t h_clk_byp_sel : 1; /**< [ 29: 29](R/W) Select the bypass input to the controller-clock divider. |
| 6158 | 0 = Use the divided coprocessor clock from the H_CLKDIV divider. |
| 6159 | 1 = Use the bypass clock from the GPIO pins. |
| 6160 | |
| 6161 | This signal is just a multiplexer-select signal; it does not enable the controller clock. |
| 6162 | You must still set H_CLKDIV_EN separately. [H_CLK_BYP_SEL] select should not be changed |
| 6163 | unless H_CLKDIV_EN is disabled. |
| 6164 | |
| 6165 | The bypass clock can be selected and running even if the controller-clock dividers are not |
| 6166 | running. |
| 6167 | |
| 6168 | Internal: |
| 6169 | Generally bypass is only used for scan purposes. */ |
| 6170 | uint64_t h_clk_en : 1; /**< [ 30: 30](R/W) Controller-clock enable. When set to 1, the controller clock is generated. This also |
| 6171 | enables access to UCTL registers 0x30-0xF8. */ |
| 6172 | uint64_t reserved_31 : 1; |
| 6173 | uint64_t ref_clk_fsel : 6; /**< [ 37: 32](R/W) Selects the reference clock frequency for the SuperSpeed and high-speed PLL blocks. The |
| 6174 | legal values are as follows: |
| 6175 | 0x27 = External reference clock 100 MHz. |
| 6176 | |
| 6177 | All other values are reserved. |
| 6178 | This value may only be changed during [UPHY_RST]. |
| 6179 | |
| 6180 | Internal: |
| 6181 | 0x2A = External reference clock 24 MHz. |
| 6182 | 0x31 = External reference clock 20 MHz. |
| 6183 | 0x38 = External reference clock 19.2 MHz. */ |
| 6184 | uint64_t ref_clk_div2 : 1; /**< [ 38: 38](R/W) Divides the reference clock by 2 before feeding it into the REF_CLK_FSEL divider. Must |
| 6185 | leave at reset value of 0x0. |
| 6186 | |
| 6187 | This value can be changed only during UPHY_RST. */ |
| 6188 | uint64_t ref_ssp_en : 1; /**< [ 39: 39](R/W) Enables reference clock to the prescaler for SuperSpeed function. This should always be |
| 6189 | enabled since this output clock is used to drive the UAHC suspend-mode clock during |
| 6190 | low-power states. |
| 6191 | |
| 6192 | This value can be changed only during UPHY_RST or during low-power states. |
| 6193 | The reference clock must be running and stable before [UPHY_RST] is deasserted and before |
| 6194 | [REF_SSP_EN] is asserted. */ |
| 6195 | uint64_t mpll_multiplier : 7; /**< [ 46: 40](R/W) Multiplies the reference clock to a frequency suitable for intended operating speed. Must |
| 6196 | leave at reset value of 0x0. This value may only be changed during [UPHY_RST]. |
| 6197 | This value is superseded by the [REF_CLK_FSEL]\<5:3\> selection. */ |
| 6198 | uint64_t ssc_ref_clk_sel : 9; /**< [ 55: 47](R/W) Enables non-standard oscillator frequencies to generate targeted MPLL output rates. Input |
| 6199 | corresponds to the frequency-synthesis coefficient. |
| 6200 | |
| 6201 | [55:53]: modulus - 1, |
| 6202 | [52:47]: 2's complement push amount |
| 6203 | |
| 6204 | Must leave at reset value of 0x0. |
| 6205 | This value may only be changed during [UPHY_RST]. */ |
| 6206 | uint64_t ssc_range : 3; /**< [ 58: 56](R/W) Spread-spectrum clock range. Selects the range of spread-spectrum modulation when SSC_EN |
| 6207 | is asserted and the PHY is spreading the SuperSpeed transmit clocks. |
| 6208 | Applies a fixed offset to the phase accumulator. |
| 6209 | 0x0 = -4980 ppm downspread of clock. |
| 6210 | 0x1 = -4492 ppm. |
| 6211 | 0x2 = -4003 ppm. |
| 6212 | 0x3-0x7 = reserved. |
| 6213 | |
| 6214 | All of these settings are within the USB 3.0 specification. The amount of EMI emission |
| 6215 | reduction might decrease as the [SSC_RANGE] increases; therefore, the [SSC_RANGE] settings |
| 6216 | can |
| 6217 | be registered to enable the amount of spreading to be adjusted on a per-application basis. |
| 6218 | This value can be changed only during UPHY_RST. */ |
| 6219 | uint64_t ssc_en : 1; /**< [ 59: 59](R/W) Spread-spectrum clock enable. Enables spread-spectrum clock production in the SuperSpeed |
| 6220 | function. If the input reference clock for the SuperSpeed PLL is already spread-spectrum, |
| 6221 | then do not enable this feature. The clocks sourced to the SuperSpeed function must have |
| 6222 | spread-spectrum to be compliant with the USB specification. |
| 6223 | The high-speed PLL cannot support a spread-spectrum input, so REF_CLK_SEL = 0x0 must |
| 6224 | enable this feature. |
| 6225 | This value may only be changed during [UPHY_RST]. */ |
| 6226 | uint64_t ref_clk_sel : 2; /**< [ 61: 60](R/W) Reference clock select. Choose reference-clock source for the SuperSpeed and high-speed |
| 6227 | PLL blocks. |
| 6228 | 0x0 = Reference clock source for both PLLs come from the USB pads. |
| 6229 | 0x1 = Reserved. |
| 6230 | 0x2 = Reserved. |
| 6231 | 0x3 = Reserved. |
| 6232 | |
| 6233 | This value can be changed only during UPHY_RST. |
| 6234 | |
| 6235 | If REF_CLK_SEL = 0x0, then the reference clock input cannot be spread-spectrum. |
| 6236 | |
| 6237 | Internal: |
| 6238 | For the 0x1 selection, reference clock source for SuperSpeed PLL is from the USB |
| 6239 | pads, reference clock source for HighSpeed PLL is PLL_REF_CLK. But in 78xx, PLL_REF_CLK |
| 6240 | cannot be routed to USB without violating jitter requirements */ |
| 6241 | uint64_t start_bist : 1; /**< [ 62: 62](R/W) Rising edge starts BIST on the memories in USBH. |
| 6242 | To run BIST, the controller clock must be both configured and enabled, and should be |
| 6243 | configured to the maximum available frequency given the available coprocessor clock and |
| 6244 | dividers. |
| 6245 | Also, the UCTL, UAHC, and UPHY should be held in software- initiated reset (using |
| 6246 | [UPHY_RST], [UAHC_RST], [UCTL_RST]) until BIST is complete. |
| 6247 | BIST defect status can be checked after FULL BIST completion, both of which are indicated |
| 6248 | in USBH()_UCTL_BIST_STATUS. The full BIST run takes almost 80,000 controller-clock cycles |
| 6249 | for |
| 6250 | the largest RAM. */ |
| 6251 | uint64_t clear_bist : 1; /**< [ 63: 63](R/W) BIST fast-clear mode select. A BIST run with this bit set clears all entries in USBH RAMs |
| 6252 | to 0x0. |
| 6253 | |
| 6254 | There are two major modes of BIST: full and clear. Full BIST is run by the BIST state |
| 6255 | machine when [CLEAR_BIST] is deasserted during BIST. Clear BIST is run if [CLEAR_BIST] is |
| 6256 | asserted during BIST. |
| 6257 | |
| 6258 | To avoid race conditions, software must first perform a CSR write operation that puts the |
| 6259 | [CLEAR_BIST] setting into the correct state and then perform another CSR write operation |
| 6260 | to |
| 6261 | set the BIST trigger (keeping the [CLEAR_BIST] state constant). |
| 6262 | CLEAR BIST completion is indicated by USBH()_UCTL_BIST_STATUS. A BIST clear operation |
| 6263 | takes almost 2,000 controller-clock cycles for the largest RAM. */ |
| 6264 | #endif /* Word 0 - End */ |
| 6265 | } s; |
| 6266 | /* struct bdk_usbhx_uctl_ctl_s cn; */ |
| 6267 | }; |
| 6268 | typedef union bdk_usbhx_uctl_ctl bdk_usbhx_uctl_ctl_t; |
| 6269 | |
| 6270 | static inline uint64_t BDK_USBHX_UCTL_CTL(unsigned long a) __attribute__ ((pure, always_inline)); |
| 6271 | static inline uint64_t BDK_USBHX_UCTL_CTL(unsigned long a) |
| 6272 | { |
| 6273 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 6274 | return 0x868000100000ll + 0x1000000000ll * ((a) & 0x1); |
| 6275 | __bdk_csr_fatal("USBHX_UCTL_CTL", 1, a, 0, 0, 0); |
| 6276 | } |
| 6277 | |
| 6278 | #define typedef_BDK_USBHX_UCTL_CTL(a) bdk_usbhx_uctl_ctl_t |
| 6279 | #define bustype_BDK_USBHX_UCTL_CTL(a) BDK_CSR_TYPE_NCB |
| 6280 | #define basename_BDK_USBHX_UCTL_CTL(a) "USBHX_UCTL_CTL" |
| 6281 | #define device_bar_BDK_USBHX_UCTL_CTL(a) 0x0 /* PF_BAR0 */ |
| 6282 | #define busnum_BDK_USBHX_UCTL_CTL(a) (a) |
| 6283 | #define arguments_BDK_USBHX_UCTL_CTL(a) (a),-1,-1,-1 |
| 6284 | |
| 6285 | /** |
| 6286 | * Register (NCB) usbh#_uctl_ecc |
| 6287 | * |
| 6288 | * UCTL ECC Control Register |
| 6289 | * This register can be used to disable ECC correction, insert ECC errors, and debug ECC |
| 6290 | * failures. |
| 6291 | * * The ECC_ERR* fields are captured when there are no outstanding ECC errors indicated in |
| 6292 | * INTSTAT and a new ECC error arrives. Prioritization for multiple events occurring on the same |
| 6293 | * cycle is indicated by the ECC_ERR_SOURCE enumeration: highest encoded value has highest |
| 6294 | * priority. |
| 6295 | * * The *ECC_*_DIS fields disable ECC correction; SBE and DBE errors are still reported. If |
| 6296 | * *ECC_*_DIS = 0x1, then no data-correction occurs. |
| 6297 | * * The *ECC_FLIP_SYND fields flip the syndrome\<1:0\> bits to generate single-bit/double-bit |
| 6298 | * error for testing. |
| 6299 | * |
| 6300 | * 0x0 = Normal operation. |
| 6301 | * 0x1 = SBE on bit[0]. |
| 6302 | * 0x2 = SBE on bit[1]. |
| 6303 | * 0x3 = DBE on bit[1:0]. |
| 6304 | * |
| 6305 | * This register is accessible only when USB()_UCTL_CTL[H_CLK_EN] = 1. |
| 6306 | * |
| 6307 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UCTL_RST]. |
| 6308 | */ |
| 6309 | union bdk_usbhx_uctl_ecc |
| 6310 | { |
| 6311 | uint64_t u; |
| 6312 | struct bdk_usbhx_uctl_ecc_s |
| 6313 | { |
| 6314 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 6315 | uint64_t reserved_60_63 : 4; |
| 6316 | uint64_t ecc_err_source : 4; /**< [ 59: 56](RO/H) Source of ECC error, see UCTL_ECC_ERR_SOURCE_E. */ |
| 6317 | uint64_t ecc_err_syndrome : 8; /**< [ 55: 48](RO/H) Syndrome bits of the ECC error. */ |
| 6318 | uint64_t ecc_err_address : 16; /**< [ 47: 32](RO/H) RAM address of the ECC error. */ |
| 6319 | uint64_t reserved_21_31 : 11; |
| 6320 | uint64_t uctl_xm_r_ecc_flip_synd : 2;/**< [ 20: 19](R/W) Insert ECC error for testing purposes. */ |
| 6321 | uint64_t uctl_xm_r_ecc_cor_dis : 1; /**< [ 18: 18](R/W) Enables ECC correction on UCTL AxiMaster read-data FIFO. */ |
| 6322 | uint64_t uctl_xm_w_ecc_flip_synd : 2;/**< [ 17: 16](R/W) Insert ECC error for testing purposes. */ |
| 6323 | uint64_t uctl_xm_w_ecc_cor_dis : 1; /**< [ 15: 15](R/W) Enables ECC correction on UCTL AxiMaster write-data FIFO. */ |
| 6324 | uint64_t reserved_9_14 : 6; |
| 6325 | uint64_t uahc_ram2_ecc_flip_synd : 2;/**< [ 8: 7](R/W) Insert ECC error for testing purposes. */ |
| 6326 | uint64_t uahc_ram2_ecc_cor_dis : 1; /**< [ 6: 6](R/W) Enables ECC correction on UAHC RxFIFO RAMs (RAM2). */ |
| 6327 | uint64_t uahc_ram1_ecc_flip_synd : 2;/**< [ 5: 4](R/W) Insert ECC error for testing purposes. */ |
| 6328 | uint64_t uahc_ram1_ecc_cor_dis : 1; /**< [ 3: 3](R/W) Enables ECC correction on UAHC TxFIFO RAMs (RAM1). */ |
| 6329 | uint64_t uahc_ram0_ecc_flip_synd : 2;/**< [ 2: 1](R/W) Insert ECC error for testing purposes. */ |
| 6330 | uint64_t uahc_ram0_ecc_cor_dis : 1; /**< [ 0: 0](R/W) Enables ECC correction on UAHC Desc/Reg cache (RAM0). */ |
| 6331 | #else /* Word 0 - Little Endian */ |
| 6332 | uint64_t uahc_ram0_ecc_cor_dis : 1; /**< [ 0: 0](R/W) Enables ECC correction on UAHC Desc/Reg cache (RAM0). */ |
| 6333 | uint64_t uahc_ram0_ecc_flip_synd : 2;/**< [ 2: 1](R/W) Insert ECC error for testing purposes. */ |
| 6334 | uint64_t uahc_ram1_ecc_cor_dis : 1; /**< [ 3: 3](R/W) Enables ECC correction on UAHC TxFIFO RAMs (RAM1). */ |
| 6335 | uint64_t uahc_ram1_ecc_flip_synd : 2;/**< [ 5: 4](R/W) Insert ECC error for testing purposes. */ |
| 6336 | uint64_t uahc_ram2_ecc_cor_dis : 1; /**< [ 6: 6](R/W) Enables ECC correction on UAHC RxFIFO RAMs (RAM2). */ |
| 6337 | uint64_t uahc_ram2_ecc_flip_synd : 2;/**< [ 8: 7](R/W) Insert ECC error for testing purposes. */ |
| 6338 | uint64_t reserved_9_14 : 6; |
| 6339 | uint64_t uctl_xm_w_ecc_cor_dis : 1; /**< [ 15: 15](R/W) Enables ECC correction on UCTL AxiMaster write-data FIFO. */ |
| 6340 | uint64_t uctl_xm_w_ecc_flip_synd : 2;/**< [ 17: 16](R/W) Insert ECC error for testing purposes. */ |
| 6341 | uint64_t uctl_xm_r_ecc_cor_dis : 1; /**< [ 18: 18](R/W) Enables ECC correction on UCTL AxiMaster read-data FIFO. */ |
| 6342 | uint64_t uctl_xm_r_ecc_flip_synd : 2;/**< [ 20: 19](R/W) Insert ECC error for testing purposes. */ |
| 6343 | uint64_t reserved_21_31 : 11; |
| 6344 | uint64_t ecc_err_address : 16; /**< [ 47: 32](RO/H) RAM address of the ECC error. */ |
| 6345 | uint64_t ecc_err_syndrome : 8; /**< [ 55: 48](RO/H) Syndrome bits of the ECC error. */ |
| 6346 | uint64_t ecc_err_source : 4; /**< [ 59: 56](RO/H) Source of ECC error, see UCTL_ECC_ERR_SOURCE_E. */ |
| 6347 | uint64_t reserved_60_63 : 4; |
| 6348 | #endif /* Word 0 - End */ |
| 6349 | } s; |
| 6350 | /* struct bdk_usbhx_uctl_ecc_s cn; */ |
| 6351 | }; |
| 6352 | typedef union bdk_usbhx_uctl_ecc bdk_usbhx_uctl_ecc_t; |
| 6353 | |
| 6354 | static inline uint64_t BDK_USBHX_UCTL_ECC(unsigned long a) __attribute__ ((pure, always_inline)); |
| 6355 | static inline uint64_t BDK_USBHX_UCTL_ECC(unsigned long a) |
| 6356 | { |
| 6357 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 6358 | return 0x8680001000f0ll + 0x1000000000ll * ((a) & 0x1); |
| 6359 | __bdk_csr_fatal("USBHX_UCTL_ECC", 1, a, 0, 0, 0); |
| 6360 | } |
| 6361 | |
| 6362 | #define typedef_BDK_USBHX_UCTL_ECC(a) bdk_usbhx_uctl_ecc_t |
| 6363 | #define bustype_BDK_USBHX_UCTL_ECC(a) BDK_CSR_TYPE_NCB |
| 6364 | #define basename_BDK_USBHX_UCTL_ECC(a) "USBHX_UCTL_ECC" |
| 6365 | #define device_bar_BDK_USBHX_UCTL_ECC(a) 0x0 /* PF_BAR0 */ |
| 6366 | #define busnum_BDK_USBHX_UCTL_ECC(a) (a) |
| 6367 | #define arguments_BDK_USBHX_UCTL_ECC(a) (a),-1,-1,-1 |
| 6368 | |
| 6369 | /** |
| 6370 | * Register (NCB) usbh#_uctl_host_cfg |
| 6371 | * |
| 6372 | * UCTL Host Controller Configuration Register |
| 6373 | * This register allows configuration of various host controller (UAHC) features. Most of these |
| 6374 | * are strap signals and should be modified only while the controller is not running. |
| 6375 | * |
| 6376 | * This register is accessible only when USB()_UCTL_CTL[H_CLK_EN] = 1. |
| 6377 | * |
| 6378 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UCTL_RST]. |
| 6379 | */ |
| 6380 | union bdk_usbhx_uctl_host_cfg |
| 6381 | { |
| 6382 | uint64_t u; |
| 6383 | struct bdk_usbhx_uctl_host_cfg_s |
| 6384 | { |
| 6385 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 6386 | uint64_t reserved_60_63 : 4; |
| 6387 | uint64_t host_current_belt : 12; /**< [ 59: 48](RO) This signal indicates the minimum value of all received BELT values and the BELT that is |
| 6388 | set by the Set LTV command. */ |
| 6389 | uint64_t reserved_38_47 : 10; |
| 6390 | uint64_t fla : 6; /**< [ 37: 32](R/W) High-speed jitter adjustment. Indicates the correction required to accommodate mac3 clock |
| 6391 | and utmi clock jitter to measure 125 us duration. With FLA tied to 0x0, the high-speed |
| 6392 | 125 us micro-frame is counted for 123933 ns. The value needs to be programmed in terms of |
| 6393 | high-speed bit times in a 30 MHz cycle. Default value that needs to be driven is 0x20 |
| 6394 | (assuming 30 MHz perfect clock). |
| 6395 | |
| 6396 | FLA connects to the FLADJ register defined in the xHCI spec in the PCI configuration |
| 6397 | space. Each count is equal to 16 high-speed bit times. By default when this register is |
| 6398 | set to 0x20, it gives 125 us interval. Now, based on the clock accuracy, you can decrement |
| 6399 | the count or increment the count to get the 125 us uSOF window. |
| 6400 | This is a strap signal; it should only be modified when UAHC is in reset (soft-reset |
| 6401 | okay). */ |
| 6402 | uint64_t reserved_29_31 : 3; |
| 6403 | uint64_t bme : 1; /**< [ 28: 28](R/W) Bus-master enable. This signal is used to disable the bus-mastering capability of the |
| 6404 | host. Disabling this capability stalls DMA accesses. */ |
| 6405 | uint64_t oci_en : 1; /**< [ 27: 27](R/W) Overcurrent-indication enable. When enabled, OCI input to UAHC is taken from the GPIO |
| 6406 | signals and sense-converted based on OCI_ACTIVE_HIGH_EN. The MIO GPIO multiplexer must be |
| 6407 | programmed accordingly. |
| 6408 | |
| 6409 | When disabled, OCI input to UAHC is forced to the correct inactive state based on |
| 6410 | OCI_ACTIVE_HIGH_EN. |
| 6411 | |
| 6412 | This is a strap signal; it should only be modified when UAHC is in reset (soft-reset |
| 6413 | okay). */ |
| 6414 | uint64_t oci_active_high_en : 1; /**< [ 26: 26](R/W) Overcurrent sense selection. The off-chip sense (high/low) is converted to match the |
| 6415 | controller's active-high sense. |
| 6416 | 0 = Overcurrent indication from off-chip source is active-low. |
| 6417 | 1 = Overcurrent indication from off-chip source is active-high. |
| 6418 | |
| 6419 | This is a strap signal; it should only be modified when UAHC is in reset (soft-reset |
| 6420 | okay). */ |
| 6421 | uint64_t ppc_en : 1; /**< [ 25: 25](R/W) Port-power-control enable. |
| 6422 | 0 = USBH()_UAHC_HCCPARAMS[PPC] report port-power-control feature is unavailable. |
| 6423 | 1 = USBH()_UAHC_HCCPARAMS[PPC] reports port-power-control feature is available. PPC output |
| 6424 | from UAHC is taken to the GPIO signals and sense-converted based on PPC_ACTIVE_HIGH_EN. |
| 6425 | |
| 6426 | The MIO GPIO multiplexer must be programmed accordingly. |
| 6427 | |
| 6428 | This is a strap signal; it should only be modified when either the UCTL_CTL[UAHC] or |
| 6429 | UAHC_GCTL[CoreSoftReset] is asserted. */ |
| 6430 | uint64_t ppc_active_high_en : 1; /**< [ 24: 24](R/W) Port power control sense selection. The active-high port-power-control output to off-chip |
| 6431 | source is converted to match the off-chip sense. |
| 6432 | 0 = Port-power control to off-chip source is active-low. |
| 6433 | 1 = Port-power control to off-chip source is active-high. |
| 6434 | |
| 6435 | This is a strap signal; it should only be modified when either the UCTL_CTL[UAHC] or |
| 6436 | UAHC_GCTL[CoreSoftReset] is asserted. */ |
| 6437 | uint64_t reserved_0_23 : 24; |
| 6438 | #else /* Word 0 - Little Endian */ |
| 6439 | uint64_t reserved_0_23 : 24; |
| 6440 | uint64_t ppc_active_high_en : 1; /**< [ 24: 24](R/W) Port power control sense selection. The active-high port-power-control output to off-chip |
| 6441 | source is converted to match the off-chip sense. |
| 6442 | 0 = Port-power control to off-chip source is active-low. |
| 6443 | 1 = Port-power control to off-chip source is active-high. |
| 6444 | |
| 6445 | This is a strap signal; it should only be modified when either the UCTL_CTL[UAHC] or |
| 6446 | UAHC_GCTL[CoreSoftReset] is asserted. */ |
| 6447 | uint64_t ppc_en : 1; /**< [ 25: 25](R/W) Port-power-control enable. |
| 6448 | 0 = USBH()_UAHC_HCCPARAMS[PPC] report port-power-control feature is unavailable. |
| 6449 | 1 = USBH()_UAHC_HCCPARAMS[PPC] reports port-power-control feature is available. PPC output |
| 6450 | from UAHC is taken to the GPIO signals and sense-converted based on PPC_ACTIVE_HIGH_EN. |
| 6451 | |
| 6452 | The MIO GPIO multiplexer must be programmed accordingly. |
| 6453 | |
| 6454 | This is a strap signal; it should only be modified when either the UCTL_CTL[UAHC] or |
| 6455 | UAHC_GCTL[CoreSoftReset] is asserted. */ |
| 6456 | uint64_t oci_active_high_en : 1; /**< [ 26: 26](R/W) Overcurrent sense selection. The off-chip sense (high/low) is converted to match the |
| 6457 | controller's active-high sense. |
| 6458 | 0 = Overcurrent indication from off-chip source is active-low. |
| 6459 | 1 = Overcurrent indication from off-chip source is active-high. |
| 6460 | |
| 6461 | This is a strap signal; it should only be modified when UAHC is in reset (soft-reset |
| 6462 | okay). */ |
| 6463 | uint64_t oci_en : 1; /**< [ 27: 27](R/W) Overcurrent-indication enable. When enabled, OCI input to UAHC is taken from the GPIO |
| 6464 | signals and sense-converted based on OCI_ACTIVE_HIGH_EN. The MIO GPIO multiplexer must be |
| 6465 | programmed accordingly. |
| 6466 | |
| 6467 | When disabled, OCI input to UAHC is forced to the correct inactive state based on |
| 6468 | OCI_ACTIVE_HIGH_EN. |
| 6469 | |
| 6470 | This is a strap signal; it should only be modified when UAHC is in reset (soft-reset |
| 6471 | okay). */ |
| 6472 | uint64_t bme : 1; /**< [ 28: 28](R/W) Bus-master enable. This signal is used to disable the bus-mastering capability of the |
| 6473 | host. Disabling this capability stalls DMA accesses. */ |
| 6474 | uint64_t reserved_29_31 : 3; |
| 6475 | uint64_t fla : 6; /**< [ 37: 32](R/W) High-speed jitter adjustment. Indicates the correction required to accommodate mac3 clock |
| 6476 | and utmi clock jitter to measure 125 us duration. With FLA tied to 0x0, the high-speed |
| 6477 | 125 us micro-frame is counted for 123933 ns. The value needs to be programmed in terms of |
| 6478 | high-speed bit times in a 30 MHz cycle. Default value that needs to be driven is 0x20 |
| 6479 | (assuming 30 MHz perfect clock). |
| 6480 | |
| 6481 | FLA connects to the FLADJ register defined in the xHCI spec in the PCI configuration |
| 6482 | space. Each count is equal to 16 high-speed bit times. By default when this register is |
| 6483 | set to 0x20, it gives 125 us interval. Now, based on the clock accuracy, you can decrement |
| 6484 | the count or increment the count to get the 125 us uSOF window. |
| 6485 | This is a strap signal; it should only be modified when UAHC is in reset (soft-reset |
| 6486 | okay). */ |
| 6487 | uint64_t reserved_38_47 : 10; |
| 6488 | uint64_t host_current_belt : 12; /**< [ 59: 48](RO) This signal indicates the minimum value of all received BELT values and the BELT that is |
| 6489 | set by the Set LTV command. */ |
| 6490 | uint64_t reserved_60_63 : 4; |
| 6491 | #endif /* Word 0 - End */ |
| 6492 | } s; |
| 6493 | /* struct bdk_usbhx_uctl_host_cfg_s cn; */ |
| 6494 | }; |
| 6495 | typedef union bdk_usbhx_uctl_host_cfg bdk_usbhx_uctl_host_cfg_t; |
| 6496 | |
| 6497 | static inline uint64_t BDK_USBHX_UCTL_HOST_CFG(unsigned long a) __attribute__ ((pure, always_inline)); |
| 6498 | static inline uint64_t BDK_USBHX_UCTL_HOST_CFG(unsigned long a) |
| 6499 | { |
| 6500 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 6501 | return 0x8680001000e0ll + 0x1000000000ll * ((a) & 0x1); |
| 6502 | __bdk_csr_fatal("USBHX_UCTL_HOST_CFG", 1, a, 0, 0, 0); |
| 6503 | } |
| 6504 | |
| 6505 | #define typedef_BDK_USBHX_UCTL_HOST_CFG(a) bdk_usbhx_uctl_host_cfg_t |
| 6506 | #define bustype_BDK_USBHX_UCTL_HOST_CFG(a) BDK_CSR_TYPE_NCB |
| 6507 | #define basename_BDK_USBHX_UCTL_HOST_CFG(a) "USBHX_UCTL_HOST_CFG" |
| 6508 | #define device_bar_BDK_USBHX_UCTL_HOST_CFG(a) 0x0 /* PF_BAR0 */ |
| 6509 | #define busnum_BDK_USBHX_UCTL_HOST_CFG(a) (a) |
| 6510 | #define arguments_BDK_USBHX_UCTL_HOST_CFG(a) (a),-1,-1,-1 |
| 6511 | |
| 6512 | /** |
| 6513 | * Register (NCB) usbh#_uctl_intena_w1c |
| 6514 | * |
| 6515 | * UCTL Interrupt Status Register |
| 6516 | * This register clears interrupt enable bits. |
| 6517 | */ |
| 6518 | union bdk_usbhx_uctl_intena_w1c |
| 6519 | { |
| 6520 | uint64_t u; |
| 6521 | struct bdk_usbhx_uctl_intena_w1c_s |
| 6522 | { |
| 6523 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 6524 | uint64_t reserved_30_63 : 34; |
| 6525 | uint64_t xm_r_dbe : 1; /**< [ 29: 29](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[XM_R_DBE]. */ |
| 6526 | uint64_t xm_r_sbe : 1; /**< [ 28: 28](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[XM_R_SBE]. */ |
| 6527 | uint64_t xm_w_dbe : 1; /**< [ 27: 27](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[XM_W_DBE]. */ |
| 6528 | uint64_t xm_w_sbe : 1; /**< [ 26: 26](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[XM_W_SBE]. */ |
| 6529 | uint64_t reserved_22_25 : 4; |
| 6530 | uint64_t ram2_dbe : 1; /**< [ 21: 21](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[RAM2_DBE]. */ |
| 6531 | uint64_t ram2_sbe : 1; /**< [ 20: 20](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[RAM2_SBE]. */ |
| 6532 | uint64_t ram1_dbe : 1; /**< [ 19: 19](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[RAM1_DBE]. */ |
| 6533 | uint64_t ram1_sbe : 1; /**< [ 18: 18](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[RAM1_SBE]. */ |
| 6534 | uint64_t ram0_dbe : 1; /**< [ 17: 17](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[RAM0_DBE]. */ |
| 6535 | uint64_t ram0_sbe : 1; /**< [ 16: 16](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[RAM0_SBE]. */ |
| 6536 | uint64_t reserved_8_15 : 8; |
| 6537 | uint64_t dma_rd_err : 1; /**< [ 7: 7](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[DMA_RD_ERR]. */ |
| 6538 | uint64_t dma_wr_err : 1; /**< [ 6: 6](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[DMA_WR_ERR]. */ |
| 6539 | uint64_t reserved_3_5 : 3; |
| 6540 | uint64_t xm_bad_dma : 1; /**< [ 2: 2](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[XM_BAD_DMA]. */ |
| 6541 | uint64_t xs_ncb_oob : 1; /**< [ 1: 1](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[XS_NCB_OOB]. */ |
| 6542 | uint64_t reserved_0 : 1; |
| 6543 | #else /* Word 0 - Little Endian */ |
| 6544 | uint64_t reserved_0 : 1; |
| 6545 | uint64_t xs_ncb_oob : 1; /**< [ 1: 1](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[XS_NCB_OOB]. */ |
| 6546 | uint64_t xm_bad_dma : 1; /**< [ 2: 2](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[XM_BAD_DMA]. */ |
| 6547 | uint64_t reserved_3_5 : 3; |
| 6548 | uint64_t dma_wr_err : 1; /**< [ 6: 6](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[DMA_WR_ERR]. */ |
| 6549 | uint64_t dma_rd_err : 1; /**< [ 7: 7](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[DMA_RD_ERR]. */ |
| 6550 | uint64_t reserved_8_15 : 8; |
| 6551 | uint64_t ram0_sbe : 1; /**< [ 16: 16](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[RAM0_SBE]. */ |
| 6552 | uint64_t ram0_dbe : 1; /**< [ 17: 17](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[RAM0_DBE]. */ |
| 6553 | uint64_t ram1_sbe : 1; /**< [ 18: 18](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[RAM1_SBE]. */ |
| 6554 | uint64_t ram1_dbe : 1; /**< [ 19: 19](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[RAM1_DBE]. */ |
| 6555 | uint64_t ram2_sbe : 1; /**< [ 20: 20](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[RAM2_SBE]. */ |
| 6556 | uint64_t ram2_dbe : 1; /**< [ 21: 21](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[RAM2_DBE]. */ |
| 6557 | uint64_t reserved_22_25 : 4; |
| 6558 | uint64_t xm_w_sbe : 1; /**< [ 26: 26](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[XM_W_SBE]. */ |
| 6559 | uint64_t xm_w_dbe : 1; /**< [ 27: 27](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[XM_W_DBE]. */ |
| 6560 | uint64_t xm_r_sbe : 1; /**< [ 28: 28](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[XM_R_SBE]. */ |
| 6561 | uint64_t xm_r_dbe : 1; /**< [ 29: 29](R/W1C/H) Reads or clears enable for USBH(0..1)_UCTL_INTSTAT[XM_R_DBE]. */ |
| 6562 | uint64_t reserved_30_63 : 34; |
| 6563 | #endif /* Word 0 - End */ |
| 6564 | } s; |
| 6565 | /* struct bdk_usbhx_uctl_intena_w1c_s cn; */ |
| 6566 | }; |
| 6567 | typedef union bdk_usbhx_uctl_intena_w1c bdk_usbhx_uctl_intena_w1c_t; |
| 6568 | |
| 6569 | static inline uint64_t BDK_USBHX_UCTL_INTENA_W1C(unsigned long a) __attribute__ ((pure, always_inline)); |
| 6570 | static inline uint64_t BDK_USBHX_UCTL_INTENA_W1C(unsigned long a) |
| 6571 | { |
| 6572 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 6573 | return 0x868000100040ll + 0x1000000000ll * ((a) & 0x1); |
| 6574 | __bdk_csr_fatal("USBHX_UCTL_INTENA_W1C", 1, a, 0, 0, 0); |
| 6575 | } |
| 6576 | |
| 6577 | #define typedef_BDK_USBHX_UCTL_INTENA_W1C(a) bdk_usbhx_uctl_intena_w1c_t |
| 6578 | #define bustype_BDK_USBHX_UCTL_INTENA_W1C(a) BDK_CSR_TYPE_NCB |
| 6579 | #define basename_BDK_USBHX_UCTL_INTENA_W1C(a) "USBHX_UCTL_INTENA_W1C" |
| 6580 | #define device_bar_BDK_USBHX_UCTL_INTENA_W1C(a) 0x0 /* PF_BAR0 */ |
| 6581 | #define busnum_BDK_USBHX_UCTL_INTENA_W1C(a) (a) |
| 6582 | #define arguments_BDK_USBHX_UCTL_INTENA_W1C(a) (a),-1,-1,-1 |
| 6583 | |
| 6584 | /** |
| 6585 | * Register (NCB) usbh#_uctl_intena_w1s |
| 6586 | * |
| 6587 | * UCTL Interrupt Status Register |
| 6588 | * This register sets interrupt enable bits. |
| 6589 | */ |
| 6590 | union bdk_usbhx_uctl_intena_w1s |
| 6591 | { |
| 6592 | uint64_t u; |
| 6593 | struct bdk_usbhx_uctl_intena_w1s_s |
| 6594 | { |
| 6595 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 6596 | uint64_t reserved_30_63 : 34; |
| 6597 | uint64_t xm_r_dbe : 1; /**< [ 29: 29](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[XM_R_DBE]. */ |
| 6598 | uint64_t xm_r_sbe : 1; /**< [ 28: 28](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[XM_R_SBE]. */ |
| 6599 | uint64_t xm_w_dbe : 1; /**< [ 27: 27](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[XM_W_DBE]. */ |
| 6600 | uint64_t xm_w_sbe : 1; /**< [ 26: 26](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[XM_W_SBE]. */ |
| 6601 | uint64_t reserved_22_25 : 4; |
| 6602 | uint64_t ram2_dbe : 1; /**< [ 21: 21](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[RAM2_DBE]. */ |
| 6603 | uint64_t ram2_sbe : 1; /**< [ 20: 20](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[RAM2_SBE]. */ |
| 6604 | uint64_t ram1_dbe : 1; /**< [ 19: 19](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[RAM1_DBE]. */ |
| 6605 | uint64_t ram1_sbe : 1; /**< [ 18: 18](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[RAM1_SBE]. */ |
| 6606 | uint64_t ram0_dbe : 1; /**< [ 17: 17](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[RAM0_DBE]. */ |
| 6607 | uint64_t ram0_sbe : 1; /**< [ 16: 16](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[RAM0_SBE]. */ |
| 6608 | uint64_t reserved_8_15 : 8; |
| 6609 | uint64_t dma_rd_err : 1; /**< [ 7: 7](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[DMA_RD_ERR]. */ |
| 6610 | uint64_t dma_wr_err : 1; /**< [ 6: 6](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[DMA_WR_ERR]. */ |
| 6611 | uint64_t reserved_3_5 : 3; |
| 6612 | uint64_t xm_bad_dma : 1; /**< [ 2: 2](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[XM_BAD_DMA]. */ |
| 6613 | uint64_t xs_ncb_oob : 1; /**< [ 1: 1](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[XS_NCB_OOB]. */ |
| 6614 | uint64_t reserved_0 : 1; |
| 6615 | #else /* Word 0 - Little Endian */ |
| 6616 | uint64_t reserved_0 : 1; |
| 6617 | uint64_t xs_ncb_oob : 1; /**< [ 1: 1](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[XS_NCB_OOB]. */ |
| 6618 | uint64_t xm_bad_dma : 1; /**< [ 2: 2](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[XM_BAD_DMA]. */ |
| 6619 | uint64_t reserved_3_5 : 3; |
| 6620 | uint64_t dma_wr_err : 1; /**< [ 6: 6](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[DMA_WR_ERR]. */ |
| 6621 | uint64_t dma_rd_err : 1; /**< [ 7: 7](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[DMA_RD_ERR]. */ |
| 6622 | uint64_t reserved_8_15 : 8; |
| 6623 | uint64_t ram0_sbe : 1; /**< [ 16: 16](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[RAM0_SBE]. */ |
| 6624 | uint64_t ram0_dbe : 1; /**< [ 17: 17](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[RAM0_DBE]. */ |
| 6625 | uint64_t ram1_sbe : 1; /**< [ 18: 18](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[RAM1_SBE]. */ |
| 6626 | uint64_t ram1_dbe : 1; /**< [ 19: 19](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[RAM1_DBE]. */ |
| 6627 | uint64_t ram2_sbe : 1; /**< [ 20: 20](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[RAM2_SBE]. */ |
| 6628 | uint64_t ram2_dbe : 1; /**< [ 21: 21](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[RAM2_DBE]. */ |
| 6629 | uint64_t reserved_22_25 : 4; |
| 6630 | uint64_t xm_w_sbe : 1; /**< [ 26: 26](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[XM_W_SBE]. */ |
| 6631 | uint64_t xm_w_dbe : 1; /**< [ 27: 27](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[XM_W_DBE]. */ |
| 6632 | uint64_t xm_r_sbe : 1; /**< [ 28: 28](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[XM_R_SBE]. */ |
| 6633 | uint64_t xm_r_dbe : 1; /**< [ 29: 29](R/W1S/H) Reads or sets enable for USBH(0..1)_UCTL_INTSTAT[XM_R_DBE]. */ |
| 6634 | uint64_t reserved_30_63 : 34; |
| 6635 | #endif /* Word 0 - End */ |
| 6636 | } s; |
| 6637 | /* struct bdk_usbhx_uctl_intena_w1s_s cn; */ |
| 6638 | }; |
| 6639 | typedef union bdk_usbhx_uctl_intena_w1s bdk_usbhx_uctl_intena_w1s_t; |
| 6640 | |
| 6641 | static inline uint64_t BDK_USBHX_UCTL_INTENA_W1S(unsigned long a) __attribute__ ((pure, always_inline)); |
| 6642 | static inline uint64_t BDK_USBHX_UCTL_INTENA_W1S(unsigned long a) |
| 6643 | { |
| 6644 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 6645 | return 0x868000100048ll + 0x1000000000ll * ((a) & 0x1); |
| 6646 | __bdk_csr_fatal("USBHX_UCTL_INTENA_W1S", 1, a, 0, 0, 0); |
| 6647 | } |
| 6648 | |
| 6649 | #define typedef_BDK_USBHX_UCTL_INTENA_W1S(a) bdk_usbhx_uctl_intena_w1s_t |
| 6650 | #define bustype_BDK_USBHX_UCTL_INTENA_W1S(a) BDK_CSR_TYPE_NCB |
| 6651 | #define basename_BDK_USBHX_UCTL_INTENA_W1S(a) "USBHX_UCTL_INTENA_W1S" |
| 6652 | #define device_bar_BDK_USBHX_UCTL_INTENA_W1S(a) 0x0 /* PF_BAR0 */ |
| 6653 | #define busnum_BDK_USBHX_UCTL_INTENA_W1S(a) (a) |
| 6654 | #define arguments_BDK_USBHX_UCTL_INTENA_W1S(a) (a),-1,-1,-1 |
| 6655 | |
| 6656 | /** |
| 6657 | * Register (NCB) usbh#_uctl_intstat |
| 6658 | * |
| 6659 | * UCTL Interrupt Status Register |
| 6660 | * This register provides a summary of interrupts. DBEs are detected and |
| 6661 | * SBE are corrected. For debugging output for ECC DBEs/SBEs, see USBH()_UCTL_ECC. This register |
| 6662 | * can |
| 6663 | * be reset by NCB reset. |
| 6664 | */ |
| 6665 | union bdk_usbhx_uctl_intstat |
| 6666 | { |
| 6667 | uint64_t u; |
| 6668 | struct bdk_usbhx_uctl_intstat_s |
| 6669 | { |
| 6670 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 6671 | uint64_t reserved_30_63 : 34; |
| 6672 | uint64_t xm_r_dbe : 1; /**< [ 29: 29](R/W1C/H) Detected double-bit error on the UCTL AxiMaster read-data FIFO. */ |
| 6673 | uint64_t xm_r_sbe : 1; /**< [ 28: 28](R/W1C/H) Detected single-bit error on the UCTL AxiMaster read-data FIFO. */ |
| 6674 | uint64_t xm_w_dbe : 1; /**< [ 27: 27](R/W1C/H) Detected double-bit error on the UCTL AxiMaster write-data FIFO. */ |
| 6675 | uint64_t xm_w_sbe : 1; /**< [ 26: 26](R/W1C/H) Detected single-bit error on the UCTL AxiMaster write-data FIFO. */ |
| 6676 | uint64_t reserved_22_25 : 4; |
| 6677 | uint64_t ram2_dbe : 1; /**< [ 21: 21](R/W1C/H) Detected double-bit error on the UAHC RxFIFO RAMs (RAM2). */ |
| 6678 | uint64_t ram2_sbe : 1; /**< [ 20: 20](R/W1C/H) Detected single-bit error on the UAHC RxFIFO RAMs (RAM2). */ |
| 6679 | uint64_t ram1_dbe : 1; /**< [ 19: 19](R/W1C/H) Detected double-bit error on the UAHC TxFIFO RAMs (RAM1). */ |
| 6680 | uint64_t ram1_sbe : 1; /**< [ 18: 18](R/W1C/H) Detected single-bit error on the UAHC TxFIFO RAMs (RAM1). */ |
| 6681 | uint64_t ram0_dbe : 1; /**< [ 17: 17](R/W1C/H) Detected double-bit error on the UAHC Desc/Reg Cache (RAM0). */ |
| 6682 | uint64_t ram0_sbe : 1; /**< [ 16: 16](R/W1C/H) Detected single-bit error on the UAHC Desc/Reg Cache (RAM0). */ |
| 6683 | uint64_t reserved_8_15 : 8; |
| 6684 | uint64_t dma_rd_err : 1; /**< [ 7: 7](R/W1C/H) Received DMA read response error from NCBO */ |
| 6685 | uint64_t dma_wr_err : 1; /**< [ 6: 6](R/W1C/H) Received DMA write response error from NCBO */ |
| 6686 | uint64_t reserved_3_5 : 3; |
| 6687 | uint64_t xm_bad_dma : 1; /**< [ 2: 2](R/W1C/H) Detected bad DMA access from UAHC to NCB. Error information is logged in |
| 6688 | USBH()_UCTL_SHIM_CFG[XM_BAD_DMA_*]. Received a DMA request from UAHC that violates the |
| 6689 | assumptions made by the AXI-to-NCB shim. Such scenarios include: illegal length/size |
| 6690 | combinations and address out-of-bounds. |
| 6691 | |
| 6692 | For more information on exact failures, see the description in |
| 6693 | USBH()_UCTL_SHIM_CFG[XM_BAD_DMA_TYPE]. The hardware does not translate the request |
| 6694 | correctly |
| 6695 | and results may violate NCB protocols. */ |
| 6696 | uint64_t xs_ncb_oob : 1; /**< [ 1: 1](R/W1C/H) Detected out-of-bound register access to UAHC over NCB. The UAHC defines 1MB of register |
| 6697 | space, starting at offset 0x0. Any accesses outside of this register space cause this bit |
| 6698 | to be set to 1. Error information is logged in USBH()_UCTL_SHIM_CFG[XS_NCB_OOB_*]. */ |
| 6699 | uint64_t reserved_0 : 1; |
| 6700 | #else /* Word 0 - Little Endian */ |
| 6701 | uint64_t reserved_0 : 1; |
| 6702 | uint64_t xs_ncb_oob : 1; /**< [ 1: 1](R/W1C/H) Detected out-of-bound register access to UAHC over NCB. The UAHC defines 1MB of register |
| 6703 | space, starting at offset 0x0. Any accesses outside of this register space cause this bit |
| 6704 | to be set to 1. Error information is logged in USBH()_UCTL_SHIM_CFG[XS_NCB_OOB_*]. */ |
| 6705 | uint64_t xm_bad_dma : 1; /**< [ 2: 2](R/W1C/H) Detected bad DMA access from UAHC to NCB. Error information is logged in |
| 6706 | USBH()_UCTL_SHIM_CFG[XM_BAD_DMA_*]. Received a DMA request from UAHC that violates the |
| 6707 | assumptions made by the AXI-to-NCB shim. Such scenarios include: illegal length/size |
| 6708 | combinations and address out-of-bounds. |
| 6709 | |
| 6710 | For more information on exact failures, see the description in |
| 6711 | USBH()_UCTL_SHIM_CFG[XM_BAD_DMA_TYPE]. The hardware does not translate the request |
| 6712 | correctly |
| 6713 | and results may violate NCB protocols. */ |
| 6714 | uint64_t reserved_3_5 : 3; |
| 6715 | uint64_t dma_wr_err : 1; /**< [ 6: 6](R/W1C/H) Received DMA write response error from NCBO */ |
| 6716 | uint64_t dma_rd_err : 1; /**< [ 7: 7](R/W1C/H) Received DMA read response error from NCBO */ |
| 6717 | uint64_t reserved_8_15 : 8; |
| 6718 | uint64_t ram0_sbe : 1; /**< [ 16: 16](R/W1C/H) Detected single-bit error on the UAHC Desc/Reg Cache (RAM0). */ |
| 6719 | uint64_t ram0_dbe : 1; /**< [ 17: 17](R/W1C/H) Detected double-bit error on the UAHC Desc/Reg Cache (RAM0). */ |
| 6720 | uint64_t ram1_sbe : 1; /**< [ 18: 18](R/W1C/H) Detected single-bit error on the UAHC TxFIFO RAMs (RAM1). */ |
| 6721 | uint64_t ram1_dbe : 1; /**< [ 19: 19](R/W1C/H) Detected double-bit error on the UAHC TxFIFO RAMs (RAM1). */ |
| 6722 | uint64_t ram2_sbe : 1; /**< [ 20: 20](R/W1C/H) Detected single-bit error on the UAHC RxFIFO RAMs (RAM2). */ |
| 6723 | uint64_t ram2_dbe : 1; /**< [ 21: 21](R/W1C/H) Detected double-bit error on the UAHC RxFIFO RAMs (RAM2). */ |
| 6724 | uint64_t reserved_22_25 : 4; |
| 6725 | uint64_t xm_w_sbe : 1; /**< [ 26: 26](R/W1C/H) Detected single-bit error on the UCTL AxiMaster write-data FIFO. */ |
| 6726 | uint64_t xm_w_dbe : 1; /**< [ 27: 27](R/W1C/H) Detected double-bit error on the UCTL AxiMaster write-data FIFO. */ |
| 6727 | uint64_t xm_r_sbe : 1; /**< [ 28: 28](R/W1C/H) Detected single-bit error on the UCTL AxiMaster read-data FIFO. */ |
| 6728 | uint64_t xm_r_dbe : 1; /**< [ 29: 29](R/W1C/H) Detected double-bit error on the UCTL AxiMaster read-data FIFO. */ |
| 6729 | uint64_t reserved_30_63 : 34; |
| 6730 | #endif /* Word 0 - End */ |
| 6731 | } s; |
| 6732 | /* struct bdk_usbhx_uctl_intstat_s cn; */ |
| 6733 | }; |
| 6734 | typedef union bdk_usbhx_uctl_intstat bdk_usbhx_uctl_intstat_t; |
| 6735 | |
| 6736 | static inline uint64_t BDK_USBHX_UCTL_INTSTAT(unsigned long a) __attribute__ ((pure, always_inline)); |
| 6737 | static inline uint64_t BDK_USBHX_UCTL_INTSTAT(unsigned long a) |
| 6738 | { |
| 6739 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 6740 | return 0x868000100030ll + 0x1000000000ll * ((a) & 0x1); |
| 6741 | __bdk_csr_fatal("USBHX_UCTL_INTSTAT", 1, a, 0, 0, 0); |
| 6742 | } |
| 6743 | |
| 6744 | #define typedef_BDK_USBHX_UCTL_INTSTAT(a) bdk_usbhx_uctl_intstat_t |
| 6745 | #define bustype_BDK_USBHX_UCTL_INTSTAT(a) BDK_CSR_TYPE_NCB |
| 6746 | #define basename_BDK_USBHX_UCTL_INTSTAT(a) "USBHX_UCTL_INTSTAT" |
| 6747 | #define device_bar_BDK_USBHX_UCTL_INTSTAT(a) 0x0 /* PF_BAR0 */ |
| 6748 | #define busnum_BDK_USBHX_UCTL_INTSTAT(a) (a) |
| 6749 | #define arguments_BDK_USBHX_UCTL_INTSTAT(a) (a),-1,-1,-1 |
| 6750 | |
| 6751 | /** |
| 6752 | * Register (NCB) usbh#_uctl_intstat_w1s |
| 6753 | * |
| 6754 | * UCTL Interrupt Status Register |
| 6755 | * This register sets interrupt bits. |
| 6756 | */ |
| 6757 | union bdk_usbhx_uctl_intstat_w1s |
| 6758 | { |
| 6759 | uint64_t u; |
| 6760 | struct bdk_usbhx_uctl_intstat_w1s_s |
| 6761 | { |
| 6762 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 6763 | uint64_t reserved_30_63 : 34; |
| 6764 | uint64_t xm_r_dbe : 1; /**< [ 29: 29](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[XM_R_DBE]. */ |
| 6765 | uint64_t xm_r_sbe : 1; /**< [ 28: 28](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[XM_R_SBE]. */ |
| 6766 | uint64_t xm_w_dbe : 1; /**< [ 27: 27](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[XM_W_DBE]. */ |
| 6767 | uint64_t xm_w_sbe : 1; /**< [ 26: 26](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[XM_W_SBE]. */ |
| 6768 | uint64_t reserved_22_25 : 4; |
| 6769 | uint64_t ram2_dbe : 1; /**< [ 21: 21](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[RAM2_DBE]. */ |
| 6770 | uint64_t ram2_sbe : 1; /**< [ 20: 20](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[RAM2_SBE]. */ |
| 6771 | uint64_t ram1_dbe : 1; /**< [ 19: 19](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[RAM1_DBE]. */ |
| 6772 | uint64_t ram1_sbe : 1; /**< [ 18: 18](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[RAM1_SBE]. */ |
| 6773 | uint64_t ram0_dbe : 1; /**< [ 17: 17](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[RAM0_DBE]. */ |
| 6774 | uint64_t ram0_sbe : 1; /**< [ 16: 16](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[RAM0_SBE]. */ |
| 6775 | uint64_t reserved_8_15 : 8; |
| 6776 | uint64_t dma_rd_err : 1; /**< [ 7: 7](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[DMA_RD_ERR]. */ |
| 6777 | uint64_t dma_wr_err : 1; /**< [ 6: 6](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[DMA_WR_ERR]. */ |
| 6778 | uint64_t reserved_3_5 : 3; |
| 6779 | uint64_t xm_bad_dma : 1; /**< [ 2: 2](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[XM_BAD_DMA]. */ |
| 6780 | uint64_t xs_ncb_oob : 1; /**< [ 1: 1](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[XS_NCB_OOB]. */ |
| 6781 | uint64_t reserved_0 : 1; |
| 6782 | #else /* Word 0 - Little Endian */ |
| 6783 | uint64_t reserved_0 : 1; |
| 6784 | uint64_t xs_ncb_oob : 1; /**< [ 1: 1](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[XS_NCB_OOB]. */ |
| 6785 | uint64_t xm_bad_dma : 1; /**< [ 2: 2](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[XM_BAD_DMA]. */ |
| 6786 | uint64_t reserved_3_5 : 3; |
| 6787 | uint64_t dma_wr_err : 1; /**< [ 6: 6](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[DMA_WR_ERR]. */ |
| 6788 | uint64_t dma_rd_err : 1; /**< [ 7: 7](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[DMA_RD_ERR]. */ |
| 6789 | uint64_t reserved_8_15 : 8; |
| 6790 | uint64_t ram0_sbe : 1; /**< [ 16: 16](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[RAM0_SBE]. */ |
| 6791 | uint64_t ram0_dbe : 1; /**< [ 17: 17](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[RAM0_DBE]. */ |
| 6792 | uint64_t ram1_sbe : 1; /**< [ 18: 18](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[RAM1_SBE]. */ |
| 6793 | uint64_t ram1_dbe : 1; /**< [ 19: 19](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[RAM1_DBE]. */ |
| 6794 | uint64_t ram2_sbe : 1; /**< [ 20: 20](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[RAM2_SBE]. */ |
| 6795 | uint64_t ram2_dbe : 1; /**< [ 21: 21](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[RAM2_DBE]. */ |
| 6796 | uint64_t reserved_22_25 : 4; |
| 6797 | uint64_t xm_w_sbe : 1; /**< [ 26: 26](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[XM_W_SBE]. */ |
| 6798 | uint64_t xm_w_dbe : 1; /**< [ 27: 27](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[XM_W_DBE]. */ |
| 6799 | uint64_t xm_r_sbe : 1; /**< [ 28: 28](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[XM_R_SBE]. */ |
| 6800 | uint64_t xm_r_dbe : 1; /**< [ 29: 29](R/W1S/H) Reads or sets USBH(0..1)_UCTL_INTSTAT[XM_R_DBE]. */ |
| 6801 | uint64_t reserved_30_63 : 34; |
| 6802 | #endif /* Word 0 - End */ |
| 6803 | } s; |
| 6804 | /* struct bdk_usbhx_uctl_intstat_w1s_s cn; */ |
| 6805 | }; |
| 6806 | typedef union bdk_usbhx_uctl_intstat_w1s bdk_usbhx_uctl_intstat_w1s_t; |
| 6807 | |
| 6808 | static inline uint64_t BDK_USBHX_UCTL_INTSTAT_W1S(unsigned long a) __attribute__ ((pure, always_inline)); |
| 6809 | static inline uint64_t BDK_USBHX_UCTL_INTSTAT_W1S(unsigned long a) |
| 6810 | { |
| 6811 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 6812 | return 0x868000100038ll + 0x1000000000ll * ((a) & 0x1); |
| 6813 | __bdk_csr_fatal("USBHX_UCTL_INTSTAT_W1S", 1, a, 0, 0, 0); |
| 6814 | } |
| 6815 | |
| 6816 | #define typedef_BDK_USBHX_UCTL_INTSTAT_W1S(a) bdk_usbhx_uctl_intstat_w1s_t |
| 6817 | #define bustype_BDK_USBHX_UCTL_INTSTAT_W1S(a) BDK_CSR_TYPE_NCB |
| 6818 | #define basename_BDK_USBHX_UCTL_INTSTAT_W1S(a) "USBHX_UCTL_INTSTAT_W1S" |
| 6819 | #define device_bar_BDK_USBHX_UCTL_INTSTAT_W1S(a) 0x0 /* PF_BAR0 */ |
| 6820 | #define busnum_BDK_USBHX_UCTL_INTSTAT_W1S(a) (a) |
| 6821 | #define arguments_BDK_USBHX_UCTL_INTSTAT_W1S(a) (a),-1,-1,-1 |
| 6822 | |
| 6823 | /** |
| 6824 | * Register (NCB) usbh#_uctl_port#_cfg_hs |
| 6825 | * |
| 6826 | * UCTL Port Configuration HighSpeed Register |
| 6827 | * This register controls configuration and test controls for the HS port 0 PHY. |
| 6828 | * |
| 6829 | * This register is accessible only when USB()_UCTL_CTL[H_CLK_EN] = 1. |
| 6830 | * |
| 6831 | * This register can be reset by NCB reset. |
| 6832 | * |
| 6833 | * Internal: |
| 6834 | * INTERNAL: All these settings are for HS functionality, connect on DVDD power domain. |
| 6835 | */ |
| 6836 | union bdk_usbhx_uctl_portx_cfg_hs |
| 6837 | { |
| 6838 | uint64_t u; |
| 6839 | struct bdk_usbhx_uctl_portx_cfg_hs_s |
| 6840 | { |
| 6841 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 6842 | uint64_t reserved_58_63 : 6; |
| 6843 | uint64_t comp_dis_tune : 3; /**< [ 57: 55](R/W) Disconnect threshold voltage. Adjusts the voltage level for the threshold used to detect a |
| 6844 | disconnect event at the host. |
| 6845 | A positive binary bit setting change results in a +1.5% incremental change in the |
| 6846 | threshold voltage level, while a negative binary bit setting change results in a -1.5% |
| 6847 | incremental change in the threshold voltage level. */ |
| 6848 | uint64_t sq_rx_tune : 3; /**< [ 54: 52](R/W) Squelch threshold adjustment. Adjusts the voltage level for the threshold used to detect |
| 6849 | valid high-speed data. |
| 6850 | A positive binary bit setting change results in a -5% incremental change in threshold |
| 6851 | voltage level, while a negative binary bit setting change results in a +5% incremental |
| 6852 | change in threshold voltage level. */ |
| 6853 | uint64_t tx_fsls_tune : 4; /**< [ 51: 48](R/W) Low-speed/full-speed source impedance adjustment. Adjusts the low- and full-speed single- |
| 6854 | ended source impedance while driving high. This parameter control is encoded in |
| 6855 | thermometer code. |
| 6856 | A positive thermometer code change results in a -2.5% incremental change in source |
| 6857 | impedance. A negative thermometer code change results in +2.5% incremental change in |
| 6858 | source impedance. Any non-thermometer code setting (that is, 0x9) is not supported and |
| 6859 | reserved. */ |
| 6860 | uint64_t reserved_46_47 : 2; |
| 6861 | uint64_t tx_hs_xv_tune : 2; /**< [ 45: 44](R/W) Transmitter high-speed crossover adjustment. This bus adjusts the voltage at which the DP0 |
| 6862 | and DM0 signals cross while transmitting in high-speed mode. |
| 6863 | 0x3 = default setting. |
| 6864 | 0x2 = +15 mV. |
| 6865 | 0x1 = -15 mV. |
| 6866 | 0x0 = reserved. */ |
| 6867 | uint64_t tx_preemp_amp_tune : 2; /**< [ 43: 42](R/W) High-speed transmitter preemphasis current control. Controls the amount of current |
| 6868 | sourced to DP0 and DM0 after a J-to-K or K-to-J transition. The high-speed transmitter |
| 6869 | preemphasis current is defined in terms of unit amounts. One unit amount is approximately |
| 6870 | 600 A and is defined as 1* preemphasis current. |
| 6871 | 0x0 = High-speed TX preemphasis is disabled. |
| 6872 | 0x1 = High-speed TX preemphasis circuit sources 1* preemphasis current. |
| 6873 | 0x2 = High-speed TX preemphasis circuit sources 2* preemphasis current. |
| 6874 | 0x3 = High-speed TX preemphasis circuit sources 3* preemphasis current. |
| 6875 | |
| 6876 | If these signals are not used, set them to 0x0. */ |
| 6877 | uint64_t reserved_41 : 1; |
| 6878 | uint64_t tx_preemp_pulse_tune : 1; /**< [ 40: 40](R/W) High-speed transmitter preemphasis duration control. Controls the duration for which the |
| 6879 | high-speed preemphasis current is sourced onto DP0 or DM0. The high-speed transmitter |
| 6880 | preemphasis duration is defined in terms of unit amounts. One unit of preemphasis duration |
| 6881 | is approximately 580 ps and is defined as 1* preemphasis duration. This signal is valid |
| 6882 | only if either TX_PREEMP_AMP_TUNE0[1] or TX_PREEMP_AMP_TUNE0[0] is set to 1. |
| 6883 | 0 = 2*, long preemphasis current duration (design default). |
| 6884 | 1 = 1*, short preemphasis current duration. |
| 6885 | |
| 6886 | If this signal is not used, set it to 0. */ |
| 6887 | uint64_t tx_res_tune : 2; /**< [ 39: 38](R/W) USB source-impedance adjustment. Some applications require additional devices to be added |
| 6888 | on the USB, such as a series switch, which can add significant series resistance. This bus |
| 6889 | adjusts the driver source impedance to compensate for added series resistance on the USB. |
| 6890 | 0x0 = source impedance is decreased by approximately 1.5 ohm. |
| 6891 | 0x1 = design default. |
| 6892 | 0x2 = source impedance is decreased by approximately 2 ohm. |
| 6893 | 0x3 = source impedance is decreased by approximately 4 ohm. |
| 6894 | |
| 6895 | Any setting other than the default can result in source-impedance variation across |
| 6896 | process, voltage, and temperature conditions that does not meet USB 2.0 specification |
| 6897 | limits. If this bus is not used, leave it at the default setting. */ |
| 6898 | uint64_t tx_rise_tune : 2; /**< [ 37: 36](R/W) High-speed transmitter rise-/fall-time adjustment. Adjusts the rise/fall times of the |
| 6899 | high-speed waveform. A positive binary bit setting change results in a -4% incremental |
| 6900 | change in the high-speed rise/fall time. A negative binary bit setting change results in a |
| 6901 | +4% incremental change in the high-speed rise/fall time. */ |
| 6902 | uint64_t tx_vref_tune : 4; /**< [ 35: 32](R/W) High-speed DC voltage-level adjustment. Adjusts the high-speed DC level voltage. |
| 6903 | A positive binary-bit-setting change results in a +1.25% incremental change in high-speed |
| 6904 | DC voltage level, while a negative binary-bit-setting change results in a -1.25% |
| 6905 | incremental change in high-speed DC voltage level. |
| 6906 | |
| 6907 | The default bit setting is intended to create a HighSpeed transmit |
| 6908 | DC level of approximately 400mV. */ |
| 6909 | uint64_t reserved_4_31 : 28; |
| 6910 | uint64_t vatest_enable : 2; /**< [ 3: 2](R/W) Analog test-pin select. Enables analog test voltages to be placed on the ID0 pin. |
| 6911 | 0x0 = Test functionality disabled. |
| 6912 | 0x1 = Test functionality enabled. |
| 6913 | 0x2, 0x3 = Reserved, invalid settings. |
| 6914 | |
| 6915 | See also the PHY databook for details on how to select which analog test voltage. */ |
| 6916 | uint64_t loopback_enable : 1; /**< [ 1: 1](R/W) Places the high-speed PHY in loopback mode, which concurrently enables high-speed receive |
| 6917 | and transmit logic. */ |
| 6918 | uint64_t atereset : 1; /**< [ 0: 0](R/W) Per-PHY ATE reset. When the USB core is powered up (not in suspend mode), an automatic |
| 6919 | tester can use this to disable PHYCLOCK and FREECLK, then re-enable them with an aligned |
| 6920 | phase. |
| 6921 | 0 = PHYCLOCK and FREECLK are available within a specific period after ATERESET is |
| 6922 | deasserted. |
| 6923 | 1 = PHYCLOCK and FREECLK outputs are disabled. */ |
| 6924 | #else /* Word 0 - Little Endian */ |
| 6925 | uint64_t atereset : 1; /**< [ 0: 0](R/W) Per-PHY ATE reset. When the USB core is powered up (not in suspend mode), an automatic |
| 6926 | tester can use this to disable PHYCLOCK and FREECLK, then re-enable them with an aligned |
| 6927 | phase. |
| 6928 | 0 = PHYCLOCK and FREECLK are available within a specific period after ATERESET is |
| 6929 | deasserted. |
| 6930 | 1 = PHYCLOCK and FREECLK outputs are disabled. */ |
| 6931 | uint64_t loopback_enable : 1; /**< [ 1: 1](R/W) Places the high-speed PHY in loopback mode, which concurrently enables high-speed receive |
| 6932 | and transmit logic. */ |
| 6933 | uint64_t vatest_enable : 2; /**< [ 3: 2](R/W) Analog test-pin select. Enables analog test voltages to be placed on the ID0 pin. |
| 6934 | 0x0 = Test functionality disabled. |
| 6935 | 0x1 = Test functionality enabled. |
| 6936 | 0x2, 0x3 = Reserved, invalid settings. |
| 6937 | |
| 6938 | See also the PHY databook for details on how to select which analog test voltage. */ |
| 6939 | uint64_t reserved_4_31 : 28; |
| 6940 | uint64_t tx_vref_tune : 4; /**< [ 35: 32](R/W) High-speed DC voltage-level adjustment. Adjusts the high-speed DC level voltage. |
| 6941 | A positive binary-bit-setting change results in a +1.25% incremental change in high-speed |
| 6942 | DC voltage level, while a negative binary-bit-setting change results in a -1.25% |
| 6943 | incremental change in high-speed DC voltage level. |
| 6944 | |
| 6945 | The default bit setting is intended to create a HighSpeed transmit |
| 6946 | DC level of approximately 400mV. */ |
| 6947 | uint64_t tx_rise_tune : 2; /**< [ 37: 36](R/W) High-speed transmitter rise-/fall-time adjustment. Adjusts the rise/fall times of the |
| 6948 | high-speed waveform. A positive binary bit setting change results in a -4% incremental |
| 6949 | change in the high-speed rise/fall time. A negative binary bit setting change results in a |
| 6950 | +4% incremental change in the high-speed rise/fall time. */ |
| 6951 | uint64_t tx_res_tune : 2; /**< [ 39: 38](R/W) USB source-impedance adjustment. Some applications require additional devices to be added |
| 6952 | on the USB, such as a series switch, which can add significant series resistance. This bus |
| 6953 | adjusts the driver source impedance to compensate for added series resistance on the USB. |
| 6954 | 0x0 = source impedance is decreased by approximately 1.5 ohm. |
| 6955 | 0x1 = design default. |
| 6956 | 0x2 = source impedance is decreased by approximately 2 ohm. |
| 6957 | 0x3 = source impedance is decreased by approximately 4 ohm. |
| 6958 | |
| 6959 | Any setting other than the default can result in source-impedance variation across |
| 6960 | process, voltage, and temperature conditions that does not meet USB 2.0 specification |
| 6961 | limits. If this bus is not used, leave it at the default setting. */ |
| 6962 | uint64_t tx_preemp_pulse_tune : 1; /**< [ 40: 40](R/W) High-speed transmitter preemphasis duration control. Controls the duration for which the |
| 6963 | high-speed preemphasis current is sourced onto DP0 or DM0. The high-speed transmitter |
| 6964 | preemphasis duration is defined in terms of unit amounts. One unit of preemphasis duration |
| 6965 | is approximately 580 ps and is defined as 1* preemphasis duration. This signal is valid |
| 6966 | only if either TX_PREEMP_AMP_TUNE0[1] or TX_PREEMP_AMP_TUNE0[0] is set to 1. |
| 6967 | 0 = 2*, long preemphasis current duration (design default). |
| 6968 | 1 = 1*, short preemphasis current duration. |
| 6969 | |
| 6970 | If this signal is not used, set it to 0. */ |
| 6971 | uint64_t reserved_41 : 1; |
| 6972 | uint64_t tx_preemp_amp_tune : 2; /**< [ 43: 42](R/W) High-speed transmitter preemphasis current control. Controls the amount of current |
| 6973 | sourced to DP0 and DM0 after a J-to-K or K-to-J transition. The high-speed transmitter |
| 6974 | preemphasis current is defined in terms of unit amounts. One unit amount is approximately |
| 6975 | 600 A and is defined as 1* preemphasis current. |
| 6976 | 0x0 = High-speed TX preemphasis is disabled. |
| 6977 | 0x1 = High-speed TX preemphasis circuit sources 1* preemphasis current. |
| 6978 | 0x2 = High-speed TX preemphasis circuit sources 2* preemphasis current. |
| 6979 | 0x3 = High-speed TX preemphasis circuit sources 3* preemphasis current. |
| 6980 | |
| 6981 | If these signals are not used, set them to 0x0. */ |
| 6982 | uint64_t tx_hs_xv_tune : 2; /**< [ 45: 44](R/W) Transmitter high-speed crossover adjustment. This bus adjusts the voltage at which the DP0 |
| 6983 | and DM0 signals cross while transmitting in high-speed mode. |
| 6984 | 0x3 = default setting. |
| 6985 | 0x2 = +15 mV. |
| 6986 | 0x1 = -15 mV. |
| 6987 | 0x0 = reserved. */ |
| 6988 | uint64_t reserved_46_47 : 2; |
| 6989 | uint64_t tx_fsls_tune : 4; /**< [ 51: 48](R/W) Low-speed/full-speed source impedance adjustment. Adjusts the low- and full-speed single- |
| 6990 | ended source impedance while driving high. This parameter control is encoded in |
| 6991 | thermometer code. |
| 6992 | A positive thermometer code change results in a -2.5% incremental change in source |
| 6993 | impedance. A negative thermometer code change results in +2.5% incremental change in |
| 6994 | source impedance. Any non-thermometer code setting (that is, 0x9) is not supported and |
| 6995 | reserved. */ |
| 6996 | uint64_t sq_rx_tune : 3; /**< [ 54: 52](R/W) Squelch threshold adjustment. Adjusts the voltage level for the threshold used to detect |
| 6997 | valid high-speed data. |
| 6998 | A positive binary bit setting change results in a -5% incremental change in threshold |
| 6999 | voltage level, while a negative binary bit setting change results in a +5% incremental |
| 7000 | change in threshold voltage level. */ |
| 7001 | uint64_t comp_dis_tune : 3; /**< [ 57: 55](R/W) Disconnect threshold voltage. Adjusts the voltage level for the threshold used to detect a |
| 7002 | disconnect event at the host. |
| 7003 | A positive binary bit setting change results in a +1.5% incremental change in the |
| 7004 | threshold voltage level, while a negative binary bit setting change results in a -1.5% |
| 7005 | incremental change in the threshold voltage level. */ |
| 7006 | uint64_t reserved_58_63 : 6; |
| 7007 | #endif /* Word 0 - End */ |
| 7008 | } s; |
| 7009 | /* struct bdk_usbhx_uctl_portx_cfg_hs_s cn; */ |
| 7010 | }; |
| 7011 | typedef union bdk_usbhx_uctl_portx_cfg_hs bdk_usbhx_uctl_portx_cfg_hs_t; |
| 7012 | |
| 7013 | static inline uint64_t BDK_USBHX_UCTL_PORTX_CFG_HS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 7014 | static inline uint64_t BDK_USBHX_UCTL_PORTX_CFG_HS(unsigned long a, unsigned long b) |
| 7015 | { |
| 7016 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==0))) |
| 7017 | return 0x868000100050ll + 0x1000000000ll * ((a) & 0x1) + 0x20ll * ((b) & 0x0); |
| 7018 | __bdk_csr_fatal("USBHX_UCTL_PORTX_CFG_HS", 2, a, b, 0, 0); |
| 7019 | } |
| 7020 | |
| 7021 | #define typedef_BDK_USBHX_UCTL_PORTX_CFG_HS(a,b) bdk_usbhx_uctl_portx_cfg_hs_t |
| 7022 | #define bustype_BDK_USBHX_UCTL_PORTX_CFG_HS(a,b) BDK_CSR_TYPE_NCB |
| 7023 | #define basename_BDK_USBHX_UCTL_PORTX_CFG_HS(a,b) "USBHX_UCTL_PORTX_CFG_HS" |
| 7024 | #define device_bar_BDK_USBHX_UCTL_PORTX_CFG_HS(a,b) 0x0 /* PF_BAR0 */ |
| 7025 | #define busnum_BDK_USBHX_UCTL_PORTX_CFG_HS(a,b) (a) |
| 7026 | #define arguments_BDK_USBHX_UCTL_PORTX_CFG_HS(a,b) (a),(b),-1,-1 |
| 7027 | |
| 7028 | /** |
| 7029 | * Register (NCB) usbh#_uctl_port#_cfg_ss |
| 7030 | * |
| 7031 | * UCTL Port Configuration SuperSpeed Register |
| 7032 | * This register controls configuration and test controls for the SS port 0 PHY. |
| 7033 | * |
| 7034 | * This register is accessible only when USB()_UCTL_CTL[H_CLK_EN] = 1. |
| 7035 | * |
| 7036 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UCTL_RST]. |
| 7037 | * |
| 7038 | * Internal: |
| 7039 | * All these settings are for high-speed functionality, connect on DVDD power domain. |
| 7040 | */ |
| 7041 | union bdk_usbhx_uctl_portx_cfg_ss |
| 7042 | { |
| 7043 | uint64_t u; |
| 7044 | struct bdk_usbhx_uctl_portx_cfg_ss_s |
| 7045 | { |
| 7046 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 7047 | uint64_t tx_vboost_lvl : 3; /**< [ 63: 61](R/W) TX voltage-boost level. Sets the boosted transmit launch amplitude (mVppd). The default |
| 7048 | bit setting is intended to set the launch amplitude to approximately 1,008 mVppd. A |
| 7049 | single, positive binary bit setting change results in a +156 mVppd change in the TX launch |
| 7050 | amplitude. |
| 7051 | A single, negative binary bit setting change results in a -156 mVppd change in the TX |
| 7052 | launch amplitude. All settings more than one binary bit change should not be used. |
| 7053 | 0x3 = 0.844 V launch amplitude. |
| 7054 | 0x4 = 1.008 V launch amplitude. |
| 7055 | 0x5 = 1.156 V launch amplitude. |
| 7056 | All others values are invalid. */ |
| 7057 | uint64_t los_bias : 3; /**< [ 60: 58](R/W) Loss-of-signal detector threshold-level control. A positive, binary bit setting change |
| 7058 | results in a +15 mVp incremental change in the LOS threshold. |
| 7059 | A negative binary bit setting change results in a -15 mVp incremental change in the LOS |
| 7060 | threshold. The 0x0 setting is reserved and must not be used. The default 0x5 setting |
| 7061 | corresponds to approximately 105 mVp. |
| 7062 | 0x0 = invalid. |
| 7063 | 0x1 = 45 mV. |
| 7064 | 0x2 = 60 mV. |
| 7065 | 0x3 = 75 mV. |
| 7066 | 0x4 = 90 mV. |
| 7067 | 0x5 = 105 mV (default). |
| 7068 | 0x6 = 120 mV. |
| 7069 | 0x7 = 135 mV. */ |
| 7070 | uint64_t lane0_ext_pclk_req : 1; /**< [ 57: 57](R/W) When asserted, this signal enables the pipe0_pclk output regardless of power state (along |
| 7071 | with the associated increase in power consumption). You can use this input to enable |
| 7072 | pipe0_pclk in the P3 state without going through a complete boot sequence. */ |
| 7073 | uint64_t lane0_tx2rx_loopbk : 1; /**< [ 56: 56](R/W) When asserted, data from TX predriver is looped back to RX slicers. LOS is bypassed and |
| 7074 | based on the tx0_en input so that rx0_los = !tx_data_en. */ |
| 7075 | uint64_t reserved_42_55 : 14; |
| 7076 | uint64_t pcs_rx_los_mask_val : 10; /**< [ 41: 32](R/W) Configurable loss-of-signal mask width. Sets the number of reference clock cycles to mask |
| 7077 | the incoming LFPS in U3 and U2 states. Masks the incoming LFPS for the number of reference |
| 7078 | clock cycles equal to the value of pcs_rx_los_mask_val\<9:0\>. This control filters out |
| 7079 | short, non-compliant LFPS glitches sent by a noncompliant host. |
| 7080 | |
| 7081 | For normal operation, set to a targeted mask interval of 10us (value = 10us / Tref_clk). |
| 7082 | If the USBH()_UCTL_CTL[REF_CLK_DIV2] is used, then |
| 7083 | (value = 10us / (2 * Tref_clk)). These equations are based on the SuperSpeed reference |
| 7084 | clock frequency. The value of PCS_RX_LOS_MASK_VAL should be as follows: |
| 7085 | |
| 7086 | \<pre\> |
| 7087 | Frequency DIV2 LOS_MASK |
| 7088 | --------- --- -------- |
| 7089 | 200 MHz 1 0x3E8 |
| 7090 | 125 MHz 0 0x4E2 |
| 7091 | 104 MHz 0 0x410 |
| 7092 | 100 MHz 0 0x3E8 |
| 7093 | 96 MHz 0 0x3C0 |
| 7094 | 76.8 MHz 1 0x180 |
| 7095 | 52 MHz 0 0x208 |
| 7096 | 50 MHz 0 0x1F4 |
| 7097 | 48 MHz 0 0x1E0 |
| 7098 | 40 MHz 1 0x0C8 |
| 7099 | 38.4 MHz 0 0x180 |
| 7100 | 26 MHz 0 0x104 |
| 7101 | 25 MHz 0 0x0FA |
| 7102 | 24 MHz 0 0x0F0 |
| 7103 | 20 MHz 0 0x0C8 |
| 7104 | 19.2 MHz 0 0x0C0 |
| 7105 | \</pre\> |
| 7106 | |
| 7107 | Setting this bus to 0x0 disables masking. The value should be defined when the PHY is in |
| 7108 | reset. Changing this value during operation might disrupt normal operation of the link. */ |
| 7109 | uint64_t pcs_tx_deemph_3p5db : 6; /**< [ 31: 26](R/W) Fine-tune transmitter driver deemphasis when set to 3.5db. |
| 7110 | This static value sets the TX driver deemphasis value when |
| 7111 | USBH()_UAHC_GUSB3PIPECTL()[TXDEEMPHASIS] is set to |
| 7112 | 0x1 (according to the PIPE3 specification). The values for transmit deemphasis are derived |
| 7113 | from the following equation: |
| 7114 | |
| 7115 | _ TX de-emphasis (db) = 20 * log_base_10((128 - 2 * pcs_tx_deemph)/128) |
| 7116 | |
| 7117 | In general, the parameter controls are static signals to be set prior to taking the PHY |
| 7118 | out of reset. However, you can dynamically change these values on-the-fly for test |
| 7119 | purposes. In this case, changes to the transmitter to reflect the current value occur only |
| 7120 | after USBH()_UAHC_GUSB3PIPECTL()[TXDEEMPHASIS] changes. |
| 7121 | |
| 7122 | Internal: |
| 7123 | Default value is package dependant. */ |
| 7124 | uint64_t pcs_tx_deemph_6db : 6; /**< [ 25: 20](R/W) Fine-tune transmitter driver deemphasis when set to 6 db. |
| 7125 | This static value sets the TX driver deemphasis value when |
| 7126 | USBH()_UAHC_GUSB3PIPECTL()[TXDEEMPHASIS] is set to |
| 7127 | 0x2 (according to the PIPE3 specification). This bus is provided for completeness and as a |
| 7128 | second potential launch amplitude. The values for transmit deemphasis are derived from the |
| 7129 | following equation: |
| 7130 | |
| 7131 | _ TX deemphasis (db) = 20 * log_base_10((128 - 2 * pcs_tx_deemph)/128) |
| 7132 | |
| 7133 | In general, the parameter controls are static signals to be set prior to taking the PHY |
| 7134 | out of reset. However, you can dynamically change these values on-the-fly for test |
| 7135 | purposes. In this case, changes to the transmitter to reflect the current value occur only |
| 7136 | after USBH()_UAHC_GUSB3PIPECTL()[TXDEEMPHASIS] changes. |
| 7137 | |
| 7138 | Internal: |
| 7139 | Default value is package dependant. */ |
| 7140 | uint64_t pcs_tx_swing_full : 7; /**< [ 19: 13](R/W) Launch amplitude of the transmitter. Sets the launch amplitude of the transmitter. The |
| 7141 | values for transmit amplitude are derived from the following equation: |
| 7142 | TX amplitude (V) = vptx * ((pcs_tx_swing_full + 1)/128) |
| 7143 | |
| 7144 | In general, the parameter controls are static signals to be set prior to taking the PHY |
| 7145 | out of reset. However, you can dynamically change these values on-the-fly for test |
| 7146 | purposes. In this case, changes to the transmitter to reflect the current value occur only |
| 7147 | after USBH()_UAHC_GUSB3PIPECTL()[TXDEEMPHASIS] changes. |
| 7148 | |
| 7149 | Internal: |
| 7150 | Default value is package dependant. */ |
| 7151 | uint64_t lane0_tx_term_offset : 5; /**< [ 12: 8](R/W) Transmitter termination offset. Reserved, set to 0x0. */ |
| 7152 | uint64_t reserved_6_7 : 2; |
| 7153 | uint64_t res_tune_ack : 1; /**< [ 5: 5](RO/H) Resistor tune acknowledge. While asserted, indicates a resistor tune is in progress. */ |
| 7154 | uint64_t res_tune_req : 1; /**< [ 4: 4](R/W) Resistor tune request. The rising edge triggers a resistor tune request (if one is not |
| 7155 | already in progress). When asserted, [RES_TUNE_ACK] is asserted high until calibration of |
| 7156 | the termination impedance is complete. |
| 7157 | Tuning disrupts the normal flow of data; therefore, assert [RES_TUNE_REQ] only when the |
| 7158 | PHY |
| 7159 | is inactive. The PHY automatically performs a tune when coming out of PRST. */ |
| 7160 | uint64_t reserved_0_3 : 4; |
| 7161 | #else /* Word 0 - Little Endian */ |
| 7162 | uint64_t reserved_0_3 : 4; |
| 7163 | uint64_t res_tune_req : 1; /**< [ 4: 4](R/W) Resistor tune request. The rising edge triggers a resistor tune request (if one is not |
| 7164 | already in progress). When asserted, [RES_TUNE_ACK] is asserted high until calibration of |
| 7165 | the termination impedance is complete. |
| 7166 | Tuning disrupts the normal flow of data; therefore, assert [RES_TUNE_REQ] only when the |
| 7167 | PHY |
| 7168 | is inactive. The PHY automatically performs a tune when coming out of PRST. */ |
| 7169 | uint64_t res_tune_ack : 1; /**< [ 5: 5](RO/H) Resistor tune acknowledge. While asserted, indicates a resistor tune is in progress. */ |
| 7170 | uint64_t reserved_6_7 : 2; |
| 7171 | uint64_t lane0_tx_term_offset : 5; /**< [ 12: 8](R/W) Transmitter termination offset. Reserved, set to 0x0. */ |
| 7172 | uint64_t pcs_tx_swing_full : 7; /**< [ 19: 13](R/W) Launch amplitude of the transmitter. Sets the launch amplitude of the transmitter. The |
| 7173 | values for transmit amplitude are derived from the following equation: |
| 7174 | TX amplitude (V) = vptx * ((pcs_tx_swing_full + 1)/128) |
| 7175 | |
| 7176 | In general, the parameter controls are static signals to be set prior to taking the PHY |
| 7177 | out of reset. However, you can dynamically change these values on-the-fly for test |
| 7178 | purposes. In this case, changes to the transmitter to reflect the current value occur only |
| 7179 | after USBH()_UAHC_GUSB3PIPECTL()[TXDEEMPHASIS] changes. |
| 7180 | |
| 7181 | Internal: |
| 7182 | Default value is package dependant. */ |
| 7183 | uint64_t pcs_tx_deemph_6db : 6; /**< [ 25: 20](R/W) Fine-tune transmitter driver deemphasis when set to 6 db. |
| 7184 | This static value sets the TX driver deemphasis value when |
| 7185 | USBH()_UAHC_GUSB3PIPECTL()[TXDEEMPHASIS] is set to |
| 7186 | 0x2 (according to the PIPE3 specification). This bus is provided for completeness and as a |
| 7187 | second potential launch amplitude. The values for transmit deemphasis are derived from the |
| 7188 | following equation: |
| 7189 | |
| 7190 | _ TX deemphasis (db) = 20 * log_base_10((128 - 2 * pcs_tx_deemph)/128) |
| 7191 | |
| 7192 | In general, the parameter controls are static signals to be set prior to taking the PHY |
| 7193 | out of reset. However, you can dynamically change these values on-the-fly for test |
| 7194 | purposes. In this case, changes to the transmitter to reflect the current value occur only |
| 7195 | after USBH()_UAHC_GUSB3PIPECTL()[TXDEEMPHASIS] changes. |
| 7196 | |
| 7197 | Internal: |
| 7198 | Default value is package dependant. */ |
| 7199 | uint64_t pcs_tx_deemph_3p5db : 6; /**< [ 31: 26](R/W) Fine-tune transmitter driver deemphasis when set to 3.5db. |
| 7200 | This static value sets the TX driver deemphasis value when |
| 7201 | USBH()_UAHC_GUSB3PIPECTL()[TXDEEMPHASIS] is set to |
| 7202 | 0x1 (according to the PIPE3 specification). The values for transmit deemphasis are derived |
| 7203 | from the following equation: |
| 7204 | |
| 7205 | _ TX de-emphasis (db) = 20 * log_base_10((128 - 2 * pcs_tx_deemph)/128) |
| 7206 | |
| 7207 | In general, the parameter controls are static signals to be set prior to taking the PHY |
| 7208 | out of reset. However, you can dynamically change these values on-the-fly for test |
| 7209 | purposes. In this case, changes to the transmitter to reflect the current value occur only |
| 7210 | after USBH()_UAHC_GUSB3PIPECTL()[TXDEEMPHASIS] changes. |
| 7211 | |
| 7212 | Internal: |
| 7213 | Default value is package dependant. */ |
| 7214 | uint64_t pcs_rx_los_mask_val : 10; /**< [ 41: 32](R/W) Configurable loss-of-signal mask width. Sets the number of reference clock cycles to mask |
| 7215 | the incoming LFPS in U3 and U2 states. Masks the incoming LFPS for the number of reference |
| 7216 | clock cycles equal to the value of pcs_rx_los_mask_val\<9:0\>. This control filters out |
| 7217 | short, non-compliant LFPS glitches sent by a noncompliant host. |
| 7218 | |
| 7219 | For normal operation, set to a targeted mask interval of 10us (value = 10us / Tref_clk). |
| 7220 | If the USBH()_UCTL_CTL[REF_CLK_DIV2] is used, then |
| 7221 | (value = 10us / (2 * Tref_clk)). These equations are based on the SuperSpeed reference |
| 7222 | clock frequency. The value of PCS_RX_LOS_MASK_VAL should be as follows: |
| 7223 | |
| 7224 | \<pre\> |
| 7225 | Frequency DIV2 LOS_MASK |
| 7226 | --------- --- -------- |
| 7227 | 200 MHz 1 0x3E8 |
| 7228 | 125 MHz 0 0x4E2 |
| 7229 | 104 MHz 0 0x410 |
| 7230 | 100 MHz 0 0x3E8 |
| 7231 | 96 MHz 0 0x3C0 |
| 7232 | 76.8 MHz 1 0x180 |
| 7233 | 52 MHz 0 0x208 |
| 7234 | 50 MHz 0 0x1F4 |
| 7235 | 48 MHz 0 0x1E0 |
| 7236 | 40 MHz 1 0x0C8 |
| 7237 | 38.4 MHz 0 0x180 |
| 7238 | 26 MHz 0 0x104 |
| 7239 | 25 MHz 0 0x0FA |
| 7240 | 24 MHz 0 0x0F0 |
| 7241 | 20 MHz 0 0x0C8 |
| 7242 | 19.2 MHz 0 0x0C0 |
| 7243 | \</pre\> |
| 7244 | |
| 7245 | Setting this bus to 0x0 disables masking. The value should be defined when the PHY is in |
| 7246 | reset. Changing this value during operation might disrupt normal operation of the link. */ |
| 7247 | uint64_t reserved_42_55 : 14; |
| 7248 | uint64_t lane0_tx2rx_loopbk : 1; /**< [ 56: 56](R/W) When asserted, data from TX predriver is looped back to RX slicers. LOS is bypassed and |
| 7249 | based on the tx0_en input so that rx0_los = !tx_data_en. */ |
| 7250 | uint64_t lane0_ext_pclk_req : 1; /**< [ 57: 57](R/W) When asserted, this signal enables the pipe0_pclk output regardless of power state (along |
| 7251 | with the associated increase in power consumption). You can use this input to enable |
| 7252 | pipe0_pclk in the P3 state without going through a complete boot sequence. */ |
| 7253 | uint64_t los_bias : 3; /**< [ 60: 58](R/W) Loss-of-signal detector threshold-level control. A positive, binary bit setting change |
| 7254 | results in a +15 mVp incremental change in the LOS threshold. |
| 7255 | A negative binary bit setting change results in a -15 mVp incremental change in the LOS |
| 7256 | threshold. The 0x0 setting is reserved and must not be used. The default 0x5 setting |
| 7257 | corresponds to approximately 105 mVp. |
| 7258 | 0x0 = invalid. |
| 7259 | 0x1 = 45 mV. |
| 7260 | 0x2 = 60 mV. |
| 7261 | 0x3 = 75 mV. |
| 7262 | 0x4 = 90 mV. |
| 7263 | 0x5 = 105 mV (default). |
| 7264 | 0x6 = 120 mV. |
| 7265 | 0x7 = 135 mV. */ |
| 7266 | uint64_t tx_vboost_lvl : 3; /**< [ 63: 61](R/W) TX voltage-boost level. Sets the boosted transmit launch amplitude (mVppd). The default |
| 7267 | bit setting is intended to set the launch amplitude to approximately 1,008 mVppd. A |
| 7268 | single, positive binary bit setting change results in a +156 mVppd change in the TX launch |
| 7269 | amplitude. |
| 7270 | A single, negative binary bit setting change results in a -156 mVppd change in the TX |
| 7271 | launch amplitude. All settings more than one binary bit change should not be used. |
| 7272 | 0x3 = 0.844 V launch amplitude. |
| 7273 | 0x4 = 1.008 V launch amplitude. |
| 7274 | 0x5 = 1.156 V launch amplitude. |
| 7275 | All others values are invalid. */ |
| 7276 | #endif /* Word 0 - End */ |
| 7277 | } s; |
| 7278 | /* struct bdk_usbhx_uctl_portx_cfg_ss_s cn; */ |
| 7279 | }; |
| 7280 | typedef union bdk_usbhx_uctl_portx_cfg_ss bdk_usbhx_uctl_portx_cfg_ss_t; |
| 7281 | |
| 7282 | static inline uint64_t BDK_USBHX_UCTL_PORTX_CFG_SS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 7283 | static inline uint64_t BDK_USBHX_UCTL_PORTX_CFG_SS(unsigned long a, unsigned long b) |
| 7284 | { |
| 7285 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==0))) |
| 7286 | return 0x868000100058ll + 0x1000000000ll * ((a) & 0x1) + 0x20ll * ((b) & 0x0); |
| 7287 | __bdk_csr_fatal("USBHX_UCTL_PORTX_CFG_SS", 2, a, b, 0, 0); |
| 7288 | } |
| 7289 | |
| 7290 | #define typedef_BDK_USBHX_UCTL_PORTX_CFG_SS(a,b) bdk_usbhx_uctl_portx_cfg_ss_t |
| 7291 | #define bustype_BDK_USBHX_UCTL_PORTX_CFG_SS(a,b) BDK_CSR_TYPE_NCB |
| 7292 | #define basename_BDK_USBHX_UCTL_PORTX_CFG_SS(a,b) "USBHX_UCTL_PORTX_CFG_SS" |
| 7293 | #define device_bar_BDK_USBHX_UCTL_PORTX_CFG_SS(a,b) 0x0 /* PF_BAR0 */ |
| 7294 | #define busnum_BDK_USBHX_UCTL_PORTX_CFG_SS(a,b) (a) |
| 7295 | #define arguments_BDK_USBHX_UCTL_PORTX_CFG_SS(a,b) (a),(b),-1,-1 |
| 7296 | |
| 7297 | /** |
| 7298 | * Register (NCB) usbh#_uctl_port#_cr_dbg_cfg |
| 7299 | * |
| 7300 | * UCTL Port Debug Configuration Register |
| 7301 | * This register allows indirect access to the configuration and test controls for the port 0 |
| 7302 | * PHY. |
| 7303 | * |
| 7304 | * This register is accessible only when USB()_UCTL_CTL[H_CLK_EN] = 1. |
| 7305 | * |
| 7306 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UCTL_RST]. |
| 7307 | * |
| 7308 | * Internal: |
| 7309 | * (In body of HRM) |
| 7310 | * To access the PHY registers indirectly through the CR interface, the HCLK must be running, |
| 7311 | * UCTL_RST must be deasserted, and UPHY_RST must be deasserted. Software is responsible for |
| 7312 | * ensuring that only one indirect access is ongoing at a time. |
| 7313 | * |
| 7314 | * To read a PHY register via indirect CR interface: |
| 7315 | * 1. Write UCTL_PORTn_CR_DBG_CFG with: |
| 7316 | * * [DATA_IN] with the \<\<address\>\> of the register, |
| 7317 | * * [CAP_ADDR], [CAP_DATA], [READ], and [WRITE] fields 0x0. |
| 7318 | * 2. Write UCTL_PORTn_CR_DBG_CFG with: |
| 7319 | * * [DATA_IN] with the \<\<address\>\> of the register, |
| 7320 | * * [CAP_ADDR] field 0x1, |
| 7321 | * * [CAP_DATA], [READ], and [WRITE] fields 0x0. |
| 7322 | * 3. Poll for UCTL_PORTn_CR_DBG_STATUS[ACK] 0x1. |
| 7323 | * 4. Write UCTL_PORTn_CR_DBG_CFG with all 0x0's. |
| 7324 | * 5. Poll for UCTL_PORTn_CR_DBG_STATUS[ACK] 0x0. |
| 7325 | * 6. Write UCTL_PORTn_CR_DBG_CFG with: |
| 7326 | * * [READ] field 0x1, |
| 7327 | * * [DATA_IN], [CAP_ADDR], [CAP_DATA], and [WRITE] fields 0x0. |
| 7328 | * 7. Poll for UCTL_PORTn_CR_DBG_STATUS[ACK] 0x1. |
| 7329 | * 8. Read UCTL_PORTn_CR_DBG_STATUS[DATA_OUT]. This is the \<\<read data\>\>. |
| 7330 | * 9. Write UCTL_PORTn_CR_DBG_CFG with all 0x0's. |
| 7331 | * 10. Poll for UCTL_PORTn_CR_DBG_STATUS[ACK] 0x0. |
| 7332 | * |
| 7333 | * To write a PHY register via indirect CR interface: |
| 7334 | * 1. Write UCTL_PORTn_CR_DBG_CFG with: |
| 7335 | * * [DATA_IN] with the \<\<address\>\> of the register, |
| 7336 | * * [CAP_ADDR], [CAP_DATA], [READ], and [WRITE] fields 0x0. |
| 7337 | * 2. Write UCTL_PORTn_CR_DBG_CFG with: |
| 7338 | * * [DATA_IN] with the \<\<address\>\> of the register, |
| 7339 | * * [CAP_ADDR] field 0x1, |
| 7340 | * * [CAP_DATA], [READ], and [WRITE] fields 0x0. |
| 7341 | * 3. Poll for UCTL_PORTn_CR_DBG_STATUS[ACK] 0x1. |
| 7342 | * 4. Write UCTL_PORTn_CR_DBG_CFG with all 0x0's. |
| 7343 | * 5. Poll for UCTL_PORTn_CR_DBG_STATUS[ACK] 0x0. |
| 7344 | * 6. Write UCTL_PORTn_CR_DBG_CFG with: |
| 7345 | * * [DATA_IN] with the \<\<write data\>\>, |
| 7346 | * * [CAP_ADDR], [CAP_DATA], [READ], and [WRITE] fields 0x0. |
| 7347 | * 7. Write UCTL_PORTn_CR_DBG_CFG with: |
| 7348 | * * [DATA_IN] with the write data, |
| 7349 | * * [CAP_DATA] field 0x1, |
| 7350 | * * [CAP_ADDR], [READ], and [WRITE] fields 0x0. |
| 7351 | * 8. Poll for UCTL_PORTn_CR_DBG_STATUS[ACK] 0x1. |
| 7352 | * 9. Write UCTL_PORTn_CR_DBG_CFG with all 0x0's. |
| 7353 | * 10. Poll for UCTL_PORTn_CR_DBG_STATUS[ACK] 0x0. |
| 7354 | * 11. Write UCTL_PORTn_CR_DBG_CFG with: |
| 7355 | * * [WRITE] field 0x1, |
| 7356 | * * [DATA_IN], [CAP_ADDR], and [READ] fields 0x0. |
| 7357 | * 12. Poll for UCTL_PORTn_CR_DBG_STATUS[ACK] 0x1. |
| 7358 | * 13. Write UCTL_PORTn_CR_DBG_CFG with all 0x0's. |
| 7359 | * 14. Poll for UCTL_PORTn_CR_DBG_STATUS[ACK] 0x0. |
| 7360 | * |
| 7361 | * For partial writes, a read-modify write is required. Note that the CAP_ADDR steps (1-5) |
| 7362 | * do not have to be repeated until the address needs changed. |
| 7363 | */ |
| 7364 | union bdk_usbhx_uctl_portx_cr_dbg_cfg |
| 7365 | { |
| 7366 | uint64_t u; |
| 7367 | struct bdk_usbhx_uctl_portx_cr_dbg_cfg_s |
| 7368 | { |
| 7369 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 7370 | uint64_t reserved_48_63 : 16; |
| 7371 | uint64_t data_in : 16; /**< [ 47: 32](R/W) Address or data to be written to the CR interface. */ |
| 7372 | uint64_t reserved_4_31 : 28; |
| 7373 | uint64_t cap_addr : 1; /**< [ 3: 3](R/W) Rising edge triggers the [DATA_IN] field to be captured as the address. */ |
| 7374 | uint64_t cap_data : 1; /**< [ 2: 2](R/W) Rising edge triggers the [DATA_IN] field to be captured as the write data. */ |
| 7375 | uint64_t read : 1; /**< [ 1: 1](R/W) Rising edge triggers a register read operation of the captured address. */ |
| 7376 | uint64_t write : 1; /**< [ 0: 0](R/W) Rising edge triggers a register write operation of the captured address with the captured data. */ |
| 7377 | #else /* Word 0 - Little Endian */ |
| 7378 | uint64_t write : 1; /**< [ 0: 0](R/W) Rising edge triggers a register write operation of the captured address with the captured data. */ |
| 7379 | uint64_t read : 1; /**< [ 1: 1](R/W) Rising edge triggers a register read operation of the captured address. */ |
| 7380 | uint64_t cap_data : 1; /**< [ 2: 2](R/W) Rising edge triggers the [DATA_IN] field to be captured as the write data. */ |
| 7381 | uint64_t cap_addr : 1; /**< [ 3: 3](R/W) Rising edge triggers the [DATA_IN] field to be captured as the address. */ |
| 7382 | uint64_t reserved_4_31 : 28; |
| 7383 | uint64_t data_in : 16; /**< [ 47: 32](R/W) Address or data to be written to the CR interface. */ |
| 7384 | uint64_t reserved_48_63 : 16; |
| 7385 | #endif /* Word 0 - End */ |
| 7386 | } s; |
| 7387 | /* struct bdk_usbhx_uctl_portx_cr_dbg_cfg_s cn; */ |
| 7388 | }; |
| 7389 | typedef union bdk_usbhx_uctl_portx_cr_dbg_cfg bdk_usbhx_uctl_portx_cr_dbg_cfg_t; |
| 7390 | |
| 7391 | static inline uint64_t BDK_USBHX_UCTL_PORTX_CR_DBG_CFG(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 7392 | static inline uint64_t BDK_USBHX_UCTL_PORTX_CR_DBG_CFG(unsigned long a, unsigned long b) |
| 7393 | { |
| 7394 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==0))) |
| 7395 | return 0x868000100060ll + 0x1000000000ll * ((a) & 0x1) + 0ll * ((b) & 0x0); |
| 7396 | __bdk_csr_fatal("USBHX_UCTL_PORTX_CR_DBG_CFG", 2, a, b, 0, 0); |
| 7397 | } |
| 7398 | |
| 7399 | #define typedef_BDK_USBHX_UCTL_PORTX_CR_DBG_CFG(a,b) bdk_usbhx_uctl_portx_cr_dbg_cfg_t |
| 7400 | #define bustype_BDK_USBHX_UCTL_PORTX_CR_DBG_CFG(a,b) BDK_CSR_TYPE_NCB |
| 7401 | #define basename_BDK_USBHX_UCTL_PORTX_CR_DBG_CFG(a,b) "USBHX_UCTL_PORTX_CR_DBG_CFG" |
| 7402 | #define device_bar_BDK_USBHX_UCTL_PORTX_CR_DBG_CFG(a,b) 0x0 /* PF_BAR0 */ |
| 7403 | #define busnum_BDK_USBHX_UCTL_PORTX_CR_DBG_CFG(a,b) (a) |
| 7404 | #define arguments_BDK_USBHX_UCTL_PORTX_CR_DBG_CFG(a,b) (a),(b),-1,-1 |
| 7405 | |
| 7406 | /** |
| 7407 | * Register (NCB) usbh#_uctl_port#_cr_dbg_status |
| 7408 | * |
| 7409 | * UCTL Port Debug Status Register |
| 7410 | * This register allows indirect access to the configuration and test controls for the port 0 |
| 7411 | * PHY. |
| 7412 | * |
| 7413 | * This register is accessible only when USB()_UCTL_CTL[H_CLK_EN] = 1. |
| 7414 | * |
| 7415 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UCTL_RST]. |
| 7416 | */ |
| 7417 | union bdk_usbhx_uctl_portx_cr_dbg_status |
| 7418 | { |
| 7419 | uint64_t u; |
| 7420 | struct bdk_usbhx_uctl_portx_cr_dbg_status_s |
| 7421 | { |
| 7422 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 7423 | uint64_t reserved_48_63 : 16; |
| 7424 | uint64_t data_out : 16; /**< [ 47: 32](RO/H) Last data read from the CR interface. */ |
| 7425 | uint64_t reserved_1_31 : 31; |
| 7426 | uint64_t ack : 1; /**< [ 0: 0](RO/H) Acknowledge that the CAP_ADDR, CAP_DATA, READ, WRITE commands have completed. */ |
| 7427 | #else /* Word 0 - Little Endian */ |
| 7428 | uint64_t ack : 1; /**< [ 0: 0](RO/H) Acknowledge that the CAP_ADDR, CAP_DATA, READ, WRITE commands have completed. */ |
| 7429 | uint64_t reserved_1_31 : 31; |
| 7430 | uint64_t data_out : 16; /**< [ 47: 32](RO/H) Last data read from the CR interface. */ |
| 7431 | uint64_t reserved_48_63 : 16; |
| 7432 | #endif /* Word 0 - End */ |
| 7433 | } s; |
| 7434 | /* struct bdk_usbhx_uctl_portx_cr_dbg_status_s cn; */ |
| 7435 | }; |
| 7436 | typedef union bdk_usbhx_uctl_portx_cr_dbg_status bdk_usbhx_uctl_portx_cr_dbg_status_t; |
| 7437 | |
| 7438 | static inline uint64_t BDK_USBHX_UCTL_PORTX_CR_DBG_STATUS(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 7439 | static inline uint64_t BDK_USBHX_UCTL_PORTX_CR_DBG_STATUS(unsigned long a, unsigned long b) |
| 7440 | { |
| 7441 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=1) && (b==0))) |
| 7442 | return 0x868000100068ll + 0x1000000000ll * ((a) & 0x1) + 0ll * ((b) & 0x0); |
| 7443 | __bdk_csr_fatal("USBHX_UCTL_PORTX_CR_DBG_STATUS", 2, a, b, 0, 0); |
| 7444 | } |
| 7445 | |
| 7446 | #define typedef_BDK_USBHX_UCTL_PORTX_CR_DBG_STATUS(a,b) bdk_usbhx_uctl_portx_cr_dbg_status_t |
| 7447 | #define bustype_BDK_USBHX_UCTL_PORTX_CR_DBG_STATUS(a,b) BDK_CSR_TYPE_NCB |
| 7448 | #define basename_BDK_USBHX_UCTL_PORTX_CR_DBG_STATUS(a,b) "USBHX_UCTL_PORTX_CR_DBG_STATUS" |
| 7449 | #define device_bar_BDK_USBHX_UCTL_PORTX_CR_DBG_STATUS(a,b) 0x0 /* PF_BAR0 */ |
| 7450 | #define busnum_BDK_USBHX_UCTL_PORTX_CR_DBG_STATUS(a,b) (a) |
| 7451 | #define arguments_BDK_USBHX_UCTL_PORTX_CR_DBG_STATUS(a,b) (a),(b),-1,-1 |
| 7452 | |
| 7453 | /** |
| 7454 | * Register (NCB) usbh#_uctl_shim_cfg |
| 7455 | * |
| 7456 | * UCTL Shim Configuration Register |
| 7457 | * This register allows configuration of various shim (UCTL) features. The fields XS_NCB_OOB_* |
| 7458 | * are captured when there are no outstanding OOB errors indicated in INTSTAT and a new OOB error |
| 7459 | * arrives. The fields XS_BAD_DMA_* are captured when there are no outstanding DMA errors |
| 7460 | * indicated in INTSTAT and a new DMA error arrives. |
| 7461 | * |
| 7462 | * This register is accessible only when USB()_UCTL_CTL[H_CLK_EN] = 1. |
| 7463 | * |
| 7464 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UCTL_RST]. |
| 7465 | */ |
| 7466 | union bdk_usbhx_uctl_shim_cfg |
| 7467 | { |
| 7468 | uint64_t u; |
| 7469 | struct bdk_usbhx_uctl_shim_cfg_s |
| 7470 | { |
| 7471 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 7472 | uint64_t xs_ncb_oob_wrn : 1; /**< [ 63: 63](RO/H) Read/write error log for out-of-bound UAHC register access. |
| 7473 | 0 = read, 1 = write. */ |
| 7474 | uint64_t reserved_60_62 : 3; |
| 7475 | uint64_t xs_ncb_oob_osrc : 12; /**< [ 59: 48](RO/H) SRCID error log for out-of-bound UAHC register access. The NCB outbound SRCID for the OOB |
| 7476 | error. |
| 7477 | \<59:58\> = chipID. |
| 7478 | \<57\> = Request source: 0 = core, 1 = NCB-device. |
| 7479 | \<56:51\> = Core/NCB-device number. Note that for NCB devices, \<56\> is always 0. |
| 7480 | \<50:48\> = SubID. */ |
| 7481 | uint64_t xm_bad_dma_wrn : 1; /**< [ 47: 47](RO/H) Read/write error log for bad DMA access from UAHC. |
| 7482 | 0 = read error log, 1 = write error log. */ |
| 7483 | uint64_t reserved_44_46 : 3; |
| 7484 | uint64_t xm_bad_dma_type : 4; /**< [ 43: 40](RO/H) ErrType error log for bad DMA access from UAHC. Encodes the type of error encountered |
| 7485 | (error largest encoded value has priority). See UCTL_XM_BAD_DMA_TYPE_E. */ |
| 7486 | uint64_t reserved_14_39 : 26; |
| 7487 | uint64_t dma_read_cmd : 2; /**< [ 13: 12](R/W) Selects the NCB read command used by DMA accesses. See UCTL_DMA_READ_CMD_E. */ |
| 7488 | uint64_t reserved_11 : 1; |
| 7489 | uint64_t dma_write_cmd : 1; /**< [ 10: 10](R/W) Selects the NCB write command used by DMA accesses. See UCTL_DMA_WRITE_CMD_E. */ |
| 7490 | uint64_t reserved_0_9 : 10; |
| 7491 | #else /* Word 0 - Little Endian */ |
| 7492 | uint64_t reserved_0_9 : 10; |
| 7493 | uint64_t dma_write_cmd : 1; /**< [ 10: 10](R/W) Selects the NCB write command used by DMA accesses. See UCTL_DMA_WRITE_CMD_E. */ |
| 7494 | uint64_t reserved_11 : 1; |
| 7495 | uint64_t dma_read_cmd : 2; /**< [ 13: 12](R/W) Selects the NCB read command used by DMA accesses. See UCTL_DMA_READ_CMD_E. */ |
| 7496 | uint64_t reserved_14_39 : 26; |
| 7497 | uint64_t xm_bad_dma_type : 4; /**< [ 43: 40](RO/H) ErrType error log for bad DMA access from UAHC. Encodes the type of error encountered |
| 7498 | (error largest encoded value has priority). See UCTL_XM_BAD_DMA_TYPE_E. */ |
| 7499 | uint64_t reserved_44_46 : 3; |
| 7500 | uint64_t xm_bad_dma_wrn : 1; /**< [ 47: 47](RO/H) Read/write error log for bad DMA access from UAHC. |
| 7501 | 0 = read error log, 1 = write error log. */ |
| 7502 | uint64_t xs_ncb_oob_osrc : 12; /**< [ 59: 48](RO/H) SRCID error log for out-of-bound UAHC register access. The NCB outbound SRCID for the OOB |
| 7503 | error. |
| 7504 | \<59:58\> = chipID. |
| 7505 | \<57\> = Request source: 0 = core, 1 = NCB-device. |
| 7506 | \<56:51\> = Core/NCB-device number. Note that for NCB devices, \<56\> is always 0. |
| 7507 | \<50:48\> = SubID. */ |
| 7508 | uint64_t reserved_60_62 : 3; |
| 7509 | uint64_t xs_ncb_oob_wrn : 1; /**< [ 63: 63](RO/H) Read/write error log for out-of-bound UAHC register access. |
| 7510 | 0 = read, 1 = write. */ |
| 7511 | #endif /* Word 0 - End */ |
| 7512 | } s; |
| 7513 | /* struct bdk_usbhx_uctl_shim_cfg_s cn; */ |
| 7514 | }; |
| 7515 | typedef union bdk_usbhx_uctl_shim_cfg bdk_usbhx_uctl_shim_cfg_t; |
| 7516 | |
| 7517 | static inline uint64_t BDK_USBHX_UCTL_SHIM_CFG(unsigned long a) __attribute__ ((pure, always_inline)); |
| 7518 | static inline uint64_t BDK_USBHX_UCTL_SHIM_CFG(unsigned long a) |
| 7519 | { |
| 7520 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 7521 | return 0x8680001000e8ll + 0x1000000000ll * ((a) & 0x1); |
| 7522 | __bdk_csr_fatal("USBHX_UCTL_SHIM_CFG", 1, a, 0, 0, 0); |
| 7523 | } |
| 7524 | |
| 7525 | #define typedef_BDK_USBHX_UCTL_SHIM_CFG(a) bdk_usbhx_uctl_shim_cfg_t |
| 7526 | #define bustype_BDK_USBHX_UCTL_SHIM_CFG(a) BDK_CSR_TYPE_NCB |
| 7527 | #define basename_BDK_USBHX_UCTL_SHIM_CFG(a) "USBHX_UCTL_SHIM_CFG" |
| 7528 | #define device_bar_BDK_USBHX_UCTL_SHIM_CFG(a) 0x0 /* PF_BAR0 */ |
| 7529 | #define busnum_BDK_USBHX_UCTL_SHIM_CFG(a) (a) |
| 7530 | #define arguments_BDK_USBHX_UCTL_SHIM_CFG(a) (a),-1,-1,-1 |
| 7531 | |
| 7532 | /** |
| 7533 | * Register (NCB) usbh#_uctl_spare0 |
| 7534 | * |
| 7535 | * UCTL Spare Register 0 |
| 7536 | * This register is a spare register. This register can be reset by NCB reset. |
| 7537 | */ |
| 7538 | union bdk_usbhx_uctl_spare0 |
| 7539 | { |
| 7540 | uint64_t u; |
| 7541 | struct bdk_usbhx_uctl_spare0_s |
| 7542 | { |
| 7543 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 7544 | uint64_t spare : 64; /**< [ 63: 0](R/W) Spare. */ |
| 7545 | #else /* Word 0 - Little Endian */ |
| 7546 | uint64_t spare : 64; /**< [ 63: 0](R/W) Spare. */ |
| 7547 | #endif /* Word 0 - End */ |
| 7548 | } s; |
| 7549 | /* struct bdk_usbhx_uctl_spare0_s cn; */ |
| 7550 | }; |
| 7551 | typedef union bdk_usbhx_uctl_spare0 bdk_usbhx_uctl_spare0_t; |
| 7552 | |
| 7553 | static inline uint64_t BDK_USBHX_UCTL_SPARE0(unsigned long a) __attribute__ ((pure, always_inline)); |
| 7554 | static inline uint64_t BDK_USBHX_UCTL_SPARE0(unsigned long a) |
| 7555 | { |
| 7556 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 7557 | return 0x868000100010ll + 0x1000000000ll * ((a) & 0x1); |
| 7558 | __bdk_csr_fatal("USBHX_UCTL_SPARE0", 1, a, 0, 0, 0); |
| 7559 | } |
| 7560 | |
| 7561 | #define typedef_BDK_USBHX_UCTL_SPARE0(a) bdk_usbhx_uctl_spare0_t |
| 7562 | #define bustype_BDK_USBHX_UCTL_SPARE0(a) BDK_CSR_TYPE_NCB |
| 7563 | #define basename_BDK_USBHX_UCTL_SPARE0(a) "USBHX_UCTL_SPARE0" |
| 7564 | #define device_bar_BDK_USBHX_UCTL_SPARE0(a) 0x0 /* PF_BAR0 */ |
| 7565 | #define busnum_BDK_USBHX_UCTL_SPARE0(a) (a) |
| 7566 | #define arguments_BDK_USBHX_UCTL_SPARE0(a) (a),-1,-1,-1 |
| 7567 | |
| 7568 | /** |
| 7569 | * Register (NCB) usbh#_uctl_spare1 |
| 7570 | * |
| 7571 | * UCTL Spare Register 1 |
| 7572 | * This register is accessible only when USB()_UCTL_CTL[H_CLK_EN] = 1. |
| 7573 | * |
| 7574 | * This register can be reset by NCB reset or with USBH()_UCTL_CTL[UCTL_RST]. |
| 7575 | */ |
| 7576 | union bdk_usbhx_uctl_spare1 |
| 7577 | { |
| 7578 | uint64_t u; |
| 7579 | struct bdk_usbhx_uctl_spare1_s |
| 7580 | { |
| 7581 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 7582 | uint64_t spare : 64; /**< [ 63: 0](R/W) Spare. */ |
| 7583 | #else /* Word 0 - Little Endian */ |
| 7584 | uint64_t spare : 64; /**< [ 63: 0](R/W) Spare. */ |
| 7585 | #endif /* Word 0 - End */ |
| 7586 | } s; |
| 7587 | /* struct bdk_usbhx_uctl_spare1_s cn; */ |
| 7588 | }; |
| 7589 | typedef union bdk_usbhx_uctl_spare1 bdk_usbhx_uctl_spare1_t; |
| 7590 | |
| 7591 | static inline uint64_t BDK_USBHX_UCTL_SPARE1(unsigned long a) __attribute__ ((pure, always_inline)); |
| 7592 | static inline uint64_t BDK_USBHX_UCTL_SPARE1(unsigned long a) |
| 7593 | { |
| 7594 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=1)) |
| 7595 | return 0x8680001000f8ll + 0x1000000000ll * ((a) & 0x1); |
| 7596 | __bdk_csr_fatal("USBHX_UCTL_SPARE1", 1, a, 0, 0, 0); |
| 7597 | } |
| 7598 | |
| 7599 | #define typedef_BDK_USBHX_UCTL_SPARE1(a) bdk_usbhx_uctl_spare1_t |
| 7600 | #define bustype_BDK_USBHX_UCTL_SPARE1(a) BDK_CSR_TYPE_NCB |
| 7601 | #define basename_BDK_USBHX_UCTL_SPARE1(a) "USBHX_UCTL_SPARE1" |
| 7602 | #define device_bar_BDK_USBHX_UCTL_SPARE1(a) 0x0 /* PF_BAR0 */ |
| 7603 | #define busnum_BDK_USBHX_UCTL_SPARE1(a) (a) |
| 7604 | #define arguments_BDK_USBHX_UCTL_SPARE1(a) (a),-1,-1,-1 |
| 7605 | |
| 7606 | #endif /* __BDK_CSRS_USBH_H__ */ |