|
i use sam9g25 on my board. i couldn't tested of signal at txd3, when i enable serial DMA support by select [*] Atmel Serial DMA support in linux kernel menuconfig. i try to slove the problem in several ways. it works when i change the atslave->cfg as below. anybody meet the same problem?
void __init at91_add_device_serial(void) { int i;
for (i = 0; i < ATMEL_MAX_UART; i++) { if (at91_usarts[i]) { #if defined(CONFIG_AT_HDMAC) || defined(CONFIG_AT_HDMAC_MODULE) int peripheral_id = platform_get_irq(at91_usarts[i], 0); struct atmel_uart_data *pdata = at91_usarts[i]->dev.platform_data;
if (pdata->use_dma_tx) { struct at_dma_slave *atslave;
atslave = kzalloc(sizeof(struct at_dma_slave), GFP_KERNEL);
/* DMA slave channel configuration */ if (peripheral_id == AT91SAM9X5_ID_USART0 || peripheral_id == AT91SAM9X5_ID_USART1 || peripheral_id == AT91SAM9X5_ID_UART0) atslave->dma_dev = &at_hdmac0_device.dev; else atslave->dma_dev = &at_hdmac1_device.dev;
atslave->reg_width = DW_DMA_SLAVE_WIDTH_8BIT; #if 0 atslave->cfg = ATC_FIFOCFG_HALFFIFO | ATC_SRC_H2SEL_SW | ATC_DST_H2SEL_HW | (AT_DMA_ID_USART0_TX << 4); /*ATC_DST_PER(peripheral_id);*/
#endif // #if 1 atslave->cfg = ATC_FIFOCFG_HALFFIFO | ATC_SRC_H2SEL_HW | ATC_DST_H2SEL_HW | ATC_SRC_PER(AT_DMA_ID_USART3_RX) | ATC_DST_PER(AT_DMA_ID_USART3_TX); #endif pdata->dma_tx_slave = atslave; } #endif platform_device_register(at91_usarts[i]); } }
if (!atmel_default_console_device) printk(KERN_INFO "AT91: No default serial console defined.\n"); }
|