ubuntu 在 R40e 上 還有 Debian 在 Sempron 2600 上

2012年5月29日 星期二

test gist

測試項目..
view raw GistTest hosted with ❤ by GitHub
source code 的話...
/*
* Copyright 2004-2011 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
* The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
* Version 2 or later at the following locations:
*
* http://www.opensource.org/licenses/gpl-license.html
* http://www.gnu.org/copyleft/gpl.html
*/
/*!
* @file drivers/serial/mxc_uart.c
*
* @brief Driver for the Freescale Semiconductor MXC serial ports based on
* drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
*
* @ingroup UART
*/
static void mxcuart_dma_writecallback(void *arg, int error, unsigned int count)
{
uart_mxc_port *umxc = arg;
struct circ_buf *xmit = &umxc->port.state->xmit;
int tx_num;
if (error != MXC_DMA_TRANSFER_ERROR) {
tx_num = count;
umxc->port.icount.tx += tx_num;
xmit->tail = (xmit->tail + tx_num) & (UART_XMIT_SIZE - 1);
}
dma_unmap_single(umxc->port.dev, umxc->tx_handle, TXDMA_BUFF_SIZE,
DMA_TO_DEVICE);
tx_num = uart_circ_chars_pending(xmit);
if (tx_num > 0)
mxcuart_dma_tx(umxc);
else
dma_list[umxc->port.line].dma_txchnl_inuse = 0;
if (tx_num < WAKEUP_CHARS)
uart_write_wakeup(&umxc->port);
}
view raw gistfile1.txt hosted with ❤ by GitHub

沒有留言:

標籤

網誌存檔