1 // SPDX-License-Identifier: GPL-2.0 2 /* 3 * Copyright (c) 2022 Rockchip Electronics Co. Ltd. 4 * 5 * it66353 HDMI 3 in 1 out driver. 6 * 7 * Author: Kenneth.Hung@ite.com.tw 8 * Wangqiang Guo <kay.guo@rock-chips.com> 9 * Version: IT66353_SAMPLE_1.08 10 * 11 */ 12 #ifndef _PLATFORM_H_ 13 #define _PLATFORM_H_ 14 /* 15 * #ifndef u8 16 * typedef unsigned char u8 ; 17 * #endif 18 * #ifndef u16 19 * typedef unsigned short u16; 20 * #endif 21 * #ifndef u32 22 * typedef unsigned long u32; 23 * #endif 24 * #ifndef __tick 25 * typedef unsigned long __tick; 26 * #endif 27 * 28 * #ifndef __cplusplus 29 * #ifndef bool 30 * typedef unsigned char bool ; 31 * #endif 32 * #endif 33 */ 34 35 typedef unsigned long __tick; 36 #define CONST const 37 /* 38 * #ifndef true 39 * #define true 1 40 * #endif 41 * 42 * #ifndef false 43 * #define false 0 44 * #endif 45 */ 46 /* 47 * assign the print function 48 * 49 * #define pr_err dev_err 50 * #define pr_info dev_info 51 * #define pr_info2 dev_dbg 52 */ 53 54 // ---------- for CEC 55 56 #define iTE_FALSE 0 57 #define iTE_TRUE 1 58 59 #define WIN32 60 61 #ifdef _MCU_8051_ 62 typedef bit iTE_u1; 63 #define _CODE code 64 #define _CODE_3K code 65 66 #elif defined (WIN32) 67 typedef int iTE_u1; 68 #define _CODE const 69 #define _CODE_3K const 70 /* 71 * #elif defined (_MCU_IT6350_) 72 * typedef unsigned char iTE_u1; 73 * #define _CODE __attribute__ ((section ("._OEM_BU1_RODATA "))) 74 * #define _CODE_3K __attribute__ ((section ("._3K_RODATA "))) 75 */ 76 #elif defined (__WIN32__) 77 typedef unsigned char iTE_u1; 78 #define _CODE const 79 #define _CODE_3K const 80 81 #else 82 #error("Please define this section by your platform") 83 typedef int iTE_u1; 84 #define _CODE 85 #define _CODE_3K 86 #endif // _MCU_8051_ 87 88 /* 89 * output TXOE state on JP47 (GPC5) 90 * by nVidia's clock detect request 91 */ 92 #define REPORT_TXOE_0(x) {GPDRC &= ~0x20; } //GPC5=0; 93 #define REPORT_TXOE_1(x) {GPDRC |= 0x20; } //GPC5=1; 94 95 /* 96 * typedef char iTE_s8, *iTE_ps8; 97 * typedef unsigned char iTE_u8, *iTE_pu8; 98 * typedef short iTE_s16, *iTE_ps16; 99 * typedef unsigned short iTE_u16, *iTE_pu16; 100 */ 101 102 #endif 103 104 105 106 107