xref: /utopia/UTPA2-700.0.x/modules/dmx/hal/k6/otv/regOTV.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1*53ee8cc1Swenshuai.xi //<MStar Software>
2*53ee8cc1Swenshuai.xi //******************************************************************************
3*53ee8cc1Swenshuai.xi // MStar Software
4*53ee8cc1Swenshuai.xi // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved.
5*53ee8cc1Swenshuai.xi // All software, firmware and related documentation herein ("MStar Software") are
6*53ee8cc1Swenshuai.xi // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by
7*53ee8cc1Swenshuai.xi // law, including, but not limited to, copyright law and international treaties.
8*53ee8cc1Swenshuai.xi // Any use, modification, reproduction, retransmission, or republication of all
9*53ee8cc1Swenshuai.xi // or part of MStar Software is expressly prohibited, unless prior written
10*53ee8cc1Swenshuai.xi // permission has been granted by MStar.
11*53ee8cc1Swenshuai.xi //
12*53ee8cc1Swenshuai.xi // By accessing, browsing and/or using MStar Software, you acknowledge that you
13*53ee8cc1Swenshuai.xi // have read, understood, and agree, to be bound by below terms ("Terms") and to
14*53ee8cc1Swenshuai.xi // comply with all applicable laws and regulations:
15*53ee8cc1Swenshuai.xi //
16*53ee8cc1Swenshuai.xi // 1. MStar shall retain any and all right, ownership and interest to MStar
17*53ee8cc1Swenshuai.xi //    Software and any modification/derivatives thereof.
18*53ee8cc1Swenshuai.xi //    No right, ownership, or interest to MStar Software and any
19*53ee8cc1Swenshuai.xi //    modification/derivatives thereof is transferred to you under Terms.
20*53ee8cc1Swenshuai.xi //
21*53ee8cc1Swenshuai.xi // 2. You understand that MStar Software might include, incorporate or be
22*53ee8cc1Swenshuai.xi //    supplied together with third party`s software and the use of MStar
23*53ee8cc1Swenshuai.xi //    Software may require additional licenses from third parties.
24*53ee8cc1Swenshuai.xi //    Therefore, you hereby agree it is your sole responsibility to separately
25*53ee8cc1Swenshuai.xi //    obtain any and all third party right and license necessary for your use of
26*53ee8cc1Swenshuai.xi //    such third party`s software.
27*53ee8cc1Swenshuai.xi //
28*53ee8cc1Swenshuai.xi // 3. MStar Software and any modification/derivatives thereof shall be deemed as
29*53ee8cc1Swenshuai.xi //    MStar`s confidential information and you agree to keep MStar`s
30*53ee8cc1Swenshuai.xi //    confidential information in strictest confidence and not disclose to any
31*53ee8cc1Swenshuai.xi //    third party.
32*53ee8cc1Swenshuai.xi //
33*53ee8cc1Swenshuai.xi // 4. MStar Software is provided on an "AS IS" basis without warranties of any
34*53ee8cc1Swenshuai.xi //    kind. Any warranties are hereby expressly disclaimed by MStar, including
35*53ee8cc1Swenshuai.xi //    without limitation, any warranties of merchantability, non-infringement of
36*53ee8cc1Swenshuai.xi //    intellectual property rights, fitness for a particular purpose, error free
37*53ee8cc1Swenshuai.xi //    and in conformity with any international standard.  You agree to waive any
38*53ee8cc1Swenshuai.xi //    claim against MStar for any loss, damage, cost or expense that you may
39*53ee8cc1Swenshuai.xi //    incur related to your use of MStar Software.
40*53ee8cc1Swenshuai.xi //    In no event shall MStar be liable for any direct, indirect, incidental or
41*53ee8cc1Swenshuai.xi //    consequential damages, including without limitation, lost of profit or
42*53ee8cc1Swenshuai.xi //    revenues, lost or damage of data, and unauthorized system use.
43*53ee8cc1Swenshuai.xi //    You agree that this Section 4 shall still apply without being affected
44*53ee8cc1Swenshuai.xi //    even if MStar Software has been modified by MStar in accordance with your
45*53ee8cc1Swenshuai.xi //    request or instruction for your use, except otherwise agreed by both
46*53ee8cc1Swenshuai.xi //    parties in writing.
47*53ee8cc1Swenshuai.xi //
48*53ee8cc1Swenshuai.xi // 5. If requested, MStar may from time to time provide technical supports or
49*53ee8cc1Swenshuai.xi //    services in relation with MStar Software to you for your use of
50*53ee8cc1Swenshuai.xi //    MStar Software in conjunction with your or your customer`s product
51*53ee8cc1Swenshuai.xi //    ("Services").
52*53ee8cc1Swenshuai.xi //    You understand and agree that, except otherwise agreed by both parties in
53*53ee8cc1Swenshuai.xi //    writing, Services are provided on an "AS IS" basis and the warranty
54*53ee8cc1Swenshuai.xi //    disclaimer set forth in Section 4 above shall apply.
55*53ee8cc1Swenshuai.xi //
56*53ee8cc1Swenshuai.xi // 6. Nothing contained herein shall be construed as by implication, estoppels
57*53ee8cc1Swenshuai.xi //    or otherwise:
58*53ee8cc1Swenshuai.xi //    (a) conferring any license or right to use MStar name, trademark, service
59*53ee8cc1Swenshuai.xi //        mark, symbol or any other identification;
60*53ee8cc1Swenshuai.xi //    (b) obligating MStar or any of its affiliates to furnish any person,
61*53ee8cc1Swenshuai.xi //        including without limitation, you and your customers, any assistance
62*53ee8cc1Swenshuai.xi //        of any kind whatsoever, or any information; or
63*53ee8cc1Swenshuai.xi //    (c) conferring any license or right under any intellectual property right.
64*53ee8cc1Swenshuai.xi //
65*53ee8cc1Swenshuai.xi // 7. These terms shall be governed by and construed in accordance with the laws
66*53ee8cc1Swenshuai.xi //    of Taiwan, R.O.C., excluding its conflict of law rules.
67*53ee8cc1Swenshuai.xi //    Any and all dispute arising out hereof or related hereto shall be finally
68*53ee8cc1Swenshuai.xi //    settled by arbitration referred to the Chinese Arbitration Association,
69*53ee8cc1Swenshuai.xi //    Taipei in accordance with the ROC Arbitration Law and the Arbitration
70*53ee8cc1Swenshuai.xi //    Rules of the Association by three (3) arbitrators appointed in accordance
71*53ee8cc1Swenshuai.xi //    with the said Rules.
72*53ee8cc1Swenshuai.xi //    The place of arbitration shall be in Taipei, Taiwan and the language shall
73*53ee8cc1Swenshuai.xi //    be English.
74*53ee8cc1Swenshuai.xi //    The arbitration award shall be final and binding to both parties.
75*53ee8cc1Swenshuai.xi //
76*53ee8cc1Swenshuai.xi //******************************************************************************
77*53ee8cc1Swenshuai.xi //<MStar Software>
78*53ee8cc1Swenshuai.xi ////////////////////////////////////////////////////////////////////////////////
79*53ee8cc1Swenshuai.xi //
80*53ee8cc1Swenshuai.xi // Copyright (c) 2008-2009 MStar Semiconductor, Inc.
81*53ee8cc1Swenshuai.xi // All rights reserved.
82*53ee8cc1Swenshuai.xi //
83*53ee8cc1Swenshuai.xi // Unless otherwise stipulated in writing, any and all information contained
84*53ee8cc1Swenshuai.xi // herein regardless in any format shall remain the sole proprietary of
85*53ee8cc1Swenshuai.xi // MStar Semiconductor Inc. and be kept in strict confidence
86*53ee8cc1Swenshuai.xi // ("MStar Confidential Information") by the recipient.
87*53ee8cc1Swenshuai.xi // Any unauthorized act including without limitation unauthorized disclosure,
88*53ee8cc1Swenshuai.xi // copying, use, reproduction, sale, distribution, modification, disassembling,
89*53ee8cc1Swenshuai.xi // reverse engineering and compiling of the contents of MStar Confidential
90*53ee8cc1Swenshuai.xi // Information is unlawful and strictly prohibited. MStar hereby reserves the
91*53ee8cc1Swenshuai.xi // rights to any and all damages, losses, costs and expenses resulting therefrom.
92*53ee8cc1Swenshuai.xi //
93*53ee8cc1Swenshuai.xi ////////////////////////////////////////////////////////////////////////////////
94*53ee8cc1Swenshuai.xi 
95*53ee8cc1Swenshuai.xi ////////////////////////////////////////////////////////////////////////////////////////////////////
96*53ee8cc1Swenshuai.xi //
97*53ee8cc1Swenshuai.xi //  File name: regOTV.h
98*53ee8cc1Swenshuai.xi //  Description: OTV Register Definition
99*53ee8cc1Swenshuai.xi //
100*53ee8cc1Swenshuai.xi ////////////////////////////////////////////////////////////////////////////////////////////////////
101*53ee8cc1Swenshuai.xi 
102*53ee8cc1Swenshuai.xi #ifndef _OTV_REG_H_
103*53ee8cc1Swenshuai.xi #define _OTV_REG_H_
104*53ee8cc1Swenshuai.xi 
105*53ee8cc1Swenshuai.xi //--------------------------------------------------------------------------------------------------
106*53ee8cc1Swenshuai.xi //  Abbreviation
107*53ee8cc1Swenshuai.xi //--------------------------------------------------------------------------------------------------
108*53ee8cc1Swenshuai.xi // Addr                             Address
109*53ee8cc1Swenshuai.xi // Buf                              Buffer
110*53ee8cc1Swenshuai.xi // Clr                              Clear
111*53ee8cc1Swenshuai.xi // CmdQ                             Command queue
112*53ee8cc1Swenshuai.xi // Cnt                              Count
113*53ee8cc1Swenshuai.xi // Ctrl                             Control
114*53ee8cc1Swenshuai.xi // Flt                              Filter
115*53ee8cc1Swenshuai.xi // Hw                               Hardware
116*53ee8cc1Swenshuai.xi // Int                              Interrupt
117*53ee8cc1Swenshuai.xi // Len                              Length
118*53ee8cc1Swenshuai.xi // Ovfw                             Overflow
119*53ee8cc1Swenshuai.xi // Pkt                              Packet
120*53ee8cc1Swenshuai.xi // Rec                              Record
121*53ee8cc1Swenshuai.xi // Recv                             Receive
122*53ee8cc1Swenshuai.xi // Rmn                              Remain
123*53ee8cc1Swenshuai.xi // Reg                              Register
124*53ee8cc1Swenshuai.xi // Req                              Request
125*53ee8cc1Swenshuai.xi // Rst                              Reset
126*53ee8cc1Swenshuai.xi // Scmb                             Scramble
127*53ee8cc1Swenshuai.xi // Sec                              Section
128*53ee8cc1Swenshuai.xi // Stat                             Status
129*53ee8cc1Swenshuai.xi // Sw                               Software
130*53ee8cc1Swenshuai.xi // Ts                               Transport Stream
131*53ee8cc1Swenshuai.xi 
132*53ee8cc1Swenshuai.xi 
133*53ee8cc1Swenshuai.xi //--------------------------------------------------------------------------------------------------
134*53ee8cc1Swenshuai.xi //  Global Definition
135*53ee8cc1Swenshuai.xi //--------------------------------------------------------------------------------------------------
136*53ee8cc1Swenshuai.xi 
137*53ee8cc1Swenshuai.xi //--------------------------------------------------------------------------------------------------
138*53ee8cc1Swenshuai.xi //  Compliation Option
139*53ee8cc1Swenshuai.xi //--------------------------------------------------------------------------------------------------
140*53ee8cc1Swenshuai.xi 
141*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
142*53ee8cc1Swenshuai.xi //  Harware Capability
143*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
144*53ee8cc1Swenshuai.xi 
145*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
146*53ee8cc1Swenshuai.xi //  Type and Structure
147*53ee8cc1Swenshuai.xi //-------------------------------------------------------------------------------------------------
148*53ee8cc1Swenshuai.xi 
149*53ee8cc1Swenshuai.xi // Software
150*53ee8cc1Swenshuai.xi 
151*53ee8cc1Swenshuai.xi #define OTV_BANK0_REG_CTRL_BASE           (0xE1400)    //0x70A<<9   //bank 0x170A
152*53ee8cc1Swenshuai.xi #define OTV_BANK1_REG_CTRL_BASE           (0xE1600)	   //0x70B<<9   //bank 0x170B
153*53ee8cc1Swenshuai.xi 
154*53ee8cc1Swenshuai.xi #define OTV0_REG_CTRL_BASE                OTV_BANK0_REG_CTRL_BASE
155*53ee8cc1Swenshuai.xi #define OTV1_REG_CTRL_BASE                (OTV_BANK0_REG_CTRL_BASE+0x100)
156*53ee8cc1Swenshuai.xi #define OTV2_REG_CTRL_BASE                OTV_BANK1_REG_CTRL_BASE
157*53ee8cc1Swenshuai.xi #define OTV3_REG_CTRL_BASE                (OTV_BANK1_REG_CTRL_BASE+0x100)
158*53ee8cc1Swenshuai.xi 
159*53ee8cc1Swenshuai.xi #define OTV0_PIDFLT_BASE                  (OTV0_REG_CTRL_BASE+0x2C)
160*53ee8cc1Swenshuai.xi #define OTV1_PIDFLT_BASE                  (OTV1_REG_CTRL_BASE+0x2C)
161*53ee8cc1Swenshuai.xi #define OTV2_PIDFLT_BASE                  (OTV2_REG_CTRL_BASE+0x2C)
162*53ee8cc1Swenshuai.xi #define OTV3_PIDFLT_BASE                  (OTV3_REG_CTRL_BASE+0x2C)
163*53ee8cc1Swenshuai.xi 
164*53ee8cc1Swenshuai.xi #define OTV0_EVENT_MASK_BASE              (OTV0_REG_CTRL_BASE+0xC0)
165*53ee8cc1Swenshuai.xi #define OTV1_EVENT_MASK_BASE              (OTV1_REG_CTRL_BASE+0xC0)
166*53ee8cc1Swenshuai.xi #define OTV2_EVENT_MASK_BASE              (OTV2_REG_CTRL_BASE+0xC0)
167*53ee8cc1Swenshuai.xi #define OTV3_EVENT_MASK_BASE              (OTV3_REG_CTRL_BASE+0xC0)
168*53ee8cc1Swenshuai.xi 
169*53ee8cc1Swenshuai.xi //#define OTV0_BANK0_PIDFLT_BASE             (OTV0_BANK0_REG_CTRL_BASE+0x80)
170*53ee8cc1Swenshuai.xi //#define OTV0_BANK1_EVENT_MASK_BASE         (OTV0_BANK1_REG_CTRL_BASE+0x180)
171*53ee8cc1Swenshuai.xi //#define OTV0_BANK1_PAYLOAD_MASK_BASE       (OTV0_BANK1_REG_CTRL_BASE+0x100)
172*53ee8cc1Swenshuai.xi 
173*53ee8cc1Swenshuai.xi //#define OTV1_BANK0_REG_CTRL_BASE           (0x23A00)
174*53ee8cc1Swenshuai.xi //#define OTV1_BANK1_REG_CTRL_BASE           (0x23C00)
175*53ee8cc1Swenshuai.xi 
176*53ee8cc1Swenshuai.xi //#define OTV1_BANK0_PIDFLT_BASE             (OTV1_BANK0_REG_CTRL_BASE+0x80)
177*53ee8cc1Swenshuai.xi //#define OTV1_BANK1_EVENT_MASK_BASE         (OTV1_BANK1_REG_CTRL_BASE+0x180)
178*53ee8cc1Swenshuai.xi //#define OTV1_BANK1_PAYLOAD_MASK_BASE       (OTV1_BANK1_REG_CTRL_BASE+0x100)
179*53ee8cc1Swenshuai.xi 
180*53ee8cc1Swenshuai.xi // Payload/Event Mask flag
181*53ee8cc1Swenshuai.xi #define OTV_EVENT_MASK            0xffffffff
182*53ee8cc1Swenshuai.xi #define OTV_EVENT_AFE             0x00000001      // Adaptation Field Extension flag
183*53ee8cc1Swenshuai.xi #define OTV_EVENT_TPD             0x00000002      // Transport Private Data flag
184*53ee8cc1Swenshuai.xi #define OTV_EVENT_SP              0x00000004      // Splicing Point flag
185*53ee8cc1Swenshuai.xi #define OTV_EVENT_OPCR            0x00000008      // OPCR flag
186*53ee8cc1Swenshuai.xi #define OTV_EVENT_PCR             0x00000010      // PCR flag
187*53ee8cc1Swenshuai.xi #define OTV_EVENT_ESPI            0x00000020      // Elementary Stream Priority Indicator
188*53ee8cc1Swenshuai.xi #define OTV_EVENT_RAI             0x00000040      // Random Access Indicator
189*53ee8cc1Swenshuai.xi #define OTV_EVENT_DI              0x00000080      // Discontinuity Indicator
190*53ee8cc1Swenshuai.xi #define OTV_EVENT_CESOS           0x00000100      // Change of Elementary Stream to Odd  Scrambled
191*53ee8cc1Swenshuai.xi #define OTV_EVENT_CESES           0x00000200      // Change of Elementary Stream to Even Scrambled
192*53ee8cc1Swenshuai.xi #define OTV_EVENT_CESNS           0x00000400      // Change of Elementary Stream to Not  Scrambled
193*53ee8cc1Swenshuai.xi #define OTV_EVENT_PUSI            0x00000800      // Payload Unit Start Indicator
194*53ee8cc1Swenshuai.xi #define OTV_EVENT_FPR             0x00001000      // First Packet Recorded
195*53ee8cc1Swenshuai.xi 
196*53ee8cc1Swenshuai.xi 
197*53ee8cc1Swenshuai.xi typedef struct _OTV_REG32
198*53ee8cc1Swenshuai.xi {
199*53ee8cc1Swenshuai.xi     volatile MS_U16                 L;
200*53ee8cc1Swenshuai.xi     volatile MS_U16                 empty_L;
201*53ee8cc1Swenshuai.xi     volatile MS_U16                 H;
202*53ee8cc1Swenshuai.xi     volatile MS_U16                 empty_H;
203*53ee8cc1Swenshuai.xi } OTV_REG32;
204*53ee8cc1Swenshuai.xi 
205*53ee8cc1Swenshuai.xi typedef struct _OTV_REG16
206*53ee8cc1Swenshuai.xi {
207*53ee8cc1Swenshuai.xi     volatile MS_U16                 data;
208*53ee8cc1Swenshuai.xi     volatile MS_U16                 _resv;
209*53ee8cc1Swenshuai.xi } OTV_REG16;
210*53ee8cc1Swenshuai.xi 
211*53ee8cc1Swenshuai.xi //typedef OTV_REG16                       REG_PidFlt;  //bruce
212*53ee8cc1Swenshuai.xi 
213*53ee8cc1Swenshuai.xi typedef struct _REG_OTV
214*53ee8cc1Swenshuai.xi {
215*53ee8cc1Swenshuai.xi     //----------------------------------------------
216*53ee8cc1Swenshuai.xi     // 0xBF245000 MIPS direct access
217*53ee8cc1Swenshuai.xi     //----------------------------------------------
218*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_PktTimer;                          // 0xbf245000   0x00
219*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_PktNum;                            // 0xbf245008   0x02
220*53ee8cc1Swenshuai.xi     OTV_REG16                           _bf245010;                             // 0xbf245010   0x04
221*53ee8cc1Swenshuai.xi 
222*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_PktSize2;                          // 0xbf245014   0x05
223*53ee8cc1Swenshuai.xi     #define OTV_PKT_SIZE_MASK              0xFF00
224*53ee8cc1Swenshuai.xi     #define OTV_PKT_SIZE_188                 0xBB
225*53ee8cc1Swenshuai.xi     #define OTV_PKT_SHIFT                       8
226*53ee8cc1Swenshuai.xi 
227*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_EventLogCtrlStatus;                // 0xbf245018   0x06
228*53ee8cc1Swenshuai.xi     #define OTV_EVENT_FIFO_NUM_MASK        0x001F
229*53ee8cc1Swenshuai.xi     #define OTV_EVENT_FIFO_FULL            0X0020
230*53ee8cc1Swenshuai.xi     #define OTV_EVENT_FIFO_EMPTY           0x0040
231*53ee8cc1Swenshuai.xi     #define OTV_EVENT_FIFO_RDLV_MASK       0x0300
232*53ee8cc1Swenshuai.xi     #define OTV_EVENT_FIFO_RDLV_SHIFT           8
233*53ee8cc1Swenshuai.xi     #define OTV_EVENT_FIFO_WTLV_MASK       0x0C00
234*53ee8cc1Swenshuai.xi     #define OTV_EVENT_FIFO_WTLV_SHIFT          10
235*53ee8cc1Swenshuai.xi     #define OTV_EVENT_FIFO_RD_OVF          0x1000
236*53ee8cc1Swenshuai.xi     #define OTV_EVENT_FIFO_WT_OVF          0x2000
237*53ee8cc1Swenshuai.xi 
238*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_PktChkSize2;                       // 0xbf24501c   0x07
239*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_HW_CTRL0;                          // 0xbf245020   0x08
240*53ee8cc1Swenshuai.xi     #define OTV_SW_RESET                   0x0001
241*53ee8cc1Swenshuai.xi     #define OTV_TEI_SKIP_PKT               0x0040
242*53ee8cc1Swenshuai.xi     #define OTV_CLR_EVENT_OVERFLOW         0x0200
243*53ee8cc1Swenshuai.xi     #define OTV_MASK_MD                    0x0800
244*53ee8cc1Swenshuai.xi     #define OTV_REC_EFRAME_EN              0x1000
245*53ee8cc1Swenshuai.xi     #define OTV_RM_PIPE                    0x4000                              // OTV RASP auto flush
246*53ee8cc1Swenshuai.xi 
247*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_HW_CTRL1;                          // 0xbf245024   0x09
248*53ee8cc1Swenshuai.xi     #define OTV_ALT_TS_SIZE                0x0080
249*53ee8cc1Swenshuai.xi     #define OTV_TICK_TIME_MASK             0x6000
250*53ee8cc1Swenshuai.xi     #define OTV_EFRAME_RD                  0x8000                              // read eframe fifo
251*53ee8cc1Swenshuai.xi 
252*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_HW_CTRL2;                          // 0xbf245028   0x0a
253*53ee8cc1Swenshuai.xi     #define OTV_INT_TIMER_EN               0x0001
254*53ee8cc1Swenshuai.xi     #define OTV_INT_EVENT_EN               0x0002
255*53ee8cc1Swenshuai.xi     #define OTV_INT_TIME_WATER_MASK        0x000C
256*53ee8cc1Swenshuai.xi     #define OTV_INT_TIME_WATER_SHIFT            2
257*53ee8cc1Swenshuai.xi     #define OTV_INT_EVENT_WATER_MASK       0x01F0
258*53ee8cc1Swenshuai.xi     #define OTV_INT_EVENT_WATER_SHIFT           4
259*53ee8cc1Swenshuai.xi     #define OTV_PKT_NUM_TIMER_SEL          0x2000                              // The recording packet timestamp: default 0:replace with pkt timer, 1: pkt number
260*53ee8cc1Swenshuai.xi     #define OTV_TIMESTAMP_OTV_EN           0x4000                              // The recording packet timestamp sel: default 0: no OTV timestamp replace, with PVR timestamp replace;  1: with OTV timestamp replace
261*53ee8cc1Swenshuai.xi     #define OTV_TIMESTAMP_PVR_TO_OTV_EN    0x8000                              // The OTV packet timestamp source select : default 0: match OTV local timstamp  1: match PVR timstamp
262*53ee8cc1Swenshuai.xi 
263*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_Pidflt_0;                          // 0xbf24502c   0x0b
264*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_Pidflt_1;                          // 0xbf245030   0x0c
265*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_Pidflt_2;                          // 0xbf245034   0x0d
266*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_Pidflt_3;                          // 0xbf245038   0x0e
267*53ee8cc1Swenshuai.xi 
268*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_HW_CTRL3;                          // 0xbf24503c   0x0f
269*53ee8cc1Swenshuai.xi     #define OTV_PKT_SW_RST                 0x0001                              // If this bit set to 1, pkt_num & pkt timestamp will be reset
270*53ee8cc1Swenshuai.xi     #define OTV_PKT_NUM_SRC_SEL            0x0002                              // 0:count by OTV pid hit, pkt_num index start from 0,1,2,...etc
271*53ee8cc1Swenshuai.xi                                                                                // 1:count by pkt dmx hit, pkt_num index start from 1,2,3,...etc
272*53ee8cc1Swenshuai.xi 
273*53ee8cc1Swenshuai.xi     #define OTV_PKT_NUM_TIMER_LOCK         0x0004                              // pkt num/timer will be locked for reading if this bit is set to 1
274*53ee8cc1Swenshuai.xi     #define OTV_FIRST_PKT_TIMER_BASE_EN    0x0008                              // If this bit set to 1, timer will be (orginal timer - first pkt timer)
275*53ee8cc1Swenshuai.xi     #define OTV_EVENT_FLT_RST              0x0010                              // If this bit set to 1, OTV event flt will reset (The bit only work after Kirin U02, including U02)
276*53ee8cc1Swenshuai.xi 
277*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_EventDescriptor;                   // 0xbf201d40   0x10
278*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_EventPktNum;                       // 0xbf201d48   0x12
279*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_EventPktTimer;                     // 0xbf201d50   0x14
280*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_EventPktPCR;                       // 0xbf201d58   0x16
281*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_EventPktPID;                       // 0xbf201d60   0x18
282*53ee8cc1Swenshuai.xi 
283*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_PushCnt;                           // 0xbf201d64   0x19
284*53ee8cc1Swenshuai.xi     #define OTV_PUSH_CNT_MASK              0xFF00                              // OTV auto flush push counter
285*53ee8cc1Swenshuai.xi 
286*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_Debug;                             // 0xbf245068   0x1a
287*53ee8cc1Swenshuai.xi 
288*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_INT_Flag;                          // 0xbf201d70   0x1c
289*53ee8cc1Swenshuai.xi     #define OTV_INT_FLAG_MASK              0x00FF
290*53ee8cc1Swenshuai.xi     #define OTV_INT_FROM_OTV0_TIMER        0x0001                              // write 0 to clear(only valid at bank OTV0)
291*53ee8cc1Swenshuai.xi     #define OTV_INT_FROM_OTV0_EVENT        0x0002                              // write 0 to clear(only valid at bank OTV0)
292*53ee8cc1Swenshuai.xi     #define OTV_INT_FROM_OTV1_TIMER        0x0004                              // write 0 to clear(only valid at bank OTV0)
293*53ee8cc1Swenshuai.xi     #define OTV_INT_FROM_OTV1_EVENT        0x0008                              // write 0 to clear(only valid at bank OTV0)
294*53ee8cc1Swenshuai.xi     #define OTV_INT_FROM_OTV2_TIMER        0x0010                              // write 0 to clear(only valid at bank OTV0)
295*53ee8cc1Swenshuai.xi     #define OTV_INT_FROM_OTV2_EVENT        0x0020                              // write 0 to clear(only valid at bank OTV0)
296*53ee8cc1Swenshuai.xi     #define OTV_INT_FROM_OTV3_TIMER        0x0040                              // write 0 to clear(only valid at bank OTV0)
297*53ee8cc1Swenshuai.xi     #define OTV_INT_FROM_OTV3_EVENT        0x0080                              // write 0 to clear(only valid at bank OTV0)
298*53ee8cc1Swenshuai.xi 
299*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_HW_CTRL4;                          // 0xbf245074   0x1d
300*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_HW_CTRL5;                          // 0xbf245078   0x1e
301*53ee8cc1Swenshuai.xi     OTV_REG16                           OTV_HW_CTRL6;                          // 0xbf24507c   0x1f
302*53ee8cc1Swenshuai.xi 
303*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_Pid_PayLoadMask_0;                 // 0xbf245080   0x20
304*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_Pid_PayLoadMask_1;                 // 0xbf245088   0x22
305*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_Pid_PayLoadMask_2;                 // 0xbf245090   0x24
306*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_Pid_PayLoadMask_3;                 // 0xbf245098   0x26
307*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_Pid_PayLoadMask_4;                 // 0xbf2450a0   0x28
308*53ee8cc1Swenshuai.xi 
309*53ee8cc1Swenshuai.xi     OTV_REG16                           _bf2450a8_bf2450bc[0x30-0x2a];         // 0xbf2450a8-bf2450bc   0x2a-0x2f
310*53ee8cc1Swenshuai.xi 
311*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_Pid_EventMask_0;                   // 0xbf2450c0   0x30
312*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_Pid_EventMask_1;                   // 0xbf2450c8   0x32
313*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_Pid_EventMask_2;                   // 0xbf2450d0   0x34
314*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_Pid_EventMask_3;                   // 0xbf2450d8   0x36
315*53ee8cc1Swenshuai.xi     OTV_REG32                           OTV_Pid_EventMask_4;                   // 0xbf2450e0   0x38
316*53ee8cc1Swenshuai.xi 
317*53ee8cc1Swenshuai.xi } REG_OTV;
318*53ee8cc1Swenshuai.xi 
319*53ee8cc1Swenshuai.xi #endif // _OTV_REG_H_
320