VxWorks BSP Reference : ads8260

sysLib [ads8260]

NAME

sysLib [ads8260] - Motorola ads 8260 board system-dependent library

ROUTINES

sysSerialHwInit( ) - initialize the BSP serial devices to a quiesent state
sysSerialHwInit2( ) - connect BSP serial device interrupts
sysSerialChanGet( ) - get the SIO_CHAN device associated with a serial channel
sysSerialReset( ) - reset the serail device
m8260IntrInit( ) - initialize the interrupt manager for the PowerPC 8260
m8260IntEnable( ) - enable the indicated interrupt
m8260IntDisable( ) - Disable one of the Level or IRQ interrupts into the SIU
m8260IvecToInum( ) - get the relevant interrupt number
sysClkConnect( ) - connect a routine to the system clock interrupt
sysClkEnable( ) - turn on system clock interrupts
sysClkDisable( ) - turn off system clock interrupts
sysClkRateGet( ) - get the system clock rate
sysClkRateSet( ) - set the system clock rate
sysAuxClkConnect( ) - connect a routine to the auxiliary clock interrupt
sysAuxClkDisable( ) - turn off auxiliary clock interrupts
sysAuxClkEnable( ) - turn on auxiliary clock interrupts
sysAuxClkRateGet( ) - get the auxiliary clock rate
sysAuxClkRateSet( ) - set the auxiliary clock rate
m8260SioDevInit( ) - initialize the SCC
m8260SioResetChannel( ) - initialize an SCC channel
m8260SioInt( ) - handle an SCC interrupt
sysNvRamGet( ) - get the contents of non-volatile RAM
sysNvRamSet( ) - write to non-volatile RAM
sysFlashGet( ) - get the contents of flash memory
sysFlashErase( ) - erase the contents of flash memory
sysFlashWrite( ) - write data to flash memory
sysFlashTypeGet( ) - determine the device type of on-board flash memory
sysFlashUpdate( ) - update the contents of the flash device
sysMotFccEndLoad( ) - load an istance of the motFccEnd driver
sysModel( ) - return the model name of the CPU board
sysBspRev( ) - return the bsp version with the revision eg 1.0/x
sysBaudClkFreq( ) - Obtains frequency of the BRG_CLK in HZ
sysHwInit( ) - initialize the system hardware
sysPhysMemTop( ) - get the address of the top of physical memory
sysMemTop( ) - get the address of the top of VxWorks memory
sysToMonitor( ) - transfer control to the ROM monitor
sysHwInit2( ) - additional system configuration and initialization
sysProcNumGet( ) - get the processor number
sysProcNumSet( ) - set the processor number
sysLocalToBusAdrs( ) - convert a local address to a bus address
sysBusToLocalAdrs( ) - convert a bus address to a local address
sysBusTas( ) - test and set a location across the bus
sysBusClearTas( ) - test and clear
vxImmrGet( ) - return the current IMMR value
sysFccEnetEnable( ) - enable the MII interface to the FCC controller
sysFccEnetDisable( ) - disable MII interface to the FCC controller
sysFccEnetAddrGet( ) - get the hardware Ethernet address
sysFccEnetCommand( ) - issue a command to the Ethernet interface controller
sysFccMiiBitWr( ) - write one bit to the MII interface
sysFccMiiBitRd( ) - read one bit from the MII interface
sysMiiOptRegsHandle( ) - handle some MII optional registers
sysFlashLED( ) - flash one of the signal lamps
sysControlLED( ) - control one of the signal lamps

DESCRIPTION

This library provides board-specific routines. The chip drivers included are:

SEE ALSO

VxWorks Programmer's Guide: Configuration


ads8260 : Routines

sysSerialHwInit( )

NAME

sysSerialHwInit( ) - initialize the BSP serial devices to a quiesent state

SYNOPSIS

void sysSerialHwInit (void)

DESCRIPTION

This routine initializes the BSP serial device descriptors and puts the devices in a quiesent state. It is called from sysHwInit( ) with interrupts locked.

Buffers and Buffer Descriptors for the two channels:

                                                  Address per SCC
                                              ---------------------------
field                                 size    SCC1            SCC2
------                                ------- -----------     -----------
Receive Buffer Descriptor             8 bytes 0x0470_0000     0x0470_0100
Receive Buffer Status                 2 bytes 0x0470_0000     0x0470_0100
Receive Buffer Length                 2 bytes 0x0470_0002     0x0470_0102
Pointer to Receive Buffer             4 bytes 0x0470_0004     0x0470_0104
Receive Buffer                        1 bytes 0x0470_0040     0x0470_0140

Transmit Buffer Descriptor            8 bytes 0x0470_0008     0x0470_0108
Transmit Buffer Status                2 bytes 0x0470_0008     0x0470_0108
Transmit Buffer Length                2 bytes 0x0470_000A     0x0470_010A
Transmit to Receive Buffer            4 bytes 0x0470_000C     0x0470_010C
Transmit Buffer                       1 bytes 0x0470_0060     0x0470_0160

RETURNS

N/A

SEE ALSO

sysLib


ads8260 : Routines

sysSerialHwInit2( )

NAME

sysSerialHwInit2( ) - connect BSP serial device interrupts

SYNOPSIS

void sysSerialHwInit2 (void)

DESCRIPTION

This routine connects the BSP serial device interrupts. It is called from sysHwInit2( ). Serial device interrupts could not be connected in sysSerialHwInit( ) because the kernel memory allocator was not initialized at that point, and intConnect( ) calls malloc( ).

RETURNS

N/A

SEE ALSO

sysLib


ads8260 : Routines

sysSerialChanGet( )

NAME

sysSerialChanGet( ) - get the SIO_CHAN device associated with a serial channel

SYNOPSIS

SIO_CHAN * sysSerialChanGet
    (
    int channel               /* serial channel */
    )

DESCRIPTION

This routine gets the SIO_CHAN device associated with a specified serial channel.

RETURNS

A pointer to the SIO_CHAN structure for the channel, or ERROR if the channel is invalid.

SEE ALSO

sysLib


ads8260 : Routines

sysSerialReset( )

NAME

sysSerialReset( ) - reset the serail device

SYNOPSIS

void sysSerialReset (void)

DESCRIPTION

This function calls sysSerialHwInit( ) to reset the serail device

RETURNS

N/A

SEE ALSO

sysLib


ads8260 : Routines

m8260IntrInit( )

NAME

m8260IntrInit( ) - initialize the interrupt manager for the PowerPC 8260

SYNOPSIS

STATUS m8260IntrInit ()

DESCRIPTION

This routine connects the default demultiplexer, m8260IntrDeMux( ), to the external interrupt vector and associates all interrupt sources with the default interrupt handler. This routine is called by sysHwInit( ) in sysLib.c.

NOTE

All interrupt from the SIU unit are enabled, CICR is setup so that SCC1 has the highest relative interrupt priority, through SCC4 with the lowest.

RETURN

OK always

SEE ALSO

sysLib


ads8260 : Routines

m8260IntEnable( )

NAME

m8260IntEnable( ) - enable the indicated interrupt

SYNOPSIS

int m8260IntEnable
    (
    int intNum                /* interrupt level to enable */
    )

DESCRIPTION

This routine will enable the indicated interrupt by setting the appropriate bit in the SIU Interrupt Mask Registers.

The design of the 8260 presents the following design requirements:

1. the mapping from interrupt number to mask bit can not be represented by
   a function. An array, indexed by interrupt number (INUM), is used to map
   the interrupt number to the appropriate mask. 

2. There are two 32 bit mask registers (SIMR_L and SIMR_H). The interrupt
   number must be compared to 4 ranges to determine which register contains
   its mask bit:

  interrupt number
  in m8260IntrCtl.h       register
  ----------------        -------
  0-15                    SIMR_L
  16-31                   SIMR_H
  32-47                   SIMR_L
  48-63                   SIMR_H

RETURNS

0, always.

SEE ALSO

sysLib


ads8260 : Routines

m8260IntDisable( )

NAME

m8260IntDisable( ) - Disable one of the Level or IRQ interrupts into the SIU

SYNOPSIS

int m8260IntDisable
    (
    int intNum                /* interrupt level to disable */
    )

DESCRIPTION

This routine will mask the bit in the SIMASK register corresponding to the requested interrupt level.

RETURNS

0, always.

SEE ALSO

sysLib


ads8260 : Routines

m8260IvecToInum( )

NAME

m8260IvecToInum( ) - get the relevant interrupt number

SYNOPSIS

int m8260IvecToInum
    (
    VOIDFUNCPTR * vector      /* interrupt vector to attach to */
    )

DESCRIPTION

This routine finds out the interrupt number associated with the vector in vector.

vector types are defined in h/drv/intrClt/m8260Intr.h.

RETURNS

the interrupt number for the vector

SEE ALSO

sysLib, m8260Intr.h


ads8260 : Routines

sysClkConnect( )

NAME

sysClkConnect( ) - connect a routine to the system clock interrupt

SYNOPSIS

STATUS sysClkConnect
    (
    FUNCPTR routine,          /* routine to connect */
    int     arg               /* argument for the routine */
    )

DESCRIPTION

This routine specifies the interrupt service routine to be called at each clock interrupt. Normally, it is called from usrRoot( ) in usrConfig.c to connect usrClock( ) to the system clock interrupt.

RETURNS

OK, or ERROR if the routine cannot be connected to the interrupt.

SEE ALSO

sysLib, intConnect( ), usrClock( ), sysClkEnable( )


ads8260 : Routines

sysClkEnable( )

NAME

sysClkEnable( ) - turn on system clock interrupts

SYNOPSIS

void sysClkEnable (void)

DESCRIPTION

This routine enables system clock interrupts.

RETURNS

N/A

SEE ALSO

sysLib, sysClkConnect( ), sysClkDisable( ), sysClkRateSet( )


ads8260 : Routines

sysClkDisable( )

NAME

sysClkDisable( ) - turn off system clock interrupts

SYNOPSIS

void sysClkDisable (void)

DESCRIPTION

This routine disables system clock interrupts.

RETURNS

N/A

SEE ALSO

sysLib, sysClkEnable( )


ads8260 : Routines

sysClkRateGet( )

NAME

sysClkRateGet( ) - get the system clock rate

SYNOPSIS

int sysClkRateGet (void)

DESCRIPTION

This routine returns the system clock rate.

RETURNS

The number of ticks per second of the system clock.

SEE ALSO

sysLib, sysClkEnable( ), sysClkRateSet( )


ads8260 : Routines

sysClkRateSet( )

NAME

sysClkRateSet( ) - set the system clock rate

SYNOPSIS

STATUS sysClkRateSet
    (
    int ticksPerSecond        /* number of clock interrupts per second */
    )

DESCRIPTION

This routine sets the interrupt rate of the system clock. It is called by usrRoot( ) in usrConfig.c.

RETURNS

OK, or ERROR if the tick rate is invalid or the timer cannot be set.

SEE ALSO

sysLib, sysClkEnable( ), sysClkRateGet( )


ads8260 : Routines

sysAuxClkConnect( )

NAME

sysAuxClkConnect( ) - connect a routine to the auxiliary clock interrupt

SYNOPSIS

STATUS sysAuxClkConnect
    (
    FUNCPTR routine,          /* routine called at each aux. clock interrupt */
    int     arg               /* argument to auxiliary clock interrupt */
                              /* routine */ 
    )

DESCRIPTION

This routine specifies the interrupt service routine to be called at each auxiliary clock interrupt. It does not enable auxiliary clock interrupts.

RETURNS

OK, or ERROR if the routine cannot be connected to the interrupt.

SEE ALSO

sysLib, intConnect( ), sysAuxClkEnable( )


ads8260 : Routines

sysAuxClkDisable( )

NAME

sysAuxClkDisable( ) - turn off auxiliary clock interrupts

SYNOPSIS

void sysAuxClkDisable (void)

DESCRIPTION

This routine disables auxiliary clock interrupts.

RETURNS

N/A

SEE ALSO

sysLib, sysAuxClkEnable( )


ads8260 : Routines

sysAuxClkEnable( )

NAME

sysAuxClkEnable( ) - turn on auxiliary clock interrupts

SYNOPSIS

void sysAuxClkEnable (void)

DESCRIPTION

This routine enables auxiliary clock interrupts. The timer is used in "reference mode" i.e. a value is programmed into the reference register and an interrupt occurs when the timer reaches that value.

RETURNS

N/A

SEE ALSO

sysLib, sysAuxClkConnect( ), sysAuxClkDisable( ), sysAuxClkRateSet( )


ads8260 : Routines

sysAuxClkRateGet( )

NAME

sysAuxClkRateGet( ) - get the auxiliary clock rate

SYNOPSIS

int sysAuxClkRateGet (void)

DESCRIPTION

This routine returns the interrupt rate of the auxiliary clock.

RETURNS

The number of ticks per second of the auxiliary clock.

SEE ALSO

sysLib, sysAuxClkEnable( ), sysAuxClkRateSet( )


ads8260 : Routines

sysAuxClkRateSet( )

NAME

sysAuxClkRateSet( ) - set the auxiliary clock rate

SYNOPSIS

STATUS sysAuxClkRateSet
    (
    int ticksPerSecond        /* number of clock interrupts per second */
    )

DESCRIPTION

This routine sets the interrupt rate of the auxiliary clock. It does not enable auxiliary clock interrupts.

RETURNS

OK, or ERROR if the tick rate is invalid or the timer cannot be set.

SEE ALSO

sysLib, sysAuxClkEnable( ), sysAuxClkRateGet( )


ads8260 : Routines

m8260SioDevInit( )

NAME

m8260SioDevInit( ) - initialize the SCC

SYNOPSIS

void m8260SioDevInit
    (
    M8260_SCC_CHAN * pSccChan
    )

DESCRIPTION

This routine is called to initialize the chip to a quiescent state. Note that the sccNum field of M8260_SCC_CHAN must be less than or equal to the maximum number of SCC channels to configure as SIOs, as defined in ads8260.h

SEE ALSO

sysLib


ads8260 : Routines

m8260SioResetChannel( )

NAME

m8260SioResetChannel( ) - initialize an SCC channel

SYNOPSIS

void m8260SioResetChannel
    (
    M8260_SCC_CHAN * pSccChan
    )

DESCRIPTION

This routines initializes an SCC channel. Initialized are:

       CPCR
       BRGC
       Baud rate
       Buffer Descriptors
       RBASE field in SCC Parameter RAM
       TBASE field in SCC Parameter RAM
       RFCR field in SCC Parameter RAM
       TFCR field in SCC Parameter RAM
       MRBLR field in SCC Parameter RAM
       
       SCC mode registers: GSMR_L, GSMR_H, AND PSMR
       transmit and receive interrupts are enabled in SCCM 

RETURNS: NA

SEE ALSO

sysLib


ads8260 : Routines

m8260SioInt( )

NAME

m8260SioInt( ) - handle an SCC interrupt

SYNOPSIS

void m8260SioInt
    (
    M8260_SCC_CHAN * pSccChan
    )

DESCRIPTION

This routine is called to handle SCC interrupts.

RETURNS

NA

SEE ALSO

sysLib


ads8260 : Routines

sysNvRamGet( )

NAME

sysNvRamGet( ) - get the contents of non-volatile RAM

SYNOPSIS

STATUS sysNvRamGet
    (
    char * string,            /* where to copy non-volatile RAM */
    int    strLen,            /* maximum number of bytes to copy */
    int    offset             /* byte offset into non-volatile RAM */
    )

DESCRIPTION

This routine copies the contents of non-volatile memory into a specified string. The string is terminated with an EOS.

NOTE

This routine has no effect, since there is no non-volatile RAM.

RETURNS

ERROR, always.

SEE ALSO

sysLib, sysNvRamSet( )


ads8260 : Routines

sysNvRamSet( )

NAME

sysNvRamSet( ) - write to non-volatile RAM

SYNOPSIS

STATUS sysNvRamSet
    (
    char * string,            /* string to be copied into non-volatile RAM */
    int    strLen,            /* maximum number of bytes to copy */
    int    offset             /* byte offset into non-volatile RAM */
    )

DESCRIPTION

This routine copies a specified string into non-volatile RAM.

NOTE

This routine has no effect, since there is no non-volatile RAM.

RETURNS

ERROR, always.

SEE ALSO

sysLib, sysNvRamGet( )


ads8260 : Routines

sysFlashGet( )

NAME

sysFlashGet( ) - get the contents of flash memory

SYNOPSIS

STATUS sysFlashGet
    (
    UCHAR * string,           /* where to copy flash memory */
    UINT32  strLen,           /* maximum number of bytes to copy */
    UINT32  offset            /* byte offset into flash memory */
    )

DESCRIPTION

This routine copies the contents of flash memory into a specified string. The string is terminated with an EOS.

RETURNS

OK, or ERROR if access is outside the flash memory range.

SEE ALSO

sysLib, sysFlashSet( )


ads8260 : Routines

sysFlashErase( )

NAME

sysFlashErase( ) - erase the contents of flash memory

SYNOPSIS

STATUS sysFlashErase
    (
    UINT32 offset             /* offset from flash base address */
    )

DESCRIPTION

This routine clears the contents of flash memory from the specified offset up to the top.

Flash 28F016 devices support block erase mode. This means each of the 32 64-KByte blocks is erased by writing a flash erase command to the device at any address within the target block, and verifying that the operation completed successfully.

RETURNS

OK, or ERROR if the contents of flash memory cannot be erased.

SEE ALSO

sysLib


ads8260 : Routines

sysFlashWrite( )

NAME

sysFlashWrite( ) - write data to flash memory

SYNOPSIS

STATUS sysFlashWrite
    (
    UINT32 * pFB,             /* string to be copied; use value if NULL */
    UINT32   size,            /* size to program in bytes */
    UINT32   offset,          /* byte offset into flash memory */
    UINT32   value            /* value to program */
    )

DESCRIPTION

This routine copies specified data of a specified length, size, into a specified offset, offset, in the flash memory. Data is passed as a string, pFB, if not NULL. If NULL, data is taken as a repeated sequence of value. The parameter offset must be appropriately aligned for the width of the Flash devices in use.

Flash 28F016 devices are programmed by a sequence of operations:

RETURNS

OK, or ERROR if the write operation fails.

SEE ALSO

sysLib, sysFlashSet( )


ads8260 : Routines

sysFlashTypeGet( )

NAME

sysFlashTypeGet( ) - determine the device type of on-board flash memory

SYNOPSIS

UINT8 sysFlashTypeGet (void)

DESCRIPTION

This routine uses the read identifier code command to determine the device type of * on-board flash memory. The returned value should be the one in drv/mem/flash28.h

RETURNS

An integer indicating the device type of on-board flash memory.

SEE ALSO

sysLib


ads8260 : Routines

sysFlashUpdate( )

NAME

sysFlashUpdate( ) - update the contents of the flash device

SYNOPSIS

STATUS sysFlashUpdate
    (
    UCHAR * filename          /* file to be copied into flash memory */
    )

DESCRIPTION

This code allows the user to overwrite the flash device with data from a file. It will copy data from "filename" to the flash device. It first erase the device, and it attempts to write data to the flash device via sysFlashWrite ().

The user should pass a binary bootrom file, for example to update the bootrom with a VxWorks BSP bootrom image:

      % make bootrom
        make: `bootrom' is up to date.
      % elfToBin < bootrom > bootrom.bin

-> sysUpdateFlash ("hostname:/tmp/bootrom.bin")
The flash has been updated without error.

RETURNS

OK, or ERROR: if the file was not accessable, the file was too large to fit into the flash, the buffers cannot be allocated, sysFlashErase () or sysFlashWrite () returned error.

SEE ALSO

sysLib, sysFlashErase( ), sysFlashGet( ), sysFlashTypeGet( ), sysFlashWrite( )


ads8260 : Routines

sysMotFccEndLoad( )

NAME

sysMotFccEndLoad( ) - load an istance of the motFccEnd driver

SYNOPSIS

END_OBJ * sysMotFccEndLoad
    (
    char * pParamStr,         /* ptr to initialization parameter string */
    void * unused             /* unused optional argument */
    )

DESCRIPTION

This routine loads the motFccEnd driver with proper parameters. It also reads the BCSR3 to find out which type of processor is being used, and sets up the load string accordingly.

The END device load string formed by this routine is in the following format. immrVal:fccNum:bdBase:bdSize:bufBase:bufSize:fifoTxBase :fifoRxBase:tbdNum:rbdNum:phyAddr:phyDefMode:pAnOrderTbl: userFlags

immrVal
Internal memory address
fccNum
FCC number being used
bdBase
buffer descriptors base address
bdSize
buffer descriptors space size
bufBase
data buffers base address
bufSize
data buffers space size
fifoTxBase
tx buffer in internal memory
fifoRxBase
rx buffer in internal memory
tbdNum
number of TBDs or NONE
rbdNum
number of RBDs or NONE
phyAddr
address of a MII-compliant PHY device
phyDefMode
default operating mode of a MII-compliant PHY device
pAnOrderTbl
auto-negotiation order table for a MII-compliant PHY device or NONE

This routine only loads and initializes one instance of the device. If the user wishes to use more than one motFccEnd devices, this routine should be changed.

RETURNS

pointer to END object or NULL.

SEE ALSO

sysLib, motFccEndLoad ()


ads8260 : Routines

sysModel( )

NAME

sysModel( ) - return the model name of the CPU board

SYNOPSIS

char * sysModel (void)

DESCRIPTION

This routine returns the model name of the CPU board.

RETURNS

A pointer to the string.

SEE ALSO

sysLib


ads8260 : Routines

sysBspRev( )

NAME

sysBspRev( ) - return the bsp version with the revision eg 1.0/x

SYNOPSIS

char * sysBspRev (void)

DESCRIPTION

This function returns a pointer to a bsp version with the revision. for eg. 1.0/x. BSP_REV defined in config.h is concatanated to BSP_VERSION and returned.

RETURNS

A pointer to the BSP version/revision string.

SEE ALSO

sysLib


ads8260 : Routines

sysBaudClkFreq( )

NAME

sysBaudClkFreq( ) - Obtains frequency of the BRG_CLK in HZ

SYNOPSIS

int sysBaudClkFreq (void)

DESCRIPTION

From page 9-5 in Rev. 0 MPC8260 PowerQUICC II User's Manual

    baud clock = 2*cpm_freq/2^2*(DFBRG+1) where DFBRG = 01
               = 2*cpm_freq/16

RETURNS

frequency of the BRG_CLK in HZ

SEE ALSO

sysLib


ads8260 : Routines

sysHwInit( )

NAME

sysHwInit( ) - initialize the system hardware

SYNOPSIS

void sysHwInit (void)

DESCRIPTION

This routine initializes various feature of the MPC8260 ADS board. It sets up the control registers, initializes various devices if they are present.

NOTE

This routine should not be called directly by the user.

RETURNS

NA

SEE ALSO

sysLib


ads8260 : Routines

sysPhysMemTop( )

NAME

sysPhysMemTop( ) - get the address of the top of physical memory

SYNOPSIS

char * sysPhysMemTop (void)

DESCRIPTION

This routine returns the address of the first missing byte of memory, which indicates the top of memory.

RETURNS

The address of the top of physical memory.

SEE ALSO

sysLib, sysMemTop( )


ads8260 : Routines

sysMemTop( )

NAME

sysMemTop( ) - get the address of the top of VxWorks memory

SYNOPSIS

char * sysMemTop (void)

DESCRIPTION

This routine returns a pointer to the first byte of memory not controlled or used by VxWorks.

The user can reserve memory space by defining the macro USER_RESERVED_MEM in config.h. This routine returns the address of the reserved memory area. The value of USER_RESERVED_MEM is in bytes.

RETURNS

The address of the top of VxWorks memory.

SEE ALSO

sysLib


ads8260 : Routines

sysToMonitor( )

NAME

sysToMonitor( ) - transfer control to the ROM monitor

SYNOPSIS

STATUS sysToMonitor
    (
    int startType             /* parameter passed to ROM to tell it how */
                              /* to boot */ 
    )

DESCRIPTION

This routine transfers control to the ROM monitor. Normally, it is called only by reboot( )--which services ^X--and bus errors at interrupt level. However, in some circumstances, the user may wish to introduce a startType to enable special boot ROM facilities.

RETURNS

Does not return.

SEE ALSO

sysLib


ads8260 : Routines

sysHwInit2( )

NAME

sysHwInit2( ) - additional system configuration and initialization

SYNOPSIS

void sysHwInit2 (void)

DESCRIPTION

This routine connects system interrupts and does any additional configuration necessary.

RETURNS

NA

SEE ALSO

sysLib


ads8260 : Routines

sysProcNumGet( )

NAME

sysProcNumGet( ) - get the processor number

SYNOPSIS

int sysProcNumGet (void)

DESCRIPTION

This routine returns the processor number for the CPU board, which is set with sysProcNumSet( ).

RETURNS

The processor number for the CPU board.

SEE ALSO

sysLib, sysProcNumSet( )


ads8260 : Routines

sysProcNumSet( )

NAME

sysProcNumSet( ) - set the processor number

SYNOPSIS

void sysProcNumSet
    (
    int procNum               /* processor number */
    )

DESCRIPTION

This routine sets the processor number for the CPU board. Processor numbers should be unique on a single backplane.

Not applicable for the busless 8260Ads.

RETURNS

NA

SEE ALSO

sysLib, sysProcNumGet( )


ads8260 : Routines

sysLocalToBusAdrs( )

NAME

sysLocalToBusAdrs( ) - convert a local address to a bus address

SYNOPSIS

STATUS sysLocalToBusAdrs
    (
    int      adrsSpace,       /* bus address space where busAdrs resides */
    char *   localAdrs,       /* local address to convert */
    char * * pBusAdrs         /* where to return bus address */
    )

DESCRIPTION

This routine gets the VMEbus address that accesses a specified local memory address.

Not applicable for the 8260Ads

RETURNS

ERROR, always.

SEE ALSO

sysLib, sysBusToLocalAdrs( )


ads8260 : Routines

sysBusToLocalAdrs( )

NAME

sysBusToLocalAdrs( ) - convert a bus address to a local address

SYNOPSIS

STATUS sysBusToLocalAdrs
    (
    int      adrsSpace,       /* bus address space where busAdrs resides */
    char *   busAdrs,         /* bus address to convert */
    char * * pLocalAdrs       /* where to return local address */
    )

DESCRIPTION

This routine gets the local address that accesses a specified VMEbus physical memory address.

Not applicable for the 8260Ads

RETURNS

ERROR, always.

SEE ALSO

sysLib, sysLocalToBusAdrs( )


ads8260 : Routines

sysBusTas( )

NAME

sysBusTas( ) - test and set a location across the bus

SYNOPSIS

BOOL sysBusTas
    (
    char * adrs               /* address to be tested-and-set */
    )

DESCRIPTION

This routine does an atomic test-and-set operation across the backplane.

Not applicable for the 8260Ads.

RETURNS

FALSE, always.

SEE ALSO

sysLib, vxTas( )


ads8260 : Routines

sysBusClearTas( )

NAME

sysBusClearTas( ) - test and clear

SYNOPSIS

void sysBusClearTas
    (
    volatile char * address   /* address to be tested-and-cleared */
    )

DESCRIPTION

This routine is a null function.

RETURNS

NA

SEE ALSO

sysLib


ads8260 : Routines

vxImmrGet( )

NAME

vxImmrGet( ) - return the current IMMR value

SYNOPSIS

UINT32 vxImmrGet (void)

DESCRIPTION

This routine returns the current IMMR value

RETURNS

current IMMR value

SEE ALSO

sysLib


ads8260 : Routines

sysFccEnetEnable( )

NAME

sysFccEnetEnable( ) - enable the MII interface to the FCC controller

SYNOPSIS

STATUS sysFccEnetEnable
    (
    UINT32 immrVal,           /* base address of the on-chip RAM */
    UINT8  fccNum             /* FCC being used */
    )

DESCRIPTION

This routine is expected to perform any target specific functions required to enable the Ethernet device and to connect the MII interface to the FCC.

RETURNS

OK, or ERROR if the FCC controller cannot be enabled.

SEE ALSO

sysLib


ads8260 : Routines

sysFccEnetDisable( )

NAME

sysFccEnetDisable( ) - disable MII interface to the FCC controller

SYNOPSIS

STATUS sysFccEnetDisable
    (
    UINT32 immrVal,           /* base address of the on-chip RAM */
    UINT8  fccNum             /* FCC being used */
    )

DESCRIPTION

This routine is expected to perform any target specific functions required to disable the Ethernet device and the MII interface to the FCC controller. This involves restoring the default values for all the Port B and C signals.

RETURNS

OK, always.

SEE ALSO

sysLib


ads8260 : Routines

sysFccEnetAddrGet( )

NAME

sysFccEnetAddrGet( ) - get the hardware Ethernet address

SYNOPSIS

STATUS sysFccEnetAddrGet
    (
    UINT32  immrVal,          /* base address of the on-chip RAM */
    UINT8   fccNum,           /* FCC being used */
    UCHAR * addr              /* where to copy the Ethernet address */
    )

DESCRIPTION

This routine provides the six byte Ethernet hardware address that will be used by each individual FCC device unit. This routine must copy the six byte address to the space provided by addr.

RETURNS

OK, or ERROR if the Ethernet address cannot be returned.

SEE ALSO

sysLib


ads8260 : Routines

sysFccEnetCommand( )

NAME

sysFccEnetCommand( ) - issue a command to the Ethernet interface controller

SYNOPSIS

STATUS sysFccEnetCommand
    (
    UINT32 immrVal,           /* base address of the on-chip RAM */
    UINT8  fccNum,            /* FCC being used */
    UINT16 command
    )

DESCRIPTION

RETURNS

OK, or ERROR if the Ethernet controller could not be restarted.

SEE ALSO

sysLib


ads8260 : Routines

sysFccMiiBitWr( )

NAME

sysFccMiiBitWr( ) - write one bit to the MII interface

SYNOPSIS

STATUS sysFccMiiBitWr
    (
    UINT32 immrVal,           /* base address of the on-chip RAM */
    UINT8  fccNum,            /* FCC being used */
    INT32  bitVal             /* the bit being written */
    )

DESCRIPTION

This routine writes the value in bitVal to the MDIO line of a MII interface. The MDC line is asserted for a while, and then negated. If bitVal is NONE, then the MDIO pin should be left in high-impedance state.

SEE ALSO

sysLib, sysFccMiiBitRd( )

RETURNS

OK, or ERROR.


ads8260 : Routines

sysFccMiiBitRd( )

NAME

sysFccMiiBitRd( ) - read one bit from the MII interface

SYNOPSIS

STATUS sysFccMiiBitRd
    (
    UINT32 immrVal,           /* base address of the on-chip RAM */
    UINT8  fccNum,            /* FCC being used */
    INT8 * bitVal             /* the bit being read */
    )

DESCRIPTION

This routine reads one bit from the MDIO line of a MII interface. The MDC line is asserted for a while, and then negated.

SEE ALSO

sysLib, sysFccMiiBitWr( )

RETURNS

OK, or ERROR.


ads8260 : Routines

sysMiiOptRegsHandle( )

NAME

sysMiiOptRegsHandle( ) - handle some MII optional registers

SYNOPSIS

STATUS sysMiiOptRegsHandle
    (
    PHY_INFO * pPhyInfo       /* PHY control structure pointer */
    )

DESCRIPTION

This routine handles some MII optional registers in the PHY described by pPhyInfo.

In the case of the ads8260, the PHY that implements the physical layer for the FCC is an LXT970. The default values for some of its chip-specific registers seem to be uncompatible with 100Base-T operations. This routine is expected to perform any PHY-specific functions required to bring the PHY itself to a state where 100Base-T operations may be possible.

SEE ALSO

sysLib, miiLib, motFccEnd.

RETURNS

OK, or ERROR.


ads8260 : Routines

sysFlashLED( )

NAME

sysFlashLED( ) - flash one of the signal lamps

SYNOPSIS

void sysFlashLED
    (
    int LED                   /* bitmap of LED to flash */
    )

DESCRIPTION

This routine will flash the indicated signal lamp for about 1/4 second

SEE ALSO

sysLib,

RETURNS

NA


ads8260 : Routines

sysControlLED( )

NAME

sysControlLED( ) - control one of the signal lamps

SYNOPSIS

void sysControlLED
    (
    int LED,                  /* bitmap of LED to control */
    int on                    /* if TRUE turn LED ON; otherwise, turn LED OFF */
    )

DESCRIPTION

This routine will turn the indicated signal lamp on or off, as requested

SEE ALSO

sysLib,

RETURNS

NA