Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: problem of usart DMA driver about 9g25 on linux platform
PostPosted: Thu Dec 15, 2011 8:22 am 
Offline

Joined: Thu Dec 15, 2011 8:04 am
Posts: 1
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");
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: