2009-05-15 04:59:21 BF533 Memdma doesn't transfer all the data.
zigma dsp (GERMANY)
Message: 74102
Hi,
I just wrote a driver to access memdma in BF533. The user will just open the driver and inside the driver read function, I am initiating a simple memdma. I could not see all the data in destination buffer. I am checking the data in driver itself, by printing to console. This is the result (should have printed 1,2,3,4,5,6,7,8,9,a):
kernel:-
Jan 2 03:40:15 blackfin user.debug kernel: Driver scmd_dma_basic opened..
Jan 2 03:40:15 blackfin user.debug kernel: Driver scmd_dma_basic read..
Jan 2 03:40:15 blackfin user.debug kernel: 0
Jan 2 03:40:15 blackfin user.debug kernel: 2
Jan 2 03:40:15 blackfin user.debug kernel: 3
Jan 2 03:40:15 blackfin user.debug kernel: 4
Jan 2 03:40:15 blackfin user.debug kernel: 5
Jan 2 03:40:15 blackfin user.debug kernel: 0
Jan 2 03:40:15 blackfin user.debug kernel: 0
Jan 2 03:40:15 blackfin user.debug kernel: 0
Jan 2 03:40:15 blackfin user.debug kernel: 0
Jan 2 03:40:15 blackfin user.debug kernel: 0
Jan 2 03:40:15 blackfin user.debug kernel: Driver scmd_dma_basic closed..
user:-
root:/bin> mknod /dev/scmd_dma_basic c 240 0
root:/bin> ./memdma_test_kernel
TEST DRIVER OPENED
TEST DRIVER - READ ACCESS
TEST DRIVER CLOSED
I am not using much in user space, because I am trying to learn writing drivers. Nevertheless, the DMA operation should have been alright.. If I use stream0, then it says that channel is not available (is kernel using it?).
I am using uClinux-dist-2008R1.5-RC3, with ez-kit board and the lan card.
Attached -
dma_test.c -> device driver.
memdma_test_kernel.c -> application
Thanks & Regards
JA.
memdma_test_kernel.c
dma_test.c
QuoteReplyEditDelete
2009-05-15 05:08:14 Re: BF533 Memdma doesn't transfer all the data.
Mike Frysinger (UNITED STATES)
Message: 74104
the kernel always reserves channel 0 for the dma_memcpy() function
as for why your driver isnt working, please read the documentation:
docs.blackfin.uclinux.org/doku.php?id=dma_systems#dma_pitfalls
QuoteReplyEditDelete