| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2003-2012, Broadcom Corporation |
|---|
| 3 | * All Rights Reserved |
|---|
| 4 | * Confidential Property of Broadcom Corporation |
|---|
| 5 | * |
|---|
| 6 | * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | * |
|---|
| 10 | * $brcm_Workfile: bchp.h $ |
|---|
| 11 | * $brcm_Revision: Hydra_Software_Devel/40 $ |
|---|
| 12 | * $brcm_Date: 2/10/12 5:24p $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: |
|---|
| 15 | * |
|---|
| 16 | * Revision History: |
|---|
| 17 | * |
|---|
| 18 | * $brcm_Log: /magnum/basemodules/chp/bchp.h $ |
|---|
| 19 | * |
|---|
| 20 | * Hydra_Software_Devel/40 2/10/12 5:24p rjlewis |
|---|
| 21 | * SW7425-2218: removed AvsLock/Unlock and added get handle. |
|---|
| 22 | * |
|---|
| 23 | * Hydra_Software_Devel/39 2/1/12 7:03p rjlewis |
|---|
| 24 | * SW7425-2216: Adding support for AVS Lock/Unlock. |
|---|
| 25 | * |
|---|
| 26 | * Hydra_Software_Devel/38 10/19/11 10:29a rjlewis |
|---|
| 27 | * SW7346-117: fixed term (milli for kilo) |
|---|
| 28 | * |
|---|
| 29 | * Hydra_Software_Devel/37 9/1/11 5:43p jtna |
|---|
| 30 | * SW7552-115: change name to BCHP_Feature_eRfmCapable |
|---|
| 31 | * |
|---|
| 32 | * Hydra_Software_Devel/36 9/1/11 6:18p xhuang |
|---|
| 33 | * SW7552-115: Add BCHP features for RFM |
|---|
| 34 | * |
|---|
| 35 | * Hydra_Software_Devel/35 8/16/11 11:32a rjlewis |
|---|
| 36 | * SW7346-117: Added support for new chip specific Enter/Exit Stand-by |
|---|
| 37 | * mode. |
|---|
| 38 | * |
|---|
| 39 | * Hydra_Software_Devel/34 8/3/11 5:45p rjlewis |
|---|
| 40 | * SW7346-117: Removed BCHP tests -- handled in comments instead. |
|---|
| 41 | * |
|---|
| 42 | * Hydra_Software_Devel/33 8/3/11 12:00p rjlewis |
|---|
| 43 | * SW7346-117: added support for GetAvsData function. |
|---|
| 44 | * |
|---|
| 45 | * Hydra_Software_Devel/32 7/27/11 9:42a davidp |
|---|
| 46 | * SW7552-75: Add BCHP_Feature_eAVDCoreFreq. |
|---|
| 47 | * |
|---|
| 48 | * Hydra_Software_Devel/31 7/13/11 6:03p pntruong |
|---|
| 49 | * SWDTV-7838: Merged. Included additional macros to improve code |
|---|
| 50 | * formatting, and masked field data/enum to prevent overflow. |
|---|
| 51 | * |
|---|
| 52 | * Hydra_Software_Devel/31 7/13/11 6:03p pntruong |
|---|
| 53 | * SWDTV-7838: Merged. Included additional macros to improve code |
|---|
| 54 | * formatting, and masked field data/enum to prevent overflow. |
|---|
| 55 | * |
|---|
| 56 | * Hydra_Software_Devel/SWDTV-7838/1 7/12/11 3:04p jhaberf |
|---|
| 57 | * SWDTV-7838: Added/modified some macros in order to making working with |
|---|
| 58 | * register bit fields easier |
|---|
| 59 | * |
|---|
| 60 | * Hydra_Software_Devel/30 1/20/11 1:40p gmohile |
|---|
| 61 | * SW7408-212 : Add support for avs settings |
|---|
| 62 | * |
|---|
| 63 | * Hydra_Software_Devel/29 10/5/10 10:56a davidp |
|---|
| 64 | * SW7422-22: Add memory controller BCHP_feature enums to allow XVD to |
|---|
| 65 | * internally set stripe and PFRI registers. |
|---|
| 66 | * |
|---|
| 67 | * Hydra_Software_Devel/28 10/28/08 12:39p maivu |
|---|
| 68 | * PR48489: fix asm compilation of bchp.h. Checkin for Kevin. |
|---|
| 69 | * |
|---|
| 70 | * Hydra_Software_Devel/28 10/28/08 12:39p maivu |
|---|
| 71 | * PR48489: fix asm compilation of bchp.h. Checkin for Kevin. |
|---|
| 72 | * |
|---|
| 73 | * Hydra_Software_Devel/28 10/28/08 11:45a cernekee |
|---|
| 74 | * PR48489: fix asm compilation of bchp.h |
|---|
| 75 | * |
|---|
| 76 | * Hydra_Software_Devel/27 12/20/07 11:54a jessem |
|---|
| 77 | * PR 38367: Added BCHP_Feature_eMemCtrl2Capable. |
|---|
| 78 | * |
|---|
| 79 | * Hydra_Software_Devel/26 10/31/06 9:09a erickson |
|---|
| 80 | * PR24374: deprecate BCHP_REV_XX in magnum for 7401 |
|---|
| 81 | * |
|---|
| 82 | * Hydra_Software_Devel/25 8/8/06 4:48p pntruong |
|---|
| 83 | * PR22572: Added feature detection for second ddr memory controller. |
|---|
| 84 | * |
|---|
| 85 | * Hydra_Software_Devel/24 8/4/06 5:41p pntruong |
|---|
| 86 | * PR22572: Need initial 93563 appframework bringup. |
|---|
| 87 | * |
|---|
| 88 | * Hydra_Software_Devel/24 8/4/06 5:40p pntruong |
|---|
| 89 | * PR22572: Need initial 93563 appframework bringup. |
|---|
| 90 | * |
|---|
| 91 | * Hydra_Software_Devel/23 6/27/06 5:52p dlwin |
|---|
| 92 | * PR 22372: Added support E[0-5] chip version. |
|---|
| 93 | * |
|---|
| 94 | * Hydra_Software_Devel/22 3/7/06 2:15p jasonh |
|---|
| 95 | * PR 20059: Updated to work with revisions up to A5/B5/C5/D5 |
|---|
| 96 | * |
|---|
| 97 | * Hydra_Software_Devel/21 1/23/06 11:43a mphillip |
|---|
| 98 | * PR18165: Update for C3 |
|---|
| 99 | * |
|---|
| 100 | * Hydra_Software_Devel/20 10/21/05 2:32p shyam |
|---|
| 101 | * PR 17148 : Cut paste problem for B2 defines |
|---|
| 102 | * |
|---|
| 103 | * Hydra_Software_Devel/19 9/15/05 11:12a erickson |
|---|
| 104 | * PR17148: added BCHP_REV_XX defines for more backward compatibility |
|---|
| 105 | * |
|---|
| 106 | * Hydra_Software_Devel/18 9/15/05 10:55a erickson |
|---|
| 107 | * PR17148: moved BCHP checked from bstd.h and added backward |
|---|
| 108 | * compatibility code (temporarily) |
|---|
| 109 | * |
|---|
| 110 | * Hydra_Software_Devel/17 9/14/05 2:14p erickson |
|---|
| 111 | * PR17148: added BCHP_VER_XX definitions |
|---|
| 112 | * |
|---|
| 113 | * Hydra_Software_Devel/16 3/8/05 4:18p jasonh |
|---|
| 114 | * PR 14339: Added support for 3DES feature check. |
|---|
| 115 | * |
|---|
| 116 | * Hydra_Software_Devel/15 2/24/05 10:21a jasonh |
|---|
| 117 | * PR 14230: Added HDCP bond status detection. |
|---|
| 118 | * |
|---|
| 119 | * Hydra_Software_Devel/14 10/26/04 5:02p jasonh |
|---|
| 120 | * PR 13068: Added detection of 2nd MPEG decoder. |
|---|
| 121 | * |
|---|
| 122 | * Hydra_Software_Devel/13 9/21/04 2:40p jasonh |
|---|
| 123 | * PR 12728: Fix -pdantic errors |
|---|
| 124 | * |
|---|
| 125 | * Hydra_Software_Devel/12 6/10/04 6:04p jasonh |
|---|
| 126 | * PR 11451: Added 3D graphics capable check for 7038. |
|---|
| 127 | * |
|---|
| 128 | * Hydra_Software_Devel/11 6/10/04 5:53p jasonh |
|---|
| 129 | * PR 11257: Adding DVO port cabable check. |
|---|
| 130 | * |
|---|
| 131 | * Hydra_Software_Devel/10 6/10/04 5:43p jasonh |
|---|
| 132 | * PR 11257: Added initial support of BCHP_GetFeature for 7038 chipsets. |
|---|
| 133 | * |
|---|
| 134 | * Hydra_Software_Devel/9 4/14/04 5:16p marcusk |
|---|
| 135 | * PR 10602: Updated comments |
|---|
| 136 | * |
|---|
| 137 | * Hydra_Software_Devel/8 4/9/04 4:32p jasonh |
|---|
| 138 | * PR 10548: Changed private shift function to non-private. |
|---|
| 139 | * |
|---|
| 140 | * Hydra_Software_Devel/7 12/24/03 11:34a pntruong |
|---|
| 141 | * PR9117: Safe guard macro parameters, and removed trailing white spaces. |
|---|
| 142 | * |
|---|
| 143 | * Hydra_Software_Devel/6 12/24/03 10:58a marcusk |
|---|
| 144 | * PR9117: Updated interrupt macros to be named consistent |
|---|
| 145 | * |
|---|
| 146 | * Hydra_Software_Devel/5 12/23/03 4:20p marcusk |
|---|
| 147 | * PR9078: Updated with interrupt id creation and extraction macros. |
|---|
| 148 | * |
|---|
| 149 | * Hydra_Software_Devel/4 12/5/03 6:08p dlwin |
|---|
| 150 | * PR 8873: Updated comment for BCHP_FIELD_ENUM() and BCHP_FIELD_DATA() |
|---|
| 151 | * removing the MASKing, since these marcos don't MASK. |
|---|
| 152 | * |
|---|
| 153 | * Hydra_Software_Devel/3 10/10/03 2:40p dlwin |
|---|
| 154 | * Updated sample code. |
|---|
| 155 | * |
|---|
| 156 | * Hydra_Software_Devel/2 9/26/03 8:49a dlwin |
|---|
| 157 | * Updated to return 16 bits for Chip ID and Chip Rev. |
|---|
| 158 | * |
|---|
| 159 | * Hydra_Software_Devel/1 9/23/03 9:47p dlwin |
|---|
| 160 | * Initial version |
|---|
| 161 | * |
|---|
| 162 | ***************************************************************************/ |
|---|
| 163 | #ifndef BCHP_H__ |
|---|
| 164 | #define BCHP_H__ |
|---|
| 165 | |
|---|
| 166 | #ifndef __ASSEMBLY__ |
|---|
| 167 | #include "bstd.h" |
|---|
| 168 | #include "breg_mem.h" |
|---|
| 169 | #endif |
|---|
| 170 | |
|---|
| 171 | #ifdef __cplusplus |
|---|
| 172 | extern "C" { |
|---|
| 173 | #endif |
|---|
| 174 | |
|---|
| 175 | /*=************************ Module Overview ******************************** |
|---|
| 176 | <verbatim> |
|---|
| 177 | |
|---|
| 178 | Overview |
|---|
| 179 | The purpose of this module is to give information about the chip that you |
|---|
| 180 | are using, such as chip ID and revision, as well as provide the register |
|---|
| 181 | list required to program the chip. |
|---|
| 182 | |
|---|
| 183 | The chip interface contains the defines for all registers and each field |
|---|
| 184 | of the register for the entire chip. These defines are automatically |
|---|
| 185 | generated from RDB (Register DataBase) and are contained in header files |
|---|
| 186 | found in the basemodules\chp\{chip}\rdb\ directory. Individual header |
|---|
| 187 | files may be included directly or all can be included by using the header |
|---|
| 188 | file bchp_{chip}.h. |
|---|
| 189 | |
|---|
| 190 | Registers must be read using the functions found in the register interface. |
|---|
| 191 | Field access must be done using the macros provided here in the |
|---|
| 192 | chip interface. These macros are as follows: |
|---|
| 193 | |
|---|
| 194 | o BCHP_GET_FIELD_DATA |
|---|
| 195 | o BCHP_FIELD_ENUM |
|---|
| 196 | o BCHP_FIELD_DATA |
|---|
| 197 | o BCHP_MASK |
|---|
| 198 | |
|---|
| 199 | |
|---|
| 200 | Design |
|---|
| 201 | The design for BCHP PI API is broken into three parts. |
|---|
| 202 | |
|---|
| 203 | o Part 1 (open/close/configuration): |
|---|
| 204 | |
|---|
| 205 | These APIs are used for opening and closing BCHP device. |
|---|
| 206 | |
|---|
| 207 | o Part 2 (get): |
|---|
| 208 | |
|---|
| 209 | These APIs are used for getting chip information, like Family Id, Chip Id, etc. |
|---|
| 210 | |
|---|
| 211 | o Part 3 (get macro/set macro): |
|---|
| 212 | |
|---|
| 213 | These macros are provided to access bit field inside a register using |
|---|
| 214 | RDB documenation. See above discussion on this topic. |
|---|
| 215 | |
|---|
| 216 | |
|---|
| 217 | Usage |
|---|
| 218 | The usage of BCHP involves the following: |
|---|
| 219 | |
|---|
| 220 | * Configure/Open of BCHP |
|---|
| 221 | |
|---|
| 222 | * Get chip defaults for chips that exist on target system |
|---|
| 223 | * Using these chip defaults, for each chip that requires a chip handle it |
|---|
| 224 | default settings for that chip. |
|---|
| 225 | |
|---|
| 226 | |
|---|
| 227 | * Get chip information |
|---|
| 228 | |
|---|
| 229 | * Use BCHP_GetChipInfo() to get chip infromation |
|---|
| 230 | * Use bit field macros to access bit fields inside register that conforms |
|---|
| 231 | to RDB. |
|---|
| 232 | |
|---|
| 233 | |
|---|
| 234 | Interrupt Requirements |
|---|
| 235 | None |
|---|
| 236 | |
|---|
| 237 | |
|---|
| 238 | Sample Code |
|---|
| 239 | |
|---|
| 240 | // Example of Bit Field Macros |
|---|
| 241 | { |
|---|
| 242 | uint32_t ulReg; |
|---|
| 243 | BREG_Read32(hReg, CMP_0_BLEND_0_CTRL, &ulReg); |
|---|
| 244 | |
|---|
| 245 | ulReg &= ~( |
|---|
| 246 | BCHP_MASK(CMP_0_BLEND_0_CTRL, BLEND_SOURCE ) | |
|---|
| 247 | BCHP_MASK(CMP_0_BLEND_0_CTRL, CONSTANT_ALPHA ) | |
|---|
| 248 | BCHP_MASK(CMP_0_BLEND_0_CTRL, BACK_COLOR_BLEND_FACTOR ) | |
|---|
| 249 | BCHP_MASK(CMP_0_BLEND_0_CTRL, FRONT_COLOR_BLEND_FACTOR)); |
|---|
| 250 | |
|---|
| 251 | ulReg |= ( |
|---|
| 252 | BCHP_FIELD_ENUM(CMP_0_BLEND_0_CTRL, BLEND_SOURCE, |
|---|
| 253 | SURFACE_V0 ) | |
|---|
| 254 | BCHP_FIELD_DATA(CMP_0_BLEND_0_CTRL, CONSTANT_ALPHA, |
|---|
| 255 | 0xff ) | |
|---|
| 256 | BCHP_FIELD_ENUM(CMP_0_BLEND_0_CTRL, BACK_COLOR_BLEND_FACTOR, |
|---|
| 257 | ZERO ) | |
|---|
| 258 | BCHP_FIELD_ENUM(CMP_0_BLEND_0_CTRL, FRONT_COLOR_BLEND_FACTOR, |
|---|
| 259 | CONSTANT_ALPHA)); |
|---|
| 260 | |
|---|
| 261 | BREG_Write32(hReg, CMP_0_BLEND_0_CTRL, ulReg); |
|---|
| 262 | } |
|---|
| 263 | |
|---|
| 264 | // |
|---|
| 265 | // NOTE: The following sample code does not do any error checking. |
|---|
| 266 | // |
|---|
| 267 | // In this example, the target H/W board contains two chips that requires |
|---|
| 268 | // Chip Handles, Bcm7038 and Bcm3250. |
|---|
| 269 | // |
|---|
| 270 | static BCHP_Handle hChip7038; |
|---|
| 271 | static BREG_Handle hReg7038; |
|---|
| 272 | static BCHP_Handle hChip3250; |
|---|
| 273 | static BREG_Handle hReg3250; |
|---|
| 274 | |
|---|
| 275 | main( void ) |
|---|
| 276 | { |
|---|
| 277 | BERR_Code retCode = BERR_SUCCESS; |
|---|
| 278 | uint32 chipId; |
|---|
| 279 | uint32 chipRev; |
|---|
| 280 | |
|---|
| 281 | // Initialize hReg7038, hReg3250 . . . |
|---|
| 282 | |
|---|
| 283 | // Now create the chip interface for the two chips |
|---|
| 284 | BCHP_Open7038( &hChip7038, hReg7038 ); |
|---|
| 285 | BCHP_Open3250( &hChip3250, hReg3250 ); |
|---|
| 286 | |
|---|
| 287 | // Get the chip information for Bcm7038 |
|---|
| 288 | BCHP_GetChipInfo( hChip7038, &eChipId, &eChipRev ); |
|---|
| 289 | printf( "Chip Information for Bcm7038\n" ); |
|---|
| 290 | printf( "ChipId=%d, ChipRev=%d\n", chipId, chipRev ); |
|---|
| 291 | |
|---|
| 292 | // Get the chip information for Bcm3250 |
|---|
| 293 | BCHP_GetChipInfo( hChip3250, &eChipId, &eChipRev ); |
|---|
| 294 | printf( "Chip Information for Bcm3250\n" ); |
|---|
| 295 | printf( "ChipId=%d, ChipRev=%d\n", chipId, chipRev ); |
|---|
| 296 | } |
|---|
| 297 | |
|---|
| 298 | |
|---|
| 299 | </verbatim> |
|---|
| 300 | ***************************************************************************/ |
|---|
| 301 | |
|---|
| 302 | |
|---|
| 303 | /*************************************************************************** |
|---|
| 304 | Summary: |
|---|
| 305 | Extracts the bitfield value of a register using RDB name. |
|---|
| 306 | |
|---|
| 307 | Description: |
|---|
| 308 | This macro extracts the bitfield value of a register using RDB name. It |
|---|
| 309 | intends to hide away the mechanics of SHIFTing/ORing/MASKing to get the |
|---|
| 310 | value. |
|---|
| 311 | |
|---|
| 312 | Input: |
|---|
| 313 | Memory - Memory variable of a register to extract the bitfield. The |
|---|
| 314 | value of this variable is usually get filled with a BREG_ReadXX call. |
|---|
| 315 | |
|---|
| 316 | Register - Register instance name defined in RDB. These names are |
|---|
| 317 | available in html documentations, and the RDB generated header files. |
|---|
| 318 | Note this a register instance name; not a regtype. |
|---|
| 319 | |
|---|
| 320 | Field - Field name defined in RDB. These names are available in html |
|---|
| 321 | documentations, and the RDB generated header files. |
|---|
| 322 | |
|---|
| 323 | Output: |
|---|
| 324 | <None> |
|---|
| 325 | |
|---|
| 326 | Returns: |
|---|
| 327 | The extracted bitfield value. |
|---|
| 328 | |
|---|
| 329 | Example: |
|---|
| 330 | ulData = BCHP_GET_FIELD_DATA(ulReg, CMP_0_BLEND_0_CTRL, BLEND_SOURCE); |
|---|
| 331 | |
|---|
| 332 | See Also: |
|---|
| 333 | BCHP_FIELD_DATA, BCHP_FIELD_ENUM. |
|---|
| 334 | **************************************************************************/ |
|---|
| 335 | #define BCHP_GET_FIELD_DATA(Memory,Register,Field) \ |
|---|
| 336 | ((((Memory) & BCHP_MASK(Register,Field)) >> \ |
|---|
| 337 | BCHP_SHIFT(Register,Field))) |
|---|
| 338 | |
|---|
| 339 | /*************************************************************************** |
|---|
| 340 | Summary: |
|---|
| 341 | Push a register bitfield value into a memory location using RDB |
|---|
| 342 | name. |
|---|
| 343 | |
|---|
| 344 | Description: |
|---|
| 345 | This macro sets a register bitfield value into a memory location |
|---|
| 346 | using an RDB name. It intends to hide away the mechanics of |
|---|
| 347 | ANDing/SHIFTing/ORing/MASKing to set the value. |
|---|
| 348 | |
|---|
| 349 | Input: |
|---|
| 350 | Memory - Memory variable to set the value of the bitfield. The |
|---|
| 351 | value of this variable is usually filled initially with a |
|---|
| 352 | BREG_ReadXX call. |
|---|
| 353 | |
|---|
| 354 | Register - Register instance name defined in RDB. These names are |
|---|
| 355 | available in html documentations, and the RDB generated header files. |
|---|
| 356 | Note this a register instance name; not a regtype. |
|---|
| 357 | |
|---|
| 358 | Field - Field name defined in RDB. The "Field" will be set to zero in |
|---|
| 359 | "Memory" before "FieldValue" os ORed in. These names are available in |
|---|
| 360 | html documentations, and the RDB generated header files. |
|---|
| 361 | |
|---|
| 362 | FieldValue - This is the value that the register field is to be set |
|---|
| 363 | to. The FieldValue will SHIFTed and MASKed before being ORed into |
|---|
| 364 | "Memory" |
|---|
| 365 | |
|---|
| 366 | Output: |
|---|
| 367 | The memory location specified by "Memory" will have the register bit |
|---|
| 368 | field specified by "Field" set to "FieldValue". |
|---|
| 369 | |
|---|
| 370 | Returns: |
|---|
| 371 | <None>. |
|---|
| 372 | |
|---|
| 373 | Example: |
|---|
| 374 | ulReg = BREG_Read32( hRegister, BCHP_V3D_PLL_CTRL_PLL_6CH_CTRL_0 ); |
|---|
| 375 | BCHP_SET_FIELD_DATA( ulReg, V3D_PLL_CTRL_PLL_6CH_CTRL_0, POST_RESETB, 0 ); |
|---|
| 376 | BREG_Write32( hRegister, BCHP_V3D_PLL_CTRL_PLL_6CH_CTRL_0, ulReg ); |
|---|
| 377 | |
|---|
| 378 | See Also: |
|---|
| 379 | BCHP_SET_FIELD_ENUM. |
|---|
| 380 | **************************************************************************/ |
|---|
| 381 | #define BCHP_SET_FIELD_DATA(Memory,Register,Field,FieldValue) \ |
|---|
| 382 | ((Memory)=(((Memory)&(~BCHP_MASK(Register,Field))) | \ |
|---|
| 383 | BCHP_FIELD_DATA(Register,Field,FieldValue))) |
|---|
| 384 | |
|---|
| 385 | /*************************************************************************** |
|---|
| 386 | Summary: |
|---|
| 387 | Push a register bitfield value into a memory location using RDB |
|---|
| 388 | name. |
|---|
| 389 | |
|---|
| 390 | Description: |
|---|
| 391 | This macro sets a register bitfield value into a memory location |
|---|
| 392 | using an RDB name. It intends to hide away the mechanics of |
|---|
| 393 | ANDing/SHIFTing/ORing/MASKing to set the value. |
|---|
| 394 | |
|---|
| 395 | Input: |
|---|
| 396 | Memory - Memory variable to set the value of the bitfield. The |
|---|
| 397 | value of this variable is usually filled initially with a |
|---|
| 398 | BREG_ReadXX call. |
|---|
| 399 | |
|---|
| 400 | Register - Register instance name defined in RDB. These names are |
|---|
| 401 | available in html documentations, and the RDB generated header files. |
|---|
| 402 | Note this a register instance name; not a regtype. |
|---|
| 403 | |
|---|
| 404 | Field - Field name defined in RDB. The "Field" will be set to zero in |
|---|
| 405 | "Memory" before "FieldValue" os ORed in. These names are available in |
|---|
| 406 | html documentations, and the RDB generated header files. |
|---|
| 407 | |
|---|
| 408 | Name - A value name that get push into the regiser bitfield. |
|---|
| 409 | This name is available in html documentations (italicized) in the |
|---|
| 410 | bitfield definition. |
|---|
| 411 | |
|---|
| 412 | Output: |
|---|
| 413 | The memory location specified by "Memory" will have the register bit |
|---|
| 414 | field specified by "Field" set to "Name". |
|---|
| 415 | |
|---|
| 416 | Returns: |
|---|
| 417 | <None>. |
|---|
| 418 | |
|---|
| 419 | Example: |
|---|
| 420 | ulReg = BREG_Read32( hRegister, BCHP_VDEC_FE_0_SYNC_DETECT ); |
|---|
| 421 | BCHP_SET_FIELD_ENUM( ulReg, VDEC_FE_0_SYNC_DETECT, HEAD_SWITCH_SEL, FOUR_HEAD ); |
|---|
| 422 | BREG_Write32( hRegister, BCHP_VDEC_FE_0_SYNC_DETECT, ulReg ); |
|---|
| 423 | |
|---|
| 424 | See Also: |
|---|
| 425 | BCHP_SET_FIELD_DATA |
|---|
| 426 | **************************************************************************/ |
|---|
| 427 | #define BCHP_SET_FIELD_ENUM(Memory,Register,Field,Name) \ |
|---|
| 428 | ((Memory)=(((Memory)&(~BCHP_MASK(Register,Field))) | \ |
|---|
| 429 | BCHP_FIELD_ENUM(Register,Field,Name))) |
|---|
| 430 | |
|---|
| 431 | /*************************************************************************** |
|---|
| 432 | Summary: |
|---|
| 433 | Push a value into a register bitfield using RDB name. |
|---|
| 434 | |
|---|
| 435 | Description: |
|---|
| 436 | This macro push a value into a register bitfield using RDB name. It |
|---|
| 437 | intends to hide away the mechanics of SHIFTing/ORing/MASKing to push |
|---|
| 438 | the value into a register bitfield. |
|---|
| 439 | |
|---|
| 440 | Input: |
|---|
| 441 | Memory - Memory variable of a register to be modified. The value |
|---|
| 442 | of this variable is usually get filled with a BREG_ReadXX call. |
|---|
| 443 | |
|---|
| 444 | Register - Register instance name defined in RDB. These names are |
|---|
| 445 | available in html documentations, and the RDB generated header files. |
|---|
| 446 | Note this a register instance name; not a regtype. |
|---|
| 447 | |
|---|
| 448 | Field - Field name defined in RDB. These names are available in html |
|---|
| 449 | documentations, and the RDB generated header files. |
|---|
| 450 | |
|---|
| 451 | Data - A data value that get push into the register bitfield. |
|---|
| 452 | |
|---|
| 453 | Output: |
|---|
| 454 | Memory - Memory variable will get modifled with the new value (Data) |
|---|
| 455 | in approriate bitfield. |
|---|
| 456 | |
|---|
| 457 | Returns: |
|---|
| 458 | <None> |
|---|
| 459 | |
|---|
| 460 | Example: |
|---|
| 461 | ulReg |= BCHP_FIELD_DATA(CMP_0_BLEND_0_CTRL, CONSTANT_ALPHA, 0xff); |
|---|
| 462 | |
|---|
| 463 | See Also: |
|---|
| 464 | BCHP_GET_FIELD_DATA, BCHP_FIELD_ENUM, BCHP_SHIFT |
|---|
| 465 | **************************************************************************/ |
|---|
| 466 | #define BCHP_FIELD_DATA(Register,Field,Data) \ |
|---|
| 467 | (((Data) << BCHP_SHIFT(Register,Field))&BCHP_MASK(Register,Field)) |
|---|
| 468 | |
|---|
| 469 | /*************************************************************************** |
|---|
| 470 | Summary: |
|---|
| 471 | Push a value name into a register bitfield using RDB name. |
|---|
| 472 | |
|---|
| 473 | Description: |
|---|
| 474 | This macro will push a value name into a register bitfield using RDB |
|---|
| 475 | name. It intends to hide away the mechanics of MASKing/SHIFTing/ORing |
|---|
| 476 | to push the value into a register bitfield. |
|---|
| 477 | |
|---|
| 478 | Input: |
|---|
| 479 | Memory - Memory variable of a register to be modified. The value |
|---|
| 480 | of this variable is usually get filled with a BREG_ReadXX call. |
|---|
| 481 | |
|---|
| 482 | Register - Register instance name defined in RDB. These names are |
|---|
| 483 | available in html documentations, and the RDB generated header files. |
|---|
| 484 | Note this a register instance name; not a regtype. |
|---|
| 485 | |
|---|
| 486 | Field - Field name defined in RDB. These names are available in html |
|---|
| 487 | documentations, and the RDB generated header files. |
|---|
| 488 | |
|---|
| 489 | Name - A value name that get push into the regiser bitfield. |
|---|
| 490 | This name is available in html documentations (italicized) in the |
|---|
| 491 | bitfield definition. |
|---|
| 492 | |
|---|
| 493 | Output: |
|---|
| 494 | Memory - Memory variable will get modified with the new value name |
|---|
| 495 | (Name) in approriate bitfield. |
|---|
| 496 | |
|---|
| 497 | Returns: |
|---|
| 498 | <None> |
|---|
| 499 | |
|---|
| 500 | Example: |
|---|
| 501 | ulReg |= BCHP_FIELD_ENUM(CMP_0_BLEND_0_CTRL, |
|---|
| 502 | FRONT_COLOR_BLEND_FACTOR, CONSTANT_ALPHA) |
|---|
| 503 | |
|---|
| 504 | See Also: |
|---|
| 505 | BCHP_FIELD_DATA, BCHP_GET_FIELD_DATA, BCHP_SHIFT |
|---|
| 506 | **************************************************************************/ |
|---|
| 507 | #define BCHP_FIELD_ENUM(Register,Field,Name) \ |
|---|
| 508 | BCHP_FIELD_DATA(Register,Field, BCHP_##Register##_##Field##_##Name) |
|---|
| 509 | |
|---|
| 510 | /************************************************************************* |
|---|
| 511 | Summary: |
|---|
| 512 | Provide a mask for a specific register field. |
|---|
| 513 | |
|---|
| 514 | Description: |
|---|
| 515 | This macro returns a mask for the specified register field. This value |
|---|
| 516 | is typically used with other masks to clear out bits of a register |
|---|
| 517 | before setting in a read/modify/write operation. |
|---|
| 518 | |
|---|
| 519 | Input: |
|---|
| 520 | Register - Register instance name defined in RDB. These names are available |
|---|
| 521 | in html documentations, and the RDB generated header files. Note this a |
|---|
| 522 | register instance name; not a regtype. |
|---|
| 523 | |
|---|
| 524 | Field - Field name defined in RDB. These names are available in html |
|---|
| 525 | documentations, and the RDB generated header files. |
|---|
| 526 | |
|---|
| 527 | Output: |
|---|
| 528 | <None> |
|---|
| 529 | |
|---|
| 530 | Returns: |
|---|
| 531 | The mask of the register field. |
|---|
| 532 | |
|---|
| 533 | Example: |
|---|
| 534 | ulReg &= ~BCHP_MASK(CMP_0_BLEND_0_CTRL, BLEND_SOURCE); |
|---|
| 535 | |
|---|
| 536 | See Also: |
|---|
| 537 | BCHP_GET_FIELD_DATA, |
|---|
| 538 | BCHP_FIELD_DATA, BCHP_FIELD_ENUM, BCHP_SHIFT |
|---|
| 539 | **************************************************************************/ |
|---|
| 540 | #define BCHP_MASK(Register,Field) \ |
|---|
| 541 | BCHP_##Register##_##Field##_MASK |
|---|
| 542 | |
|---|
| 543 | /************************************************************************* |
|---|
| 544 | Summary: |
|---|
| 545 | Provide a shift for a specific register field. |
|---|
| 546 | |
|---|
| 547 | Description: |
|---|
| 548 | This macro returns a shift value for the specified register field. |
|---|
| 549 | This value is typically used by the BCHP_FIELD_NAME and |
|---|
| 550 | BCHP_FIELD_ENUM macros to shift field values into the proper |
|---|
| 551 | location. In other modules this value is used to determine a shift |
|---|
| 552 | amount used in interrupt processing. |
|---|
| 553 | |
|---|
| 554 | Input: |
|---|
| 555 | Register - Register instance name defined in RDB. These names are available |
|---|
| 556 | in html documentations, and the RDB generated header files. Note this a |
|---|
| 557 | register instance name; not a regtype. |
|---|
| 558 | |
|---|
| 559 | Field - Field name defined in RDB. These names are available in html |
|---|
| 560 | documentations, and the RDB generated header files. |
|---|
| 561 | |
|---|
| 562 | Output: |
|---|
| 563 | <None> |
|---|
| 564 | |
|---|
| 565 | Returns: |
|---|
| 566 | The shift value of the register field. |
|---|
| 567 | |
|---|
| 568 | Example: |
|---|
| 569 | ulShift = BCHP_SHIFT(SUN_TOP_CTRL_PIN_MUX_CTRL_4, gpio_00); |
|---|
| 570 | |
|---|
| 571 | See Also: |
|---|
| 572 | BCHP_MASK, BCHP_GET_FIELD_DATA, |
|---|
| 573 | BCHP_FIELD_DATA, BCHP_FIELD_ENUM. |
|---|
| 574 | **************************************************************************/ |
|---|
| 575 | #define BCHP_SHIFT(Register,Field) \ |
|---|
| 576 | BCHP_##Register##_##Field##_SHIFT |
|---|
| 577 | |
|---|
| 578 | /*{secret}****************************************************************** |
|---|
| 579 | |
|---|
| 580 | Summary: |
|---|
| 581 | Used only by BCHP interface to create interrupt IDs |
|---|
| 582 | |
|---|
| 583 | Interrupt IDs consist of the L2 interrupt register address |
|---|
| 584 | or'd with an interrupt bit shift value. Since L2 registers |
|---|
| 585 | are 32 bits in length the shift value must range from 0-31. |
|---|
| 586 | This requires 5 bits to represent the shift value. |
|---|
| 587 | |
|---|
| 588 | Since all L2 interrupt register addresses are 32 bit aligned and |
|---|
| 589 | can be no larger than 0x1FFFFFF the register address is shifted |
|---|
| 590 | up by three and the unused lower two bits are reused to store |
|---|
| 591 | the interrupt shift. |
|---|
| 592 | |
|---|
| 593 | See Also: |
|---|
| 594 | BCHP_INT_ID_REG_SHIFT, BCHP_INT_ID_SHIFT_MASK, |
|---|
| 595 | BCHP_INT_ID_CREATE, BCHP_INT_ID_GET_REG, BCHP_INT_ID_REG_SHIFT |
|---|
| 596 | **************************************************************************/ |
|---|
| 597 | #define BCHP_INT_ID_REG_SHIFT 3 |
|---|
| 598 | |
|---|
| 599 | /*{secret}****************************************************************** |
|---|
| 600 | |
|---|
| 601 | Summary: |
|---|
| 602 | Used only by BCHP interface to create interrupt IDs |
|---|
| 603 | |
|---|
| 604 | Interrupt IDs consist of the L2 interrupt register address |
|---|
| 605 | or'd with an interrupt bit shift value. Since L2 registers |
|---|
| 606 | are 32 bits in length the shift value must range from 0-31. |
|---|
| 607 | This requires 5 bits to represent the shift value. |
|---|
| 608 | |
|---|
| 609 | Since all L2 interrupt register addresses are 32 bit aligned and |
|---|
| 610 | can be no larger than 0x1FFFFFF the register address is shifted |
|---|
| 611 | up by three and the unused lower two bits are reused to store |
|---|
| 612 | the interrupt shift. |
|---|
| 613 | |
|---|
| 614 | See Also: |
|---|
| 615 | BCHP_INT_ID_REG_SHIFT, BCHP_INT_ID_SHIFT_MASK, |
|---|
| 616 | BCHP_INT_ID_CREATE, BCHP_INT_ID_GET_REG, BCHP_INT_ID_REG_SHIFT |
|---|
| 617 | **************************************************************************/ |
|---|
| 618 | #define BCHP_INT_ID_SHIFT_MASK 0x0000001F |
|---|
| 619 | |
|---|
| 620 | /*{secret}****************************************************************** |
|---|
| 621 | |
|---|
| 622 | Summary: |
|---|
| 623 | Used only by BCHP interface to create interrupt IDs |
|---|
| 624 | |
|---|
| 625 | See Also: |
|---|
| 626 | BCHP_INT_ID_REG_SHIFT, BCHP_INT_ID_SHIFT_MASK, |
|---|
| 627 | BCHP_INT_ID_CREATE, BCHP_INT_ID_GET_REG, BCHP_INT_ID_REG_SHIFT |
|---|
| 628 | **************************************************************************/ |
|---|
| 629 | #define BCHP_INT_ID_CREATE( reg, shift ) \ |
|---|
| 630 | (((reg) << BCHP_INT_ID_REG_SHIFT) | (shift)) |
|---|
| 631 | |
|---|
| 632 | /*{secret}****************************************************************** |
|---|
| 633 | |
|---|
| 634 | Summary: |
|---|
| 635 | Used by interrupt interface module to extract registers and shift values |
|---|
| 636 | from a BINT_Id |
|---|
| 637 | |
|---|
| 638 | See Also: |
|---|
| 639 | BCHP_INT_ID_REG_SHIFT, BCHP_INT_ID_SHIFT_MASK, |
|---|
| 640 | BCHP_INT_ID_CREATE, BCHP_INT_ID_GET_REG, BCHP_INT_ID_REG_SHIFT |
|---|
| 641 | **************************************************************************/ |
|---|
| 642 | #define BCHP_INT_ID_GET_REG( intId ) \ |
|---|
| 643 | (((intId) & (~BCHP_INT_ID_SHIFT_MASK)) >> BCHP_INT_ID_REG_SHIFT) |
|---|
| 644 | |
|---|
| 645 | /*{secret}****************************************************************** |
|---|
| 646 | |
|---|
| 647 | Summary: |
|---|
| 648 | Used by interrupt interface module to extract registers and shift |
|---|
| 649 | values from a BINT_Id |
|---|
| 650 | |
|---|
| 651 | See Also: |
|---|
| 652 | BCHP_INT_ID_REG_SHIFT, BCHP_INT_ID_SHIFT_MASK, |
|---|
| 653 | BCHP_INT_ID_CREATE, BCHP_INT_ID_GET_REG, BCHP_INT_ID_REG_SHIFT |
|---|
| 654 | **************************************************************************/ |
|---|
| 655 | #define BCHP_INT_ID_GET_SHIFT( intId ) \ |
|---|
| 656 | ((intId) & BCHP_INT_ID_SHIFT_MASK) |
|---|
| 657 | |
|---|
| 658 | #ifndef __ASSEMBLY__ |
|---|
| 659 | /*************************************************************************** |
|---|
| 660 | Summary: |
|---|
| 661 | Chip Interface Handle. |
|---|
| 662 | |
|---|
| 663 | Description: |
|---|
| 664 | TODO: Will add the rest of the API later. I'm declaring it here |
|---|
| 665 | to get things compile. |
|---|
| 666 | |
|---|
| 667 | See Also: |
|---|
| 668 | BCHP_Open(), BCHP_Close(). |
|---|
| 669 | **************************************************************************/ |
|---|
| 670 | typedef struct BCHP_P_Context *BCHP_Handle; /* Opaque handle */ |
|---|
| 671 | |
|---|
| 672 | /*************************************************************************** |
|---|
| 673 | Summary: |
|---|
| 674 | This enumeration represents possible chipset features to query. |
|---|
| 675 | |
|---|
| 676 | Description: |
|---|
| 677 | This enumeration is provided to a call to BCHP_GetFeature |
|---|
| 678 | in order to determine the capabilities of a given chipset. |
|---|
| 679 | |
|---|
| 680 | Each enumeration has a specific type associated with it. All feature |
|---|
| 681 | enumerations that end with 'Capable' refer to a bool type. All feature |
|---|
| 682 | enumerations that end with a 'Count' refer to an int type. |
|---|
| 683 | |
|---|
| 684 | See Also: |
|---|
| 685 | BCHP_GetFeature. |
|---|
| 686 | ***************************************************************************/ |
|---|
| 687 | typedef enum BCHP_Feature |
|---|
| 688 | { |
|---|
| 689 | BCHP_Feature_e3DGraphicsCapable, /* 3D capable? (bool) */ |
|---|
| 690 | BCHP_Feature_eDvoPortCapable, /* DVO Port capable? (bool) */ |
|---|
| 691 | BCHP_Feature_eMacrovisionCapable, /* Chip is macrovision capable? (bool) */ |
|---|
| 692 | BCHP_Feature_eMpegDecoderCount, /* Number of MPEG decoders (int) */ |
|---|
| 693 | BCHP_Feature_eHdcpCapable, /* HDCP capable? (bool) */ |
|---|
| 694 | BCHP_Feature_e3desCapable, /* 3DES capable? (bool) */ |
|---|
| 695 | BCHP_Feature_e1080pCapable, /* 1080p Capable? (bool) */ |
|---|
| 696 | BCHP_Feature_eRfmCapable, /* RFM capable? (bool) */ |
|---|
| 697 | BCHP_Feature_eMemCtrl1Capable, /* Second DDR memory controller present (bool). */ |
|---|
| 698 | BCHP_Feature_eMemCtrl2Capable, /* Third DDR memory controller present (bool). */ |
|---|
| 699 | BCHP_Feature_eMemCtrl0DDR3ModeCapable, /* True = DDR3 */ |
|---|
| 700 | BCHP_Feature_eMemCtrl0DDRDeviceTechCount, /* Size of memory part in MBits ie: 256, 512, 1024 */ |
|---|
| 701 | BCHP_Feature_eMemCtrl0DramWidthCount, /* Size of data path 16, 32, 64 bits */ |
|---|
| 702 | BCHP_Feature_eMemCtrl1DDR3ModeCapable, /* True = DDR3 */ |
|---|
| 703 | BCHP_Feature_eMemCtrl1DDRDeviceTechCount, /* Size of memory part in MBits ie: 256, 512, 1024 */ |
|---|
| 704 | BCHP_Feature_eMemCtrl1DramWidthCount, /* Size of data path 16, 32, 64 bits */ |
|---|
| 705 | BCHP_Feature_eAVDCoreFreq /* AVD Core freqencey */ |
|---|
| 706 | } BCHP_Feature; |
|---|
| 707 | |
|---|
| 708 | /*************************************************************************** |
|---|
| 709 | Summary: |
|---|
| 710 | This structure represents settings for avs monitor |
|---|
| 711 | |
|---|
| 712 | Description: |
|---|
| 713 | This structure is provided to a call to BCHP_Monitor_Pvt |
|---|
| 714 | Note that this data is only used by 65nm parts that support AVS hardware. |
|---|
| 715 | |
|---|
| 716 | See Also: |
|---|
| 717 | BCHP_Monitor_Pvt. |
|---|
| 718 | ***************************************************************************/ |
|---|
| 719 | typedef struct BCHP_AvsSettings |
|---|
| 720 | { |
|---|
| 721 | unsigned hardStopOffset; /* Range 0-15. This parameter should be programmed as per the |
|---|
| 722 | board voltage drop (through PCB and filter components) between |
|---|
| 723 | the output of the regulator [VREG_VFB_1P2 net] and the |
|---|
| 724 | supply of the chip [D1.2V_BCM75XX]. Each unit is ~12.5mV. |
|---|
| 725 | If the board design has 20mV of drop then hardStopOffset=2 |
|---|
| 726 | should be programmed */ |
|---|
| 727 | unsigned maxVoltageStopOffset; /* Percentage reduction 0-15 from maximum +16% Vreg setting (at regulator). |
|---|
| 728 | Set this parameter to 4 if ambient temperature is expected |
|---|
| 729 | to rise above +70C for extended period. */ |
|---|
| 730 | } BCHP_AvsSettings; |
|---|
| 731 | |
|---|
| 732 | |
|---|
| 733 | /*************************************************************************** |
|---|
| 734 | Summary: |
|---|
| 735 | The data structure for receiving current AVS data. |
|---|
| 736 | |
|---|
| 737 | Description: |
|---|
| 738 | The AVS PVT Monitor can collect various pieces of information. |
|---|
| 739 | This is used to return that information to the caller. |
|---|
| 740 | Note that this data is only valid for 40nm parts that support AVS hardware. |
|---|
| 741 | |
|---|
| 742 | See Also: |
|---|
| 743 | BCHP_GetAvsData() |
|---|
| 744 | |
|---|
| 745 | ****************************************************************************/ |
|---|
| 746 | typedef struct { |
|---|
| 747 | unsigned voltage; /* this is the last measured voltage (in millivolts) */ |
|---|
| 748 | /* to convert use: float V = voltage/1000.; */ |
|---|
| 749 | unsigned temperature; /* this is the last converted temperature (in thousands) read from internal chip thermister */ |
|---|
| 750 | /* to convert use: float centigrade = temperature/1000.; */ |
|---|
| 751 | } BCHP_AvsData; |
|---|
| 752 | |
|---|
| 753 | |
|---|
| 754 | /*************************************************************************** |
|---|
| 755 | Summary: |
|---|
| 756 | Close a chip handle. |
|---|
| 757 | |
|---|
| 758 | Description: |
|---|
| 759 | Close the chip release internal resource. |
|---|
| 760 | |
|---|
| 761 | See Also: |
|---|
| 762 | BCHP_Open |
|---|
| 763 | **************************************************************************/ |
|---|
| 764 | BERR_Code BCHP_Close( |
|---|
| 765 | BCHP_Handle hChip /* [in] Chip handle */ |
|---|
| 766 | ); |
|---|
| 767 | |
|---|
| 768 | /*************************************************************************** |
|---|
| 769 | Summary: |
|---|
| 770 | Get the chip information. |
|---|
| 771 | |
|---|
| 772 | Description: |
|---|
| 773 | This function queries the chip id and its revision. |
|---|
| 774 | |
|---|
| 775 | See Also: |
|---|
| 776 | BCHP_Close |
|---|
| 777 | **************************************************************************/ |
|---|
| 778 | BERR_Code BCHP_GetChipInfo( |
|---|
| 779 | const BCHP_Handle hChip, /* [in] Chip handle */ |
|---|
| 780 | uint16_t *pChipId, /* [out] Chip Id */ |
|---|
| 781 | uint16_t *pChipRev /* [out] Chip Rev. */ |
|---|
| 782 | ); |
|---|
| 783 | |
|---|
| 784 | /*************************************************************************** |
|---|
| 785 | Summary: |
|---|
| 786 | Get a chip feature. |
|---|
| 787 | |
|---|
| 788 | Description: |
|---|
| 789 | This function returns specific information about a feature of a |
|---|
| 790 | chip. If the feature enumeration is understood by the specific |
|---|
| 791 | chip's interface, an appropriate value is returned. If the |
|---|
| 792 | feature enumeration is unhandled, this function will return |
|---|
| 793 | BERR_UNKNOWN meaning it is unknown whether this feature is supported |
|---|
| 794 | by this chipset. |
|---|
| 795 | |
|---|
| 796 | The type of the returned value (pFeatureValue) is specified in the |
|---|
| 797 | documentation of the feature enumeration. All feature enumerations |
|---|
| 798 | that end with 'Capable' return a bool type. All feature enumerations |
|---|
| 799 | that end with a 'Count' return an int type. |
|---|
| 800 | |
|---|
| 801 | See Also: |
|---|
| 802 | BCHP_Close |
|---|
| 803 | **************************************************************************/ |
|---|
| 804 | BERR_Code BCHP_GetFeature( |
|---|
| 805 | const BCHP_Handle hChip, /* [in] Chip handle */ |
|---|
| 806 | const BCHP_Feature eFeature, /* [in] Feature to be queried. */ |
|---|
| 807 | void *pFeatureValue /* [out] Feature value. */ |
|---|
| 808 | ); |
|---|
| 809 | |
|---|
| 810 | /*************************************************************************** |
|---|
| 811 | Summary: |
|---|
| 812 | Monitor adaptive voltage scaling. |
|---|
| 813 | |
|---|
| 814 | Description: |
|---|
| 815 | This function is called to adjust the voltage in response to |
|---|
| 816 | ring oscillator frequencies |
|---|
| 817 | |
|---|
| 818 | See Also: |
|---|
| 819 | BCHP_Close |
|---|
| 820 | **************************************************************************/ |
|---|
| 821 | void BCHP_MonitorPvt( |
|---|
| 822 | BCHP_Handle hChip, /* [in] Chip handle */ |
|---|
| 823 | BCHP_AvsSettings *pSettings /* [in] AVS settings. */ |
|---|
| 824 | ); |
|---|
| 825 | |
|---|
| 826 | /*************************************************************************** |
|---|
| 827 | Summary: |
|---|
| 828 | Get the current AVS data. |
|---|
| 829 | |
|---|
| 830 | Description: |
|---|
| 831 | This can be used to get various data associated with the AVS hardware. |
|---|
| 832 | This data will only be valid on 40nm parts that support AVS hardware. |
|---|
| 833 | |
|---|
| 834 | See Also: |
|---|
| 835 | BCHP_Open |
|---|
| 836 | |
|---|
| 837 | **************************************************************************/ |
|---|
| 838 | BERR_Code BCHP_GetAvsData( |
|---|
| 839 | BCHP_Handle hChip, /* [in] Chip handle */ |
|---|
| 840 | BCHP_AvsData *pData /* [out] pointer to location to return data */ |
|---|
| 841 | ); |
|---|
| 842 | |
|---|
| 843 | /*************************************************************************** |
|---|
| 844 | Summary: |
|---|
| 845 | Enter chip Standby mode. |
|---|
| 846 | |
|---|
| 847 | Description: |
|---|
| 848 | This will perform chip specific functions needed to enter power stand-by mode. |
|---|
| 849 | |
|---|
| 850 | See Also: |
|---|
| 851 | BCHP_Open |
|---|
| 852 | |
|---|
| 853 | **************************************************************************/ |
|---|
| 854 | BERR_Code BCHP_Standby( |
|---|
| 855 | BCHP_Handle hChip /* [in] Chip handle */ |
|---|
| 856 | ); |
|---|
| 857 | |
|---|
| 858 | /*************************************************************************** |
|---|
| 859 | Summary: |
|---|
| 860 | Exit chip Standby mode. |
|---|
| 861 | |
|---|
| 862 | Description: |
|---|
| 863 | This will perform chip specific functions needed to exit power stand-by mode. |
|---|
| 864 | |
|---|
| 865 | See Also: |
|---|
| 866 | BCHP_Open |
|---|
| 867 | |
|---|
| 868 | **************************************************************************/ |
|---|
| 869 | BERR_Code BCHP_Resume( |
|---|
| 870 | BCHP_Handle hChip /* [in] Chip handle */ |
|---|
| 871 | ); |
|---|
| 872 | |
|---|
| 873 | /*************************************************************************** |
|---|
| 874 | Summary: |
|---|
| 875 | Get handle for AVS module. |
|---|
| 876 | |
|---|
| 877 | Description: |
|---|
| 878 | This is used for testing purposes to gain access to AVS priv functions. |
|---|
| 879 | This will return NULL on platforms that do not support AVS. |
|---|
| 880 | |
|---|
| 881 | See Also: |
|---|
| 882 | BCHP_Open |
|---|
| 883 | |
|---|
| 884 | **************************************************************************/ |
|---|
| 885 | void *BCHP_GetAvsHandle( |
|---|
| 886 | BCHP_Handle hChip /* [in] Chip handle */ |
|---|
| 887 | ); |
|---|
| 888 | |
|---|
| 889 | #endif /* ! __ASSEMBLY__ */ |
|---|
| 890 | |
|---|
| 891 | /** |
|---|
| 892 | Summary: |
|---|
| 893 | BCHP_VER_XX values are used with the BCHP_VER and BCHP_<<secondary_chip>>_VER macros |
|---|
| 894 | to provide version-specific software support. |
|---|
| 895 | |
|---|
| 896 | Description: |
|---|
| 897 | Every magnum software build must have BCHP_VER defined to one of the following |
|---|
| 898 | values. This determines the version of chip the software is intended to run on. |
|---|
| 899 | |
|---|
| 900 | Magnum has limited support for binary compatibility for other minor versions |
|---|
| 901 | of the same chip. In most cases this is made possible by backward compatible |
|---|
| 902 | hardware interfaces. In a small number of cases, either compile time or |
|---|
| 903 | run time chip version tests are used to provide binary compatibility. See magnum |
|---|
| 904 | architecture documentation for more details. |
|---|
| 905 | **/ |
|---|
| 906 | #define BCHP_VER_A0 (0x00000000) |
|---|
| 907 | #define BCHP_VER_A1 (0x00000001) |
|---|
| 908 | #define BCHP_VER_A2 (0x00000002) |
|---|
| 909 | #define BCHP_VER_A3 (0x00000003) |
|---|
| 910 | #define BCHP_VER_A4 (0x00000004) |
|---|
| 911 | #define BCHP_VER_A5 (0x00000005) |
|---|
| 912 | |
|---|
| 913 | #define BCHP_VER_B0 (0x00010000) |
|---|
| 914 | #define BCHP_VER_B1 (0x00010001) |
|---|
| 915 | #define BCHP_VER_B2 (0x00010002) |
|---|
| 916 | #define BCHP_VER_B3 (0x00010003) |
|---|
| 917 | #define BCHP_VER_B4 (0x00010004) |
|---|
| 918 | #define BCHP_VER_B5 (0x00010005) |
|---|
| 919 | |
|---|
| 920 | #define BCHP_VER_C0 (0x00020000) |
|---|
| 921 | #define BCHP_VER_C1 (0x00020001) |
|---|
| 922 | #define BCHP_VER_C2 (0x00020002) |
|---|
| 923 | #define BCHP_VER_C3 (0x00020003) |
|---|
| 924 | #define BCHP_VER_C4 (0x00020004) |
|---|
| 925 | #define BCHP_VER_C5 (0x00020005) |
|---|
| 926 | |
|---|
| 927 | #define BCHP_VER_D0 (0x00030000) |
|---|
| 928 | #define BCHP_VER_D1 (0x00030001) |
|---|
| 929 | #define BCHP_VER_D2 (0x00030002) |
|---|
| 930 | #define BCHP_VER_D3 (0x00030003) |
|---|
| 931 | #define BCHP_VER_D4 (0x00030004) |
|---|
| 932 | #define BCHP_VER_D5 (0x00030005) |
|---|
| 933 | |
|---|
| 934 | #define BCHP_VER_E0 (0x00040000) |
|---|
| 935 | #define BCHP_VER_E1 (0x00040001) |
|---|
| 936 | #define BCHP_VER_E2 (0x00040002) |
|---|
| 937 | #define BCHP_VER_E3 (0x00040003) |
|---|
| 938 | #define BCHP_VER_E4 (0x00040004) |
|---|
| 939 | #define BCHP_VER_E5 (0x00040005) |
|---|
| 940 | |
|---|
| 941 | /* Use one particular chip to purge BCHP_REV from Magnum code and customer builds. */ |
|---|
| 942 | #if BCHP_CHIP == 7401 |
|---|
| 943 | #if defined BCHP_REV_C0 || defined BCHP_REV_C1 |
|---|
| 944 | #error BCHP_REV_XX is deprecreated. Use BCHP_VER==BCHP_VER_XX instead. Remove from code and build system. |
|---|
| 945 | #endif |
|---|
| 946 | #else |
|---|
| 947 | |
|---|
| 948 | /* Backward compatibility for BCHP_REV_XX. |
|---|
| 949 | This code will be removed in the future. You should define BCHP_VER. */ |
|---|
| 950 | #ifdef BCHP_REV_A0 |
|---|
| 951 | #ifndef BCHP_VER |
|---|
| 952 | #define BCHP_VER BCHP_VER_A0 |
|---|
| 953 | #elif BCHP_VER != BCHP_VER_A0 |
|---|
| 954 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 955 | #endif |
|---|
| 956 | #endif |
|---|
| 957 | #ifdef BCHP_REV_A1 |
|---|
| 958 | #ifndef BCHP_VER |
|---|
| 959 | #define BCHP_VER BCHP_VER_A1 |
|---|
| 960 | #elif BCHP_VER != BCHP_VER_A1 |
|---|
| 961 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 962 | #endif |
|---|
| 963 | #endif |
|---|
| 964 | #ifdef BCHP_REV_A2 |
|---|
| 965 | #ifndef BCHP_VER |
|---|
| 966 | #define BCHP_VER BCHP_VER_A2 |
|---|
| 967 | #elif BCHP_VER != BCHP_VER_A2 |
|---|
| 968 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 969 | #endif |
|---|
| 970 | #endif |
|---|
| 971 | #ifdef BCHP_REV_A3 |
|---|
| 972 | #ifndef BCHP_VER |
|---|
| 973 | #define BCHP_VER BCHP_VER_A3 |
|---|
| 974 | #elif BCHP_VER != BCHP_VER_A3 |
|---|
| 975 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 976 | #endif |
|---|
| 977 | #endif |
|---|
| 978 | #ifdef BCHP_REV_A4 |
|---|
| 979 | #ifndef BCHP_VER |
|---|
| 980 | #define BCHP_VER BCHP_VER_A4 |
|---|
| 981 | #elif BCHP_VER != BCHP_VER_A4 |
|---|
| 982 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 983 | #endif |
|---|
| 984 | #endif |
|---|
| 985 | #ifdef BCHP_REV_A5 |
|---|
| 986 | #ifndef BCHP_VER |
|---|
| 987 | #define BCHP_VER BCHP_VER_A5 |
|---|
| 988 | #elif BCHP_VER != BCHP_VER_A5 |
|---|
| 989 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 990 | #endif |
|---|
| 991 | #endif |
|---|
| 992 | |
|---|
| 993 | #ifdef BCHP_REV_B0 |
|---|
| 994 | #ifndef BCHP_VER |
|---|
| 995 | #define BCHP_VER BCHP_VER_B0 |
|---|
| 996 | #elif BCHP_VER != BCHP_VER_B0 |
|---|
| 997 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 998 | #endif |
|---|
| 999 | #endif |
|---|
| 1000 | #ifdef BCHP_REV_B1 |
|---|
| 1001 | #ifndef BCHP_VER |
|---|
| 1002 | #define BCHP_VER BCHP_VER_B1 |
|---|
| 1003 | #elif BCHP_VER != BCHP_VER_B1 |
|---|
| 1004 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1005 | #endif |
|---|
| 1006 | #endif |
|---|
| 1007 | #ifdef BCHP_REV_B2 |
|---|
| 1008 | #ifndef BCHP_VER |
|---|
| 1009 | #define BCHP_VER BCHP_VER_B2 |
|---|
| 1010 | #elif BCHP_VER != BCHP_VER_B2 |
|---|
| 1011 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1012 | #endif |
|---|
| 1013 | #endif |
|---|
| 1014 | #ifdef BCHP_REV_B3 |
|---|
| 1015 | #ifndef BCHP_VER |
|---|
| 1016 | #define BCHP_VER BCHP_VER_B3 |
|---|
| 1017 | #elif BCHP_VER != BCHP_VER_B3 |
|---|
| 1018 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1019 | #endif |
|---|
| 1020 | #endif |
|---|
| 1021 | #ifdef BCHP_REV_B4 |
|---|
| 1022 | #ifndef BCHP_VER |
|---|
| 1023 | #define BCHP_VER BCHP_VER_B4 |
|---|
| 1024 | #elif BCHP_VER != BCHP_VER_B4 |
|---|
| 1025 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1026 | #endif |
|---|
| 1027 | #endif |
|---|
| 1028 | #ifdef BCHP_REV_B5 |
|---|
| 1029 | #ifndef BCHP_VER |
|---|
| 1030 | #define BCHP_VER BCHP_VER_B5 |
|---|
| 1031 | #elif BCHP_VER != BCHP_VER_B5 |
|---|
| 1032 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1033 | #endif |
|---|
| 1034 | #endif |
|---|
| 1035 | |
|---|
| 1036 | #ifdef BCHP_REV_C0 |
|---|
| 1037 | #ifndef BCHP_VER |
|---|
| 1038 | #define BCHP_VER BCHP_VER_C0 |
|---|
| 1039 | #elif BCHP_VER != BCHP_VER_C0 |
|---|
| 1040 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1041 | #endif |
|---|
| 1042 | #endif |
|---|
| 1043 | #ifdef BCHP_REV_C1 |
|---|
| 1044 | #ifndef BCHP_VER |
|---|
| 1045 | #define BCHP_VER BCHP_VER_C1 |
|---|
| 1046 | #elif BCHP_VER != BCHP_VER_C1 |
|---|
| 1047 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1048 | #endif |
|---|
| 1049 | #endif |
|---|
| 1050 | #ifdef BCHP_REV_C2 |
|---|
| 1051 | #ifndef BCHP_VER |
|---|
| 1052 | #define BCHP_VER BCHP_VER_C2 |
|---|
| 1053 | #elif BCHP_VER != BCHP_VER_C2 |
|---|
| 1054 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1055 | #endif |
|---|
| 1056 | #endif |
|---|
| 1057 | #ifdef BCHP_REV_C3 |
|---|
| 1058 | #ifndef BCHP_VER |
|---|
| 1059 | #define BCHP_VER BCHP_VER_C3 |
|---|
| 1060 | #elif BCHP_VER != BCHP_VER_C3 |
|---|
| 1061 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1062 | #endif |
|---|
| 1063 | #endif |
|---|
| 1064 | #ifdef BCHP_REV_C4 |
|---|
| 1065 | #ifndef BCHP_VER |
|---|
| 1066 | #define BCHP_VER BCHP_VER_C4 |
|---|
| 1067 | #elif BCHP_VER != BCHP_VER_C4 |
|---|
| 1068 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1069 | #endif |
|---|
| 1070 | #endif |
|---|
| 1071 | #ifdef BCHP_REV_C5 |
|---|
| 1072 | #ifndef BCHP_VER |
|---|
| 1073 | #define BCHP_VER BCHP_VER_C5 |
|---|
| 1074 | #elif BCHP_VER != BCHP_VER_C5 |
|---|
| 1075 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1076 | #endif |
|---|
| 1077 | #endif |
|---|
| 1078 | |
|---|
| 1079 | #ifdef BCHP_REV_D0 |
|---|
| 1080 | #ifndef BCHP_VER |
|---|
| 1081 | #define BCHP_VER BCHP_VER_D0 |
|---|
| 1082 | #elif BCHP_VER != BCHP_VER_D0 |
|---|
| 1083 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1084 | #endif |
|---|
| 1085 | #endif |
|---|
| 1086 | #ifdef BCHP_REV_D1 |
|---|
| 1087 | #ifndef BCHP_VER |
|---|
| 1088 | #define BCHP_VER BCHP_VER_D1 |
|---|
| 1089 | #elif BCHP_VER != BCHP_VER_D1 |
|---|
| 1090 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1091 | #endif |
|---|
| 1092 | #endif |
|---|
| 1093 | #ifdef BCHP_REV_D2 |
|---|
| 1094 | #ifndef BCHP_VER |
|---|
| 1095 | #define BCHP_VER BCHP_VER_D2 |
|---|
| 1096 | #elif BCHP_VER != BCHP_VER_D2 |
|---|
| 1097 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1098 | #endif |
|---|
| 1099 | #endif |
|---|
| 1100 | #ifdef BCHP_REV_D3 |
|---|
| 1101 | #ifndef BCHP_VER |
|---|
| 1102 | #define BCHP_VER BCHP_VER_D3 |
|---|
| 1103 | #elif BCHP_VER != BCHP_VER_D3 |
|---|
| 1104 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1105 | #endif |
|---|
| 1106 | #endif |
|---|
| 1107 | #ifdef BCHP_REV_D4 |
|---|
| 1108 | #ifndef BCHP_VER |
|---|
| 1109 | #define BCHP_VER BCHP_VER_D4 |
|---|
| 1110 | #elif BCHP_VER != BCHP_VER_D4 |
|---|
| 1111 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1112 | #endif |
|---|
| 1113 | #endif |
|---|
| 1114 | #ifdef BCHP_REV_D5 |
|---|
| 1115 | #ifndef BCHP_VER |
|---|
| 1116 | #define BCHP_VER BCHP_VER_D5 |
|---|
| 1117 | #elif BCHP_VER != BCHP_VER_D5 |
|---|
| 1118 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1119 | #endif |
|---|
| 1120 | #endif |
|---|
| 1121 | |
|---|
| 1122 | #ifdef BCHP_REV_E0 |
|---|
| 1123 | #ifndef BCHP_VER |
|---|
| 1124 | #define BCHP_VER BCHP_VER_E0 |
|---|
| 1125 | #elif BCHP_VER != BCHP_VER_E0 |
|---|
| 1126 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1127 | #endif |
|---|
| 1128 | #endif |
|---|
| 1129 | #ifdef BCHP_REV_E1 |
|---|
| 1130 | #ifndef BCHP_VER |
|---|
| 1131 | #define BCHP_VER BCHP_VER_E1 |
|---|
| 1132 | #elif BCHP_VER != BCHP_VER_E1 |
|---|
| 1133 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1134 | #endif |
|---|
| 1135 | #endif |
|---|
| 1136 | #ifdef BCHP_REV_E2 |
|---|
| 1137 | #ifndef BCHP_VER |
|---|
| 1138 | #define BCHP_VER BCHP_VER_E2 |
|---|
| 1139 | #elif BCHP_VER != BCHP_VER_E2 |
|---|
| 1140 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1141 | #endif |
|---|
| 1142 | #endif |
|---|
| 1143 | #ifdef BCHP_REV_E3 |
|---|
| 1144 | #ifndef BCHP_VER |
|---|
| 1145 | #define BCHP_VER BCHP_VER_E3 |
|---|
| 1146 | #elif BCHP_VER != BCHP_VER_E3 |
|---|
| 1147 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1148 | #endif |
|---|
| 1149 | #endif |
|---|
| 1150 | #ifdef BCHP_REV_E4 |
|---|
| 1151 | #ifndef BCHP_VER |
|---|
| 1152 | #define BCHP_VER BCHP_VER_E4 |
|---|
| 1153 | #elif BCHP_VER != BCHP_VER_E4 |
|---|
| 1154 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1155 | #endif |
|---|
| 1156 | #endif |
|---|
| 1157 | #ifdef BCHP_REV_E5 |
|---|
| 1158 | #ifndef BCHP_VER |
|---|
| 1159 | #define BCHP_VER BCHP_VER_E5 |
|---|
| 1160 | #elif BCHP_VER != BCHP_VER_E5 |
|---|
| 1161 | #error Mismatch of BCHP_VER and deprecated BCHP_REV_XX |
|---|
| 1162 | #endif |
|---|
| 1163 | #endif |
|---|
| 1164 | |
|---|
| 1165 | |
|---|
| 1166 | #if BCHP_VER == BCHP_VER_A0 && !defined BCHP_REV_A0 |
|---|
| 1167 | #define BCHP_REV_A0 1 |
|---|
| 1168 | #endif |
|---|
| 1169 | #if BCHP_VER == BCHP_VER_A1 && !defined BCHP_REV_A1 |
|---|
| 1170 | #define BCHP_REV_A1 1 |
|---|
| 1171 | #endif |
|---|
| 1172 | #if BCHP_VER == BCHP_VER_A2 && !defined BCHP_REV_A2 |
|---|
| 1173 | #define BCHP_REV_A2 1 |
|---|
| 1174 | #endif |
|---|
| 1175 | #if BCHP_VER == BCHP_VER_A3 && !defined BCHP_REV_A3 |
|---|
| 1176 | #define BCHP_REV_A3 1 |
|---|
| 1177 | #endif |
|---|
| 1178 | #if BCHP_VER == BCHP_VER_A4 && !defined BCHP_REV_A4 |
|---|
| 1179 | #define BCHP_REV_A4 1 |
|---|
| 1180 | #endif |
|---|
| 1181 | #if BCHP_VER == BCHP_VER_A5 && !defined BCHP_REV_A5 |
|---|
| 1182 | #define BCHP_REV_A5 1 |
|---|
| 1183 | #endif |
|---|
| 1184 | |
|---|
| 1185 | #if BCHP_VER == BCHP_VER_B0 && !defined BCHP_REV_B0 |
|---|
| 1186 | #define BCHP_REV_B0 1 |
|---|
| 1187 | #endif |
|---|
| 1188 | #if BCHP_VER == BCHP_VER_B1 && !defined BCHP_REV_B1 |
|---|
| 1189 | #define BCHP_REV_B1 1 |
|---|
| 1190 | #endif |
|---|
| 1191 | #if BCHP_VER == BCHP_VER_B2 && !defined BCHP_REV_B2 |
|---|
| 1192 | #define BCHP_REV_B2 1 |
|---|
| 1193 | #endif |
|---|
| 1194 | #if BCHP_VER == BCHP_VER_B3 && !defined BCHP_REV_B3 |
|---|
| 1195 | #define BCHP_REV_B3 1 |
|---|
| 1196 | #endif |
|---|
| 1197 | #if BCHP_VER == BCHP_VER_B4 && !defined BCHP_REV_B4 |
|---|
| 1198 | #define BCHP_REV_B4 1 |
|---|
| 1199 | #endif |
|---|
| 1200 | #if BCHP_VER == BCHP_VER_B5 && !defined BCHP_REV_B5 |
|---|
| 1201 | #define BCHP_REV_B5 1 |
|---|
| 1202 | #endif |
|---|
| 1203 | |
|---|
| 1204 | #if BCHP_VER == BCHP_VER_C0 && !defined BCHP_REV_C0 |
|---|
| 1205 | #define BCHP_REV_C0 1 |
|---|
| 1206 | #endif |
|---|
| 1207 | #if BCHP_VER == BCHP_VER_C1 && !defined BCHP_REV_C1 |
|---|
| 1208 | #define BCHP_REV_C1 1 |
|---|
| 1209 | #endif |
|---|
| 1210 | #if BCHP_VER == BCHP_VER_C2 && !defined BCHP_REV_C2 |
|---|
| 1211 | #define BCHP_REV_C2 1 |
|---|
| 1212 | #endif |
|---|
| 1213 | #if BCHP_VER == BCHP_VER_C3 && !defined BCHP_REV_C3 |
|---|
| 1214 | #define BCHP_REV_C3 1 |
|---|
| 1215 | #endif |
|---|
| 1216 | #if BCHP_VER == BCHP_VER_C4 && !defined BCHP_REV_C4 |
|---|
| 1217 | #define BCHP_REV_C4 1 |
|---|
| 1218 | #endif |
|---|
| 1219 | #if BCHP_VER == BCHP_VER_C5 && !defined BCHP_REV_C5 |
|---|
| 1220 | #define BCHP_REV_C5 1 |
|---|
| 1221 | #endif |
|---|
| 1222 | |
|---|
| 1223 | #if BCHP_VER == BCHP_VER_D0 && !defined BCHP_REV_D0 |
|---|
| 1224 | #define BCHP_REV_D0 1 |
|---|
| 1225 | #endif |
|---|
| 1226 | #if BCHP_VER == BCHP_VER_D1 && !defined BCHP_REV_D1 |
|---|
| 1227 | #define BCHP_REV_D1 1 |
|---|
| 1228 | #endif |
|---|
| 1229 | #if BCHP_VER == BCHP_VER_D2 && !defined BCHP_REV_D2 |
|---|
| 1230 | #define BCHP_REV_D2 1 |
|---|
| 1231 | #endif |
|---|
| 1232 | #if BCHP_VER == BCHP_VER_D3 && !defined BCHP_REV_D3 |
|---|
| 1233 | #define BCHP_REV_D3 1 |
|---|
| 1234 | #endif |
|---|
| 1235 | #if BCHP_VER == BCHP_VER_D4 && !defined BCHP_REV_D4 |
|---|
| 1236 | #define BCHP_REV_D4 1 |
|---|
| 1237 | #endif |
|---|
| 1238 | #if BCHP_VER == BCHP_VER_D5 && !defined BCHP_REV_D5 |
|---|
| 1239 | #define BCHP_REV_D5 1 |
|---|
| 1240 | #endif |
|---|
| 1241 | |
|---|
| 1242 | #if BCHP_VER == BCHP_VER_E0 && !defined BCHP_REV_E0 |
|---|
| 1243 | #define BCHP_REV_E0 1 |
|---|
| 1244 | #endif |
|---|
| 1245 | #if BCHP_VER == BCHP_VER_E1 && !defined BCHP_REV_E1 |
|---|
| 1246 | #define BCHP_REV_E1 1 |
|---|
| 1247 | #endif |
|---|
| 1248 | #if BCHP_VER == BCHP_VER_E2 && !defined BCHP_REV_E2 |
|---|
| 1249 | #define BCHP_REV_E2 1 |
|---|
| 1250 | #endif |
|---|
| 1251 | #if BCHP_VER == BCHP_VER_E3 && !defined BCHP_REV_E3 |
|---|
| 1252 | #define BCHP_REV_E3 1 |
|---|
| 1253 | #endif |
|---|
| 1254 | #if BCHP_VER == BCHP_VER_E4 && !defined BCHP_REV_E4 |
|---|
| 1255 | #define BCHP_REV_E4 1 |
|---|
| 1256 | #endif |
|---|
| 1257 | #if BCHP_VER == BCHP_VER_E5 && !defined BCHP_REV_E5 |
|---|
| 1258 | #define BCHP_REV_E5 1 |
|---|
| 1259 | #endif |
|---|
| 1260 | |
|---|
| 1261 | #endif /* 7401 purge of BCHP_REV */ |
|---|
| 1262 | |
|---|
| 1263 | /* Check for required definitions */ |
|---|
| 1264 | #ifndef BCHP_CHIP |
|---|
| 1265 | #error BCHP_CHIP must be defined to the main chip id. |
|---|
| 1266 | #endif |
|---|
| 1267 | |
|---|
| 1268 | #ifndef BCHP_VER |
|---|
| 1269 | #error BCHP_VER must be defined to a standard value. |
|---|
| 1270 | #endif |
|---|
| 1271 | |
|---|
| 1272 | #ifdef __cplusplus |
|---|
| 1273 | } |
|---|
| 1274 | #endif |
|---|
| 1275 | |
|---|
| 1276 | #endif |
|---|
| 1277 | |
|---|
| 1278 | /* End of File */ |
|---|