system.c
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:19k
- #include "stcommon.h"
- #include <system.h>
- #include <stddefs.h>
- #include "stdevice.h"
- #include "section.h"
- #include "boot.h"
- #include "evt.h"
- #include "pio.h"
- #include "uart.h"
- #include "tbx.h"
- #include "i2c.h"
- #include "av.h"
- #include "stsys.h"
- #include "service.h"
- #include "sysserv.h"
- #include "denc.h"
- #define INTERCONNECT_BASE CFG_BASE_ADDRESS
- #define INTERCONNECT_CONFIG_CONTROL_REG_C 0x00
- #define INTERCONNECT_CONFIG_CONTROL_REG_D 0x04
- #define INTERCONNECT_CONFIG_CONTROL_REG_E 0x08
- #define INTERCONNECT_CONFIG_CONTROL_REG_F 0x0C
- #define INTERCONNECT_CONFIG_CONTROL_REG_G 0x10
- #define INTERCONNECT_CONFIG_CONTROL_REG_H 0x14
- #define CONFIG_CONTROL_C (INTERCONNECT_BASE + INTERCONNECT_CONFIG_CONTROL_REG_C)
- #define CONFIG_CONTROL_D (INTERCONNECT_BASE + INTERCONNECT_CONFIG_CONTROL_REG_D)
- #define CONFIG_CONTROL_E (INTERCONNECT_BASE + INTERCONNECT_CONFIG_CONTROL_REG_E)
- #define CONFIG_CONTROL_F (INTERCONNECT_BASE + INTERCONNECT_CONFIG_CONTROL_REG_F)
- #define CONFIG_CONTROL_G (INTERCONNECT_BASE + INTERCONNECT_CONFIG_CONTROL_REG_G)
- #define CONFIG_CONTROL_H (INTERCONNECT_BASE + INTERCONNECT_CONFIG_CONTROL_REG_H)
- ST_ClockInfo_t ST_ClockInfo;
- #define MODE_DVB SERVICE_MODE_DVB
- /* chroma luma delay */
- #define DEN_CFG3 (DENC_BASE_ADDRESS + 0xC)
- #define DEN_DACC (DENC_BASE_ADDRESS + 0x104)
- #define DEN_CDEL_LFC (DENC_BASE_ADDRESS + 0x144)
- #define DEN_LFCOEF0 (DENC_BASE_ADDRESS + 0x148)
- #define DEN_LFCOEF1 (DENC_BASE_ADDRESS + 0x14C)
- #define DEN_LFCOEF2 (DENC_BASE_ADDRESS + 0x150)
- #define DEN_LFCOEF3 (DENC_BASE_ADDRESS + 0x154)
- #define DEN_LFCOEF4 (DENC_BASE_ADDRESS + 0x158)
- #define DEN_LFCOEF5 (DENC_BASE_ADDRESS + 0x15C)
- #define DEN_LFCOEF6 (DENC_BASE_ADDRESS + 0x160)
- #define DEN_LFCOEF7 (DENC_BASE_ADDRESS + 0x164)
- #define DEN_LFCOEF8 (DENC_BASE_ADDRESS + 0x168)
- #define DEN_LFCOEF9 (DENC_BASE_ADDRESS + 0x16C)
- #if 1
- #define NHD2_CONFIG_BASE 0x20400000
- #define NHD3_CONFIG_BASE 0x20401000
- #define CLOCK_REG_BASE 0x20300000
- #define NHD2_INIT_1_PRIORITY (NHD2_CONFIG_BASE + 0x00)
- #define NHD2_INIT_2_PRIORITY (NHD2_CONFIG_BASE + 0x04)
- #define NHD2_INIT_3_PRIORITY (NHD2_CONFIG_BASE + 0x08)
- #define NHD2_INIT_4_PRIORITY (NHD2_CONFIG_BASE + 0x0C)
- #define NHD2_INIT_5_PRIORITY (NHD2_CONFIG_BASE + 0x10)
- #define NHD2_INIT_6_PRIORITY (NHD2_CONFIG_BASE + 0x14)
- #define NHD2_INIT_7_PRIORITY (NHD2_CONFIG_BASE + 0x18)
- #define NHD2_INIT_8_PRIORITY (NHD2_CONFIG_BASE + 0x1C)
- #define NHD2_INIT_1_LIMIT (NHD2_CONFIG_BASE + 0x60)
- #define NHD2_INIT_2_LIMIT (NHD2_CONFIG_BASE + 0x64)
- #define NHD2_INIT_3_LIMIT (NHD2_CONFIG_BASE + 0x68)
- #define NHD2_INIT_4_LIMIT (NHD2_CONFIG_BASE + 0x6C)
- #define NHD2_INIT_5_LIMIT (NHD2_CONFIG_BASE + 0x70)
- #define NHD2_INIT_6_LIMIT (NHD2_CONFIG_BASE + 0x74)
- #define NHD2_INIT_7_LIMIT (NHD2_CONFIG_BASE + 0x78)
- #define NHD2_INIT_8_LIMIT (NHD2_CONFIG_BASE + 0x7C)
- #define NHD2_TARG_1_PRIORITY (NHD2_CONFIG_BASE + 0x80)
- #define NHD2_TARG_2_PRIORITY (NHD2_CONFIG_BASE + 0x84)
- #define NHD3_TARG_1_PRIORITY (NHD3_CONFIG_BASE + 0x40)
- #define NHD3_TARG_2_PRIORITY (NHD3_CONFIG_BASE + 0x44)
- #define NHD3_TARG_3_PRIORITY (NHD3_CONFIG_BASE + 0x48)
- #define NHD3_TARG_4_PRIORITY (NHD3_CONFIG_BASE + 0x4C)
- #define NHD3_TARG_5_PRIORITY (NHD3_CONFIG_BASE + 0x50)
- #define NHD3_INIT_3_PRIORITY (NHD3_CONFIG_BASE + 0x08)
- #define NHD3_INIT_4_PRIORITY (NHD3_CONFIG_BASE + 0x0C)
- #define NHD3_INIT_1_LIMIT (NHD3_CONFIG_BASE + 0x30)
- #define NHD3_INIT_2_LIMIT (NHD3_CONFIG_BASE + 0x34)
- #define SET_FDMA_REG(Offset, Value) ( *((volatile U32*)(((U32)0x20D00000) + (Offset))) = ((U32)Value) )
- #endif
- #if 1
- int KB_SysInit(void)
- {
- ST_ErrorCode_t ST_ErrorCode;
- int nReturn;
- U32 DEN_CFG3Val; /*Lynn: chroma luma delay*/
- //write register
- /* System Pix clk setup0*/
- //Done in cfg STSYS_WriteRegDev32LE(0x20F00054, 0xEBF);
- /* Enable video DAC in config control reg D */
- STSYS_WriteRegDev32LE(CONFIG_CONTROL_D, 0x00);
- STSYS_WriteRegDev32LE(0x2090017C, 0x00);
- /* Enabling PCM pins of PIO port 2 */
- STSYS_WriteRegDev32LE(CONFIG_CONTROL_F, STSYS_ReadRegDev32LE(CONFIG_CONTROL_F)|0x00E00000);
- /* Configure TSIS for Serial mode */
- /* Req for configuring I2C pio in ALT1 function */
- STSYS_WriteRegDev32LE(CONFIG_CONTROL_H, STSYS_ReadRegDev32LE(CONFIG_CONTROL_H)|0x0C000000);
- STSYS_WriteRegDev32LE((void*)NHD2_INIT_1_PRIORITY, 0x7);
- STSYS_WriteRegDev32LE((void*)NHD2_INIT_1_LIMIT, 0x196);
- STSYS_WriteRegDev32LE((void*)NHD2_INIT_2_PRIORITY, 0x9);
- STSYS_WriteRegDev32LE((void*)NHD2_INIT_2_LIMIT, 0x0);
- STSYS_WriteRegDev32LE((void*)NHD2_INIT_3_PRIORITY, 0x6);
- STSYS_WriteRegDev32LE((void*)NHD2_INIT_3_LIMIT, 0x3C1);
- STSYS_WriteRegDev32LE((void*)NHD2_INIT_4_PRIORITY, 0x8);
- STSYS_WriteRegDev32LE((void*)NHD2_INIT_4_LIMIT, 0x0);
-
- STSYS_WriteRegDev32LE((void*)NHD2_INIT_5_PRIORITY, 0x4);
- STSYS_WriteRegDev32LE((void*)NHD2_INIT_5_LIMIT, 0x3C1);
- STSYS_WriteRegDev32LE((void*)NHD2_INIT_6_PRIORITY, 0x3);
- STSYS_WriteRegDev32LE((void*)NHD2_INIT_6_LIMIT, 0x0B1);
- STSYS_WriteRegDev32LE((void*)NHD2_INIT_7_PRIORITY, 0x2);
- STSYS_WriteRegDev32LE((void*)NHD2_INIT_7_LIMIT, 0x131);
- STSYS_WriteRegDev32LE((void*)NHD2_INIT_8_PRIORITY, 0x5);
- STSYS_WriteRegDev32LE((void*)NHD2_INIT_8_LIMIT, 0x3B1);
- STSYS_WriteRegDev32LE((void*)NHD2_TARG_1_PRIORITY, 0x2);
- STSYS_WriteRegDev32LE((void*)NHD2_TARG_2_PRIORITY, 0x1);
- STSYS_WriteRegDev32LE((void*)NHD3_INIT_1_LIMIT, 0x224);
- STSYS_WriteRegDev32LE((void*)NHD3_INIT_2_LIMIT, 0x1A3);
- STSYS_WriteRegDev32LE((void*)NHD3_INIT_3_PRIORITY, 0x1);
- STSYS_WriteRegDev32LE((void*)NHD3_INIT_4_PRIORITY, 0x2);
- STSYS_WriteRegDev32LE((void*)NHD3_TARG_1_PRIORITY, 0x5);
- STSYS_WriteRegDev32LE((void*)NHD3_TARG_2_PRIORITY, 0x1);
- STSYS_WriteRegDev32LE((void*)NHD3_TARG_3_PRIORITY, 0x2);
- STSYS_WriteRegDev32LE((void*)NHD3_TARG_4_PRIORITY, 0x3);
- STSYS_WriteRegDev32LE((void*)NHD3_TARG_5_PRIORITY, 0x4);
- //CPU_FRAME_REG : BASE + 0x0; CPU_LIMIT_REG : BASE + 0x4
- STSYS_WriteRegDev32LE((void*)(CLOCK_REG_BASE+0x0), 0xAF);
- STSYS_WriteRegDev32LE((void*)(CLOCK_REG_BASE+0x4), 0x05);
- /* CFG_VIDIC */
- STSYS_WriteRegDev32LE((void*)(0x20500010), 0x12);
- /* CS's code - Julia added to remove the pop sound after power ON the TV */
- STSYS_WriteRegDev32LE(CONFIG_CONTROL_D, (STSYS_ReadRegDev32LE(CONFIG_CONTROL_D) | 0x0000A000));
- STSYS_WriteRegDev32LE(CONFIG_CONTROL_D, (STSYS_ReadRegDev32LE(CONFIG_CONTROL_D) & 0xFFFF8FFF));
- /*TMTM added*/
- SET_FDMA_REG(0x45F0, 0x258); //TMTM holdoff time=2uS; = 5uS or 0x3E8 //0x532); //0x214);
-
- //write register over
- ST_ErrorCode = KB_SECTIONSetup();
- if(ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init sections n");
- return RETFIAL1;
- }
-
- ST_ErrorCode = KB_BOOTSetup();
- if(ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_BOOTSetup n");
- return RETFIAL1;
- }
-
- ST_ErrorCode = ST_GetClockInfo(&ST_ClockInfo);
- if(ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init ST_GetClockInfo n");
- return RETFIAL1;
- }
-
- ST_ErrorCode = KB_PIOSetup();
- if(ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_PIOSetup n");
- return RETFIAL1;
- }
-
- ST_ErrorCode = KB_UartSetup();
- if(ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_UartSetup n");
- return RETFIAL1;
- }
-
- ST_ErrorCode = KB_TbxSetup();
- if(ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_TbxSetup n");
- return RETFIAL1;
- }
-
- ST_ErrorCode = KB_EVTSetup();
- if(ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_EVTSetup n");
- return RETFIAL1;
- }
-
- ST_ErrorCode = KB_I2CInit(KB_I2C_RATE_100K);
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init I2C_Setup n");
- }
- ST_ErrorCode = KB_FDMASetup();
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_FDMASetup n");
- }
-
- ST_ErrorCode = KB_AVMEMSetup();
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_AVMEMSetup n");
- }
- ST_ErrorCode = KB_CLKRVSetup();
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_CLKRVSetup n");
- return RETFIAL1;
- }
-
- KB_DmxInit();
-
- ST_ErrorCode = KB_DENCSetup( SERVICE_DISPLAY_PAL ); /*STDENC_MODE_PALBDGHI*/
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_DENCSetup n");
- }
-
- ST_ErrorCode = KB_VtgSetup( SERVICE_DISPLAY_PAL ); /*STVTG_TIMING_MODE_576I50000_13500*/
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_VtgSetup n");
- }
-
- ST_ErrorCode = KB_LayerSetup();
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_LayerSetup n");
- }
-
- ST_ErrorCode = KB_VoutSetup();
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_VoutSetup n");
- }
-
- ST_ErrorCode = KB_VmixSetup();
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_VmixSetup n");
- return RETFIAL1;
- }
- nReturn = KB_AVInit();
- if (nReturn != RETOK)
- {
- Print("error init J_Av n");
- return RETFIAL1;
- }
-
- if (KB_SysGPOResetInit() != RETOK)
- {
- Print("error init KB_SysGPOResetInit n");
- return RETFIAL1;
- }
-
- return RETOK;
- }
- #else
- int KB_SysInit(void)
- {
- ST_ErrorCode_t ST_ErrorCode;
- int nReturn;
- U32 DEN_CFG3Val; /*Lynn: chroma luma delay*/
- /* System Pix clk setup0*/
- /* Enable video DAC in config control reg D */
- STSYS_WriteRegDev32LE(CONFIG_CONTROL_D, 0x00);
- STSYS_WriteRegDev32LE(0x2090017C, 0x00);
- /* CFG_VIDIC */
- STSYS_WriteRegDev32LE((void*)(0x20500010), 0x12);
- /* Enabling PCM pins of PIO port 2 */
- STSYS_WriteRegDev32LE(CONFIG_CONTROL_F, STSYS_ReadRegDev32LE(CONFIG_CONTROL_F)|0x00F00000);
- /* Configure TSIS for Serial mode */
- //STSYS_WriteRegDev32LE(CONFIG_CONTROL_C, STSYS_ReadRegDev32LE(CONFIG_CONTROL_C)|0x28);
- /* Req for configuring I2C pio in ALT1 function */
- STSYS_WriteRegDev32LE(CONFIG_CONTROL_H, STSYS_ReadRegDev32LE(CONFIG_CONTROL_H)|0x0C000000);
- ST_ErrorCode = KB_SECTIONSetup();
- if(ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init sections n");
- return RETFIAL1;
- }
-
- ST_ErrorCode = KB_BOOTSetup();
- if(ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_BOOTSetup n");
- return RETFIAL1;
- }
-
- ST_ErrorCode = ST_GetClockInfo(&ST_ClockInfo);
- if(ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init ST_GetClockInfo n");
- return RETFIAL1;
- }
-
- ST_ErrorCode = KB_PIOSetup();
- if(ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_PIOSetup n");
- return RETFIAL1;
- }
-
- ST_ErrorCode = KB_UartSetup();
- if(ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_UartSetup n");
- return RETFIAL1;
- }
-
- ST_ErrorCode = KB_TbxSetup();
- if(ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_TbxSetup n");
- return RETFIAL1;
- }
-
- ST_ErrorCode = KB_EVTSetup();
- if(ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_EVTSetup n");
- return RETFIAL1;
- }
-
- ST_ErrorCode = KB_I2CInit(KB_I2C_RATE_100K);
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init I2C_Setup n");
- //return RETFIAL1;
- }
- //Print("nHere");
- ST_ErrorCode = KB_FDMASetup();
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_FDMASetup n");
- //return RETFIAL1;
- }
-
- ST_ErrorCode = KB_AVMEMSetup();
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_AVMEMSetup n");
- //return RETFIAL1;
- }
- ST_ErrorCode = KB_CLKRVSetup();
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_CLKRVSetup n");
- return RETFIAL1;
- }
-
- #if 0
- ST_ErrorCode = PTI_Setup( SERVICE_MODE_DVB );
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init PTI_Setup n");
- //return RETFIAL1;
- }
- #endif
-
- KB_DmxInit();
-
- ST_ErrorCode = KB_DENCSetup( SERVICE_DISPLAY_PAL ); /*STDENC_MODE_PALBDGHI*/
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_DENCSetup n");
- //return RETFIAL1;
- }
-
- ST_ErrorCode = KB_VtgSetup( SERVICE_DISPLAY_PAL ); /*STVTG_TIMING_MODE_576I50000_13500*/
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_VtgSetup n");
- //return RETFIAL1;
- }
-
- ST_ErrorCode = KB_LayerSetup();
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_LayerSetup n");
- //return RETFIAL1;
- }
- #if 0
- {
- int nReturn;
-
- nReturn = KB_OSDInit();
- Print("KB_OSDInit = %dn", nReturn);
- }
- #endif
-
- ST_ErrorCode = KB_VoutSetup();
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_VoutSetup n");
- //return RETFIAL1;
- }
- #if 0
- ST_ErrorCode = OSD_Setup();
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init OSD_Setup n");
- //return RETFIAL1;
- }
- #endif
-
- ST_ErrorCode = KB_VmixSetup();
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_VmixSetup n");
- return RETFIAL1;
- }
- nReturn = KB_AVInit();
- if (nReturn != RETOK)
- {
- Print("error init J_Av n");
- return RETFIAL1;
- }
-
- #if 0
- ST_ErrorCode = KB_VbiSetup();
- if (ST_ErrorCode != ST_NO_ERROR)
- {
- Print("error init KB_VbiSetup n");
- return RETFIAL1;
- }
- #endif
- if (KB_SysGPOResetInit() != RETOK)
- {
- Print("error init KB_SysGPOResetInit n");
- return RETFIAL1;
- }
-
- STTBX_Print(("n==============================================n"));
- STTBX_Print((" OS20/ST-Lite: %sn", kernel_version() ));
- STTBX_Print((" Processor: %sn", device_name(device_id()) ));
- #if defined(UNIFIED_MEMORY)
- STTBX_Print((" Unified: Yesn" ));
- #else
- STTBX_Print((" Unified: Non" ));
- #endif
- STTBX_Print((" CPU Speed: %dn", ST_GetClockSpeed() ));
- STTBX_Print((" STPTI support: "));
- #if defined(STPTI_DVB_SUPPORT)
- STTBX_Print(("DVB "));
- #endif
- #if defined(STPTI_DTV_SUPPORT)
- STTBX_Print(("DirecTV "));
- #endif
- #if !defined(STPTI_DTV_SUPPORT) && !defined(STPTI_DVB_SUPPORT)
- STTBX_Print(("none "));
- #endif
- STTBX_Print(("n Service: "));
- #if defined(SERVICE_DVB)
- STTBX_Print(("DVB "));
- #endif
- #if defined(SERVICE_DIRECTV)
- STTBX_Print(("DirecTV "));
- #endif
- #if !defined(SERVICE_DVB) && !defined(SERVICE_DIRECTV)
- STTBX_Print(("none "));
- #endif
- STTBX_Print(("n Build Date: %s at %sn", __DATE__, __TIME__ ));
- STTBX_Print(("==============================================nn"));
- STTBX_Print(("==============================================nn"));
- /* Chroma delay */
- {
- UINT32 tmpValue;
- tmpValue = STSYS_ReadRegDev32LE((void*)DEN_CDEL_LFC);
- tmpValue = (tmpValue & 0x0F) | 0x50;
- STSYS_WriteRegDev32LE((void*)DEN_CDEL_LFC, tmpValue);
-
- STSYS_WriteRegDev32LE((void*)DEN_CFG3, 0x08 | STSYS_ReadRegDev32LE((void*)0x2090000c));
- }
-
- return RETOK;
-
- /* added by dts 2006-3-27, for adjust amplitude-frequency characteristic
- ** 1. set WA_BLITTER_LUMA_CHROMA_DELAY = FALSE
- ** 2. Add the following code in correct position, otherwise the denc driver
- ** will reset the params to default.
- */
- #if 1
- /* DENC_CDFL_LFC */
- STSYS_WriteRegDev32LE((void*)0x20900144, 0x25);
- /* DENC_DAC6 */
- STSYS_WriteRegDev32LE((void*)0x209001ac, 0x27);
- /* DENC_DACC */
- STSYS_WriteRegDev32LE((void*)0x20900104, 0x61);
- /* DENC_LCOEF0 -- DENC_LCOEF9 */
- STSYS_WriteRegDev32LE((void*)0x20900148, 0x23);
- STSYS_WriteRegDev32LE((void*)0x2090014c, 0x81);
- STSYS_WriteRegDev32LE((void*)0x20900150, 0xf7);
- STSYS_WriteRegDev32LE((void*)0x20900154, 0xfe);
- STSYS_WriteRegDev32LE((void*)0x20900158, 0x1e);
- STSYS_WriteRegDev32LE((void*)0x2090015c, 0x05);
- STSYS_WriteRegDev32LE((void*)0x20900160, 0xa3);
- STSYS_WriteRegDev32LE((void*)0x20900164, 0xf9);
- STSYS_WriteRegDev32LE((void*)0x20900168, 0x19);
- STSYS_WriteRegDev32LE((void*)0x2090016c, 0x0e);
- #else
- #if 0
- DEN_CFG3Val = STSYS_ReadRegDev32LE((void*)DEN_CFG3);
- DEN_CFG3Val |= 0x08;
- STSYS_WriteRegDev32LE((void*)(DEN_CFG3), DEN_CFG3Val);
- STSYS_WriteRegDev32LE((void*)(DEN_CDEL_LFC), 0x32); /*Test for Chroma_luma delay*/
- DEN_CFG3Val = STSYS_ReadRegDev32LE((void*)DEN_CDEL_LFC);
- #else
- /******leslie chua**********
- DEN_CFG3Val = STSYS_ReadRegDev32LE((void*)DEN_CDEL_LFC);
- DEN_CFG3Val |= 0x01;
- STSYS_WriteRegDev32LE((void*)(DEN_CDEL_LFC), DEN_CFG3Val);
-
- ********************************/
- #if 0 /**********FIR2C********/
- DEN_CFG3Val = STSYS_ReadRegDev32LE((void*)DEN_CDEL_LFC);
- STSYS_WriteRegDev32LE((void*)(DEN_CDEL_LFC), 0x35); /*Test for Chroma_luma delay*/
- DEN_CFG3Val = STSYS_ReadRegDev32LE((void*)DEN_CDEL_LFC);
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF0), 0x23); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF1), 0x81); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF2), 0xF7); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF3), 0xFE); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF4), 0x1E); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF5), 0x05); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF6), 0xA4); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF7), 0xF9); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF8), 0x44); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF9), 0x06); /*Test for Chroma_luma delay*/
- #else /*******FIR2E leslie*********/
- DEN_CFG3Val = STSYS_ReadRegDev32LE((void*)DEN_CDEL_LFC);
- STSYS_WriteRegDev32LE((void*)(DEN_CDEL_LFC), 0x35); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF0), 0x3D); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF1), 0xBC); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF2), 0xF9); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF3), 0xFF); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF4), 0x23); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF5), 0x05); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF6), 0xA0); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF7), 0xF1); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF8), 0x47); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_LFCOEF9), 0x1E); /*Test for Chroma_luma delay*/
- STSYS_WriteRegDev32LE((void*)(DEN_DACC), 0x51); /*Test for Chroma_luma delay*/
- #endif
- #endif
-
- #endif
-
- /* Chroma delay */
- //STSYS_WriteRegDev32LE((void*)0x20900144, 0x52);
- //STSYS_WriteRegDev32LE((void*)0x2090000c, 0x08 | STSYS_ReadRegDev32LE((void*)0x2090000c));
-
- return RETOK;
- }
- #endif
- /* EOF */