This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SPI issue - no spidev0.0 creation in /dev

Hi,

I am trying to port SPI driver (for IMX035 sony image sensor) from APPRO IPNC 2.6 to IPNC 3.0.

I have stuck now with SPI issue. I raised issue in some other thread before but did not get any reply, so initiating new thread with more details.

After porting SPI driver from 2.6 to 3.0 I am getting below boot log.

Loading from NAND 32MiB 3,3V 8-bit, offset 0x200000
   Image Name:   Linux-2.6.18_pro500-davinci_IPNC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2669188 Bytes =  2.5 MB
   Load Address: 80008000
   Entry Point:  80008000
## Booting kernel from Legacy Image at 80700000 ...
   Image Name:   Linux-2.6.18_pro500-davinci_IPNC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2669188 Bytes =  2.5 MB
   Load Address: 80008000
   Entry Point:  80008000
   Loading Kernel Image ... OK
OK

Starting kernel ...

[    0.000000] Linux version 2.6.18_pro500-davinci_IPNC_DM365_3.0.0 (root@user-desktop) (gcc version 4.2.0 (MontaVista 2
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[    0.000000] Machine: DaVinci DM365 IPNC
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] DaVinci DM0365 variant 0x8
[    0.000000] PLL0: fixedrate: 24000000, commonrate: 135000000, vpssrate: 270000000
[    0.000000] PLL0: vencrate_sd: 27000000, ddrrate: 270000000 mmcsdrate: 49090909
[    0.000000] PLL1: armrate: 297000000, voicerate: 118800000, vencrate_hd: 74250000
[    0.000000] CPU0: D VIVT write-back cache
[    0.000000] CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
[    0.000000] CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
[    0.000000] Built 1 zonelists.  Total pages: 12288
[    0.000000] Kernel command line: mem=48M console=ttyS0,115200n8 root=/dev/mtdblock3 rootfstype=squashfs ip=off eth=00:0C:"
[    0.000000] TI DaVinci EMAC: kernel boot params Ethernet address: 00:0C:13:A5:DE:D1
[    0.000000] PID hash table entries: 256 (order: 8, 1024 bytes)
[    0.000000] Clock event device timer0_0 configured with caps set: 07
[    0.000000] Console: colour dummy device 80x30
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 48MB = 48MB total
[    0.000000] Memory: 45860KB available (2301K code, 278K data, 172K init)
[    0.000000] Calibrating delay loop (skipped)... 148.27 BogoMIPS preset
[    0.000000] Security Framework v1.0.0 initialized
[    0.000000] Capability LSM initialized
[    0.000000] Mount-cache hash table entries: 512
[    0.000000] CPU: Testing write buffer coherency: ok
[    0.010000] NET: Registered protocol family 16
[    0.010000] End of board initid number is negative
[    0.010000] DaVinci: 104 gpio irqs
[    0.010000] MUX: initialized GPIO20
[    0.010000] MUX: initialized I2C_SCL
[    0.010000] id number is: 0
[    0.020000] Generic PHY: Registered new driver
[    0.020000] ch0 default output "COMPOSITE", mode "NTSC"
[    0.020000] VPBE Encoder Initialized
[    0.020000] id number is: 1
[    0.030000] SCSI subsystem initialized
[    0.030000] NET: Registered protocol family 2
[    0.120000] IP route cache hash table entries: 512 (order: -1, 2048 bytes)
[    0.120000] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.120000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.120000] TCP: Hash tables configured (established 2048 bind 1024)
[    0.120000] TCP reno registered
[    0.120000]
[    0.120000]  ***davinci_spi_board_init()!<6>PS: davinci_spi_register
[    0.120000]  ***davinci_spi_board_init_End(0)!<5>VFS: Disk quotas dquot_6.5.1
[    0.140000] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.140000] squashfs: version 3.1 (2006/08/19) Phillip Lougher
[    0.140000] JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
[    0.140000] Initializing Cryptographic API
[    0.140000] io scheduler noop registered
[    0.140000] io scheduler anticipatory registered (default)
[    0.140000] io scheduler deadline registered
[    0.140000] io scheduler cfq registered
[    0.190000] CSL: Module install successful, device major num = 253
[    0.190000] CSL: Module version 0.10.00, built on Jun 20 2012 17:30:46
[    0.190000] I2C: Module install successful, device major num = 252
[    0.190000] DMA: Module install successful, device major num = 251
[    0.190000] DRV: Module install successful
[    0.190000] DRV: Module built on Jun 20 2012 17:30:47
[    0.190000] DRV: EDMACC.QUEPRI  = 00002777
[    0.190000] DRV: SYSTEM.MSTPRI0 = 00440011
[    0.190000] DRV: SYSTEM.MSTPRI1 = 00000444
[    0.190000] DRV: ISP.BCR        = 00000002
[    0.190000] DRV: SYSTEM.MISC    = 00000399
[    0.190000] EDMAK module: built on Jun 20 2012 at 17:30:32
[    0.190000]   Reference Linux version 2.6.18
[    0.190000]   File /home/user/IP_CAMERA/IPNetCam_3_0/dvsdk_ipnctools/linuxutils_2_24_03/packages/ti/sdo/linuxutils/ec
[    0.190000] IRQK module: built on Jun 20 2012 at 17:30:33
[    0.190000]   Reference Linux version 2.6.18
[    0.190000]   File /home/user/IP_CAMERA/IPNetCam_3_0/dvsdk_ipnctools/linuxutils_2_24_03/packages/ti/sdo/linuxutils/ic
[    0.190000] irqk initialized
[    0.190000] CMEMK module: built on Jun 20 2012 at 17:30:31
[    0.190000]   Reference Linux version 2.6.18
[    0.190000]   File /home/user/IP_CAMERA/IPNetCam_3_0/dvsdk_ipnctools/linuxutils_2_24_03/packages/ti/sdo/linuxutils/cc
[    0.200000] allocated heap buffer 0xc4000000 of size 0x5000000
[    0.200000] CMEM Range Overlaps Kernel Physical - allowing overlap
[    0.200000] CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x83000000)
[    0.200000] cmemk initialized
[    0.200000] Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled
[    0.200000] serial8250.0: ttyS0 at MMIO map 0x1d06000 mem 0xfbd06000 (irq = 41) is a 16550A
[    0.210000] RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize
[    0.220000] id number is negative
[    0.230000] Davinci EMAC MII Bus: probed
[    0.230000] MAC address is 00:0C:13:A5:DE:D1
[    0.240000] TI DaVinci EMAC Linux version updated 4.0
[    0.240000] Linux video capture interface: v2.00
[    0.270000] Trying to register davinci display video device.
[    0.270000] layer=c0438200,layer->video_dev=c0438360
[    0.280000] Trying to register davinci display video device.
[    0.280000] layer=c0438000,layer->video_dev=c0438160
[    0.290000] davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
[    0.300000] i2c /dev entries driver
[    0.310000] nand_davinci nand_davinci.0: Using 4-bit hardware ECC
[    0.310000] id number is: 0
[    0.320000] NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit)
[    0.330000] Creating 6 MTD partitions on "nand_davinci.0":
[    0.330000] 0x00000000-0x00080000 : "bootloader"
[    0.340000] 0x00080000-0x00200000 : "params"
[    0.340000] 0x00200000-0x00600000 : "kernel"
[    0.350000] 0x00600000-0x01e00000 : "filesystem"
[    0.360000] 0x01e00000-0x02000000 : "data1"
[    0.360000] 0x02000000-0x02000000 : "data2"
[    0.370000] mtd: partition "data2" is out of reach -- disabled
[    0.380000] nand_davinci nand_davinci.0: hardware revision: 2.3
[    0.380000] Inside of spi master probe
[    0.390000] id number is: 0
[    0.390000] MUX: initialized SPI0_SCLK
[    0.390000] MUX: initialized SPI0_SDO)
[    0.400000] dm_spi.0: davinci SPI Controller driver at 0xc386e000 (irq = 42) use_dma=0
[    0.410000] rtc_davinci_dm365 rtc_davinci_dm365.0: rtc intf: proc
[    0.420000] rtc_davinci_dm365 rtc_davinci_dm365.0: rtc intf: dev (254:0)
[    0.430000] rtc_davinci_dm365 rtc_davinci_dm365.0: rtc core: registered rtc_davinci_dm365 as rtc0
[    0.440000] rtc wait time out !!!!!
[    0.450000] rtc wait time out !!!!!
[    0.450000] rtc wait time out !!!!!
[    0.460000] rtc wait time out !!!!!
[    0.460000] rtc wait time out !!!!!
[    0.470000] rtc wait time out !!!!!
[    0.480000] rtc wait time out !!!!!
[    0.480000] rtc wait time out !!!!!
[    0.490000] Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
[    0.500000] ASoC version 0.13.1
[    0.520000] id number is: -1
[    0.520000] CQ0093 Voice Codec 0.1
[    0.520000] asoc: cq93vc <-> davinci-vcif mapping ok
[    0.540000] ALSA device list:
[    0.540000]   #0: On-chip voice codec (cq93vc)
[    0.550000] IPv4 over IPv4 tunneling driver
[    0.550000] TCP bic registered
[    0.560000] NET: Registered protocol family 1
[    0.560000] NET: Registered protocol family 17
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.570000] rtc wait time out !!!!!
[    0.580000] Time: timer0_1 clocksource has been installed.
[    0.580000] Clock event device timer0_0 configured with caps set: 08
[    0.580000] Switched to high resolution mode on CPU 0
[    0.580000] rtc_davinci_dm365 rtc_davinci_dm365.0: setting the system clock to 2000-09-14 01:01:01 (968893261)
[    0.600000] VFS: Mounted root (squashfs filesystem) readonly.
[    0.600000] Freeing init memory: 172K
INIT: version 2.86 booting
Creat queue id:0
queue id:0
FileMngThread created
Creat queue id:32769
queue id:32769
AlramThread created
Share memory init success
IPNC_DM365_3.0.0 (root@user-desktop) (gcc version 4.2.0 (M
Creat queue id:65538
queue id:65538
queue id:32769
queue id:65538
Creat queue id:98307
queue id:98307
Setting up networking ...rm: unable to remove `/etc/network/run': Read-only file system
net_search_gateway:eth0, 1A8C0, 0, 1

CPU is DM365

*****************************************************************

  IPNC BUILD VERSION: DM365 IPNC REF DESIGN VERSION 3.00.00.10

*****************************************************************

./av_server.out DM365 NTSC APPRO2A AEWB 720P H264 4000000 VBR AUTO MENUOFF &
Check_device_version : DEVICE VER = 0 !!
log status
Starting portmap daemon: CPU CurrentStatus is = 0
log status
portmapstart_daemon
ApproDrvInit: 7
Creat queue id:131076
queue id:131076
ApproDrvInit: 9
queue id:131076
ApproDrvInit: 8
queue id:131076
ApproDrvInit: 2
queue id:131076
ApproDrvInit: 6
queue id:131076
ApproDrvInit: 10
queue id:131076
 Selected sensor is 720P

AVSERVER UI: Initializing.
 AVSERVER API: Creating TSKs.
Inside of DRV_Init
Inside of OSA_InitExit of OSA_InitExit of OSA_Init 1
Inside of CSL_sysInit
CSL status is: 0
Inside of CSL_usrDrvIoctl
fd:4    cmd:52224
Inside of CSL_usrDrvIoctl
fd:4    cmd:52229
Inside of CSL_usrDrvIoctl
fd:12   cmd:52232
Inside of CSL_usrDrvIoctl
fd:12   cmd:52231
Inside of CSL_usrDrvIoctl
fd:4    cmd:52231
 
 CLK Hz,
 ARM   Hz =  297000000
 DDR   Hz =  270000000
 VPSS  Hz =  270000000
 IMCOP Hz =  270000000
 
Inside of CSL_usrDrvIoctl
fd:4    cmd:52231
 DRV LDC: GetConfig 0004 0x0
ldcInFrameWidth:0
 [OSA_FILE ] Reading file [/mnt/nand/IMG_Paramset.bin] ... ERROR
IMAGE TUNE: Paramset File is not available..... Setting DEFAULT parameter
 AVSERVER API: Creating TSKs...DONE
SYSTEM.MSTPRI0 value changed to 00440011

CONFIGURING MY AVSERVER FOR DM365 .....
queue id:65538
RAW IN MODE: 0
Resize: 0
YUV: 2
FPS: 30
SENSOR MODE: 6
STREAM CFG: 0
 AVSERVER API: Sending START.
 CAPTURE: Opening imager SONY_IMX035_1_3MP.
 
 $$$$$$$$$$$$ 1280X1024 $$$$$$$$$$$$

 
 $$$$$$$$$$$$ DRV_imgsOpen sxga $$$$$$$$$$$$

 
 ########## 1584X1119 ############

$$$$$$$$$$$$$$ VID0:1000
Inside of CSL_usrDrvIoctl
fd:12   cmd:52224
Inside of CSL_usrDrvIoctl
fd:12   cmd:52225
Inside of CSL_usrDrvIoctl
fd:12   cmd:52226
Inside of CSL_usrDrvIoctl
fd:12   cmd:52225
 ERROR  (drv_imgs_IMX035_1_3MP.c|DRV_imgsOpen|132): DRV_spiOpen()
 ERROR  (drv_capture.c|DRV_captureOpen|65): Open failed
 ERROR  (videoCaptureThr.c|VIDEO_captureTskCreate|87): DRV_captureOpen()
 ERROR  (videoCaptureThr.c|VIDEO_captureTskMain|745): VIDEO_captureTskCreate() ERROR  (avServerMainThr.c|AVSERVER_tskStart|2
/opt/ipnc/modules/init.d_ins/portmap: /opt/ipnc/modules/init.d_ins/portmap: 162: cannot create /var/run/portmap.pid: Read-onm
log success
.
log status
log status
Starting mounting local filesystems: log status
mount none on /dev/shm type tmpfs (rw,size=5M)
none on /var/run type tmpfs (rw)
none on /tmp type tmpfs (rw,sync)
log success
log status
Starting hotplug subsystem:
   usb     
   usb      [success]
   input   
   input    [success]
done.
[    8.820000] loop: loaded (max 8 devices)
[    8.990000] tun: Universal TUN/TAP device driver, 1.6
[    9.020000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    9.270000] CSLIP: code copyright 1989 Regents of the University of California
[    9.420000] netconsole: not configured, aborting
[    9.600000] PPP generic driver version 2.4.2
[    9.830000] PPP Deflate Compression module registered
Starting internet superserver: inetd.
[   10.590000]  sbulla: unknown partition table
[   12.080000] id number is: 0
[   12.080000] davinci-mmc davinci-mmc.0: Supporting 4-bit mode
MontaVista(R) Linux(R) Professional Edition 5.0.0 (0702774)
[   12.590000] usbcore: registered new driver usbfs
DM365_IPNC login: root (automatic login)river hub
[   12.970000] musb_hdrc: version 6.0, cppi-dma, peripheral, debug=0
[   13.080000] id number is negative
Welcome to MontaVista(R) Linux(R) Professional Edition 5.0.0 (0702774).
[   13.110000] musb_hdrc: USB Peripheral mode controller at c3906000 using DMA, IRQ 12
login[672]: root login  on `ttyS0'port class v1.1-646.<5>iscsi: registered transport (tcp)
[   14.350000]  sbulla: unknown partition table
# dosfs 3.0.6 (04 Oct 2009)
# able to get drive geometry, using default 255/63
# ev/sbulla has 255 heads and 63 sectors per track,
# gical sector size is 512,
# ing 0xf8 media descriptor, with 1024 sectors;
# le system has 2 12-bit FATs and 4 sectors per cluster.
# T size is 1 sector, and provides 247 clusters.
# ot directory contains 512 slots.
# lume ID is 35c6ab9b, no volume label.
# eue id:0

When I checked in /dev, I can not see spidev0.0 node and because of which I am getting DRV_spiOpen error.

When I check in /sys folder, I can SPI in /sys/bus, /sys/devices and /sys/module. I understand from this my porting is partially done but I am not able to understand why i am not getting spidev0.0 in /dev folder.

Please help.

Regards,

panshi



  • You might have an older kernel, older style driver or no udev or similar. Means that device files will not automatically be created. You could try creating the file manually. I don't know what the default major is for spidev0.0. You can check /proc/devices for the major number. Assuming it's a character device:

    mknod /dev/spidev0.0 c MAJOR 0

    You might have to set the permissions:

    chmod 664 /dev/spidev0.0

  • Hi,

    Also, SPI stuff was removed to reduce boot time considering we were using Parallele sensor MT5, you will need to enable it in the kernel code

    Can you compare the versions of kernel of v2.6 and v3.0 and merge the changes requried for SPI

    Regards,

    Raghu

  • Hi,

    Thank you for reply.

    "You might have an older kernel, older style driver or no udev or similar."

    - I am using kernel "Linux-2.6.18_pro500-davinci_IPNC" which is same in version 2.6 and 3.0.

    - Driver files are same as 2.6 IPNC version, I am using same files for version 3.0 IPNC.

    "Means that device files will not automatically be created. You could try creating the file manually. "

    - In 2.6 IPNC version I could not find any mdev or pdev or mknod for SPIDEV0.0 creation. So I am assuming when I call "davinci_spi_register" it should get created.

    - When i tried to run mknod dev/spidev0.0 c 153 0, I am getting error as read only file system.

    "Also, SPI stuff was removed to reduce boot time considering we were using Parallele sensor MT5, you will need to enable it in the kernel code"

    - As part of enabling in kernel. with make meuconfig i have enabled user space spi driver similar to version 2.6 config file. Is there any thing else I have to enable in kernel?

    "Can you compare the versions of kernel of v2.6 and v3.0 and merge the changes requried for SPI"

    - I compared and merged the possible required changes of SPI from 2.6 to 3.0.

    Raghu, could you please share some check points i need to carry out to figure out the issue. Please let me know if any more details require.

    Regards,

    panshi

  • I've haven't seen any drivers that automatically device files. For some reason Linux kernel writers don't like to do that. The newer drivers will raise an event that is picked up by mdev or udev on the user space side that automatically creates the device file. The older drivers won't raise an event.

    In any case, a filesystem needs to be write-able to add a device node. Never used squashfs. Can you add the node to the source filesystem before "squashing" it? Udev does weird things that might allow creation of a writeable device directory. Doubt that udev works with for linux 2.6.18 though.

  • Dear Norman,

    Thank you for reply.

    "In any case, a filesystem needs to be write-able to add a device node. Never used squashfs. Can you add the node to the source filesystem before "squashing" it?"

    Do you mean I have to add node manually in filesystem and then squashing it and download.

    After doing this I am getting below boot log,

    Loading from NAND 32MiB 3,3V 8-bit, offset 0x200000
       Image Name:   Linux-2.6.18_pro500-davinci_IPNC
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3255204 Bytes =  3.1 MB
       Load Address: 80008000
       Entry Point:  80008000
    ## Booting kernel from Legacy Image at 80700000 ...
       Image Name:   Linux-2.6.18_pro500-davinci_IPNC
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3255204 Bytes =  3.1 MB
       Load Address: 80008000
       Entry Point:  80008000
       Loading Kernel Image ... OK
    OK

    Starting kernel ...

    [    0.000000] Linux version 2.6.18_pro500-davinci_IPNC_DM365_3.0.0 (root@user-desktop) (gcc version 4.2.0 (MontaVista 2
    [    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
    [    0.000000] Machine: DaVinci DM365 IPNC
    [    0.000000] Memory policy: ECC disabled, Data cache writeback
    [    0.000000] DaVinci DM0365 variant 0x8
    [    0.000000] PLL0: fixedrate: 24000000, commonrate: 135000000, vpssrate: 270000000
    [    0.000000] PLL0: vencrate_sd: 27000000, ddrrate: 270000000 mmcsdrate: 49090909
    [    0.000000] PLL1: armrate: 297000000, voicerate: 118800000, vencrate_hd: 74250000
    [    0.000000] CPU0: D VIVT write-back cache
    [    0.000000] CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
    [    0.000000] CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
    [    0.000000] Built 1 zonelists.  Total pages: 12288
    [    0.000000] Kernel command line: mem=48M console=ttyS0,115200n8 root=/dev/mtdblock3 rootfstype=squashfs ip=off eth=00:0C:"
    [    0.000000] TI DaVinci EMAC: kernel boot params Ethernet address: 00:0C:13:A5:DE:D1
    [    0.000000] PID hash table entries: 256 (order: 8, 1024 bytes)
    [    0.000000] Clock event device timer0_0 configured with caps set: 07
    [    0.000000] Console: colour dummy device 80x30
    [    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.000000] Memory: 48MB = 48MB total
    [    0.000000] Memory: 45312KB available (2869K code, 284K data, 176K init)
    [    0.000000] Calibrating delay loop (skipped)... 148.27 BogoMIPS preset
    [    0.000000] Security Framework v1.0.0 initialized
    [    0.000000] Capability LSM initialized
    [    0.000000] Mount-cache hash table entries: 512
    [    0.000000] CPU: Testing write buffer coherency: ok
    [    0.010000] NET: Registered protocol family 16
    [    0.010000] End of board initid number is negative
    [    0.010000] DaVinci: 104 gpio irqs
    [    0.010000] MUX: initialized GPIO20
    [    0.010000] MUX: initialized I2C_SCL
    [    0.020000] Generic PHY: Registered new driver
    [    0.020000] ch0 default output "COMPOSITE", mode "NTSC"
    [    0.020000] VPBE Encoder Initialized
    [    0.020000] id number is: 1
    [    0.030000] SCSI subsystem initialized
    [    0.030000] NET: Registered protocol family 2
    [    0.120000] IP route cache hash table entries: 512 (order: -1, 2048 bytes)
    [    0.120000] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.120000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.120000] TCP: Hash tables configured (established 2048 bind 1024)
    [    0.120000] TCP reno registered
    [    0.120000]
    [    0.120000]  ***davinci_spi_board_init()!<6>
    [    0.120000]  ***davinci_spi_board_init_End(0)!<5>VFS: Disk quotas dquot_6.5.1
    [    0.140000] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [    0.140000] squashfs: version 3.1 (2006/08/19) Phillip Lougher
    [    0.140000] JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
    [    0.140000] SGI XFS with no debug enabled
    [    0.150000] Initializing Cryptographic API
    [    0.150000] io scheduler noop registered
    [    0.150000] io scheduler anticipatory registered (default)
    [    0.150000] io scheduler deadline registered
    [    0.150000] io scheduler cfq registered
    [    0.190000] CSL: Module install successful, device major num = 253
    [    0.190000] CSL: Module version 0.10.00, built on Jun 21 2012 18:17:19
    [    0.190000] I2C: Module install successful, device major num = 252
    [    0.190000] DMA: Module install successful, device major num = 251
    [    0.190000] DRV: Module install successful
    [    0.190000] DRV: Module built on Jun 21 2012 18:17:20
    [    0.190000] DRV: EDMACC.QUEPRI  = 00002777
    [    0.190000] DRV: SYSTEM.MSTPRI0 = 00440011
    [    0.190000] DRV: SYSTEM.MSTPRI1 = 00000444
    [    0.190000] DRV: ISP.BCR        = 00000002
    [    0.190000] DRV: SYSTEM.MISC    = 00000399
    [    0.190000] EDMAK module: built on Jun 21 2012 at 18:16:59
    [    0.190000]   Reference Linux version 2.6.18
    [    0.190000]   File /home/user/IP_CAMERA/IPNetCam_3_0/dvsdk_ipnctools/linuxutils_2_24_03/packages/ti/sdo/linuxutils/ec
    [    0.190000] IRQK module: built on Jun 21 2012 at 18:17:00
    [    0.190000]   Reference Linux version 2.6.18
    [    0.190000]   File /home/user/IP_CAMERA/IPNetCam_3_0/dvsdk_ipnctools/linuxutils_2_24_03/packages/ti/sdo/linuxutils/ic
    [    0.200000] irqk initialized
    [    0.200000] CMEMK module: built on Jun 21 2012 at 18:16:58
    [    0.200000]   Reference Linux version 2.6.18
    [    0.200000]   File /home/user/IP_CAMERA/IPNetCam_3_0/dvsdk_ipnctools/linuxutils_2_24_03/packages/ti/sdo/linuxutils/cc
    [    0.200000] allocated heap buffer 0xc4000000 of size 0x5000000
    [    0.200000] CMEM Range Overlaps Kernel Physical - allowing overlap
    [    0.200000] CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x83000000)
    [    0.200000] cmemk initialized
    [    0.200000] Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled
    [    0.210000] serial8250.0: ttyS0 at MMIO map 0x1d06000 mem 0xfbd06000 (irq = 41) is a 16550A
    [    0.220000] RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize
    [    0.230000] id number is negative
    [    0.230000] Davinci EMAC MII Bus: probed
    [    0.240000] MAC address is 00:0C:13:A5:DE:D1
    [    0.240000] TI DaVinci EMAC Linux version updated 4.0
    [    0.250000] Linux video capture interface: v2.00
    [    0.270000] Trying to register davinci display video device.
    [    0.280000] layer=c04ac200,layer->video_dev=c04ac360
    [    0.280000] Trying to register davinci display video device.
    [    0.290000] layer=c04ac000,layer->video_dev=c04ac160
    [    0.300000] davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
    [    0.310000] i2c /dev entries driver
    [    0.310000] nand_davinci nand_davinci.0: Using 4-bit hardware ECC
    [    0.320000] id number is: 0
    [    0.320000] NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit)
    [    0.330000] Creating 6 MTD partitions on "nand_davinci.0":
    [    0.340000] 0x00000000-0x00080000 : "bootloader"
    [    0.340000] 0x00080000-0x00200000 : "params"
    [    0.350000] 0x00200000-0x00600000 : "kernel"
    [    0.360000] 0x00600000-0x01e00000 : "filesystem"
    [    0.360000] 0x01e00000-0x02000000 : "data1"
    [    0.370000] 0x02000000-0x02000000 : "data2"
    [    0.380000] mtd: partition "data2" is out of reach -- disabled
    [    0.380000] nand_davinci nand_davinci.0: hardware revision: 2.3
    [    0.390000] Inside of spi master probe
    [    0.400000] id number is: 0
    [    0.400000] MUX: initialized SPI0_SCLK
    [    0.400000] MUX: initialized SPI0_SDO)
    [    0.410000] dm_spi.0: davinci SPI Controller driver at 0xc386e000 (irq = 42) use_dma=0
    [    0.420000] rtc_davinci_dm365 rtc_davinci_dm365.0: rtc intf: proc
    [    0.430000] rtc_davinci_dm365 rtc_davinci_dm365.0: rtc intf: dev (254:0)
    [    0.440000] rtc_davinci_dm365 rtc_davinci_dm365.0: rtc core: registered rtc_davinci_dm365 as rtc0
    [    0.450000] rtc wait time out !!!!!
    [    0.450000] rtc wait time out !!!!!
    [    0.460000] rtc wait time out !!!!!
    [    0.470000] rtc wait time out !!!!!
    [    0.470000] rtc wait time out !!!!!
    [    0.480000] rtc wait time out !!!!!
    [    0.480000] rtc wait time out !!!!!
    [    0.490000] rtc wait time out !!!!!
    [    0.490000] Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
    [    0.500000] ASoC version 0.13.1
    [    0.520000] id number is: -1
    [    0.530000] CQ0093 Voice Codec 0.1
    [    0.530000] asoc: cq93vc <-> davinci-vcif mapping ok
    [    0.550000] ALSA device list:
    [    0.550000]   #0: On-chip voice codec (cq93vc)
    [    0.560000] IPv4 over IPv4 tunneling driver
    [    0.560000] TCP bic registered
    [    0.560000] NET: Registered protocol family 1
    [    0.570000] NET: Registered protocol family 17
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.570000] rtc wait time out !!!!!
    [    0.580000] Time: timer0_1 clocksource has been installed.
    [    0.580000] Clock event device timer0_0 configured with caps set: 08
    [    0.580000] Switched to high resolution mode on CPU 0
    [    0.580000] rtc_davinci_dm365 rtc_davinci_dm365.0: setting the system clock to 2000-09-14 01:01:01 (968893261)
    [    0.600000] VFS: Mounted root (squashfs filesystem) readonly.
    [    0.600000] Freeing init memory: 176K
    INIT: version 2.86 booting
    [    3.310000] JFFS2 notice: (261) check_node_data: wrong data CRC in data node at 0x000b4600: read 0xf8ab9fcf, calculated 0.
    Creat queue id:0
    queue id:0
    FileMngThread created
    Creat queue id:32769
    queue id:32769
    queue id:32769
    AlramThread created
    Share memory init success
    IPNC_DM365_3.0.0 (root@user-desktop) (gcc version 4.2.0 (M
    Creat queue id:65538
    queue id:65538
    Setting up networking ...queue id:65538
    Creat queue id:98307
    queue id:98307
    net_search_gateway:eth0, 1A8C0, 0, 1

    CPU is DM365

    *****************************************************************

      IPNC BUILD VERSION: DM365 IPNC REF DESIGN VERSION 3.00.00.10

    *****************************************************************

    ./av_server.out DM365 NTSC APPRO2A AEWB 720P H264 4000000 VBR AUTO MENUOFF &
    Check_device_version : DEVICE VER = 0 !!
    rm: unable to remove `/etc/network/run': Read-only file system
    CPU CurrentStatus is = 0
    log status
    Starting portmap daemon: log status
    portmapstart_daemon
    ApproDrvInit: 7
    Creat queue id:131076
    queue id:131076
    ApproDrvInit: 9
    queue id:131076
    ApproDrvInit: 8
    queue id:131076
     Selected sensor is 720P

    AVSERVER UI: Initializing.
     AVSERVER API: Creating TSKs.
    Inside of DRV_Init
    Inside of OSA_InitExit of OSA_InitExit of OSA_Init 1
    Inside of CSL_sysInit
    CSL status is: 0
    ApproDrvInit: 2
    queue id:131076
    ApproDrvInit: 6
    queue id:131076
    ApproDrvInit: 10
    queue id:131076
    fd:4    cmd:52224
    fd:4    cmd:52229
    fd:12   cmd:52232
    fd:12   cmd:52231
    log success
    fd:4    cmd:52231
     
     CLK Hz,
     ARM   Hz =  297000000
     DDR   Hz =  270000000
     VPSS  Hz =  270000000
     IMCOP Hz =  270000000
     
    fd:4    cmd:52231
     DRV LDC: GetConfig 0004 0x0
    ldcInFrameWidth:0
     [OSA_FILE ] Reading file [/mnt/nand/IMG_Paramset.bin] ... ERROR
    IMAGE TUNE: Paramset File is not available..... Setting DEFAULT parameter
    .
    log status
    log status
    Starting mounting local filesystems: log status
    mount none on /dev/shm type tmpfs (rw,size=5M)
    none on /var/run type tmpfs (rw)
    none on /tmp type tmpfs (rw,sync)
    log success
    log status
     AVSERVER API: Creating TSKs...DONE
    SYSTEM.MSTPRI0 value changed to 00440011

    CONFIGURING MY AVSERVER FOR DM365 .....
    queue id:65538
    RAW IN MODE: 0
    Resize: 0
    YUV: 2
    FPS: 30
    SENSOR MODE: 6
    STREAM CFG: 0
     AVSERVER API: Sending START.
     CAPTURE: Opening imager SONY_IMX035_1_3MP.
     
     $$$$$$$$$$$$ 1280X1024 $$$$$$$$$$$$

     
     $$$$$$$$$$$$ DRV_imgsOpen sxga $$$$$$$$$$$$

     
     ########## 1584X1119 ############

    $$$$$$$$$$$$$$ VID0:1000
    usb     
    spi mode: 16
    bits per word: 8
    max speed: 12000000 Hz (12000 KHz)
     CAPTURE: Opening ISIF.
    fd:7    cmd:52226
    fd:7    cmd:52225
    ================> 1000, 150, 0
    fd:7    cmd:52224
    fd:7    cmd:52252
    fd:7    cmd:52257
    fd:7    cmd:52257
    fd:7    cmd:52256
    Inside of CSL_usrDrvIoctl
    fd:7    cmd:52256
     CAPTURE: Opening H3A.
    Inside of CSL_usrDrvIoctl
    fd:9    cmd:52227
    Inside of CSL_usrDrvIoctl
    fd:9    cmd:52232
    APPRO Setting Applied
    fd:9    cmd:52225
    fd:9    cmd:52224
    fd:9    cmd:52240
    fd:9    cmd:52230
    fd:9    cmd:52242
    fd:9    cmd:52242
     CAPTURE: Opening IPIPE.
    fd:6    cmd:52249
    fd:6    cmd:52225
    fd:6    cmd:52224
    fd:5    cmd:52248
    fd:5    cmd:52248
    fd:5    cmd:52241
    fd:5    cmd:52241
     CAPTURE: Open DONE.
    queue id:131076
    Inside of CSL_usrDrvIoctl
    fd:11   cmd:52228
    Inside of CSL_usrDrvIoctl
    fd:11   cmd:52227

     FR : 0 users registered from[    6.250000] DavinciDisplay DavinciDisplay.1: Before finishing with S_FMT:
    [    6.250000] layer.pix_fmt.bytesperline = 640,
    [    6.250000]  layer.pix_fmt.width = 640,
    [    6.250000]  layer.pix_fmt.height = 480,
    [    6.250000]  layer.pix_fmt.sizeimage =460800
     exsiting face a[    6.280000] DavinciDisplay DavinciDisplay.1: pixfmt->width = 640,
    [    6.280000]  layer->layer_info.config.line_length= 640
    lbum
    Initializing...
    fd:12   cmd:52224
    IPNC_DM365_3.0.0 (root@user-desktop) (gcc version 4.2.0 (M
    fd:12   cmd:52227
    IPNC AUTO_IRIS = 1
    Video mode is: 0
    Stream_flag is: 1
    fd:9    cmd:52244
     CAPTURE: Starting IPIPE.
    fd:6    cmd:52266
    fd:6    cmd:52253
    fd:6    cmd:52263
    fd:6    cmd:52255
    fd:6    cmd:52252
    fd:5    cmd:52242
    fd:5    cmd:52242
    fd:6    cmd:52249
     CAPTURE: Starting ISIF.
    fd:7    cmd:52226
     CAPTURE: Starting imager.
    Type:0  Wait:2
    fd:7    cmd:52258
    Initializing...
    Initializing...
    Initializing...
    Initializing...
    ...done initializing
    ...done initializing
    Play this stream using the URL:
            rtsp://192.168.1.168:8554/PSIA/Streaming/channels/1?videoCodecType=MPEG4

    (We use port 8301 for optional RTSP-over-HTTP tunneling.)
    Play this stream using the URL:
            rtsp://192.168.1.168:8556/PSIA/Streaming/channels/2?videoCodecType=H.264

    (We use port 8303 for optional RTSP-over-HTTP tunneling.)
    ...done initializing
    Play this stream using the URL:
            rtsp://192.168.1.168:8557/PSIA/Streaming/channels/2?videoCodecType=H.264

    (We use port 8304 for optional RTSP-over-HTTP tunneling.)
    ...done initializing
    Play this stream using the URL:
            rtsp://192.168.1.168:8553/PSIA/Streaming/channels/1?videoCodecType=MPEG4

    (We use port 8300 for optional RTSP-over-HTTP tunneling.)
    ...done initializing
    Play this stream using the URL:
            rtsp://192.168.1.168:8555/PSIA/Streaming/channels/0?videoCodecType=MJPEG

    (We use port 8302 for optional RTSP-over-HTTP tunneling.)
       usb      [success]
       input   
       input    [success]
    done.
    [    9.160000] loop: loaded (max 8 devices)
    [    9.370000] tun: Universal TUN/TAP device driver, 1.6
    [    9.370000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
    [    9.630000] CSLIP: code copyright 1989 Regents of the University of California
    [    9.790000] netconsole: not configured, aborting
    [    9.980000] PPP generic driver version 2.4.2
    [   10.240000] PPP Deflate Compression module registered
    Starting internet superserver: inetd.
    [   11.060000]  sbulla: unknown partition table
    [   12.620000] id number is: 0
    [   12.620000] davinci-mmc davinci-mmc.0: Supporting 4-bit mode
    [   12.630000] davinci-mmc davinci-mmc.0: Using DMA mode
    [   13.160000] usbcore: registered new driver usbfs
    [   13.260000] usbcore: registered new driver hub
    [   13.540000] musb_hdrc: version 6.0, cppi-dma, peripheral, debug=0
    [   13.650000] id number is negative
    [   13.670000] musb_hdrc musb_hdrc: No DMA interrupt line
    [   13.670000] musb_hdrc: USB Peripheral mode controller at c3906000 using DMA, IRQ 12
    [   14.050000] Loading iSCSI transport class v1.1-646.<5>iscsi: registered transport (tcp)
    [   14.990000]  sbulla: unknown partition table
    mkdosfs 3.0.6 (04 Oct 2009)
    unable to get drive geometry, using default 255/63
    /dev/sbulla has 255 heads and 63 sectors per track,
    logical sector size is 512,
    using 0xf8 media descriptor, with 1024 sectors;
    file system has 2 12-bit FATs and 4 sectors per cluster.
    FAT size is 1 sector, and provides 247 clusters.
    Root directory contains 512 slots.
    Volume ID is 35d15b65, no volume label.
    queue id:0
    MontaVista(R) Linux(R) Professional Edition 5.0.0 (0702774)

    DM365_IPNC login: root (automatic login)


    Welcome to MontaVista(R) Linux(R) Professional Edition 5.0.0 (0702774).

    login[651]: root login  on `ttyS0'

    # ApproDrvExit: 7
    Error: WaitStreamReady Fail.
    Error: SemWait: Invalid Semaphore handler

    After this my code gets hang. I doubt it is getting stuck because of manual node creation.

    In spi kernel documentation I found below note.

    "Do not try to manage the /dev character device special file nodes by hand.
    That's error prone, and you'd need to pay careful attention to system
    security issues; udev/mdev should already be configured securely."

    Any suggestions.

    Regards,

    panshi



  • Hi

                  I guess this is bcz of your make script. Hope you used make command in the application dir to build your kernel+app together.


    If that s the case, the make script picks the suitable configuration every time from /arch/arm/configs/ directory in the kernel.

    So your .config file will be over written every-time when you do a make from top level such that the option set during the make menuconfig will be ignored.

    So check your make script and change it to read the kernel configs from .config always intsead of /arch/arm/configs/xxxxx.


    If you feel difficult in doing that, then check which configuration u are using , edit that file in /arch/arm/configs/  location to Enable SPIxx option in it
    and build from toplevel using make command.


    Hope this shoul solve ur problem.


  • Dear all,

          I met the same problem, & I did according to what was suggested here. But failed to see the /dev/spidev0.0 file.

          Then, I checked the ../ti-davinci/arch/arm/mach-davinci folder, and I found the following:

          (1) After I performed the make sysall, in IPNC3.0, there is no davinci_spi-platform.o file found, it seems the davinci_spi-platform.c file was not compiled into the kernel.

          (2) On the other hand, I checked the IPNC2.6, after performing make sysall, the davinci_spi-platform.o file exists.

          BTW: I modified the config file to support SPI in IPNC3.0.

          I guess it seems this is the reason why I can not see the  /dev/spidev0.0 file.

         Could you tell me what should i do to make the davinci_spi-platform.c be compiled and included into the kernel.

         Thanks

              Zhihui

  • Hi,

    Are you porting SPI to 3.0? I suggest check for new IPNC releases which may have SPI support.

    I faced this problem in IPNC 3.0 long back. I tried to port all possible IPNC2.6 SPI implentation to IPNC 3.0. For spidev0.0 I created the node manually at host side and then downloaded compressed (cramfs) filesystem to target.

  • For SPI driver support on 2.6.18 kernel version, please use v3.1 of  IPNC

    We have imx035 and imx036 suported

    Regards,

    Raghu

  • Hi , Rgahu

           I am porting IPNC 2.6 to IPNC3.0, actually we are porting the IMX122 driver in IPNC 2.6 to IPNC 3.0, & we have done many modifications on our IPNC 3.0 based MT9P031 camera, & we want to make the IMX122 and MT9P031 share the same software except Sensor drivers. Therefore, we are not planning to port to IPNC 3.1 for now.

    Hi  Panshi

         Yes, I am porting to IPNC 3.0, and for the above reason, I would like to port the SPI and IMX122 sensor to our existing modified IPNC 3.0.

          Could you tell me have you finally made your IPNC 3.0 SPI works well ? If yes, could you tell me how to do this?

          My progress for now is following: (it seems the SPI driver is already in the kernel?)

     # find / -name *spi* /proc/irq/42/dm_spi

    /sys/vendor/mvista/lspinfo

    /sys/module/spidev

    /sys/module/davinci_spi_master

     /sys/class/spidev

    /sys/class/spi_master

    /sys/class/spi_master/spi0

    /sys/bus/spi

    /sys/bus/spi/drivers/spidev

    /sys/bus/platform/drivers/dm_spi

    /sys/bus/platform/drivers/dm_spi/dm_spi.0

    /sys/bus/platform/devices/dm_spi.0

    /sys/devices/platform/dm_spi.0

    /sys/devices/platform/dm_spi.0/spi_master:spi0 

     

    # cat /proc/devices

    Character devices:  

    1 mem  

    4 /dev/vc/0  

    4 tty   4 ttyS  

    5 /dev/tty  

    5 /dev/console  

    5 /dev/ptmx  

    ......

     153 spi

    180 usb

    ......

     

         However, i still can not see the /dev/spidev0.0 file. So I did following things:

         (1) In the command prompt, I performed "mknod /tmp/spidev0.0 c 153 0",  which created a node in the /tmp folder, & I performed the "chmod 777 /tmp/spidev0.0"  (not using /dev because /dev folder is read-only)

         (2) I changed the SPI_open file to open /tmp/spidev0.0, not /dev/spidev0.0.

         (3) Finally, I runs the av_server.out, which opens the /tmp/spidev0.0 file.   I found it passed the error on opening SPI device, however, it prints something like DRV_imageTurnInit fails, and the av_server.out exits.

          My question is:

         (1) How about I perform  "mknod /tmp/spidev0.0 c 153 0" mannually on tmp folder, which it not read-only.

         (2) Are there any requirements that I run av_server.out mannually, do I need to do something like load.sh works.

         Thanks

     

     

    Are you porting SPI to 3.0? I suggest check for new IPNC releases which may have SPI support.

    I faced this problem in IPNC 3.0 long back. I tried to port all possible IPNC2.6 SPI implentation to IPNC 3.0. For spidev0.0 I created the node manually at host side and then downloaded compressed (cramfs) filesystem to target.