GT-64260A Design Guide
Doc. No. MV-S300165-00, Rev. A
CONFIDENTIAL
Copyright © 2002 Marvell
Page 162
Document Classification: Proprietary Information
May 21, 2002, Preliminary
BRG_DEFAULT_BAUD_TUNING_GET(&(cfgTunBrg.tuning),UART_PORT);
brgSetConfig(&cfgTunBrg,UART_PORT); /* set the BRG with defaults values */
/* Halt any Rx/Tx activities */
/* stop the MPSC Rx machines */
GT_REG_WRITE(CHR(UARTPort,2) , ABORT_RECEPTION);
/* workaround for wrong data read from MPSC internal registers. */
/* wait for the Rx to abort in the MPSC machine */
for(tempRegValue=0; tempRegValue<1000; tempR+);
/* Abort SDMA Rx machine */
GT_REG_WRITE(sdmaRxCommandRegister[UARTPort], ABORT_RECEIVE);
/* check that the Rx aborted in the SDMA machine */
GT_REG_READ(sdmaRxCommandRegister[UARTPort],((UINT32*)&commandMpsc));
while(commandMpsc & ABORT_RECEIVE)
{
GT_REG_READ(sdmaRxCommandRegister[UARTPort],((UINT32*)&commandMpsc));
}
/* Abort the SDMA Tx machine */
GT_REG_WRITE(sdmaRxCommandRegister[UARTPort], ABORT_TRANSMIT);
/* Check that the Tx stopped in the SDMA machine */
GT_REG_READ(sdmaRxCommandRegister[UARTPort],((UINT32*)&commandMpsc));
while(commandMpsc & ABORT_TRANSMIT)
{
GT_REG_READ(sdmaRxCommandRegister[UARTPort],((UINT32*)&commandMpsc));
}
/* Set port 0 protocol to be UART */
mpscGetDefaultPortConfig(&TempPortConfig,UART_PORT);
TempPortConfig.protocol = UART_PROTOCOL;
mpscSetPortConfig(&TempPortConfig,UARTPort);
allocStruct.portNumber = UARTPort;
allocStruct.numberOfDescriptors = MIN_NUMBER_OF_UART_RX_DESC_ALLOC;
allocStruct.bufferSize = BUFFER_SIZE_FOR_UART;
allocStruct.priority = PRIO0;