AnsweredAssumed Answered

Compile CF_AXI_ADC drivers into 3.14 kernel

Question asked by nick.wernicke@gmail.com on Oct 31, 2014
Latest reply on Nov 3, 2014 by mhennerich

The CF_AXI_ADC drivers are available in linux/drivers/iio/adc at xcomm_zynq · analogdevicesinc/linux · GitHub

 

I attempted to port them to a real-time (patched) xilinx linux kernel that is version 3.14. They compile into the kernel with no errors, but I can't get the drivers to load: the devices do not show up in /proc/device-tree. They do not compile as modules. I don't know why that would be.

 

The devices DO show up when I build the analog devices 3.15 kernel. I must be missing something, or these drivers are not compatible with the older kernel.

 

My strategy was as follows, what am I missing?

From analog devices linux 3.15 copy

from analog_devices_linux/drivers/iio/adc/

  admc_adc.c

  admc_ctrl.c

  admc_speed.c

  cf_axi_adc.h

  cf_axi_adc_core.c

  cf_axi_adc_ring.c

  cf_axi_adc_ring_stream.c

 

from analog_devices_linux/drivers/iio/

  industrialio-core.c

  iio_core.h

  iio_core_trigger.h

  kfifo_buf.c

  industrialio-buffer.c

  buffer_cb.c

  industrialio-event.c

  industrialio-trigger.c

  industrialio-triggered-buffer.c

  industrialio-dmabuf.c

  industrialio-dmaengine.c

 

from analog_devices_linux/include/linux/iio/

* all the files

 

add to drivers/iio/adc/Kconfig

config CF_AXI_ADC

  tristate "Analog Devices AD9467 AD9643 High-Speed AXI ADC driver"

  select IIO_BUFFER

  help

   Say yes here to build support for Analog Devices AD9467 and AD9643,

   High-Speed LVDS analog to digital converters (ADC).

   FPGA interface HDL is available here:

   http://wiki.analog.com/resources/fpga/xilinx/fmc/ad9467

   If unsure, say N (but it's safe to say "Y").


   To compile this driver as a module, choose M here: the

   module will be called cf_axi_adc.

 

add this to the top of drivers/iio/adc/makefile

obj-$(CONFIG_CF_AXI_ADC) += cf_axi_adc.o ad9467.o ad9361.o admc_adc.o admc_speed.o admc_ctrl.o ad_adc.o

obj-$(CONFIG_CF_AXI_FFT) += cf_axi_fft_core.o

cf_axi_adc-y := cf_axi_adc_core.o cf_axi_adc_ring.o cf_axi_adc_ring_stream.o

 

Add to drivers/iio/Makefile

industrialio-y := industrialio-core.o industrialio-event.o inkern.o industrialio-dmabuf.o industrialio-dmaengine.o

Outcomes