Forum Discussion
Altera_Forum
Honored Contributor
20 years agoHi Scott,
thanks you for answer. According to your suggestion <div class='quotetop'>QUOTE </div> --- Quote Start --- Check the name of your dma controller in SOPCBuilder ...[/b] --- Quote End --- i checked it: - the name of the DMA controller in the SoPC Builder is correct: dma_0 - in the nios2_system.h file of my Kernel Build, there is na_dma_0 - in the kernel i have enabled DMA Support - in the proc filesystem i have an dma entry, if i usecat dma its empty. it seems there is still something wrong. For a little in my driver code i used i=get_dma_residue((unsigned int)0); it returns -1, according to the driver code in arch/nios2nommu/kernel/dma.c nt get_dma_residue(unsigned int dmanr)
{
int result =-1;
if (dmanr < MAX_DMA_CHANNELS) {
result = inl(dma_channels.addr+REG_DMA_LENGTH);
}
return result;
} this means MAX_DMA_CHANNELS is at least 0, since dmanr is 0, so something is wrong in #define MAX_DMA_CHANNELS sizeof(dma_channels)/sizeof(struct dma_channel) but this again depends on the definition on the the table, as you have written in your post. Any idea? Thanks. Helmar -- according to the kernel bug. the function i used isn't implemented