GT-64260A Design Guide
Doc. No. MV-S300165-00, Rev. A
CONFIDENTIAL
Copyright © 2002 Marvell
Page 160
Document Classification: Proprietary Information
May 21, 2002, Preliminary
for(i = 0 ; i <Transmit->bufferNum ; i++)
{
pCurrTxDesc->bytecnt = Transmit->bufferLen[i];
pCurrTxDesc->buf_ptr = VIRTUAL_TO_PHY(Transmit->buffer[i]);
pCurrTxDesc->shadowOwner = SHADOW_OWNER_BY_CPU;
pCurrTxDesc->pointerToRxQueue = (UINT32)Transmit;
if(i != 0)
*(UINT32*)(&(pCurrTxDesc->cmd_sts)) = ENABLE_INTERRUPT | OWNER_BY_GT;
pLastTxDesc = pCurrTxDesc;
pCurrTxDesc = (TX_DESC*)PHY_TO_VIRTUAL(pCurrTxDesc->next_desc_ptr);
}
*(UINT32*)(&(pLastTxDesc->cmd_sts)) = *(UINT32*)(&(pLastTxDesc->cmd_sts)) | LAST |
OWNER_BY_GT | GENERATE_CRC;
*(UINT32*)(&(pFirstTxDesc->cmd_sts)) = *(UINT32*)(&(pFirstTxDesc->cmd_sts)) |
OWNER_BY_GT;
/* send the packet out using the Ethernet SDMA machine */
sdmaSendPackets(ETHERNET_PROTOCOL,PRIO0,
ETHERNET_DOWNLOADING_PORT,(UINT32*)(&(pFirstTxDesc->cmd_sts)));
/* update the current descriptor */
sdmaTxCurrentDescriptors[ETHERNET_DOWNLOADING_TX_PORT] =
(UINT32*)PHY_TO_VIRTUAL(pLastTxDesc->next_desc_ptr);
return OK;
}
E.3 MPSC API
mpscLow.c: MPSC register manipulation.
mpscLow.h: MPSC function and structs declaration.
mpsc.c: Initialize MPSC port engines.
mpsc.h: MPSC structs and functions declaration.
brgLow.c , brg.c : BRG Register manipulation and initializations.
brgLow.h, brg.h: BRG function and structure declaration.
sdmaLow.c: SDMA register manipulation and initializations.
sdmaLow.h: SDMA functions and structures declaration.
sdma.c: SDMA memory allocation and transmit packet routines.