www.pudn.com > MPC8241BSP.rar > sysNet.c


/* sysNet.c - template system network initialization */ 
 
/* Copyright 1984-2000 Wind River Systems, Inc. */ 
/* Copyright 1999-2000 Motorola, Inc., All Rights Reserved */ 
 
/* 
modification history 
-------------------- 
01a,14apr00,rhk  created (from version 01a of mv5100/sysNet.c). 
*/ 
 
/* 
DESCRIPTION 
 
This library contains board-specific routines for network subsystems. 
*/ 
 
 
/* includes */ 
 
#include "vxWorks.h" 
#include "taskLib.h" 
#include "config.h" 
 
#if defined (INCLUDE_NETWORK) 
 
/* forward declarations */ 
 
#if defined(INCLUDE_NETWORK) && defined(INCLUDE_END) 
    IMPORT void sysPciInit (void); 
#endif /* defined(INCLUDE_NETWORK) && defined(INCLUDE_END) */ 
 
#ifdef INCLUDE_DEVGALNET 
    IMPORT STATUS sysGTPciInit(void); 
#endif 
 
/****************************************************************************** 
* 
* sysNetHwInit - initialize the network interface 
* 
* This routine initializes the network hardware to a quiescent state.  It 
* does not connect interrupts. 
* 
* Only polled mode operation is possible after calling this routine. 
* Interrupt mode operation is possible after the memory system has been 
* initialized and sysNetHwInit2() has been called. 
*/ 
 
void sysNetHwInit (void) 
    { 
    } 
 
 
/****************************************************************************** 
* 
* sysNetHwInit2 - initialize additional features of the network interface 
* 
* This routine completes initialization needed for interrupt mode operation 
* of the network device drivers.  Interrupt handlers can be connected. 
* Interrupt or DMA operations can begin. 
*/ 
 
void sysNetHwInit2 (void) 
    { 
/* 	printf("\n %s(%d) In sysNetHwInit2",__FILE__,__LINE__); 
  sysPciInit();*/ 
#ifdef INCLUDE_DEVGALNET 
  sysGTPciInit(); 
#endif 
    } 
 
#endif /* INCLUDE_NETWORK */ 
 
 
/****************************************************************************** 
* 
* sysLanIntEnable - enable the LAN interrupt 
* 
* This routine enables interrupts at a specified level  
* 
* RETURNS: OK, or ERROR if network support not included. 
* 
* SEE ALSO: sysLanIntDisable() 
*/ 
 
STATUS sysLanIntEnable 
    ( 
    int intLevel 		/* interrupt level to enable */ 
    ) 
    { 
 
#if defined (INCLUDE_NETWORK) 
 
    /* enable the IRQ for LAN */ 
 
    intEnable (intLevel); 
    return (OK); 
#else 
    return (ERROR); 
#endif 
    } 
 
 
/****************************************************************************** 
* 
* sysLanIntDisable - disable the LAN interrupt 
* 
* This routine has been modified and is temporarily a stub. Changes to the WRS 
* 21x40End driver are required to switch from a dedicated interrupt line for the 
* Ethernet chip to the bussed PCI interrupt structure used by the PPMC750. This 
* change is also required to support Ethernet chips resident on PMC sites. WRS 
* has assigned SPR #27879 to track the 21x40End driver change. 
* 
* RETURNS: return of intDisable, or ERROR if network support not included. 
* 
* SEE ALSO: sysLanIntEnable() 
*/ 
 
STATUS sysLanIntDisable 
    ( 
    int intLevel 		/* interrupt level to enable */ 
    ) 
    { 
#if defined (INCLUDE_NETWORK) 
    return (OK); 
#else 
    return (ERROR); 
#endif 
    }