AnsweredAssumed Answered

getting the AD9361 drivers into the Xilinx 4.6 kernel

Question asked by Ben5 on Jun 19, 2017
Latest reply on Jun 19, 2017 by Ben5

I've gotten my AD-FMCOMMS3-EBZ card working on my ZCU102 board using the 4.6 kernel from Analog Devices (the "xcomm_zynq" branch). However, I do NOT want to be stuck using AD's own kernel.


Instead, I'm trying to build the necessary drivers into Xilinx's 4.6 kernel. I've tried patching in what seemed like all the necessary files:

  • the entire drivers/iio/ directory
  • the entire include/linux/iio directory
  • include/linux/clk/clkscale.h
  • drivers/dma/dma-axi-dmac.c and corresponding Kconfig entry
  • lib/scatterlist.c and include/linux/scatterlist.h

That kernel seems to build fine, but when I boot it up (with the AD9361 entries in my device tree) I get weird sporadic kernel hangs when it tries to do AD9361 things.  Sometimes it will hang during boot-up when it's trying to probe the AD9361-phy.  Sometimes it will finish booting up, but will hang when I run some code that makes libiio calls to configure the AD9361. In the case of the libiio hanging, the process becomes impossible to kill, and its process state is "D", meaning it's in uniterruptible sleep while it's waiting for the kernel to respond.  This seems to indicate to me something subtly wrong or missing in my kernel patching.


Any tips or recommendations on getting this to work?  I would also be fine with building the drivers as an external loadable kernel module, but I assume I'll run into the same issues with this method.