AnsweredAssumed Answered

SPORT configuration error while using ioctl

Question asked by alex-ipa on Aug 22, 2012
Latest reply on Aug 31, 2012 by Aaronwu

When configure the SPORT0 with ioctl, following the SPORT documentation in

the ioctl returns an error.

The error is returned from the switch case statement in function "sport_ioctl" in line 792 in /linux-2.6.x/drivers/char/bfin_sport.c

The parameter "cmd = 0" and the macro "SPORT_IOC_CONFIG = -1071624191" is not equal and therefore the default case is executed.

The development board is Bluetchnix CM-BF537E witch bf537e. The configuration file in /linux-2.6.x/arch/blackfin/mach-bf537/boards/ is similar to the stamp file. The driver in "Linux Kernel Configuration -> Device Drivers -> Character devices -> Blackfin SPORT dirver for direct raw access" is select and SPI over SPORT is disabled.

The Linux Kernel is compiled from the git clone:

root:/> uname -a

Linux blackfin 3.5.0-ADI-2012R1-pre-00815-g582dd7d-dirty #73 PREEMPT Wed Aug 22 10:02:03 CEST 2012 blackfin GNU/Linux


The device is listed in the device list:

root:/> ls -la /dev/s*

crw-rw----    1 root     root      153,   0 Jan  1 00:00 /dev/spidev0.1

crw-rw----    1 root     root       10,  62 Jan  1 00:00 /dev/sport0


The sport0 is detectet:

root:/> cat /proc/misc

  59 network_throughput

  60 network_latency

  61 cpu_dma_latency

  62 sport0

  63 bfin-dma

235 autofs


Why the parameter "cmd" is 0? Is this a bug or a configuration problem?


Best regards


Alexander Ens