UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
443 Views
Registered: ‎04-06-2018

zturn DMA linux time out

hi, I have been trying to get some drive to work with my DMA in Linux, my board is a Z-Turn , Vivado 2017.3,  custom kernel

 

I edited the device tree, attached , and trying to get the interruption vector for 62 and 63:

 

cat /proc/interrupts
           CPU0       CPU1       
 29:      16885      12668       GIC  29  twd
 35:          0          0       GIC  35  f800c000.ocmc
 39:         43          0       GIC  39  f8007100.adc
 40:          0          0       GIC  40  f8007000.devcfg
 41:          0          0       GIC  41  f8005000.watchdog
 43:      52555          0       GIC  43  ttc_clockevent
 45:          0          0       GIC  45  f8003000.dmac
 46:          0          0       GIC  46  f8003000.dmac
 47:          0          0       GIC  47  f8003000.dmac
 48:          0          0       GIC  48  f8003000.dmac
 49:          0          0       GIC  49  f8003000.dmac
 51:          3          0       GIC  51  e000d000.spi
 53:          0          0       GIC  53  ehci_hcd:usb1
 54:    1504543          0       GIC  54  eth0
 56:        114          0       GIC  56  mmc0
 57:          0          0       GIC  57  cdns-i2c
 62:     100001          0       GIC  62  xilinx-dma-controller
 63:          0          0       GIC  63  xilinx-dma-controller
 72:          0          0       GIC  72  f8003000.dmac
 73:          0          0       GIC  73  f8003000.dmac
 74:          0          0       GIC  74  f8003000.dmac
 75:          0          0       GIC  75  f8003000.dmac
 82:        128          0       GIC  82  xuartps
146:          0          0  zynq-gpio  50  K1
IPI1:          0       5039  Timer broadcast interrupts
IPI2:       1203       1499  Rescheduling interrupts
IPI3:          0          0  Function call interrupts
IPI4:         88         30  Single function call interrupts
IPI5:          0          0  CPU stop interrupts
IPI6:         97        119  IRQ work interrupts
IPI7:          0          0  completion interrupts

 

ls -l /sys/class/dma
total 0
lrwxrwxrwx 1 root root 0 Jan 1 00:00 dma0chan0 -> ../../devices/amba.1/f8003000.dmac/dma/dma0chan0
lrwxrwxrwx 1 root root 0 Jan 1 00:00 dma0chan1 -> ../../devices/amba.1/f8003000.dmac/dma/dma0chan1
lrwxrwxrwx 1 root root 0 Jan 1 00:00 dma0chan2 -> ../../devices/amba.1/f8003000.dmac/dma/dma0chan2
lrwxrwxrwx 1 root root 0 Jan 1 00:00 dma0chan3 -> ../../devices/amba.1/f8003000.dmac/dma/dma0chan3
lrwxrwxrwx 1 root root 0 Jan 1 00:00 dma0chan4 -> ../../devices/amba.1/f8003000.dmac/dma/dma0chan4
lrwxrwxrwx 1 root root 0 Jan 1 00:00 dma0chan5 -> ../../devices/amba.1/f8003000.dmac/dma/dma0chan5
lrwxrwxrwx 1 root root 0 Jan 1 00:00 dma0chan6 -> ../../devices/amba.1/f8003000.dmac/dma/dma0chan6
lrwxrwxrwx 1 root root 0 Jan 1 00:00 dma0chan7 -> ../../devices/amba.1/f8003000.dmac/dma/dma0chan7
lrwxrwxrwx 1 root root 0 Jan 1 00:00 dma1chan0 -> ../../devices/amba.1/amba_pl.6/40400000.dma/dma/dma1chan0
lrwxrwxrwx 1 root root 0 Jan 1 00:00 dma1chan1 -> ../../devices/amba.1/amba_pl.6/40400000.dma/dma/dma1chan1

 

when I run this code

https://lauri.võsandi.com/hdl/zynq/xilinx-dma.html

which uses /dev/mem I get :

 

irq 62: nobody cared (try booting with the "irqpoll" option)
CPU: 0 PID: 700 Comm: dmauser Not tainted 3.15.0-xilinx #1
[<c0013f00>] (unwind_backtrace) from [<c0010570>] (show_stack+0x10/0x14)
[<c0010570>] (show_stack) from [<c04ec2a0>] (dump_stack+0x88/0xd8)
[<c04ec2a0>] (dump_stack) from [<c005578c>] (__report_bad_irq+0x28/0xb8)
[<c005578c>] (__report_bad_irq) from [<c0055be0>] (note_interrupt+0x19c/0x250)
[<c0055be0>] (note_interrupt) from [<c0053df8>] (handle_irq_event_percpu+0xd0/0xe0)
[<c0053df8>] (handle_irq_event_percpu) from [<c0053e44>] (handle_irq_event+0x3c/0x5c)
[<c0053e44>] (handle_irq_event) from [<c00567e0>] (handle_fasteoi_irq+0xb4/0x12c)
[<c00567e0>] (handle_fasteoi_irq) from [<c0053724>] (generic_handle_irq+0x20/0x30)
[<c0053724>] (generic_handle_irq) from [<c000e3bc>] (handle_IRQ+0x64/0x8c)
[<c000e3bc>] (handle_IRQ) from [<c00084c4>] (gic_handle_irq+0x38/0x5c)
[<c00084c4>] (gic_handle_irq) from [<c0010f80>] (__irq_svc+0x40/0x70)
Exception stack(0xe5471f00 to 0xe5471f48)
1f00: 00000000 e5470000 00000000 c0730080 00000000 00000040 ffffffff e5470008
1f20: bfaaaabb 0000000a e5471f48 00400100 0001b184 e5471f48 c0023920 c00241d8
1f40: 60000113 ffffffff
[<c0010f80>] (__irq_svc) from [<c00241d8>] (__do_softirq+0x80/0x1cc)
[<c00241d8>] (__do_softirq) from [<c0024514>] (irq_exit+0x58/0xa8)
[<c0024514>] (irq_exit) from [<c000e3c0>] (handle_IRQ+0x68/0x8c)
[<c000e3c0>] (handle_IRQ) from [<c00084c4>] (gic_handle_irq+0x38/0x5c)
[<c00084c4>] (gic_handle_irq) from [<c001113c>] (__irq_usr+0x3c/0x60)
Exception stack(0xe5471fb0 to 0xe5471ff8)
1fa0:                                     7efefeff 00000025 00008f58 00008f5c
1fc0: 65707061 9a8f8f9e 00008f58 25252525 bfaaaabb b6f6c6e0 00008f50 bedd9c3c
1fe0: bf545443 bedd96cc b6e1b554 b6e5b758 60000010 ffffffff
handlers:
[<c020ce98>] dma_intr_handler
Disabling IRQ #62

 

the IRQ seems to happen tough :

 

62: 100001 0 GIC 62 xilinx-dma-controller

 

when I run cat /proc/iomem

cat /proc/iomem
00000000-2fffffff : System RAM
  00008000-006b9587 : Kernel code
  006ee000-00763323 : Kernel data
40400000-4040ffff : /amba/amba_pl/dma@40400000
e0000000-e0000ffe : xuartps
e0001000-e0001ffe : xuartps
e0002000-e0002fff : /amba/usb@e0002000
  e0002000-e0002fff : /amba/usb@e0002000
e0004000-e0004fff : /amba/i2c@e0004000
e0008000-e0008fff : /amba/can@e0008000
e000a000-e000afff : /amba/gpio@e000a000
e000d000-e000dfff : /amba/spi@e000d000
e0100000-e0100fff : mmc0
f8003000-f8003fff : /amba/dmac@f8003000
  f8003000-f8003fff : /amba/dmac@f8003000
f8005000-f8005fff : /amba/watchdog@f8005000
f8007000-f80070ff : /amba/devcfg@f8007000
f8007100-f800711f : /amba/adc@f8007100
f800c000-f800cfff : /amba/ocmc@f800c000
fffc0000-ffffffff : f800c000.ocmc

 

dmesg for DMA says:

 

dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-2364208
dma-pl330 f8003000.dmac:     DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
xilinx-dma 40400000.dma: Probing xilinx axi dma engine...Successful

 

I have been trying drivers from axidma.c.golden, dma_proxy ..

 

If anybody has any tip, any idea, please.

 

BR.

 

 

 

 

 

 

 

Tags (2)
0 Kudos