Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with two dma in design #98

Closed
eleICoto opened this issue May 9, 2019 · 57 comments
Closed

Problem with two dma in design #98

eleICoto opened this issue May 9, 2019 · 57 comments

Comments

@eleICoto
Copy link

eleICoto commented May 9, 2019

I'm using two dma in my design
my system-user.dtsi in petalinux is like this
image
my pl.dtsi in petalinux is like this
image
the problem i'm facing is like this
image
it seems like module cant find slave channel
image
my bd is like this
image
besides i'm using ZCU104

@GOOD-Stuff
Copy link

Hi!
What if you try to set in pl.dtsi something like this:

amba_pl: amba_pl@0 {
                ....
                axidma_chrdev: axidma_chrdev@0 {
                         compatible = "xlnx,axidma-chrdev";
                         dmas = <&ps2pl 0 &pl2ps 1>; // note to the 1 after pl2ps, it is the xlnx,device-id 
                         dma-names = "tx_channel", "rx_channel";
                 };
		ps2pl: dma@a0000000 {
			#dma-cells = <1>;
			clock-names = ... // your values
                         ......
			dma-channel@a0000000 {
				compatible = "xlnx,axi-dma-mm2s-channel";
				dma-channels = <0x1>;
				interrupts = <0 34 4>; // set here your values
                                 ...
				xlnx,device-id = <0x0>;
				xlnx,include-dre ;
			};
};
               pl2ps: dma@a0001000 {
			#dma-cells = <1>;
			clock-names = ... // your values
                         ......
			dma-channel@a0001030 {
				compatible = "xlnx,axi-dma-s2mm-channel";
				dma-channels = <0x1>;
				interrupts = <0 33 4>;
                                 ...
				xlnx,device-id = <0x1>;
				xlnx,include-dre ;
			};
		};
};

@eleICoto
Copy link
Author

eleICoto commented Jun 5, 2019

Thank you for your replay, I actually fix this, the DMA address width in zynq ultrascale family chip must be set to 40bit, or it will go wrong.

@eleICoto eleICoto closed this as completed Jun 5, 2019
@suikammd
Copy link

Hey, where to modify the DMA address width?
Could you share your new dtsi file?

@eleICoto
Copy link
Author

@suikammd in vivado block design
image

@suikammd
Copy link

@eleICoto Thanks, but after insmod the driver, nothing happens.
Is your device tree you attached above works?

@eleICoto
Copy link
Author

@ Can you upload your block design? And specific DMA setting?
I have tested one DMA with two channel & two DMA with one channel
All these setting works fine
Right now I'm trying to speed up buffer access time

@suikammd
Copy link

@eleICoto Hello, this is my block design.
image
But just to insmod the driver should have nothing to do with block design?
P.S. Do you use petalinux? or Can you share me with your process of using this driver?
Thanks a lot!

@eleICoto
Copy link
Author

@suikammd Yes i'm using petalinux
I think there is something to do with block design, just like i posted before

@eleICoto
Copy link
Author

@suikammd And I'm wondering what board are you using?
And, if possible, can you list your workflow when generate.bit and building petalinux

@suikammd
Copy link

suikammd commented Jun 15, 2019

@eleICoto Sorry for later reply.

This is my workflow:

  1. Generate Bitstream to get .bit and Export Hardware to package .bit into HDF
  2. petalinux-config --get-hw-description ./
  3. Image Packaging Configurations -> Root filesystem type -> SD card
    Uncheck DTG Settings->Kernel Bootargs->generate boot args automatically, set bootrags to earlycon clk_ignore_unused earlyprintk root=/dev/mmcblk0p2 rw rootwait
  4. petalinux-build
    Maybe there is something wrong with my device tree, I'm using zcu104, same as you.
    Thanks a lot!

@eleICoto
Copy link
Author

image
image

@eleICoto
Copy link
Author

@suikammd
image
Open this file, check whether the DMA setting is enable

@suikammd
Copy link

suikammd commented Jun 15, 2019

Thanks @eleICoto ,I checked this file, It's not enabled, should I just add CONFIG_DMA=y?

@eleICoto
Copy link
Author

@suikammd So did you enter peltalinux-config -c kernel and enable those dma setting mention in this page?
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842337/DMA+Drivers+-+Soft+IPs

@eleICoto
Copy link
Author

@suikammd according to my experience, save tage in petalinux-config -c kernel cant automatic set .cfg path you have to enter it by hand

@eleICoto
Copy link
Author

@suikammd And, by the way, according to your description, I guess your ZCU104 doesn't have network access?

@suikammd
Copy link

suikammd commented Jun 15, 2019

@eleICoto yes, but network access a necessity?
I'll try to config the kernel and enable dma in the cfg file.

I add those lines in cfg file.

CONFIG_CMA=y
CONFIG_DMA_CMA=y
CONFIG_XILINX_DMAENGINES=y
CONFIG_XILINX_AXIDMA=y
CONFIG_XILINX_AXIVDMA=y
CONFIG_DMA_SHARED_BUFFER=y

Thanks very much

@eleICoto
Copy link
Author

@suikammd That depends on you, but for sure there is something lack in your device tree setting, follow this page https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842279/Build+Device+Tree+Blob
Generate a Board file Device Tree Source (.dts/.dtsi) files on command line using HSM/HSI.
And I'm not sure if there will be problem when you just add setting in .cfg file, I would recommand using petalinux-config -c kernel

@suikammd
Copy link

@eleICoto I do enable dma using petalinux-config -c kernel, but it does not show up in the cfg file you metioned.

@eleICoto
Copy link
Author

@suikammd Yes, after you finfish enable process, you need to save you config, in the bottom of menuconfig, there is a save tag, enter it and modify .cfg path

@suikammd
Copy link

@eleICoto yes, I config the kernel, saved the settings but those settings still not show up in cfg file, so I just add those CONFIG_* I mentioned above.
When I tried to insmod the driver, the dmesg changes nothing and no new device appeared. But modprobe -l shows I successfully insmod the driver while the driver actually not exists.
It must be something wrong with the device tree. If you are not busy, could you share me how you test DMA with two channels?
Thanks!

@eleICoto
Copy link
Author

@suikammd Alright
plnx_kernel.zip
this is the config file i'm using
And could you up load your dmesg? just run dmesg > log.log and upload log.log
And your pl.dtsi system-user.dtsi

@suikammd
Copy link

@eleICoto Thanks, three files all uploaded.
peta.zip

@eleICoto
Copy link
Author

@suikammd It seems like you have change your bd to two dma design, but you have not change your dma
address width to 40

@eleICoto
Copy link
Author

@suikammd And there is something wrong with your axidma_chrdev
image
if you use two dma with only one channel both value should be 0
image
And it seems like you set the dma-names in opposite if your design is to send data from ps ddr to pl ddr

@eleICoto
Copy link
Author

@suikammd log.log is the log file after you insmod?

@suikammd
Copy link

@eleICoto The dma address width is set to 40. Block design was done by my lab mate. In fact, I'm major in networks ==.

@suikammd log.log is the log file after you insmod?

Yes, so it must be something wrong with device tree files. I'm very confused about how to modify them.

@eleICoto
Copy link
Author

@suikammd ahhhh 40 in decimal...... not hex

@eleICoto
Copy link
Author

image
image

@suikammd
Copy link

suikammd commented Jun 17, 2019

@eleICoto My lab mate says he set 40 in decimal...
I'll try to modify device tree files as pics you attached above.

@eleICoto
Copy link
Author

@suikammd according to device tree file you send to me
image
image
both addrwidth is set to 40 hex 64 dec

@honorpeter
Copy link

@suikammd Do you succeed? I follow the eleICoto said,but I got this log when I insmod and run dmesg

root@xdmatest:~# dmesg

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.0-xilinx-v2018.2 (oe-user@oe-host) (gcc version 9
[ 0.000000] Boot CPU: AArch64 Processor [410fd034]
[ 0.000000] Machine model: ZynqMP ZCU102 Rev1.0
[ 0.000000] earlycon: cdns0 at MMIO 0x00000000ff000000 (options '115200n8')
[ 0.000000] bootconsole [cdns0] enabled
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 256 MiB at 0x000000006fc00000
[ 0.000000] On node 0 totalpages: 1048320
[ 0.000000] DMA zone: 7165 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 524032 pages, LIFO batch:31
[ 0.000000] Normal zone: 7168 pages used for memmap
[ 0.000000] Normal zone: 524288 pages, LIFO batch:31
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: MIGRATE_INFO_TYPE not supported.
[ 0.000000] percpu: Embedded 21 pages/cpu @ffffffc87ff63000 s46488 r8192 d313366
[ 0.000000] pcpu-alloc: s46488 r8192 d31336 u86016 alloc=21*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum 845719
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 1033987
[ 0.000000] Kernel command line: earlycon clk_ignore_unused root=/dev/mmcblk0p2t
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[ 0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 0.000000] software IO TLB [mem 0x6bc00000-0x6fc00000] (64MB) mapped at [fffff]
[ 0.000000] Memory: 3784592K/4193280K available (9916K kernel code, 644K rwdata)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] modules : 0xffffff8000000000 - 0xffffff8008000000 ( 128 MB)
[ 0.000000] vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000 ( 250 GB)
[ 0.000000] .text : 0xffffff8008080000 - 0xffffff8008a30000 ( 9920 KB)
[ 0.000000] .rodata : 0xffffff8008a30000 - 0xffffff8008d40000 ( 3136 KB)
[ 0.000000] .init : 0xffffff8008d40000 - 0xffffff8008dc0000 ( 512 KB)
[ 0.000000] .data : 0xffffff8008dc0000 - 0xffffff8008e61200 ( 645 KB)
[ 0.000000] .bss : 0xffffff8008e61200 - 0xffffff800907f2b0 ( 2169 KB)
[ 0.000000] fixed : 0xffffffbefe7fd000 - 0xffffffbefec00000 ( 4108 KB)
[ 0.000000] PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000 ( 16 MB)
[ 0.000000] vmemmap : 0xffffffbf00000000 - 0xffffffc000000000 ( 4 GB )
[ 0.000000] 0xffffffbf00000000 - 0xffffffbf1dc00000 ( 476 MB )
[ 0.000000] memory : 0xffffffc000000000 - 0xffffffc880000000 ( 34816 MB)
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] arch_timer: cp15 timer(s) running at 99.99MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0s
[ 0.000003] sched_clock: 56 bits at 99MHz, resolution 10ns, wraps every 4398046s
[ 0.008314] Console: colour dummy device 80x25
[ 0.012568] console [tty0] enabled
[ 0.015934] bootconsole [cdns0] disabled
[ 0.019845] Calibrating delay loop (skipped), value calculated using timer freq)
[ 0.019859] pid_max: default: 32768 minimum: 301
[ 0.019962] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.019980] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.020559] ASID allocator initialised with 65536 entries
[ 0.020606] Hierarchical SRCU implementation.
[ 0.020936] EFI services will not be available.
[ 0.020961] zynqmp_plat_init Platform Management API v1.0
[ 0.020969] zynqmp_plat_init Trustzone version v1.0
[ 0.021065] smp: Bringing up secondary CPUs ...
[ 0.021319] Detected VIPT I-cache on CPU1
[ 0.021348] CPU1: Booted secondary processor [410fd034]
[ 0.021621] Detected VIPT I-cache on CPU2
[ 0.021639] CPU2: Booted secondary processor [410fd034]
[ 0.021900] Detected VIPT I-cache on CPU3
[ 0.021918] CPU3: Booted secondary processor [410fd034]
[ 0.021958] smp: Brought up 1 node, 4 CPUs
[ 0.021990] SMP: Total of 4 processors activated.
[ 0.021998] CPU features: detected feature: 32-bit EL0 Support
[ 0.022009] CPU: All CPU(s) started at EL2
[ 0.022025] alternatives: patching kernel code
[ 0.022767] devtmpfs: initialized
[ 0.027281] random: get_random_u32 called from bucket_table_alloc+0x108/0x260 w0
[ 0.027488] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_s
[ 0.027510] futex hash table entries: 1024 (order: 5, 131072 bytes)
[ 0.027748] random: fast init done
[ 0.032969] xor: measuring software checksum speed
[ 0.071918] 8regs : 2302.000 MB/sec
[ 0.111947] 8regs_prefetch: 2052.000 MB/sec
[ 0.151979] 32regs : 2830.000 MB/sec
[ 0.192008] 32regs_prefetch: 2378.000 MB/sec
[ 0.192017] xor: using function: 32regs (2830.000 MB/sec)
[ 0.192086] pinctrl core: initialized pinctrl subsystem
[ 0.192615] NET: Registered protocol family 16
[ 0.193227] cpuidle: using governor menu
[ 0.193766] vdso: 2 pages (1 code @ ffffff8008a36000, 1 data @ ffffff8008dc4000)
[ 0.193783] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.194244] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.223707] reset_zynqmp reset-controller: Xilinx zynqmp reset driver probed
[ 0.224265] ARM CCI_400_r1 PMU driver probed
[ 0.229088] zynqmp-pinctrl ff180000.pinctrl: zynqmp pinctrl initialized
[ 0.236900] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.304253] raid6: int64x1 gen() 402 MB/s
[ 0.372206] raid6: int64x1 xor() 445 MB/s
[ 0.440255] raid6: int64x2 gen() 687 MB/s
[ 0.508291] raid6: int64x2 xor() 603 MB/s
[ 0.576365] raid6: int64x4 gen() 1042 MB/s
[ 0.644410] raid6: int64x4 xor() 739 MB/s
[ 0.712473] raid6: int64x8 gen() 980 MB/s
[ 0.780480] raid6: int64x8 xor() 745 MB/s
[ 0.848532] raid6: neonx1 gen() 725 MB/s
[ 0.916586] raid6: neonx1 xor() 852 MB/s
[ 0.984638] raid6: neonx2 gen() 1168 MB/s
[ 1.052657] raid6: neonx2 xor() 1207 MB/s
[ 1.120740] raid6: neonx4 gen() 1506 MB/s
[ 1.188752] raid6: neonx4 xor() 1441 MB/s
[ 1.256827] raid6: neonx8 gen() 1652 MB/s
[ 1.324852] raid6: neonx8 xor() 1533 MB/s
[ 1.324860] raid6: using algorithm neonx8 gen() 1652 MB/s
[ 1.324867] raid6: .... xor() 1533 MB/s, rmw enabled
[ 1.324875] raid6: using neon recovery algorithm
[ 1.325451] XGpio: /amba_pl@0/gpio@b0000000: registered, base is 510
[ 1.326741] SCSI subsystem initialized
[ 1.326784] libata version 3.00 loaded.
[ 1.326907] usbcore: registered new interface driver usbfs
[ 1.326946] usbcore: registered new interface driver hub
[ 1.326988] usbcore: registered new device driver usb
[ 1.327047] media: Linux media interface: v0.10
[ 1.327075] Linux video capture interface: v2.00
[ 1.327112] pps_core: LinuxPPS API ver. 1 registered
[ 1.327121] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giomett>
[ 1.327141] PTP clock support registered
[ 1.327165] EDAC MC: Ver: 3.0.0
[ 1.327459] zynqmp-ipi ff9905c0.mailbox: Probed ZynqMP IPI Mailbox driver.
[ 1.327615] FPGA manager framework
[ 1.327717] fpga-region fpga-full: FPGA Region probed
[ 1.327814] Advanced Linux Sound Architecture Driver Initialized.
[ 1.328060] Bluetooth: Core ver 2.22
[ 1.328088] NET: Registered protocol family 31
[ 1.328096] Bluetooth: HCI device and connection manager initialized
[ 1.328108] Bluetooth: HCI socket layer initialized
[ 1.328119] Bluetooth: L2CAP socket layer initialized
[ 1.328138] Bluetooth: SCO socket layer initialized
[ 1.328680] clocksource: Switched to clocksource arch_sys_counter
[ 1.328753] VFS: Disk quotas dquot_6.6.0
[ 1.328797] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 1.332743] NET: Registered protocol family 2
[ 1.333037] TCP established hash table entries: 32768 (order: 6, 262144 bytes)
[ 1.333249] TCP bind hash table entries: 32768 (order: 7, 524288 bytes)
[ 1.333662] TCP: Hash tables configured (established 32768 bind 32768)
[ 1.333737] UDP hash table entries: 2048 (order: 4, 65536 bytes)
[ 1.333814] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
[ 1.333970] NET: Registered protocol family 1
[ 1.334154] RPC: Registered named UNIX socket transport module.
[ 1.334164] RPC: Registered udp transport module.
[ 1.334171] RPC: Registered tcp transport module.
[ 1.334178] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.334190] PCI: CLS 0 bytes, default 128
[ 1.334535] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[ 1.334689] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters avaie
[ 1.335333] audit: initializing netlink subsys (disabled)
[ 1.335682] audit: type=2000 audit(1.316:1): state=initialized audit_enabled=0 1
[ 1.335723] workingset: timestamp_bits=62 max_order=20 bucket_order=0
[ 1.336397] NFS: Registering the id_resolver key type
[ 1.336418] Key type id_resolver registered
[ 1.336426] Key type id_legacy registered
[ 1.336438] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 1.336460] jffs2: version 2.2. (NAND) (SUMMARY) \xffffffc2\xffffffa9 2001-200.
[ 1.360041] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 1.360062] io scheduler noop registered
[ 1.360069] io scheduler deadline registered
[ 1.360089] io scheduler cfq registered (default)
[ 1.360098] io scheduler mq-deadline registered
[ 1.360105] io scheduler kyber registered
[ 1.360714] nwl-pcie fd0e0000.pcie: Link is DOWN
[ 1.360758] OF: PCI: host bridge /amba/pcie@fd0e0000 ranges:
[ 1.360780] OF: PCI: MEM 0xe0000000..0xefffffff -> 0xe0000000
[ 1.360792] OF: PCI: MEM 0x600000000..0x7ffffffff -> 0x600000000
[ 1.360917] nwl-pcie fd0e0000.pcie: PCI host bridge to bus 0000:00
[ 1.360932] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 1.360942] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[ 1.360953] pci_bus 0000:00: root bus resource [mem 0x600000000-0x7ffffffff pre]
[ 1.360981] pci 0000:00:00.0: [10ee:d021] type 01 class 0x060400
[ 1.361036] pci 0000:00:00.0: PME# supported from D0 D1 D2 D3hot
[ 1.361211] pci 0000:00:00.0: PCI bridge to [bus 01-0c]
[ 1.362031] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed
[ 1.362394] xilinx-vdma a0000000.dma: Xilinx AXI DMA Engine Driver Probed!!
[ 1.362695] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success
[ 1.362853] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success
[ 1.363013] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success
[ 1.363171] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success
[ 1.363329] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success
[ 1.363488] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success
[ 1.363645] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success
[ 1.363805] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success
[ 1.364024] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success
[ 1.364181] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success
[ 1.364333] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success
[ 1.364489] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success
[ 1.364638] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success
[ 1.364825] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success
[ 1.364984] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success
[ 1.365139] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success
[ 1.389998] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 1.392986] cacheinfo: Unable to detect cache hierarchy for CPU 0
[ 1.397093] brd: module loaded
[ 1.400419] loop: module loaded
[ 1.401312] ahci-ceva fd0c0000.ahci: couldn't get PHY in node ahci: -517
[ 1.401473] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 1.402557] m25p80 spi0.0: n25q512a (131072 Kbytes)
[ 1.402580] 3 ofpart partitions found on MTD device spi0.0
[ 1.402589] Creating 3 MTD partitions on "spi0.0":
[ 1.402600] 0x000000000000-0x000000100000 : "boot"
[ 1.403010] 0x000000100000-0x000000140000 : "bootenv"
[ 1.403378] 0x000000140000-0x000001740000 : "kernel"
[ 1.404580] libphy: Fixed MDIO Bus: probed
[ 1.405578] tun: Universal TUN/TAP device driver, 1.6
[ 1.405717] CAN device driver interface
[ 1.407745] macb ff0e0000.ethernet: Not enabling partial store and forward
[ 1.408121] libphy: MACB_mii_bus: probed
[ 1.409758] macb ff0e0000.ethernet eth0: Cadence GEM rev 0x50070106 at 0xff0e00)
[ 1.409775] TI DP83867 ff0e0000.ethernet-ffffffff:0c: attached PHY driver [TI D)
[ 1.410327] usbcore: registered new interface driver asix
[ 1.410377] usbcore: registered new interface driver ax88179_178a
[ 1.410407] usbcore: registered new interface driver cdc_ether
[ 1.410436] usbcore: registered new interface driver net1080
[ 1.410466] usbcore: registered new interface driver cdc_subset
[ 1.410497] usbcore: registered new interface driver zaurus
[ 1.410536] usbcore: registered new interface driver cdc_ncm
[ 1.410796] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM
[ 1.411858] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.411868] ehci-pci: EHCI PCI platform driver
[ 1.412122] usbcore: registered new interface driver uas
[ 1.412160] usbcore: registered new interface driver usb-storage
[ 1.412627] rtc_zynqmp ffa60000.rtc: rtc core: registered ffa60000.rtc as rtc0
[ 1.412703] i2c /dev entries driver
[ 1.413688] IR NEC protocol handler initialized
[ 1.413698] IR RC5(x/sz) protocol handler initialized
[ 1.413706] IR RC6 protocol handler initialized
[ 1.413713] IR JVC protocol handler initialized
[ 1.413720] IR Sony protocol handler initialized
[ 1.413727] IR SANYO protocol handler initialized
[ 1.413734] IR Sharp protocol handler initialized
[ 1.413741] IR MCE Keyboard/mouse protocol handler initialized
[ 1.413748] IR XMP protocol handler initialized
[ 1.414747] usbcore: registered new interface driver uvcvideo
[ 1.414756] USB Video Class driver (1.1.1)
[ 1.415240] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer at ffffff800912d0s
[ 1.415415] Bluetooth: HCI UART driver ver 2.3
[ 1.415425] Bluetooth: HCI UART protocol H4 registered
[ 1.415434] Bluetooth: HCI UART protocol BCSP registered
[ 1.415463] Bluetooth: HCI UART protocol LL registered
[ 1.415472] Bluetooth: HCI UART protocol ATH3K registered
[ 1.415480] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 1.415525] Bluetooth: HCI UART protocol Intel registered
[ 1.415534] Bluetooth: HCI UART protocol QCA registered
[ 1.415569] usbcore: registered new interface driver bcm203x
[ 1.415603] usbcore: registered new interface driver bpa10x
[ 1.415638] usbcore: registered new interface driver bfusb
[ 1.415672] usbcore: registered new interface driver btusb
[ 1.415681] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[ 1.415729] usbcore: registered new interface driver ath3k
[ 1.415852] EDAC MC: ECC not enabled
[ 1.416031] EDAC DEVICE0: Giving out device to module zynqmp-ocm-edac controlle)
[ 1.416524] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 1199880 KHz
[ 1.416580] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed tz
[ 1.417001] sdhci: Secure Digital Host Controller Interface driver
[ 1.417011] sdhci: Copyright(c) Pierre Ossman
[ 1.417018] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.460691] mmc0: SDHCI controller on ff170000.sdhci [ff170000.sdhci] using ADMt
[ 1.466713] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.466851] usbcore: registered new interface driver usbhid
[ 1.466860] usbhid: USB HID core driver
[ 1.468658] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered
[ 1.470454] pktgen: Packet Generator for packet performance testing. Version: 25
[ 1.472761] Netfilter messages via NETLINK v0.30.
[ 1.472881] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 1.473021] Initializing XFRM netlink socket
[ 1.473082] NET: Registered protocol family 10
[ 1.473491] Segment Routing with IPv6
[ 1.473536] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 1.473706] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 1.474018] NET: Registered protocol family 17
[ 1.474034] NET: Registered protocol family 15
[ 1.474052] bridge: filtering via arp/ip/ip6tables is no longer available by de.
[ 1.474069] Ebtables v2.0 registered
[ 1.474159] can: controller area network core (rev 20170425 abi 9)
[ 1.474193] NET: Registered protocol family 29
[ 1.474208] can: raw protocol (rev 20170425)
[ 1.474216] can: broadcast manager protocol (rev 20170425 t)
[ 1.474227] can: netlink gateway (rev 20170425) max_hops=1
[ 1.474439] Bluetooth: RFCOMM TTY layer initialized
[ 1.474452] Bluetooth: RFCOMM socket layer initialized
[ 1.474474] Bluetooth: RFCOMM ver 1.11
[ 1.474485] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 1.474493] Bluetooth: BNEP filters: protocol multicast
[ 1.474503] Bluetooth: BNEP socket layer initialized
[ 1.474512] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 1.474522] Bluetooth: HIDP socket layer initialized
[ 1.474635] 9pnet: Installing 9P2000 support
[ 1.474653] Key type dns_resolver registered
[ 1.475032] registered taskstats version 1
[ 1.475344] Btrfs loaded, crc32c=crc32c-generic
[ 1.481727] ff000000.serial: ttyPS0 at MMIO 0xff000000 (irq = 47, base_baud = 6s
[ 1.634246] mmc0: new high speed SDHC card at address aaaa
[ 1.641847] mmcblk0: mmc0:aaaa SB16G 14.8 GiB
[ 1.649369] mmcblk0: p1 p2 p3
[ 3.134376] console [ttyPS0] enabled
[ 3.138531] ff010000.serial: ttyPS1 at MMIO 0xff010000 (irq = 48, base_baud = 6s
[ 3.149102] xilinx-psgtr fd400000.zynqmp_phy: Lane:1 type:8 protocol:4 pll_locks
[ 3.157368] PLL: shutdown
[ 3.160036] PLL: shutdown
[ 3.162955] PLL: enable
[ 3.165446] PLL: shutdown
[ 3.168803] PLL: enable
[ 3.171263] xilinx-dp-snd-codec fd4a0000.zynqmp-display:zynqmp_dp_snd_codec0: Xd
[ 3.181852] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm0: Xilinx DisplayPort Sound PCM d
[ 3.189801] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm1: Xilinx DisplayPort Sound PCM d
[ 3.198040] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilik
[ 3.210403] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: xilik
[ 3.223017] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: Xilid
[ 3.233113] OF: graph: no port node found in /amba/zynqmp-display@fd4a0000
[ 3.239986] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 3.246520] [drm] No driver support for vblank timestamp query.
[ 3.252482] xlnx-drm xlnx-drm.0: bound fd4a0000.zynqmp-display (ops 0xffffff800)
[ 4.336690] [drm] Cannot find any crtc or sizes
[ 4.341313] [drm] Initialized xlnx 1.0.0 20130509 for fd4a0000.zynqmp-display o0
[ 4.349341] zynqmp-display fd4a0000.zynqmp-display: ZynqMP DisplayPort Subsysted
[ 4.358291] xilinx-psgtr fd400000.zynqmp_phy: Lane:3 type:3 protocol:2 pll_locks
[ 4.366101] ahci-ceva fd0c0000.ahci: AHCI 0001.0301 32 slots 2 ports 6 Gbps 0x3e
[ 4.374988] ahci-ceva fd0c0000.ahci: flags: 64bit ncq sntf pm clo only pmp fbs
[ 4.385339] scsi host0: ahci-ceva
[ 4.388781] scsi host1: ahci-ceva
[ 4.392111] ata1: SATA max UDMA/133 mmio [mem 0xfd0c0000-0xfd0c1fff] port 0x1005
[ 4.399952] ata2: SATA max UDMA/133 mmio [mem 0xfd0c0000-0xfd0c1fff] port 0x1805
[ 4.409614] xilinx-psgtr fd400000.zynqmp_phy: Lane:2 type:0 protocol:3 pll_locks
[ 4.419632] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 4.425048] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus numb1
[ 4.432893] xhci-hcd xhci-hcd.0.auto: hcc params 0x0238f625 hci version 0x100 q0
[ 4.441542] xhci-hcd xhci-hcd.0.auto: irq 58, io mem 0xfe200000
[ 4.447536] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 4.454250] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.461453] usb usb1: Product: xHCI Host Controller
[ 4.466310] usb usb1: Manufacturer: Linux 4.14.0-xilinx-v2018.2 xhci-hcd
[ 4.472996] usb usb1: SerialNumber: xhci-hcd.0.auto
[ 4.478124] hub 1-0:1.0: USB hub found
[ 4.481811] hub 1-0:1.0: 1 port detected
[ 4.485872] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 4.491285] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus numb2
[ 4.498972] usb usb2: We don't know the algorithms for LPM for this host, disab.
[ 4.507069] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[ 4.513780] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.520984] usb usb2: Product: xHCI Host Controller
[ 4.525844] usb usb2: Manufacturer: Linux 4.14.0-xilinx-v2018.2 xhci-hcd
[ 4.532528] usb usb2: SerialNumber: xhci-hcd.0.auto
[ 4.537609] hub 2-0:1.0: USB hub found
[ 4.541298] hub 2-0:1.0: 1 port detected
[ 4.546274] pca953x 0-0020: 0-0020 supply vcc not found, using dummy regulator
[ 4.556159] pca953x 0-0020: interrupt support not compiled in
[ 4.561920] pca953x 0-0021: 0-0021 supply vcc not found, using dummy regulator
[ 4.571828] pca953x 0-0021: interrupt support not compiled in
[ 4.578281] ina2xx 3-0040: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.584979] ina2xx 3-0041: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.591671] ina2xx 3-0042: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.598370] ina2xx 3-0043: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.605068] ina2xx 3-0044: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.611768] ina2xx 3-0045: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.618465] ina2xx 3-0046: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.625157] ina2xx 3-0047: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.631855] ina2xx 3-004a: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.638549] ina2xx 3-004b: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.644854] i2c i2c-0: Added multiplexed i2c bus 3
[ 4.650206] ina2xx 4-0040: power monitor ina226 (Rshunt = 2000 uOhm)
[ 4.656904] ina2xx 4-0041: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.663597] ina2xx 4-0042: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.670290] ina2xx 4-0043: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.676989] ina2xx 4-0044: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.683688] ina2xx 4-0045: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.690381] ina2xx 4-0046: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.697089] ina2xx 4-0047: power monitor ina226 (Rshunt = 5000 uOhm)
[ 4.703390] i2c i2c-0: Added multiplexed i2c bus 4
[ 4.722861] ata1: SATA link down (SStatus 0 SControl 330)
[ 4.728201] ata2: SATA link down (SStatus 0 SControl 330)
[ 4.749030] i2c i2c-0: Added multiplexed i2c bus 5
[ 4.753871] i2c i2c-0: Added multiplexed i2c bus 6
[ 4.758582] pca954x 0-0075: registered 4 multiplexed busses for I2C mux pca9544
[ 4.765898] cdns-i2c ff020000.i2c: 400 kHz mmio ff020000 irq 33
[ 4.773464] at24 7-0054: 1024 byte 24c08 EEPROM, writable, 1 bytes/write
[ 4.780119] i2c i2c-1: Added multiplexed i2c bus 7
[ 4.785046] i2c i2c-1: Added multiplexed i2c bus 8
[ 4.791777] si570 9-005d: registered, current frequency 300000000 Hz
[ 4.798079] i2c i2c-1: Added multiplexed i2c bus 9
[ 4.816745] si570 10-005d: registered, current frequency 148500000 Hz
[ 4.823133] i2c i2c-1: Added multiplexed i2c bus 10
[ 4.828162] i2c i2c-1: Added multiplexed i2c bus 11
[ 4.833071] i2c i2c-1: Added multiplexed i2c bus 12
[ 4.837989] i2c i2c-1: Added multiplexed i2c bus 13
[ 4.842896] i2c i2c-1: Added multiplexed i2c bus 14
[ 4.847705] pca954x 1-0074: registered 8 multiplexed busses for I2C switch pca98
[ 4.855562] i2c i2c-1: Added multiplexed i2c bus 15
[ 4.860485] i2c i2c-1: Added multiplexed i2c bus 16
[ 4.865404] i2c i2c-1: Added multiplexed i2c bus 17
[ 4.870617] i2c i2c-1: Added multiplexed i2c bus 18
[ 4.875547] i2c i2c-1: Added multiplexed i2c bus 19
[ 4.880474] i2c i2c-1: Added multiplexed i2c bus 20
[ 4.885389] i2c i2c-1: Added multiplexed i2c bus 21
[ 4.890314] i2c i2c-1: Added multiplexed i2c bus 22
[ 4.895113] pca954x 1-0075: registered 8 multiplexed busses for I2C switch pca98
[ 4.902686] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 34
[ 4.909760] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[ 4.916570] rtc_zynqmp ffa60000.rtc: setting system clock to 2019-06-17 05:27:4)
[ 4.925491] clk: Not disabling unused clocks
[ 4.929713] ALSA device list:
[ 4.932621] #0: DisplayPort monitor
[ 4.939184] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompats
[ 4.978091] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opt)
[ 4.986121] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 5.001216] devtmpfs: mounted
[ 5.004209] Freeing unused kernel memory: 512K
[ 5.407471] udevd[1880]: starting version 3.2.2
[ 5.449647] udevd[1881]: starting eudev-3.2.2
[ 5.476705] [drm] Cannot find any crtc or sizes
[ 6.148283] EXT4-fs (mmcblk0p3): recovery complete
[ 6.153942] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opt)
[ 6.163808] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data ma.
[ 6.200790] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 6.864404] pps pps0: new PPS source ptp0
[ 6.868363] macb ff0e0000.ethernet: gem-ptp-timer ptp clock registered.
[ 6.874996] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 54.067511] xilinx_axidma: loading out-of-tree module taints kernel.
[ 54.075778] axidma: axidma_dma.c: axidma_dma_init: 718: DMA: Found 1 transmit c.
[ 54.085733] axidma: axidma_dma.c: axidma_dma_init: 720: VDMA: Found 0 transmit .

@eleICoto
Copy link
Author

@honorpeter it seems like you have succeeded someway but i have no idea how this kind message showed up
image

@suikammd
Copy link

@honorpeter I couldn't even insmod the driver...Could you tell me what you do before you insmod the driver.

@eleICoto
Copy link
Author

@suikammd if you can, ask your lab mate to provide you the bitstream in sdk project.

@honorpeter
Copy link

@eleICoto Than you . but [ 54.067511] xilinx_axidma: loading out-of-tree module taints kernel. why?

@honorpeter
Copy link

@honorpeter I couldn't even insmod the driver...Could you tell me what you do before you insmod the driver.
@eleICoto You can do like #24 (comment).

@honorpeter
Copy link

@bperez77 when I follow you step and insmod the driver on zcu102 , I find an log and Benchmark is ok,may be as warning. but is it a matter?

Starting udev
[ 5.396416] udevd[1879]: starting version 3.2.2
[ 5.438209] udevd[1880]: starting eudev-3.2.2
[ 5.480848] [drm] Cannot find any crtc or size

root@xdmatest:~# insmod /lib/modules/4.14.0-xilinx-v2018.2/extra/xilinx-axidma.ko
[ 45.791759] xilinx_axidma: loading out-of-tree module taints kernel.
[ 45.799444] axidma: axidma_dma.c: axidma_dma_init: 718: DMA: Found 1 transmit channels and 1 receive channels.
[ 45.809396] axidma: axidma_dma.c: axidma_dma_init: 720: VDMA: Found 0 transmit channels and 0 receive channels.
./axidma-benchmark
AXI DMA Benchmark Parameters:
Transmit Buffer Size: 7.91 MiB
Receive Buffer Size: 7.91 MiB
Number of DMA Transfers: 1000 transfers

Using transmit channel 0 and receive channel 1.
Single transfer test successfully completed!
Beginning performance analysis of the DMA engine.

DMA Timing Statistics:
Elapsed Time: 20.97 s
Transmit Throughput: 377.20 MiB/s
Receive Throughput: 377.20 MiB/s
Total Throughput: 754.39 MiB/s
root@xdmatest:/usr/bin#

But test is ok, how can I do to modify the petalinux config to avoid the issue.xilinx_axidma: loading out-of-tree module taints kernel.

@eleICoto
Copy link
Author

@honorpeter where is your .ko file located at? Did this step familiar with you? petalinux-config rootfs
module -> enable dma module

@eleICoto
Copy link
Author

@honorpeter
image
image

@suikammd
Copy link

suikammd commented Jun 17, 2019

@honorpeter I just followed what the author said.
Before I exec petalinux-build, I build the module xilinx_axidma successfully.
But it seems that there must be something wrong with the device tree that leads to failed insmod. After insmod, dmesg changes nothing.

@eleICoto He already gave me the bitstream file.

@honorpeter
Copy link

@suikammd He may give you hdf. I think you should create a new project by petalinux and followed what the author said you will succeed.
You should build the petalinux with the hdf and then change the system-user.dtsi according the pl.dtsi.

@honorpeter
Copy link

@honorpeter
image
image

Only do this can't avoid the "loading out-of-tree module taints kernel" warning. I just did .

@eleICoto
Copy link
Author

@honorpeter Would you please upload your kernel config file as I mentioned before, I think there might be some config about module sig that has not been enable.

@honorpeter
Copy link

@eleICoto As #94 (comment)
but how to do and to set in where place .

@honorpeter
Copy link

In petalinux 2018.2 petalinux-config -c kernel → Device Drivers → DMA Engine support ->hlep

CONFIG_DMADEVICES:

│ │
│ DMA engines can do asynchronous data transfers without │
│ involving the host CPU. Currently, this framework can be │
│ used to offload memory copies in the network stack and │
│ RAID operations in the MD driver. This menu only presents │
│ DMA Device drivers supported by the configured arch, it may │
│ be empty in some cases. │
│ │
│ Symbol: DMADEVICES [=y] │
│ Type : boolean │
│ Prompt: DMA Engine support │
│ Location: │
│ -> Device Drivers │
│ Defined at drivers/dma/Kconfig:5 │
│ Depends on: HAS_DMA [=y] │
│ Selected by: SND_SOC_SH4_SIU [=n] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && (SUPERH || ARCH_SHMOBILE [=n] || COMPILE_TEST [=n])\ │
│ && (SUPERH || ARCH_SHMOBILE [=n]) && HAVE_CLK [=y] || CRYPTO_DEV_SP_CCP [=n] && CRYPTO [=y] && CRYPTO_HW [=n] && CRYPTO_DEV_CCP [=n] && \ │
│ CRYPTO_DEV_CCP_DD [=n] │

@honorpeter
Copy link

@eleICoto
Arrow keys navigate the menu. selects submenus ---> (or empty submenus ----). Highlighted letters are hotkeys. Pressing │
│ includes, excludes, modularizes features. Press to exit, <?> for Help, </> for Search. Legend: [] built-in [ ] │
│ excluded module < > module capable │
│ │
│ ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ --- Xilinx DMA Engines │ │
│ │ < > DMA Test client for AXI DMA │ │
│ │ < > DMA Test client for VDMA │ │
│ │ < > DMA Test client for CDMA │ │
│ │ -
- Xilinx DPDMA Engine │ │
│ │ [ ] Xilinx DPDMA debugfs │ │
│ │ -*- Xilinx Framebuffer │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │
IS DMA Test client for AXI DMA and DMA Test client for VDMA should be selected?

@suikammd
Copy link

@suikammd He may give you hdf. I think you should create a new project by petalinux and followed what the author said you will succeed.
You should build the petalinux with the hdf and then change the system-user.dtsi according the pl.dtsi.

@honorpeter you mean follow this issue 24?
Could you share me how you build petalinux?
What I do is the following:

  1. build xilinx_axidma
  2. modify device tree as the zip file I uploaded above
  3. petalinux-build
  4. sd card boot -> insert module nothing happens with no error show up

@eleICoto
Copy link
Author

@honorpeter Yes just upload this file ./project-spec/meta-plnx-generated/recipes-kernel/linux/configs/plnx_kernel.cfg

@honorpeter
Copy link

@eleICoto
In
./build/tmp/work/plnx_zynqmp-xilinx-linux/linux-xlnx/4.14-xilinx-v2018.2+gitAUTOINC+ad4cd988ba-r0/xilinx-kmeta/bsp/xilinx/soc/drivers-drm.cfg I find

CMA

CONFIG_CMA=y
CONFIG_DMA_CMA=y
CONFIG_CMA_SIZE_MBYTES=128
CONFIG_CMA_SIZE_SEL_MBYTES=y
CONFIG_CMA_ALIGNMENT=8

In
./build/tmp/work/plnx_zynqmp-xilinx-linux/linux-xlnx/4.14-xilinx-v2018.2+gitAUTOINC+ad4cd988ba-r0/xilinx-kmeta/bsp/xilinx/soc/drivers-zynqmp.cfg
I find

DMA

CONFIG_DMA_ENGINE=y
CONFIG_XILINX_ZYNQMP_DMA=y

May be it's all ok.But can't see any about DMA in ./project-spec/meta-plnx-generated/recipes-kernel/linux/configs/plnx_kernel.cfg.

@honorpeter
Copy link

@suikammd He may give you hdf. I think you should create a new project by petalinux and followed what the author said you will succeed.
You should build the petalinux with the hdf and then change the system-user.dtsi change the system-user.dtsi according the pl.dtsi.

@honorpeter you mean follow this issue 24?
Could you share me how you build petalinux?
What I do is the following:

1. build xilinx_axidma

2. modify device tree as the zip file I uploaded above

3. petalinux-build

4. sd card boot -> insert module nothing happens with no error show up

1.first creat petalinux project
2. then add the hdf to you project
3.petalinux-config --get-hw-description=./
4.petalinux-build
5.create module
6.create app
7.change the system-user.dtsi according the pl.dtsi.
8.petalinux-build

@honorpeter
Copy link

@eleICoto

This is ./project-spec/meta-plnx-generated/recipes-kernel/linux/configs/plnx_kernel.cfg

CONFIG_MTD=y
CONFIG_MTD_OF_PARTS=y
CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_GPIOLIB=y
CONFIG_GPIO_XILINX=y
CONFIG_GPIO_ZYNQ=y
CONFIG_I2C=y
CONFIG_I2C_CADENCE=y
CONFIG_MMC=y
CONFIG_MMC_BLOCK=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_OF_XILINX_PS=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MTD=y
CONFIG_MTD_M25P80=y
CONFIG_MTD_OF_PARTS=y
CONFIG_NET_CORE=y
CONFIG_PCI=y
CONFIG_PCIE_XILINX_NWL=y
CONFIG_PCI_MSI=y
CONFIG_RTC_CLASS=y
CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_SERIAL_XILINX_PS_UART=y
CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_XUSBPS=y
CONFIG_USB_GADGET_XUSBPS=y
CONFIG_USB_OTG=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_XUSBP=y
CONFIG_USB_XUSBPS_DR_OF=y
CONFIG_USB_XUSBPS_OTG=y
CONFIG_WATCHDOG=y
CONFIG_XILINX_PS_WATCHDOG=y
~
~
~
~
~
~
~
~
~
~
"./project-spec/meta-plnx-generated/recipes-kernel/linux/configs/plnx_kernel.cfg" 40L, 805C 1,0-1 全部

can't see any about dma and axi dma ,only see #98 (comment)

@suikammd
Copy link

suikammd commented Jun 19, 2019

@honorpeter Thanks!
Did you test with the author's example successfully?
Should I just copy pl.dtsi to system-user.dtsi?

This is my system-user.dtsi:
/include/ "system-conf.dtsi"
/ {
axidma_chrdev: axidma_chrdev@0 {
compatible = "xlnx,axidma-chrdev";
dmas = <&axi_dma_0 0 &axi_dma_0 1>;
dma-names = "tx_channel", "rx_channel";
};

@honorpeter
Copy link

@suikammd Yes I had test the example successfully . You should copy all in the pl.dtsi to the system-conf.dtsi and change the channel's Id .like #98 (comment)

@suikammd
Copy link

@honorpeter Hi, thanks for reply.
After follow your suggestion, I met this wired error
| Error: /home/ubuntu/board/xilinx-zcu104-2018.2/build/../components/plnx_workspace/device-tree/device-tree/system-top.dts:30.123-31.1 syntax error
this is the system-top.dts file:

/*
 * CAUTION: This file is automatically generated by Xilinx.
 * Version:
 * Today is: Wed Jun 19 14:16:49 2019
 */


/dts-v1/;
/include/ "zynqmp.dtsi"
/include/ "zynqmp-clk-ccf.dtsi"
/include/ "zcu104-revc.dtsi"
/include/ "pl.dtsi"
/include/ "pcw.dtsi"
/ {
        chosen {
                bootargs = "earlycon clk_ignore_unused";
                stdout-path = "serial0:115200n8";
        };
        aliases {
                ethernet0 = &gem3;
                i2c0 = &i2c1;
                serial0 = &uart0;
                serial1 = &uart1;
                spi0 = &qspi;
        };
        memory {
                device_type = "memory";
                reg = <0x0 0x0 0x0 0x7ff00000>;
        };
 };
#include "system-user.dtsi"

Do you know how to solve it?

@honorpeter
Copy link

@suikammd You should learn https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841738/Getting+Started
May be #include "system-user.dtsi"? You can delete all ,the petalinux will genarate auto

@suikammd
Copy link

@honorpeter Thanks, it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants