/* SPDX-License-Identifier: LGPL-2.1-only OR BSD-3-Clause */
/******************************************************************************
 *
 * This file is provided under a dual license.  When you use or
 * distribute this software, you may choose to be licensed under
 * version 2.1 of the GNU Lesser General Public License
 * ("LGPLv2.1 License") or BSD License.
 *
 * LGPLv2.1 License
 *
 * Copyright(C) 2019 MediaTek Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html for more
 * details.
 *
 * BSD LICENSE
 *
 * Copyright(C) 2019 MediaTek Inc.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *  * Neither the name of the copyright holder nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 *****************************************************************************/


/*****************************************************************************
 *
 * Filename:
 * ---------
 *   $Workfile: hw_async.h $ 
 *
 * Project:
 * --------
 *   MT5360
 *
 * Description:
 * ------------
 *   VDOIN Module miscellaneous register definition
 *   
 * Author:
 * -------
 *   Adam Yang
 *
 * Last changed:
 * ------------- 
 * $Author: brianpc.huang $ 
 *
 * $Modtime: 04/05/27 1:22p $  
 *
 * $Revision: #1 $
****************************************************************************/

#ifndef _HW_ASYNC_
#define _HW_ASYNC_



//#define IO_ASYNC_BASE (0x00002000 + VDOIN_BASE)

#define IO_ASYNC_BASE (IO_VIRT_SRE + 0x20000)

#define ASYNC_00 (IO_ASYNC_BASE + 0x800)
    #define AS_VSYNC_ACT_SEL Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_CSYNC_DGLITCH_SEL Fld(1,30,AC_MSKB3)//[30:30]
    #define AS_HSYNC_DGLITCH_SEL Fld(1,29,AC_MSKB3)//[29:29]
    #define AS_VSYNC_DGLITCH_SEL Fld(1,28,AC_MSKB3)//[28:28]
    #define AS_SYNC_SEL Fld(2,26,AC_MSKB3)//[27:26]
    #define AS_HSYNC_IN_RST_POL Fld(1,25,AC_MSKB3)//[25:25]
    #define AS_ACT_IRQ_SEL Fld(3,22,AC_MSKW32)//[24:22]
    #define AS_CSYNC_INV Fld(1,21,AC_MSKB2)//[21:21]
    #define AS_HSYNC_INV Fld(1,20,AC_MSKB2)//[20:20]
    #define AS_VSYNC_INV Fld(1,19,AC_MSKB2)//[19:19]
    #define AS_VSYNC_DELAY_SEL Fld(1,18,AC_MSKB2)//[18:18]
    #define AS_AUTO_INVP Fld(1,17,AC_MSKB2)//[17:17]
    #define AS_MODE_CHG_CLEAR Fld(1,16,AC_MSKB2)//[16:16]
    #define AS_MODE_CHG_IRQ_SEL Fld(2,14,AC_MSKB1)//[15:14]
    #define AS_MOD_CHG_V Fld(6,8,AC_MSKB1)//[13:8]
    #define AS_VLINCNT_ADD1_EN Fld(1,6,AC_MSKB0)//[6:6]
    #define AS_MOD_CHG_H Fld(6,0,AC_MSKB0)//[5:0]
#define ASYNC_01 (IO_ASYNC_BASE + 0x804)
    #define AS_DE_COMP_DIFF_TH Fld(8,24,AC_FULLB3)//[31:24]
    #define AS_DE_COMP_SEL Fld(2,22,AC_MSKB2)//[23:22]
	#define ORI_DECOMPOSITE	       0
	#define NEW_DECOMPOSITE1	2
	#define NEW_DECOMPOSITE2	1
    #define AS_CSYNC_CONT_THU Fld(10,12,AC_MSKW21)//[21:12]
    #define AS_DE_COMP_TOSH Fld(1,10,AC_MSKB1)//[10:10]
    #define AS_CSYNC_CONT_THL Fld(10,0,AC_MSKW10)//[9:0]
#define ASYNC_02 (IO_ASYNC_BASE + 0x808)
    #define AS_DBG_OUT_SEL Fld(4,28,AC_MSKB3)//[31:28]
    #define AS_SP2_EN Fld(1,27,AC_MSKB3)//[27:27]
    #define AS_HLEN_VLEN_RESET_SP2 Fld(1,26,AC_MSKB3)//[26:26]
    #define AS_LONG_LENGTH_STATUS_HOLD Fld(1,25,AC_MSKB3)//[25:25]
    #define AS_HLEN_VLEN_RESET Fld(1,24,AC_MSKB3)//[24:24]
    #define AS_CSYNC_CONT_THH Fld(10,12,AC_MSKW21)//[21:12]
    #define AS_VACT_MP_TH Fld(10,0,AC_MSKW10)//[9:0]
#define ASYNC_03 (IO_ASYNC_BASE + 0x80C)
    #define AS_VSYNC_MASK_TEST Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_FLD_DET_1152I_EN Fld(1,30,AC_MSKB3)//[30:30]
    #define AS_AUTO_HV_SKEW_CLK27_EN Fld(1,29,AC_MSKB3)//[29:29]
    #define AS_CLEAR_AUTO_DELAY_FLAG Fld(1,28,AC_MSKB3)//[28:28]
    #define AS_FLD_DET_AUTO Fld(1,27,AC_MSKB3)//[27:27]
    #define AS_FLD_DET_OLD Fld(1,26,AC_MSKB3)//[26:26]
    #define AS_FIELD_DEF_INV Fld(1,25,AC_MSKB3)//[25:25]
    #define AS_FLD_DETECT_E Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_FLD_DETECT_S Fld(12,0,AC_MSKW10)//[11:0]
#define ASYNC_04 (IO_ASYNC_BASE + 0x810)
    #define AS_NEW_HSYNC_RST_EN Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_HLEN_USE_ACTIVE Fld(1,30,AC_MSKB3)//[30:30]
    #define AS_NEW_HSYNC_RST_RANGE Fld(4,24,AC_MSKB3)//[27:24]
    #define AS_HLEN2_E Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_HLEN2_S Fld(12,0,AC_MSKW10)//[11:0]
#define ASYNC_05 (IO_ASYNC_BASE + 0x814)
    #define AS_CH_DIFF_TH Fld(6,24,AC_MSKB3)//[29:24]
    #define AS_CHRANGE_L Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_CHRANGE_U Fld(12,0,AC_MSKW10)//[11:0]
#define ASYNC_06 (IO_ASYNC_BASE + 0x818)
    #define AS_CV_DIFF_TH Fld(6,24,AC_MSKB3)//[29:24]
    #define AS_CVRANTH_L Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_CVRANGE_U Fld(12,0,AC_MSKW10)//[11:0]
#define ASYNC_07 (IO_ASYNC_BASE + 0x81C)
    #define AS_VSYNC_OUT_HYST_THR Fld(8,24,AC_FULLB3)//[31:24]
    #define AS_CV_STABLE_TH Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_CH_STABLE_TH Fld(12,0,AC_MSKW10)//[11:0]
#define ASYNC_08 (IO_ASYNC_BASE + 0x820)
    #define AS_VMASK1_OFF Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_VMASK2_OFF Fld(1,30,AC_MSKB3)//[30:30]
    #define AS_VMASK3_OFF Fld(1,29,AC_MSKB3)//[29:29]
    #define AS_MASK_SLICE_EN Fld(1,25,AC_MSKB3)//[25:25]
    #define AS_MASK_SLICE_INV Fld(1,24,AC_MSKB3)//[24:24]
    #define AS_MV_HEND Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_MV_HSTART Fld(12,0,AC_MSKW10)//[11:0]
#define ASYNC_09 (IO_ASYNC_BASE + 0x824)
    #define AS_SERR_MASK_END Fld(8,24,AC_FULLB3)//[31:24]
    #define AS_SERR_MASK_ST Fld(8,16,AC_FULLB2)//[23:16]
    #define AS_MV_VACTIVE_END Fld(8,8,AC_FULLB1)//[15:8]
    #define AS_MV_VACTIVE_ST Fld(8,0,AC_FULLB0)//[7:0]
#define ASYNC_0A (IO_ASYNC_BASE + 0x828)
    #define AS_VMASK1_ST Fld(8,24,AC_FULLB3)//[31:24]
    #define AS_VMASK1_END Fld(8,16,AC_FULLB2)//[23:16]
    #define AS_VMASK2_ST Fld(8,8,AC_FULLB1)//[15:8]
    #define AS_VMASK2_END Fld(8,0,AC_FULLB0)//[7:0]
#define ASYNC_0B (IO_ASYNC_BASE + 0x82C)
    #define AS_C_DEGLITCH Fld(6,26,AC_MSKB3)//[31:26]
    #define AS_H_DEGLITCH Fld(3,23,AC_MSKW32)//[25:23]
    #define AS_V_DEGLITCH Fld(3,20,AC_MSKB2)//[22:20]
    #define AS_MASK_SLICE_POS_SEL Fld(1,16,AC_MSKB2)//[16:16]
    #define AS_MASK_SLICE_END Fld(8,8,AC_FULLB1)//[15:8]
    #define AS_MASK_SLICE_ST Fld(8,0,AC_FULLB0)//[7:0]
#define ASYNC_0C (IO_ASYNC_BASE + 0x830)
    #define AS_MUTE_EN Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_MUTE_HACT_EN Fld(1,30,AC_MSKB3)//[30:30]
    #define AS_MUTE_VACT_EN Fld(1,29,AC_MSKB3)//[29:29]
    #define AS_MUTE_CACT_EN Fld(1,28,AC_MSKB3)//[28:28]
    #define AS_MUTE_HP_EN Fld(1,27,AC_MSKB3)//[27:27]
    #define AS_MUTE_VP_EN Fld(1,26,AC_MSKB3)//[26:26]
    #define AS_MUTE_HLEN_EN Fld(1,25,AC_MSKB3)//[25:25]
    #define AS_MUTE_VLEN_EN Fld(1,24,AC_MSKB3)//[24:24]
	#define AS_MUTE_MULTI_EN Fld(7, 24, AC_MSKB3) //[30:24]
    #define AS_MUTE_H_CNT_THR Fld(4,20,AC_MSKB2)//[23:20]
    #define AS_H_DIFF_TH Fld(8,12,AC_MSKW21)//[19:12]
    #define AS_H_STABLE_VALUE Fld(12,0,AC_MSKW10)//[11:0]
#define ASYNC_0D (IO_ASYNC_BASE + 0x834)
    #define AS_MUTE_CLR Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_C_SYNC_H_MUTE Fld(2,29,AC_MSKB3)//[30:29]
    #define AS_MUTE_V_CNT_THR Fld(4,20,AC_MSKB2)//[23:20]
    #define AS_V_DIFF_TH Fld(8,12,AC_MSKW21)//[19:12]
    #define AS_V_STABLE_VALUE Fld(12,0,AC_MSKW10)//[11:0]
#define ASYNC_0E (IO_ASYNC_BASE + 0x838)
    #define AS_DISABLE_DATA_ACTIVE Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_HSYNC_LOCK_INV Fld(1,30,AC_MSKB3)//[30:30]
    #define AS_POST_DATA_ACTIVE_12 Fld(1,29,AC_MSKB3)//[29:29]
    #define AS_PRE_DATA_ACTIVE_12 Fld(1,28,AC_MSKB3)//[28:28]
    #define AS_SP0_PIXEL_EN Fld(1,27,AC_MSKB3)//[27:27]
    #define AS_C_MAXMIN_FILTER Fld(2,25,AC_MSKB3)//[26:25]
    #define AS_PIX_VCNT_FLD_RST_EN Fld(1,24,AC_MSKB3)//[24:24]
    #define AS_POST_DATA_ACTIVE_11_0 Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_PRE_DATA_ACTIVE_11_0 Fld(12,0,AC_MSKW10)//[11:0]
#define ASYNC_0F (IO_ASYNC_BASE + 0x83C)
    #define AS_TOP_THR Fld(8,24,AC_FULLB3)//[31:24]
    #define AS_OVER_SAMPLE_PHASE Fld(1,23,AC_MSKB2)//[23:23]
    #define AS_OVER_SAMPLE_ON Fld(1,22,AC_MSKB2)//[22:22]
    #define AS_PHASESEL_B_DISABLE Fld(1,21,AC_MSKB2)//[21:21]
    #define AS_PHASESEL_GX Fld(5,16,AC_MSKB2)//[20:16]
    #define AS_PHASE_SUM_ALG_SEL Fld(1,15,AC_MSKB1)//[15:15]
    #define AS_PHASE_RESET Fld(1,14,AC_MSKB1)//[14:14]
    #define AS_PHASESEL_G_DISABLE Fld(1,13,AC_MSKB1)//[13:13]
    #define AS_PHASESEL_BX Fld(5,8,AC_MSKB1)//[12:8]
    #define AS_PHASE_MAXMIN_SEL Fld(1,7,AC_MSKB0)//[7:7]
      #define AS_PHASE_MAX_SEL 0
      #define AS_PHASE_MIN_SEL 1
    #define AS_PHASE_RAND_EN Fld(1,6,AC_MSKB0)//[6:6]
    #define AS_PHASESEL_R_DISABLE Fld(1,5,AC_MSKB0)//[5:5]
    #define AS_PHASESEL_RX Fld(5,0,AC_MSKB0)//[4:0]
#define ASYNC_10 (IO_ASYNC_BASE + 0x840)
    #define AS_HLOCK_SELF_END_12 Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_HLOCK_SELF_ST_12 Fld(1,30,AC_MSKB3)//[30:30]
    #define AS_H_LEN_PIX_STABLE_TH Fld(6,24,AC_MSKB3)//[29:24]
    #define AS_HLOCK_SELF_END_11_0 Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_HLOCK_SELF_ST_11_0 Fld(12,0,AC_MSKW10)//[11:0]
#define ASYNC_11 (IO_ASYNC_BASE + 0x844)
    #define AS_HWIDTH_MEASURE Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_H_STABLE_MON_EN Fld(1,30,AC_MSKB3)//[30:30]
    #define AS_VSYNC_OUT_DELAY_SEL Fld(1,29,AC_MSKB3)//[29:29]
    #define AS_VSYNC_OUTP_INV Fld(1,28,AC_MSKB3)//[28:28]
    #define AS_NEW_VS_OUTP_H1 Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_NEW_VS_OUTP_S1 Fld(12,0,AC_MSKW10)//[11:0]
#define ASYNC_12 (IO_ASYNC_BASE + 0x848)
    #define AS_VCNT_PIX_RESET_FIELD Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_FLD_SELECT Fld(2,29,AC_MSKB3)//[30:29]
		#define FIELD_DET_CLK27	0	
		#define FIELD_FREERUN	1		
		#define FIELD_DISABLE	3
    #define AS_VS_OUT_INT_SEL Fld(1,28,AC_MSKB3)//[28:28]
		#define VS_PROG_VSYNC_INT	0	
		#define VS_INPUT_VSYNC_INT	1
    #define AS_DISABLE_VS_OUT Fld(1,27,AC_MSKB3)//[27:27]
    #define AS_VS_UP_GATE Fld(1,25,AC_MSKB3)//[25:25]
    #define AS_VS_UPDATE_EN Fld(1,24,AC_MSKB3)//[24:24]
    #define AS_NEW_VS_OUTP_H2 Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_NEW_VS_OUTP_S2 Fld(12,0,AC_MSKW10)//[11:0]
#define ASYNC_13 (IO_ASYNC_BASE + 0x84C)
    #define AS_BDMASK_DISABLE Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_BDVSYNCP Fld(1,28,AC_MSKB3)//[28:28]
    #define AS_BDHSYNCP Fld(1,27,AC_MSKB3)//[27:27]
    #define AS_BDINSEL Fld(3,24,AC_MSKB3)//[26:24]
    #define AS_BDMASK_END Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_BDMASK_ST Fld(12,0,AC_MSKW10)//[11:0]
#define ASYNC_14 (IO_ASYNC_BASE + 0x850)
    #define AS_VFREE_RST_EN Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_HFREE_RST_EN Fld(1,30,AC_MSKB3)//[30:30]
    #define AS_HFREE_RST_TH_12 Fld(1,24,AC_MSKB3)//[24:24]
    #define AS_VFREE_RST_TH Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_HFREE_RST_TH_11_0 Fld(12,0,AC_MSKW10)//[11:0]
#define ASYNC_15 (IO_ASYNC_BASE + 0x854)
    #define AS_BDDATATH Fld(8,24,AC_FULLB3)//[31:24]
    #define AS_H_BD_MASK_R_11_0 Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_H_BD_MASK_L_11_0 Fld(12,0,AC_MSKW10)//[11:0]
#define ASYNC_16 (IO_ASYNC_BASE + 0x858)
    #define AS_H_BD_MASK_R_12 Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_AUTO_CLK_RDY_CLR Fld(1,30,AC_MSKB3)//[30:30]
    #define AS_CLK_AUTO Fld(1,29,AC_MSKB3)//[29:29]
    #define AS_CLKDET_INI Fld(1,28,AC_MSKB3)//[28:28]
    #define AS_H_BD_MASK_L_12 Fld(1,27,AC_MSKB3)//[27:27]
    #define AS_AUTO_PHASE_RDY_CLR Fld(1,26,AC_MSKB3)//[26:26]
    #define AS_PHASE_AUTO Fld(1,25,AC_MSKB3)//[25:25]
    #define AS_PHSDET_INI Fld(1,24,AC_MSKB3)//[24:24]
    #define AS_PSNE_THB1 Fld(8,16,AC_FULLB2)//[23:16]
    #define AS_PSNE_THG1 Fld(8,8,AC_FULLB1)//[15:8]
    #define AS_PSNE_THR1 Fld(8,0,AC_FULLB0)//[7:0]
#define ASYNC_17 (IO_ASYNC_BASE + 0x85C)
    #define AS_TOP_PE_SW Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_C_PSNE_SRC_SEL Fld(2,29,AC_MSKB3)//[30:29]
    #define AS_C_PSNE_STA_SEL Fld(1,28,AC_MSKB3)//[28:28]
    #define AS_PHASE_BOUNDARY_ENABLE Fld(1,27,AC_MSKB3)//[27:27]
    #define AS_PSNE_THB2 Fld(8,16,AC_FULLB2)//[23:16]
    #define AS_PSNE_THG2 Fld(8,8,AC_FULLB1)//[15:8]
    #define AS_PSNE_THR2 Fld(8,0,AC_FULLB0)//[7:0]
#define ASYNC_18 (IO_ASYNC_BASE + 0x860)
    #define AS_VMASK3_ST Fld(8,24,AC_FULLB3)//[31:24]
    #define AS_VMASK3_END Fld(8,16,AC_FULLB2)//[23:16]
    #define AS_MAX_RST_CNT_THR Fld(5,8,AC_MSKB1)//[12:8]
    #define AS_TOTAL_LINE_THR Fld(8,0,AC_FULLB0)//[7:0]
#define ASYNC_19 (IO_ASYNC_BASE + 0x864)
    #define AS_VMASK4_MODE Fld(1,18,AC_MSKB2)//[18:18]
    #define AS_VMASK4_OFF Fld(1,17,AC_MSKB2)//[17:17]
    #define AS_VMASK4_INV Fld(1,16,AC_MSKB2)//[16:16]
    #define AS_VMASK4_END Fld(8,8,AC_FULLB1)//[15:8]
    #define AS_VMASK4_ST Fld(8,0,AC_FULLB0)//[7:0]
#define ASYNC_1A (IO_ASYNC_BASE + 0x868)
    #define AS_PIX_AUTO_HV_SKEW Fld(1,28,AC_MSKB3)//[28:28]
    #define AS_AUTO_HV_SKEW_PIX_EN Fld(1,27,AC_MSKB3)//[27:27]
    #define AS_VIO_CLR Fld(1,26,AC_MSKB3)//[26:26]
    #define AS_VIOLATION_DET_EN Fld(1,25,AC_MSKB3)//[25:25]
    #define AS_STBL_WIN_MON_EN Fld(1,24,AC_MSKB3)//[24:24]
    #define AS_STBL_WIN_END Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_STBL_WIN_ST Fld(12,0,AC_MSKW10)//[11:0]
#define STA_SYNC0_00 (IO_ASYNC_BASE + 0x1A0)
	#define STA_SYNC0_00_0 (IO_ASYNC_BASE+0x1A0)
    #define AS_H_LEN_S Fld(12,20,AC_MSKW32)//[31:20]
    #define AS_V_LEN_S Fld(12,8,AC_MSKW21)//[19:8]
    #define AS_MODE_CHG_STA Fld(1,7,AC_MSKB0)//[7:7]
    #define AS_HSYNC_P Fld(1,6,AC_MSKB0)//[6:6]
    #define AS_VSYNC_P Fld(1,5,AC_MSKB0)//[5:5]
    #define AS_FIELD_CK27_DET Fld(1,4,AC_MSKB0)//[4:4]
    #define AS_FIELD_ACT Fld(1,3,AC_MSKB0)//[3:3]
    #define AS_HSYNC_ACT Fld(1,2,AC_MSKB0)//[2:2]
    #define AS_VSYNC_ACT Fld(1,1,AC_MSKB0)//[1:1]
    #define AS_CSYNC_ACT Fld(1,0,AC_MSKB0)//[0:0]
      #define STA0_HSYNC_ACT 0x04  // detect Hsync Activity , 1 : active
      #define STA0_VSYNC_ACT 0x02  // detect Vsync Activity , 1 : active
      #define STA0_CSYNC_ACT 0x01  // detect Csync Activity , 1 : active  
#define STA_SYNC0_01 (IO_ASYNC_BASE + 0x1A4)
    #define AS_SYNC0_MUTE Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_AUTO_DELAY_TOG Fld(1,30,AC_MSKB3)//[30:30]
    #define AS_AUTO_DELAY_VSYNC Fld(1,29,AC_MSKB3)//[29:29]
    #define AS_HSYNC_WIDTH_S Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_VSYNC_WIDTH_S Fld(12,0,AC_MSKW10)//[11:0]
#define STA_SYNC0_02 (IO_ASYNC_BASE + 0x1A8)
    #define AS_SOGH_STABLE Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_SOGV_STABLE Fld(1,30,AC_MSKB3)//[30:30]
    #define AS_VSYNC_OUTX_ACT Fld(1,24,AC_MSKB3)//[24:24]
    #define AS_CH_LEN_S Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_CV_LEN_S Fld(12,0,AC_MSKW10)//[11:0]
#define STA_SYNC0_03 (IO_ASYNC_BASE + 0x1AC)
    #define AS_V_LEN0_CK27_WIDTH Fld(13,16,AC_MSKW32)//[28:16]
    #define AS_F1_PSYNC_NO Fld(8,8,AC_FULLB1)//[15:8]
    #define AS_F0_PSYNC_NO Fld(8,0,AC_FULLB0)//[7:0]
#define STA_SYNC0_04 (IO_ASYNC_BASE + 0x1B0)
    #define AS_H_LEN_PIX_S_7_0 Fld(8,24,AC_FULLB3)//[31:24]
    #define AS_LEFTBC_STA_S_11_0 Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_RIGHTBC_STA_S_11_0 Fld(12,0,AC_MSKW10)//[11:0]
#define STA_SYNC0_05 (IO_ASYNC_BASE + 0x1B4)
    #define AS_HSYNC_WIDTH_PIX_S_7_0 Fld(8,24,AC_FULLB3)//[31:24]
    #define AS_TOPBC_STA_S Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_BOTTOMBC_STA_S Fld(12,0,AC_MSKW10)//[11:0]
#define STA_SYNC0_06 (IO_ASYNC_BASE + 0x1B8)
    #define AS_HSYNC_WIDTH_PIX_S_11_8 Fld(4,28,AC_MSKB3)//[31:28]
    #define AS_H_LEN_PIX_S_11_8 Fld(4,24,AC_MSKB3)//[27:24]
    #define AS_NEWTOPBC_S Fld(12,12,AC_MSKW21)//[23:12]
    #define AS_NEWBOTTOMBC_S Fld(12,0,AC_MSKW10)//[11:0]
#define STA_SYNC0_07 (IO_ASYNC_BASE + 0x1BC)
    #define AS_RMAXMIND Fld(8,24,AC_FULLB3)//[31:24]
    #define AS_TOP_SUMRD_S Fld(24,0,AC_MSKDW)//[23:0]
#define STA_SYNC0_08 (IO_ASYNC_BASE + 0x1C0)
    #define AS_GMAXMIND Fld(8,24,AC_FULLB3)//[31:24]
    #define AS_TOP_SUMGD_S Fld(24,0,AC_MSKDW)//[23:0]
#define STA_SYNC0_09 (IO_ASYNC_BASE + 0x1C4)
    #define AS_BMAXMIND Fld(8,24,AC_FULLB3)//[31:24]
    #define AS_TOP_SUMBD_S Fld(24,0,AC_MSKDW)//[23:0]
#define STA_SYNC0_0A (IO_ASYNC_BASE + 0x1C8)
    #define AS_H_LEN_PIX_S_12 Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_HSYNC_WIDTH_PIX_S_12 Fld(1,30,AC_MSKB3)//[30:30]
    #define AS_LEFTBC_STA_S_12 Fld(1,29,AC_MSKB3)//[29:29]
    #define AS_RIGHTBC_STA_S_12 Fld(1,28,AC_MSKB3)//[28:28]
    #define AS_STA_R_S Fld(24,0,AC_MSKDW)//[23:0]
#define STA_SYNC0_0B (IO_ASYNC_BASE + 0x1CC)
    #define AS_HV_HIT_PIX Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_R_DLY Fld(1,30,AC_MSKB3)//[30:30]
    #define AS_G_DLY Fld(1,29,AC_MSKB3)//[29:29]
    #define AS_B_DLY Fld(1,28,AC_MSKB3)//[28:28]
    #define AS_STA_G_S Fld(24,0,AC_MSKDW)//[23:0]
#define STA_SYNC0_0C (IO_ASYNC_BASE + 0x1D0)
    #define AS_AUTO_PHASE_RDY Fld(1,29,AC_MSKB3)//[29:29]
    #define AS_PHASE_GOOD Fld(5,24,AC_MSKB3)//[28:24]
    #define AS_STA_B_S Fld(24,0,AC_MSKDW)//[23:0]
#define STA_SYNC0_0D (IO_ASYNC_BASE + 0x1D4)
    #define AS_V_LEN0_WIDTH Fld(13,0,AC_MSKW10)//[12:0]
#define STA_SYNC0_0E (IO_ASYNC_BASE + 0x1D8)
    #define AS_R_VIOLATION Fld(1,31,AC_MSKB3)//[31:31]
    #define AS_G_VIOLATION Fld(1,30,AC_MSKB3)//[30:30]
    #define AS_B_VIOLATION Fld(1,29,AC_MSKB3)//[29:29]
    #define AS_WINB_HSTABLE Fld(1,28,AC_MSKB3)//[28:28]
    #define AS_H_LEN_PIX_STABLE Fld(1,27,AC_MSKB3)//[27:27]
    #define AS_AUTO_CLK_RDY Fld(1,26,AC_MSKB3)//[26:26]
    #define AS_PHS_MAXMIN_DIFF_S Fld(26,0,AC_MSKDW)//[25:0]
#define STA_SYNC2_00 (IO_ASYNC_BASE + 0x1DC)
    #define AS2_CSYNC_ACT Fld(1,24,AC_MSKB3)//[24:24]
    #define AS2_VSYNC_WIDTH_S Fld(12,12,AC_MSKW21)//[23:12]
    #define AS2_HSYNC_WIDTH_S Fld(12,0,AC_MSKW10)//[11:0]
#define STA_SYNC2_01 (IO_ASYNC_BASE + 0x1FC)
    #define AS2_H_LEN_S Fld(12,12,AC_MSKW21)//[23:12]
    #define AS2_V_LEN_S Fld(12,0,AC_MSKW10)//[11:0]


#endif

