source: svn/trunk/newcon3bcm2_21bu/magnum/portinginterface/aob/7552/baob_priv.h

Last change on this file was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 4.9 KB
Line 
1/******************************************************************************
2 *    (c)2010-2011 Broadcom Corporation
3 *
4 * This program is the proprietary software of Broadcom Corporation and/or its licensors,
5 * and may only be used, duplicated, modified or distributed pursuant to the terms and
6 * conditions of a separate, written license agreement executed between you and Broadcom
7 * (an "Authorized License").  Except as set forth in an Authorized License, Broadcom grants
8 * no license (express or implied), right to use, or waiver of any kind with respect to the
9 * Software, and Broadcom expressly reserves all rights in and to the Software and all
10 * intellectual property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU
11 * HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY
12 * NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE. 
13 * 
14 * Except as expressly set forth in the Authorized License,
15 * 
16 * 1.     This program, including its structure, sequence and organization, constitutes the valuable trade
17 * secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof,
18 * and to use this information only in connection with your use of Broadcom integrated circuit products.
19 * 
20 * 2.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
21 * AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
22 * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
23 * THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES
24 * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE,
25 * LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION
26 * OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF
27 * USE OR PERFORMANCE OF THE SOFTWARE.
28 *
29 * 3.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS
30 * LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR
31 * EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR
32 * USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF
33 * THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT
34 * ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
35 * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF
36 * ANY LIMITED REMEDY.
37 *
38 * $brcm_Workfile: baob_priv.h $
39 * $brcm_Revision: 5 $
40 * $brcm_Date: 12/13/11 1:37p $
41 *
42 * Module Description:
43 *
44 * Revision History:
45 *
46 * $brcm_Log: /AP/ctfe/core/aob/baob_priv.h $
47 *
48 * 5   12/13/11 1:37p mpovich
49 * SW3128-1: Fix integ. compilation issue.
50 *
51 * 4   12/12/11 12:06p farshidf
52 * SW7552-170: new AOB PI
53 *
54 * 3   11/9/11 4:38p farshidf
55 * SW7552-139: adapt the code for magnum support
56 *
57 * 1   12/16/10 6:31p farshidf
58 * SW3128-1: new aob file
59 *
60 *****************************************************************************/
61
62#ifndef BAOB_PRIV_H__
63#define BAOB_PRIV_H__
64
65#ifdef __cplusplus
66extern "C" {
67#endif
68#ifdef LEAP_BASED_CODE
69#define BERR_AOB_ID                              5
70#endif
71#define DEV_MAGIC_ID            ((BERR_AOB_ID<<16) | 0xFACE)
72/***************************************************************************
73Summary:
74    Error Codes specific to BAOB
75
76Description:
77
78See Also:
79
80****************************************************************************/
81#define BAOB_ERR_NOTAVAIL_MODULATION_TYPE       BERR_MAKE_CODE(BERR_AOB_ID, 0)
82#define BAOB_ERR_NOTAVAIL_CHN_NO                BERR_MAKE_CODE(BERR_AOB_ID, 1)
83#define BAOB_ERR_SYMBOLRATE_EXCEEDED            BERR_MAKE_CODE(BERR_AOB_ID, 2)
84
85#define BREG_WriteField(h, Register, Field, Data) \
86  BREG_Write32(h, BCHP_##Register, ((BREG_Read32(h, BCHP_##Register) & \
87  ~((uint32_t)BCHP_MASK(Register, Field))) | \
88  BCHP_FIELD_DATA(Register, Field, Data)))
89
90
91#define BREG_ReadField(h, Register, Field) \
92  ((BREG_Read32(h, BCHP_##Register) & BCHP_MASK(Register,Field)) >> \
93  BCHP_SHIFT(Register,Field))
94
95
96
97/***************************************************************************
98Summary:
99        The handle for OOB  Downstream module.
100
101Description:
102
103See Also:
104        BAOB_Open()
105
106****************************************************************************/
107 
108#ifndef LEAP_BASED_CODE
109typedef struct BAOB_P_Handle
110{
111        BAOB_Settings settings;
112        void *pImpl;                                            /* Device specific structure */
113} BAOB_P_Handle;
114
115
116typedef struct BAOB_P_3x7x_Handle
117{
118    uint32_t                    magicId;                   /* Used to check if structure is corrupt */
119        BCHP_Handle                     hChip;
120    BREG_Handle                 hRegister;
121        BINT_Handle                     hInterrupt;
122        unsigned int            mxChnNo;
123        BTMR_TimerHandle        hTimer;
124        BAOB_Status_t           *pStatus;
125        BAOB_AcqParams_t        *pAcqParam;
126        BKNI_EventHandle        hIntEvent;
127        BAOB_PowerStatus PowerStatus;
128        BAOB_CallbackFunc pCallback[BAOB_Callback_eLast];
129        void *pCallbackParam[BAOB_Callback_eLast];
130} BAOB_P_3x7x_Handle;
131#endif
132
133#ifdef __cplusplus
134}
135#endif
136
137#endif
Note: See TracBrowser for help on using the repository browser.