1 //<MStar Software> 2 //****************************************************************************** 3 // MStar Software 4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved. 5 // All software, firmware and related documentation herein ("MStar Software") are 6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by 7 // law, including, but not limited to, copyright law and international treaties. 8 // Any use, modification, reproduction, retransmission, or republication of all 9 // or part of MStar Software is expressly prohibited, unless prior written 10 // permission has been granted by MStar. 11 // 12 // By accessing, browsing and/or using MStar Software, you acknowledge that you 13 // have read, understood, and agree, to be bound by below terms ("Terms") and to 14 // comply with all applicable laws and regulations: 15 // 16 // 1. MStar shall retain any and all right, ownership and interest to MStar 17 // Software and any modification/derivatives thereof. 18 // No right, ownership, or interest to MStar Software and any 19 // modification/derivatives thereof is transferred to you under Terms. 20 // 21 // 2. You understand that MStar Software might include, incorporate or be 22 // supplied together with third party`s software and the use of MStar 23 // Software may require additional licenses from third parties. 24 // Therefore, you hereby agree it is your sole responsibility to separately 25 // obtain any and all third party right and license necessary for your use of 26 // such third party`s software. 27 // 28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as 29 // MStar`s confidential information and you agree to keep MStar`s 30 // confidential information in strictest confidence and not disclose to any 31 // third party. 32 // 33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any 34 // kind. Any warranties are hereby expressly disclaimed by MStar, including 35 // without limitation, any warranties of merchantability, non-infringement of 36 // intellectual property rights, fitness for a particular purpose, error free 37 // and in conformity with any international standard. You agree to waive any 38 // claim against MStar for any loss, damage, cost or expense that you may 39 // incur related to your use of MStar Software. 40 // In no event shall MStar be liable for any direct, indirect, incidental or 41 // consequential damages, including without limitation, lost of profit or 42 // revenues, lost or damage of data, and unauthorized system use. 43 // You agree that this Section 4 shall still apply without being affected 44 // even if MStar Software has been modified by MStar in accordance with your 45 // request or instruction for your use, except otherwise agreed by both 46 // parties in writing. 47 // 48 // 5. If requested, MStar may from time to time provide technical supports or 49 // services in relation with MStar Software to you for your use of 50 // MStar Software in conjunction with your or your customer`s product 51 // ("Services"). 52 // You understand and agree that, except otherwise agreed by both parties in 53 // writing, Services are provided on an "AS IS" basis and the warranty 54 // disclaimer set forth in Section 4 above shall apply. 55 // 56 // 6. Nothing contained herein shall be construed as by implication, estoppels 57 // or otherwise: 58 // (a) conferring any license or right to use MStar name, trademark, service 59 // mark, symbol or any other identification; 60 // (b) obligating MStar or any of its affiliates to furnish any person, 61 // including without limitation, you and your customers, any assistance 62 // of any kind whatsoever, or any information; or 63 // (c) conferring any license or right under any intellectual property right. 64 // 65 // 7. These terms shall be governed by and construed in accordance with the laws 66 // of Taiwan, R.O.C., excluding its conflict of law rules. 67 // Any and all dispute arising out hereof or related hereto shall be finally 68 // settled by arbitration referred to the Chinese Arbitration Association, 69 // Taipei in accordance with the ROC Arbitration Law and the Arbitration 70 // Rules of the Association by three (3) arbitrators appointed in accordance 71 // with the said Rules. 72 // The place of arbitration shall be in Taipei, Taiwan and the language shall 73 // be English. 74 // The arbitration award shall be final and binding to both parties. 75 // 76 //****************************************************************************** 77 //<MStar Software> 78 //////////////////////////////////////////////////////////////////////////////// 79 // 80 // Copyright (c) 2008-2009 MStar Semiconductor, Inc. 81 // All rights reserved. 82 // 83 // Unless otherwise stipulated in writing, any and all information contained 84 // herein regardless in any format shall remain the sole proprietary of 85 // MStar Semiconductor Inc. and be kept in strict confidence 86 // ("MStar Confidential Information") by the recipient. 87 // Any unauthorized act including without limitation unauthorized disclosure, 88 // copying, use, reproduction, sale, distribution, modification, disassembling, 89 // reverse engineering and compiling of the contents of MStar Confidential 90 // Information is unlawful and strictly prohibited. MStar hereby reserves the 91 // rights to any and all damages, losses, costs and expenses resulting therefrom. 92 // 93 //////////////////////////////////////////////////////////////////////////////// 94 95 /////////////////////////////////////////////////////////////////////////////////////////////////// 96 /// 97 /// @file drvSYS.h 98 /// @brief System Control Interface 99 /// @author MStar Semiconductor Inc. 100 /////////////////////////////////////////////////////////////////////////////////////////////////// 101 102 /*! \defgroup G_SYS SYS interface 103 \ingroup G_PERIPHERAL 104 105 \brief 106 107 This drvSYS.h provide functions like WDT, FlushMemory, and Chip-Related utility. 108 109 <b>Features</b> 110 111 - WDT control function 112 - System Memory control function 113 - System Chip-Related function 114 115 <b> Operation Code Flow: </b> \n 116 -# Prepare SYS setting for each operation 117 -# Set and start SYS in command handle 118 -# Trigger SYS 119 120 \defgroup G_SYS_INIT Initialization Task relative 121 \ingroup G_SYS 122 \defgroup G_SYS_COMMON Common Task relative 123 \ingroup G_SYS 124 \defgroup G_SYS_CONTROL Control relative 125 \ingroup G_SYS 126 \defgroup G_SYS_OTHER other relative 127 \ingroup G_SYS 128 */ 129 130 #ifndef _DRV_SYS_H_ 131 #define _DRV_SYS_H_ 132 133 #ifdef __cplusplus 134 extern "C" 135 { 136 #endif 137 138 #include "MsTypes.h" 139 #include "MsDevice.h" 140 141 //------------------------------------------------------------------------------------------------- 142 // Driver Capability 143 //------------------------------------------------------------------------------------------------- 144 145 #define SYS_ENCODER_MFE 0x00000001UL 146 #define SYS_ENCODER_VE 0x00000002UL 147 148 #define SYS_FRONTEND_AVD 0x00000001UL 149 #define SYS_FRONTEND_DEMOD 0x00000002UL 150 #define SYS_FRONTEND_VBI 0x00000004UL 151 #define SYS_FRONTEND_VIF 0x00000008UL 152 153 #define SYS_SYSTEM_CEC 0x00000001UL 154 #define SYS_SYSTEM_MBX 0x00000002UL 155 #define SYS_SYSTEM_SWI2C 0x00000004UL 156 #define SYS_SYSTEM_BDMA 0x00000008UL 157 #define SYS_SYSTEM_CPU 0x00000010UL 158 #define SYS_SYSTEM_GPIO 0x00000020UL 159 #define SYS_SYSTEM_HWI2C 0x00000040UL 160 #define SYS_SYSTEM_IR 0x00000080UL 161 #define SYS_SYSTEM_MIU 0x00000100UL 162 #define SYS_SYSTEM_MPIF 0x00000200UL 163 #define SYS_SYSTEM_MSPI 0x00000400UL 164 #define SYS_SYSTEM_PM 0x00000800UL 165 #define SYS_SYSTEM_PWM 0x00001000UL 166 #define SYS_SYSTEM_PWS 0x00002000UL 167 #define SYS_SYSTEM_RTC 0x00004000UL 168 #define SYS_SYSTEM_SAR 0x00008000UL 169 #define SYS_SYSTEM_URDMA 0x00010000UL 170 #define SYS_SYSTEM_WDT 0x00020000UL 171 172 #define SYS_CA_AESDMA 0x00000001UL 173 #define SYS_CA_CA 0x00000002UL 174 #define SYS_CA_PCMCIA 0x00000004UL 175 #define SYS_CA_SC 0x00000008UL 176 177 #define SYS_CODEC_GPD 0x00000001UL 178 #define SYS_CODEC_JPEG 0x00000002UL 179 #define SYS_CODEC_VDEC 0x00000004UL 180 181 #define SYS_DISPLAY_ACE 0x00000001UL 182 #define SYS_DISPLAY_DAC 0x00000002UL 183 #define SYS_DISPLAY_DDC2BI 0x00000004UL 184 #define SYS_DISPLAY_DIP 0x00000008UL 185 #define SYS_DISPLAY_DLC 0x00000010UL 186 #define SYS_DISPLAY_GOP 0x00000020UL 187 #define SYS_DISPLAY_HDMITX 0x00000040UL 188 #define SYS_DISPLAY_MHL 0x00000080UL 189 #define SYS_DISPLAY_MVOP 0x00000100UL 190 #define SYS_DISPLAY_PNL 0x00000200UL 191 #define SYS_DISPLAY_XC 0x00000400UL 192 193 #define SYS_GFX_GFX 0x00000001UL 194 #define SYS_AUDIO_AUDIO 0x00000001UL 195 #define SYS_STORAGE_SERFLASH 0x00000001UL 196 #define SYS_DEMUX_DMX 0x00000001UL 197 198 //------------------------------------------------------------------------------------------------- 199 // Macro and Define 200 //------------------------------------------------------------------------------------------------- 201 /// Version string. 202 #define MSIF_SYS_LIB_CODE {'S','Y','S','_'} //Lib code 203 #define MSIF_SYS_LIBVER {'0','1'} //LIB version 204 #define MSIF_SYS_BUILDNUM {'0','9' } //Build Number 205 #define MSIF_SYS_CHANGELIST {'0','0','6','3','0','6','5','2'} //P4 ChangeList Number 206 207 #define SYS_DRV_VERSION /* Character String for DRV/API version */ \ 208 MSIF_TAG, /* 'MSIF' */ \ 209 MSIF_CLASS, /* '00' */ \ 210 MSIF_CUS, /* 0x0000 */ \ 211 MSIF_MOD, /* 0x0000 */ \ 212 MSIF_CHIP, \ 213 MSIF_CPU, \ 214 MSIF_SYS_LIB_CODE, /* IP__ */ \ 215 MSIF_SYS_LIBVER, /* 0.0 ~ Z.Z */ \ 216 MSIF_SYS_BUILDNUM, /* 00 ~ 99 */ \ 217 MSIF_SYS_CHANGELIST, /* CL# */ \ 218 MSIF_OS 219 220 #define SYS_LIB_NAME_MAX 16UL ///< Maximum length of library name 221 #define SYS_LIB_TIME_MAX 16UL ///< Maximum length of time 222 #define SYS_LIB_DATE_MAX 16UL ///< Maximum length of date 223 #define SYS_BOARD_MODEL_MAX 32UL ///< Maximum length of board name 224 #define SYS_PLATFORM_CHIP_MAX 32UL ///< Maximum length of playform name 225 #define SYS_EFUSE_DID_LENGTH 4UL ///< efuse device ID length 226 227 228 //------------------------------------------------------------------------------------------------- 229 // Type and Structure 230 //------------------------------------------------------------------------------------------------- 231 232 /// System information 233 typedef struct _SYS_Info 234 { 235 struct 236 { 237 MS_U16 DeviceId; ///< Device ID 238 MS_U8 Version; ///< Version 239 MS_U8 Revision; ///< Revision 240 MS_PHY MIU1Base; ///< MIU1Base 241 MS_PHY MIU1BusBase; ///< MIU1Base 242 MS_PHY MIU2Base; ///< MIU2Base 243 MS_PHY MIU2BusBase; ///< MIU3Base 244 MS_PHY MIU3Base; ///< MIU2Base 245 MS_PHY MIU3BusBase; ///< MIU3Base 246 } Chip; ///< Chip information 247 248 struct 249 { 250 MS_U8 Time[SYS_LIB_TIME_MAX]; ///< Library Built Time 251 MS_U8 Date[SYS_LIB_DATE_MAX]; ///< Library Built Date 252 } SWLib; ///< Software Library Information 253 254 } SYS_Info; 255 256 257 typedef struct _SYS_Status 258 { 259 MS_BOOL WDT_Active; ///< Watchdog Timer 260 261 } SYS_Status; 262 263 typedef enum _SYS_DbgLv 264 { 265 E_SYS_DBGLV_NONE //no debug message 266 ,E_SYS_DBGLV_ERR_ONLY //show error only 267 ,E_SYS_DBGLV_REG_DUMP //show error & reg dump 268 ,E_SYS_DBGLV_INFO //show error & informaiton 269 ,E_SYS_DBGLV_ALL //show error, information & funciton name 270 }SYS_DbgLv; 271 272 typedef enum 273 { 274 E_SYS_QUERY_H264_SUPPORTED = 0x00, 275 E_SYS_QUERY_DVBC_SUPPORTED = 0x10, 276 E_SYS_QUERY_MM_SUPPORTED = 0x11, 277 E_SYS_QUERY_TTXNICAM_SUPPORTED = 0x12, 278 E_SYS_QUERY_TCON_SUPPORTED = 0x13, 279 E_SYS_QUERY_DTV_SUPPORTED = 0x14, 280 E_SYS_QUERY_DTVCC_SUPPORTED = 0x15, 281 E_SYS_QUERY_GINGA_NCL_SUPPORTED = 0x16, 282 E_SYS_QUERY_GINGA_JAVA_SUPPORTED = 0x17, 283 E_SYS_QUERT_HD_SUPPORTED = 0x18, 284 E_SYS_QUERY_MHL_SUPPORTED = 0x19, 285 E_SYS_QUERY_DVBT_SUPPORTED = 0x1A, 286 E_SYS_QUERY_ISDBT_SUPPORTED = 0x1B, 287 E_SYS_QUERY_HBBTV_SUPPORTED = 0x1C, 288 E_SYS_QUERY_SECURED_IC_SUPPORTED = 0x200, 289 } E_SYS_QUERY; 290 291 typedef enum 292 { 293 E_SYS_ATV_AGC_PAD_SET, 294 E_SYS_DTV_AGC_PAD_SET, 295 E_SYS_DTV_AGC_PAD_SET_ALL_OFF, 296 }SYS_AGC_PAD_SET; 297 298 typedef enum 299 { 300 E_TS0_PAD_SET, 301 E_TS1_PAD_SET, 302 E_TS2_PAD_SET, 303 E_TS3_PAD_SET, 304 E_CA_CI_PAD_SET, 305 E_SC_PAD_SET, 306 E_MSPI_PAD_SET, 307 E_TS4_PAD_SET, 308 E_TS5_PAD_SET, 309 E_PAD_SET_MAX 310 }SYS_PAD_MUX_SET; 311 312 typedef enum 313 { 314 E_PARALLEL_IN, 315 E_SERIAL_IN, 316 E_PARALLEL_IN_2nd_PORT, 317 E_PARALLEL_OUT, 318 E_CA_CI_PAD_CA, 319 E_CA_CI_PAD_CI, 320 E_CA_CI_PAD_NONE, 321 E_TRI_STATE_ON, 322 E_TRI_STATE_OFF, 323 E_SC_PAD_PCM, 324 E_SC_PAD_TS1, 325 E_MSPI_PAD_ON, 326 E_MSPI_PAD_GPIO, 327 E_SERIAL_IN_3_WIRE, 328 E_PARALLEL_OUT_SER2PAR, 329 E_PARALLEL_OUT_INTDMD, 330 E_PARALLEL_OUT_TSO, 331 E_PARALLEL_OUT_SER2PAR1, 332 E_PAD_SEL_MAX 333 }SYS_PAD_SEL; 334 335 typedef enum 336 { 337 E_PCM_CD_SINGLE, 338 E_PCM_CD_OR, 339 E_PCM_CD_MAX 340 }SYS_PCM_CD_MODE; 341 342 typedef enum 343 { 344 E_SYS_DOLBY_VERSION = 0x00, 345 E_SYS_DOLBY_CONTROL_BIT = 0x01, 346 E_SYS_DOLBY_REVERSE_BIT = 0x02, 347 348 } E_SYS_DOLBY_HASH_INFO; 349 350 typedef enum 351 { 352 E_SYS_CHIP_TV, 353 E_SYS_CHIP_STB, 354 E_SYS_CHIP_MAX, 355 } E_SYS_CHIP_TYPE; 356 357 typedef enum 358 { 359 E_SYS_IP_ENCODER, 360 E_SYS_IP_FRONTEND, 361 E_SYS_IP_DEMUX, 362 E_SYS_IP_SYSTEM, 363 E_SYS_IP_CA, 364 E_SYS_IP_CODEC, 365 E_SYS_IP_DISPLAY, 366 E_SYS_IP_AUDIO, 367 E_SYS_IP_GFX, 368 E_SYS_IP_STORAGE, 369 } E_SYS_IP_TYPE; 370 371 typedef enum 372 { 373 E_SYS_IO_SWI2C_READ = 0x00, 374 E_SYS_IO_SWI2C_WRITE = 0x01, 375 E_SYS_IO_MAX = 0xFF, 376 } E_SYS_IO_PROC; 377 378 //------------------------------------------------------------------------------------------------- 379 // Function and Variable 380 //------------------------------------------------------------------------------------------------- 381 //------------------------------------------------------------------------------------------------- 382 /// MOBF Encrypt 383 /// @ingroup G_SYS_INIT 384 /// @param u32Key \b IN: Key 385 /// @param bEnable \b IN: TRUE/FLASE 386 /// @return DRVAESDMA_OK : Success 387 /// @return Others : Fail 388 //------------------------------------------------------------------------------------------------- 389 MS_BOOL MDrv_SYS_Init(void); 390 //------------------------------------------------------------------------------------------------- 391 /// MOBF Encrypt 392 /// @ingroup G_SYS_INIT 393 /// @param u32Key \b IN: Key 394 /// @param bEnable \b IN: TRUE/FLASE 395 /// @return DRVAESDMA_OK : Success 396 /// @return Others : Fail 397 //------------------------------------------------------------------------------------------------- 398 MS_BOOL MDrv_SYS_GlobalInit(void); 399 //------------------------------------------------------------------------------------------------- 400 /// MOBF Encrypt 401 /// @ingroup G_SYS_COMMON 402 /// @param u32Key \b IN: Key 403 /// @param bEnable \b IN: TRUE/FLASE 404 /// @return DRVAESDMA_OK : Success 405 /// @return Others : Fail 406 //------------------------------------------------------------------------------------------------- 407 const SYS_Info* MDrv_SYS_GetInfo(void); 408 //------------------------------------------------------------------------------------------------- 409 /// MOBF Encrypt 410 /// @ingroup G_SYS_COMMON 411 /// @param u32Key \b IN: Key 412 /// @param bEnable \b IN: TRUE/FLASE 413 /// @return DRVAESDMA_OK : Success 414 /// @return Others : Fail 415 //------------------------------------------------------------------------------------------------- 416 MS_U8 MDrv_SYS_GetChipRev(void); 417 //------------------------------------------------------------------------------------------------- 418 /// MOBF Encrypt 419 /// @ingroup G_SYS_COMMON 420 /// @param u32Key \b IN: Key 421 /// @param bEnable \b IN: TRUE/FLASE 422 /// @return DRVAESDMA_OK : Success 423 /// @return Others : Fail 424 //------------------------------------------------------------------------------------------------- 425 MS_U16 MDrv_SYS_GetChipID(void); 426 //------------------------------------------------------------------------------------------------- 427 /// MOBF Encrypt 428 /// @ingroup G_SYS_COMMON 429 /// @param u32Key \b IN: Key 430 /// @param bEnable \b IN: TRUE/FLASE 431 /// @return DRVAESDMA_OK : Success 432 /// @return Others : Fail 433 //------------------------------------------------------------------------------------------------- 434 void MDrv_SYS_WDTEnable(MS_BOOL bEnable); 435 //------------------------------------------------------------------------------------------------- 436 /// MOBF Encrypt 437 /// @ingroup G_SYS_COMMON 438 /// @param u32Key \b IN: Key 439 /// @param bEnable \b IN: TRUE/FLASE 440 /// @return DRVAESDMA_OK : Success 441 /// @return Others : Fail 442 //------------------------------------------------------------------------------------------------- 443 void MDrv_SYS_WDTClear(void); 444 //------------------------------------------------------------------------------------------------- 445 /// MOBF Encrypt 446 /// @ingroup G_SYS_COMMON 447 /// @param u32Key \b IN: Key 448 /// @param bEnable \b IN: TRUE/FLASE 449 /// @return DRVAESDMA_OK : Success 450 /// @return Others : Fail 451 //------------------------------------------------------------------------------------------------- 452 // MS_BOOL MDrv_SYS_WDTLastStatus(void); 453 //------------------------------------------------------------------------------------------------- 454 /// MOBF Encrypt 455 /// @ingroup G_SYS_COMMON 456 /// @param u32Key \b IN: Key 457 /// @param bEnable \b IN: TRUE/FLASE 458 /// @return DRVAESDMA_OK : Success 459 /// @return Others : Fail 460 //------------------------------------------------------------------------------------------------- 461 // void MDrv_SYS_WDTSetTime(MS_U32 u32Ms); 462 //------------------------------------------------------------------------------------------------- 463 /// MOBF Encrypt 464 /// @ingroup G_SYS_COMMON 465 /// @param u32Key \b IN: Key 466 /// @param bEnable \b IN: TRUE/FLASE 467 /// @return DRVAESDMA_OK : Success 468 /// @return Others : Fail 469 //------------------------------------------------------------------------------------------------- 470 // void MDrv_SYS_ResetChip(void); 471 //------------------------------------------------------------------------------------------------- 472 /// MOBF Encrypt 473 /// @ingroup G_SYS_COMMON 474 /// @param u32Key \b IN: Key 475 /// @param bEnable \b IN: TRUE/FLASE 476 /// @return DRVAESDMA_OK : Success 477 /// @return Others : Fail 478 //------------------------------------------------------------------------------------------------- 479 // void MDrv_SYS_ResetCPU(void); 480 //------------------------------------------------------------------------------------------------- 481 /// MOBF Encrypt 482 /// @ingroup G_SYS_COMMON 483 /// @param u32Key \b IN: Key 484 /// @param bEnable \b IN: TRUE/FLASE 485 /// @return DRVAESDMA_OK : Success 486 /// @return Others : Fail 487 //------------------------------------------------------------------------------------------------- 488 void MDrv_SYS_SetDbgLevel(SYS_DbgLv eLevel); 489 //------------------------------------------------------------------------------------------------- 490 /// MOBF Encrypt 491 /// @ingroup G_SYS_COMMON 492 /// @param u32Key \b IN: Key 493 /// @param bEnable \b IN: TRUE/FLASE 494 /// @return DRVAESDMA_OK : Success 495 /// @return Others : Fail 496 //------------------------------------------------------------------------------------------------- 497 // void MDrv_SYS_FlushMemory(void); 498 //------------------------------------------------------------------------------------------------- 499 /// MOBF Encrypt 500 /// @ingroup G_SYS_COMMON 501 /// @param u32Key \b IN: Key 502 /// @param bEnable \b IN: TRUE/FLASE 503 /// @return DRVAESDMA_OK : Success 504 /// @return Others : Fail 505 //------------------------------------------------------------------------------------------------- 506 // void MDrv_SYS_ReadMemory(void); 507 //------------------------------------------------------------------------------------------------- 508 /// MOBF Encrypt 509 /// @ingroup G_SYS_COMMON 510 /// @param u32Key \b IN: Key 511 /// @param bEnable \b IN: TRUE/FLASE 512 /// @return DRVAESDMA_OK : Success 513 /// @return Others : Fail 514 //------------------------------------------------------------------------------------------------- 515 // void MDrv_SYS_VIFWriteByteByVDMbox(MS_U32 u32Reg, MS_U8 u8Val); 516 //------------------------------------------------------------------------------------------------- 517 /// MOBF Encrypt 518 /// @ingroup G_SYS_COMMON 519 /// @param u32Key \b IN: Key 520 /// @param bEnable \b IN: TRUE/FLASE 521 /// @return DRVAESDMA_OK : Success 522 /// @return Others : Fail 523 //------------------------------------------------------------------------------------------------- 524 // void MDrv_SYS_VIFWriteByteMaskByVDMbox(MS_U32 u32Reg, MS_U8 u8Val, MS_U8 u8Mask); 525 //------------------------------------------------------------------------------------------------- 526 /// MOBF Encrypt 527 /// @ingroup G_SYS_COMMON 528 /// @param u32Key \b IN: Key 529 /// @param bEnable \b IN: TRUE/FLASE 530 /// @return DRVAESDMA_OK : Success 531 /// @return Others : Fail 532 //------------------------------------------------------------------------------------------------- 533 // void MDrv_SYS_VIFWriteRegBitByVDMbox(MS_U32 u32Reg, MS_U8 bEnable, MS_U8 u8Mask); 534 //------------------------------------------------------------------------------------------------- 535 /// MOBF Encrypt 536 /// @ingroup G_SYS_COMMON 537 /// @param u32Key \b IN: Key 538 /// @param bEnable \b IN: TRUE/FLASE 539 /// @return DRVAESDMA_OK : Success 540 /// @return Others : Fail 541 //------------------------------------------------------------------------------------------------- 542 // MS_U8 MDrv_SYS_VIFReadByteByVDMbox(MS_U32 u32Reg); 543 //------------------------------------------------------------------------------------------------- 544 /// MOBF Encrypt 545 /// @ingroup G_SYS_COMMON 546 /// @param u32Key \b IN: Key 547 /// @param bEnable \b IN: TRUE/FLASE 548 /// @return DRVAESDMA_OK : Success 549 /// @return Others : Fail 550 //------------------------------------------------------------------------------------------------- 551 // MS_U16 MDrv_SYS_VIFRead2ByteByVDMbox(MS_U32 u32Reg); 552 //------------------------------------------------------------------------------------------------- 553 /// MOBF Encrypt 554 /// @ingroup G_SYS_COMMON 555 /// @param u32Key \b IN: Key 556 /// @param bEnable \b IN: TRUE/FLASE 557 /// @return DRVAESDMA_OK : Success 558 /// @return Others : Fail 559 //------------------------------------------------------------------------------------------------- 560 MS_BOOL MDrv_SYS_Query(E_SYS_QUERY id); 561 562 #ifdef _SYS_DAC_GAIN_CTRL_ 563 //------------------------------------------------------------------------------------------------- 564 /// MOBF Encrypt 565 /// @ingroup G_SYS_COMMON 566 /// @param u32Key \b IN: Key 567 /// @param bEnable \b IN: TRUE/FLASE 568 /// @return DRVAESDMA_OK : Success 569 /// @return Others : Fail 570 //------------------------------------------------------------------------------------------------- 571 void MDrv_SYS_EnhanceDACGain(MS_U8 u8DAC_ID, MS_BOOL bEnable); 572 #endif 573 //------------------------------------------------------------------------------------------------- 574 /// MOBF Encrypt 575 /// @ingroup G_SYS_COMMON 576 /// @param u32Key \b IN: Key 577 /// @param bEnable \b IN: TRUE/FLASE 578 /// @return DRVAESDMA_OK : Success 579 /// @return Others : Fail 580 //------------------------------------------------------------------------------------------------- 581 void MDrv_SYS_GetSoftwareVersion(MS_SW_VERSION_INFO *pSoftwareVersionInfo); 582 //------------------------------------------------------------------------------------------------- 583 /// MOBF Encrypt 584 /// @ingroup G_SYS_COMMON 585 /// @param u32Key \b IN: Key 586 /// @param bEnable \b IN: TRUE/FLASE 587 /// @return DRVAESDMA_OK : Success 588 /// @return Others : Fail 589 //------------------------------------------------------------------------------------------------- 590 void MDrv_SYS_SetAGCPadMux(SYS_AGC_PAD_SET eAgcPadMux); 591 //------------------------------------------------------------------------------------------------- 592 /// MOBF Encrypt 593 /// @ingroup G_SYS_CONTROL 594 /// @param u32Key \b IN: Key 595 /// @param bEnable \b IN: TRUE/FLASE 596 /// @return DRVAESDMA_OK : Success 597 /// @return Others : Fail 598 //------------------------------------------------------------------------------------------------- 599 MS_BOOL MDrv_SYS_SetPadMux(SYS_PAD_MUX_SET ePadMuxType,SYS_PAD_SEL ePadSel); 600 //------------------------------------------------------------------------------------------------- 601 /// MOBF Encrypt 602 /// @ingroup G_SYS_CONTROL 603 /// @param u32Key \b IN: Key 604 /// @param bEnable \b IN: TRUE/FLASE 605 /// @return DRVAESDMA_OK : Success 606 /// @return Others : Fail 607 //------------------------------------------------------------------------------------------------- 608 // MS_BOOL MDrv_SYS_SetPCMCardDetectMode(SYS_PCM_CD_MODE ePCMCDMode); 609 //------------------------------------------------------------------------------------------------- 610 /// MOBF Encrypt 611 /// @ingroup G_SYS_CONTROL 612 /// @param u32Key \b IN: Key 613 /// @param bEnable \b IN: TRUE/FLASE 614 /// @return DRVAESDMA_OK : Success 615 /// @return Others : Fail 616 //------------------------------------------------------------------------------------------------- 617 // MS_BOOL MDrv_SYS_DisableDebugPort(void); 618 //------------------------------------------------------------------------------------------------- 619 /// MOBF Encrypt 620 /// @ingroup G_SYS_CONTROL 621 /// @param u32Key \b IN: Key 622 /// @param bEnable \b IN: TRUE/FLASE 623 /// @return DRVAESDMA_OK : Success 624 /// @return Others : Fail 625 //------------------------------------------------------------------------------------------------- 626 // MS_BOOL MDrv_SYS_EnableDebugPort(void); 627 //------------------------------------------------------------------------------------------------- 628 /// MOBF Encrypt 629 /// @ingroup G_SYS_CONTROL 630 /// @param u32Key \b IN: Key 631 /// @param bEnable \b IN: TRUE/FLASE 632 /// @return DRVAESDMA_OK : Success 633 /// @return Others : Fail 634 //------------------------------------------------------------------------------------------------- 635 MS_BOOL MDrv_SYS_SetTSOutClockPhase(MS_U16 u16Val); 636 //------------------------------------------------------------------------------------------------- 637 /// MOBF Encrypt 638 /// @ingroup G_SYS_CONTROL 639 /// @param u32Key \b IN: Key 640 /// @param bEnable \b IN: TRUE/FLASE 641 /// @return DRVAESDMA_OK : Success 642 /// @return Others : Fail 643 //------------------------------------------------------------------------------------------------- 644 MS_BOOL MDrv_SYS_SetTSClockPhase(SYS_PAD_MUX_SET ePadMuxType, MS_U16 u16Val); 645 //------------------------------------------------------------------------------------------------- 646 /// MOBF Encrypt 647 /// @ingroup G_SYS_COMMON 648 /// @param u32Key \b IN: Key 649 /// @param bEnable \b IN: TRUE/FLASE 650 /// @return DRVAESDMA_OK : Success 651 /// @return Others : Fail 652 //------------------------------------------------------------------------------------------------- 653 MS_U32 MDrv_SYS_SetPowerState(EN_POWER_MODE u16PowerState); 654 //------------------------------------------------------------------------------------------------- 655 /// MOBF Encrypt 656 /// @ingroup G_SYS_OTHER 657 /// @param u32Key \b IN: Key 658 /// @param bEnable \b IN: TRUE/FLASE 659 /// @return DRVAESDMA_OK : Success 660 /// @return Others : Fail 661 //------------------------------------------------------------------------------------------------- 662 // MS_U32 MDrv_SYS_QueryDolbyHashInfo(E_SYS_DOLBY_HASH_INFO index); 663 //------------------------------------------------------------------------------------------------- 664 /// MOBF Encrypt 665 /// @ingroup G_SYS_COMMON 666 /// @param u32Key \b IN: Key 667 /// @param bEnable \b IN: TRUE/FLASE 668 /// @return DRVAESDMA_OK : Success 669 /// @return Others : Fail 670 //------------------------------------------------------------------------------------------------- 671 E_SYS_CHIP_TYPE MDrv_SYS_GetChipType(void); 672 //------------------------------------------------------------------------------------------------- 673 /// MOBF Encrypt 674 /// @ingroup G_SYS_COMMON 675 /// @param u32Key \b IN: Key 676 /// @param bEnable \b IN: TRUE/FLASE 677 /// @return DRVAESDMA_OK : Success 678 /// @return Others : Fail 679 //------------------------------------------------------------------------------------------------- 680 void MDrv_SYS_SetChipType(E_SYS_CHIP_TYPE Type); 681 //------------------------------------------------------------------------------------------------- 682 /// MOBF Encrypt 683 /// @ingroup G_SYS_OTHER 684 /// @param u32Key \b IN: Key 685 /// @param bEnable \b IN: TRUE/FLASE 686 /// @return DRVAESDMA_OK : Success 687 /// @return Others : Fail 688 //------------------------------------------------------------------------------------------------- 689 // void MDrv_SYS_GetDolbyKeyCustomer(MS_U8 * u8pkey); 690 //------------------------------------------------------------------------------------------------- 691 /// MOBF Encrypt 692 /// @ingroup G_SYS_OTHER 693 /// @param u32Key \b IN: Key 694 /// @param bEnable \b IN: TRUE/FLASE 695 /// @return DRVAESDMA_OK : Success 696 /// @return Others : Fail 697 //------------------------------------------------------------------------------------------------- 698 MS_U16 MDrv_SYS_ReadBrickTerminatorStatus(void); 699 //------------------------------------------------------------------------------------------------- 700 /// MOBF Encrypt 701 /// @ingroup G_SYS_OTHER 702 /// @param u32Key \b IN: Key 703 /// @param bEnable \b IN: TRUE/FLASE 704 /// @return DRVAESDMA_OK : Success 705 /// @return Others : Fail 706 //------------------------------------------------------------------------------------------------- 707 void MDrv_SYS_WriteBrickTerminatorStatus(MS_U16 u16Status); 708 //------------------------------------------------------------------------------------------------- 709 /// MOBF Encrypt 710 /// @ingroup G_SYS_OTHER 711 /// @param u32Key \b IN: Key 712 /// @param bEnable \b IN: TRUE/FLASE 713 /// @return DRVAESDMA_OK : Success 714 /// @return Others : Fail 715 //------------------------------------------------------------------------------------------------- 716 MS_BOOL MDrv_SYS_GetEfuseDid(MS_U16 *u16efuse_did); 717 //------------------------------------------------------------------------------------------------- 718 /// MOBF Encrypt 719 /// @ingroup G_SYS_OTHER 720 /// @param u32Key \b IN: Key 721 /// @param bEnable \b IN: TRUE/FLASE 722 /// @return DRVAESDMA_OK : Success 723 /// @return Others : Fail 724 //------------------------------------------------------------------------------------------------- 725 MS_BOOL MDrv_SYS_ReadEfuseHDCPKey(MS_U16 u16ReadAddr, MS_U32 *u32HDCPKey); 726 //------------------------------------------------------------------------------------------------- 727 /// MOBF Encrypt 728 /// @ingroup G_SYS_COMMON 729 /// @param u32Key \b IN: Key 730 /// @param bEnable \b IN: TRUE/FLASE 731 /// @return DRVAESDMA_OK : Success 732 /// @return Others : Fail 733 //------------------------------------------------------------------------------------------------- 734 // MS_U32 MDrv_SYS_GetIpList(E_SYS_IP_TYPE TYPE); 735 736 //FOR INTERNAL USE ONLY 737 // MS_U32 MDrv_SYS_RegisterIoProc(E_SYS_IO_PROC dwIoType, void *pdwIoFunction); 738 739 #ifdef __cplusplus 740 } 741 #endif 742 743 744 #endif // _DRV_SYS_H_ 745 746