- }
- }
-
- /* make sure the transmitter is enabled.
- * NOTE: this overrides any setting done in ttySx, to 8N1, no auto-CTS.
- * in the future, move the tr/rec_ctrl shadows from etrax100ser.c to
- * shadows.c and use it here as well...
- */
-
- *DEBUG_TR_CTRL = 0x40;
- while(*DEBUG_OCMD & 7); /* Until DMA is not running */
- while(*DEBUG_STATUS & 0x7f); /* wait until output FIFO is empty as well */
- udelay(200); /* Wait for last two characters to leave the serial transmitter */
-
- if (tmp_size)
- {
- descr.ctrl = len ? 0 : d_eop | d_wait | d_eol;
- descr.sw_len = tmp_size;
- descr.buf = virt_to_phys(tmp_buf);
- descr.next = virt_to_phys(&descr2);
- descr2.ctrl = d_eop | d_wait | d_eol;
- descr2.sw_len = len;
- descr2.buf = virt_to_phys((char*)buf);
- }
- else
- {
- descr.ctrl = d_eop | d_wait | d_eol;
- descr.sw_len = len;
- descr.buf = virt_to_phys((char*)buf);
- }
-
- *DEBUG_FIRST = virt_to_phys(&descr); /* write to R_DMAx_FIRST */
- *DEBUG_OCMD = 1; /* dma command start -> R_DMAx_CMD */
-
- /* wait until the output dma channel is ready again */
- while(*DEBUG_OCMD & 7);
- while(*DEBUG_STATUS & 0x7f);
- udelay(200);
-
- tmp_size = 0;