source: svn/newcon3bcm2_21bu/magnum/portinginterface/xpt/7552/bxpt_remux_priv.c

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 3.3 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2003-2010, Broadcom Corporation
3 *     All Rights Reserved
4 *     Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: bxpt_remux_priv.c $
11 * $brcm_Revision: Hydra_Software_Devel/2 $
12 * $brcm_Date: 10/28/10 2:08p $
13 *
14 * Implemtation of the remux module private functions.
15 *
16 * Revision History:
17 *
18 * $brcm_Log: /magnum/portinginterface/xpt/base2/bxpt_remux_priv.c $
19 *
20 * Hydra_Software_Devel/2   10/28/10 2:08p gmullen
21 * SW7422-20: Checkin ported files
22 *
23 * Hydra_Software_Devel/9   9/9/09 8:07a piyushg
24 * SW7630-30: Add 7630 XPT PI support.
25 * Added directory element "7630".
26 *
27 * Hydra_Software_Devel/8   8/11/09 10:40a piyushg
28 * PR55216: Added initial 7340 XPT support.
29 *
30 * Hydra_Software_Devel/7   8/5/09 4:52p piyushg
31 * PR55545: Add 7125 XPT PI support
32 * Added file element "bxpt_rave_ihex.c".
33 * Added file element "bxpt_rave_ihex.h".
34 *
35 * Hydra_Software_Devel/PR55545/1   7/24/09 10:50a mward
36 * PR55548: Adapted for 7125 based on 7342, 7340.
37 *
38 * Hydra_Software_Devel/6   7/14/09 10:22a piyushg
39 * PR56771: Add XPT PI code for 7342.
40 *
41 * Hydra_Software_Devel/5   4/7/09 5:26p piyushg
42 * PR52986: Add support for 7635
43 * Added directory element "7635".
44 *
45 * Hydra_Software_Devel/4   1/27/09 1:10p gmullen
46 * PR51625: Added 7336 support
47 *
48 * Hydra_Software_Devel/3   1/12/09 4:43p gmullen
49 * PR50362: Fixed addressing bug. Some parts have the remux IO registers
50 * outside of the remux block.
51 *
52 * Hydra_Software_Devel/2   11/2/06 8:40a gmullen
53 * PR23189: Added 3563 support.
54 *
55 * Hydra_Software_Devel/1   11/8/05 10:06a gmullen
56 * PR15309: Added private functions for remux.
57 *
58 *
59 ***************************************************************************/
60
61#include "bstd.h"
62#include "bxpt_remux_priv.h"
63#include "bdbg.h"
64#include "bkni.h"
65#include "bxpt_priv.h"
66
67#include "bchp_xpt_rmx0_io.h"
68#include "bchp_xpt_rmx1_io.h"
69
70#include "bchp_xpt_rmx0.h"
71
72static uint32_t ComputeRegAddress(
73        BXPT_Remux_Handle hRmx,                 /* [in] Handle for the remux channel */
74        uint32_t Reg0Addr
75    )
76{
77    uint32_t RegAddr;
78
79    switch( Reg0Addr )
80    {
81        case BCHP_XPT_RMX0_IO_FORMAT:
82        if( hRmx->ChannelNo )
83            RegAddr = BCHP_XPT_RMX1_IO_FORMAT;
84        else
85            RegAddr = BCHP_XPT_RMX0_IO_FORMAT;
86        break;
87
88        case BCHP_XPT_RMX0_IO_PKT_DLY_CNT:
89        if( hRmx->ChannelNo )
90            RegAddr = BCHP_XPT_RMX1_IO_PKT_DLY_CNT;
91        else
92            RegAddr = BCHP_XPT_RMX0_IO_PKT_DLY_CNT;
93        break;
94
95        default:
96        RegAddr = Reg0Addr - BCHP_XPT_RMX0_CTRL + hRmx->BaseAddr;
97        break;
98    }
99   
100    return RegAddr;
101}
102
103void BXPT_Remux_P_WriteReg(
104        BXPT_Remux_Handle hRmx,                 /* [in] Handle for the remux channel */
105        uint32_t Reg0Addr,
106        uint32_t RegVal
107        )
108{
109        BREG_Write32( hRmx->hRegister, ComputeRegAddress( hRmx, Reg0Addr ), RegVal );
110}               
111
112uint32_t BXPT_Remux_P_ReadReg(
113        BXPT_Remux_Handle hRmx,                 /* [in] Handle for the remux channel */
114        uint32_t Reg0Addr
115        )
116{
117        return( BREG_Read32( hRmx->hRegister, ComputeRegAddress( hRmx, Reg0Addr ) ));
118}
119
120
121
122
Note: See TracBrowser for help on using the repository browser.