⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dpx_hw.c

📁 交换机中常用芯片链路复用7350的驱动源代码(vxworks中实现)
💻 C
字号:
/******************************************************************************/
/**  COPYRIGHT (C) 1999 PMC-SIERRA, INC. ALL RIGHTS RESERVED.                **/
/**--------------------------------------------------------------------------**/
/** This software embodies materials and concepts which are proprietary and  **/
/** confidential to PMC-Sierra, Inc.                                         **/
/** PMC-Sierra distributes this software to its customers pursuant to the    **/ 
/** terms and conditions of the Device Driver Software License Agreement     **/ 
/** contained in the text file software.lic that is distributed along with   **/ 
/** the device driver software. This software can only be utilized if all    **/ 
/** terms and conditions of the Device Driver Software License Agreement are **/ 
/** accepted. If there are any questions, concerns, or if the Device Driver  **/
/** Software License Agreement text file, software.lic, is missing please    **/
/** contact PMC-Sierra for assistance.                                       **/
/**--------------------------------------------------------------------------**/
/**                                                                          **/
/******************************************************************************/
/*******************************************************************************
**    MODULE     : Duplex device drivers source file for accessing hardware
**                 interface
**
**    FILE       : Dpx_hwif.c
**      
**    DESCRIPTION: This file contains system specific code. User should modify
**                 the code to reflect your system configuration.
**
**
**    NOTES      :
**
*******************************************************************************/
/* 
**    MODIFICATION HISTORY:
**
** $Log: dpx_hw.c.rca $
** 
**  Revision: 1.1 Wed Aug 16 16:22:17 2000 bhalwani
**    Beta-1.0
**
** 
**  4   06/15/00    Bhalwani        Vortex chipset driver beta-1.0
**  3   06/15/00    Bhalwani        Vortex chipset driver Alpha-1.30
**  2   02/11/00    chenkemi        alpha-001
**  1   07/19/99    chenkemi        Initial Version
**
**  9   07/19/99    chenkemi        Beta-1.0
**  8   07/19/99    chenkemi        removed path reference for syspci.h header file
**  7   07/16/99    chenkemi        added the MINTE clear before  setting  the CPLD 
**                                  interrupt mask bit.
**  6   06/15/99    chenkemi        added board-specific code, to get the chip out of 
**                                  reset.
**  5   05/28/99    chenkemi        fixed the return for error code
**  4   05/27/99    chenkemi        Re-organized header files
**  3   05/19/99    chenkemi        code cleanup after code review
**  2   03/26/99    chenkemi        added statistical couns data structure and API.
**  1   03/02/99    chenkemi        Initial Version
**
*/



/** include files **/
#include <string.h>
#include "dpx_api.h"
#include "sysPci.h"

/** external functions **/

/** external data **/

/** public data **/

/** public functions **/

/** private data **/

/** private functions **/



/*******************************************************************************
**
**  sysDuplexDeviceDetect
**  ___________________________________________________________________________ 
**
**  DESCRIPTION:   Detect if any duplex device at certian slot. It may be 
**                 modified to reflect a particular system configuration.  
**                 For driver internal use only
**
**  VALID STATES:  Not applicable
**
**  SIDE EFFECTS:  None.
**
**  INPUTS:        usrCtxt - user context contain slot number and device ID.
**
**  OUTPUTS:	   pu4BaseAddr - pointer to the device base address
**                 ppSysInfo - pointer to the SysInfo structure
**
**  RETURN CODES:  DPX_SUCCESS (Successful)
**                 DPX_ERR_DEV_NOT_DETECTED (device not detected)
**
*******************************************************************************/
INT4 sysDuplexDeviceDetect(DPX_USR_CTXT usrCtxt, VOID **ppSysInfo,
                           UINT4 *pu4BaseAddr) 
{
    UINT4           u4RegAddr;  
    sVCS_DEV_CTXT  *psDevCtxt;
   
    /* usrCtxt contains the sVCS_SYS_BADDR structure */ 
    psDevCtxt =  (sVCS_DEV_CTXT *)usrCtxt;
   
    /* get the base address and sysInfo pointer */
    *pu4BaseAddr = psDevCtxt->u4BaseAddr; 
    *ppSysInfo   = psDevCtxt->pSysInfo;
                   

                   
    /* As a pre-caution step, First clear MINTE bit of DUPLEX register */
    u4RegAddr = psDevCtxt->u4BaseAddr + 0x01;
    sysDuplexRawWrite((INT1 *)u4RegAddr, 0x02);
                      
    return(DPX_SUCCESS);
    
}    



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -