Line 964... |
Line 964... |
spwamba_write(SPWAMBA_REG_RXDMA, (unsigned int)rxdesctable);
|
spwamba_write(SPWAMBA_REG_RXDMA, (unsigned int)rxdesctable);
|
spwamba_write(SPWAMBA_REG_CONTROL, SPWAMBA_CONTROL_RXDMA);
|
spwamba_write(SPWAMBA_REG_CONTROL, SPWAMBA_CONTROL_RXDMA);
|
|
|
/* wait until second packet received */
|
/* wait until second packet received */
|
v = spwamba_read(SPWAMBA_REG_STATUS);
|
v = spwamba_read(SPWAMBA_REG_STATUS);
|
for (i = 0; i < 12000 && (v & 0x800) == 0; i++)
|
for (i = 0; i < 32000 && (v & 0x800) == 0; i++)
|
v = spwamba_read(SPWAMBA_REG_STATUS);
|
v = spwamba_read(SPWAMBA_REG_STATUS);
|
CHECK_VALUE("reg_status", v, 0x7843);
|
CHECK_VALUE("reg_status", v, 0x7843);
|
spwamba_write(SPWAMBA_REG_STATUS, v);
|
spwamba_write(SPWAMBA_REG_STATUS, v);
|
|
|
/* check completed descriptors */
|
/* check completed descriptors */
|
Line 995... |
Line 995... |
spwamba_write(SPWAMBA_REG_TXDMA, (unsigned int)txdesctable);
|
spwamba_write(SPWAMBA_REG_TXDMA, (unsigned int)txdesctable);
|
spwamba_write(SPWAMBA_REG_CONTROL, SPWAMBA_CONTROL_TXDMA);
|
spwamba_write(SPWAMBA_REG_CONTROL, SPWAMBA_CONTROL_TXDMA);
|
|
|
/* wait until first packet sent, then cancel tx dma */
|
/* wait until first packet sent, then cancel tx dma */
|
v = spwamba_read(SPWAMBA_REG_STATUS);
|
v = spwamba_read(SPWAMBA_REG_STATUS);
|
for (i = 0; i < 1600 && (v & 0x1000) == 0; i++)
|
for (i = 0; i < 4000 && (v & 0x1000) == 0; i++)
|
v = spwamba_read(SPWAMBA_REG_STATUS);
|
v = spwamba_read(SPWAMBA_REG_STATUS);
|
spwamba_write(SPWAMBA_REG_CONTROL, SPWAMBA_CONTROL_TXCANCEL);
|
spwamba_write(SPWAMBA_REG_CONTROL, SPWAMBA_CONTROL_TXCANCEL);
|
v = spwamba_read(SPWAMBA_REG_STATUS);
|
v = spwamba_read(SPWAMBA_REG_STATUS);
|
|
for (i = 0; i < 4000 && (v & 0x0040) != 0; i++)
|
|
v = spwamba_read(SPWAMBA_REG_STATUS);
|
CHECK_VALUE("reg_status", v, 0x1003);
|
CHECK_VALUE("reg_status", v, 0x1003);
|
CHECK_VALUE("txdesctable[0].f", txdesctable[0].f, 0x0c0000);
|
CHECK_VALUE("txdesctable[0].f", txdesctable[0].f, 0x0c0000);
|
CHECK_VALUE("txdesctable[1].f", txdesctable[1].f, 0x150100);
|
CHECK_VALUE("txdesctable[1].f", txdesctable[1].f, 0x150100);
|
|
|
/* send EEP to flush the partial packet */
|
/* send EEP to flush the partial packet */
|
Line 1328... |
Line 1330... |
usec = LEON3_GpTimer_Regs->e[1].val;
|
usec = LEON3_GpTimer_Regs->e[1].val;
|
spwamba_write(SPWAMBA_REG_RXDMA, (unsigned int)rxdesctable);
|
spwamba_write(SPWAMBA_REG_RXDMA, (unsigned int)rxdesctable);
|
spwamba_write(SPWAMBA_REG_TXDMA, (unsigned int)txdesctable);
|
spwamba_write(SPWAMBA_REG_TXDMA, (unsigned int)txdesctable);
|
spwamba_write(SPWAMBA_REG_CONTROL, SPWAMBA_CONTROL_TXDMA | SPWAMBA_CONTROL_RXDMA);
|
spwamba_write(SPWAMBA_REG_CONTROL, SPWAMBA_CONTROL_TXDMA | SPWAMBA_CONTROL_RXDMA);
|
v = spwamba_read(SPWAMBA_REG_STATUS);
|
v = spwamba_read(SPWAMBA_REG_STATUS);
|
for (i = 0; i < 8000 && (v & 0x2080) != 0x2000; i++)
|
for (i = 0; i < 16000 && (v & 0x2080) != 0x2000; i++)
|
v = spwamba_read(SPWAMBA_REG_STATUS);
|
v = spwamba_read(SPWAMBA_REG_STATUS);
|
|
|
usec = usec - LEON3_GpTimer_Regs->e[1].val + 1;
|
usec = usec - LEON3_GpTimer_Regs->e[1].val + 1;
|
|
|
CHECK_VALUE("reg_status", v, 0x6043);
|
CHECK_VALUE("reg_status", v, 0x6043);
|