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.

为DM368增加新驱动后,系统提示无法打开/dev/video0



 

我想要为DM368写一个SiI9135的驱动,我用的DVSDK版本为4.02。

现在我的驱动已经可以正确读写SiI9135的寄存器,且已被成功注册为 v4l2 sub device。

但当我试图用'./encode -v t.264 -y 3 -I 3'命令访问SiI9135时,板子提示报错。具体信息如下:

=======================================================================

Starting kernel ...

 

Uncompressing Linux................................................................................................................................... done, booting the kernel.

Linux version 2.6.32.17-davinci1-g2053519-dirty (root@ubuntu) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #67 PREEMPT Mon Aug 6 22:03:12 CST 2012

CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177

CPU: VIVT data cache, VIVT instruction cache

Machine: WeiZhong Motherboard

Memory policy: ECC disabled, Data cache writeback

DaVinci dm36x_rev1.2 variant 0x8

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 15240

Kernel command line: mem=60M console=ttyS0,115200n8 root=/dev/nfs rw nfsroot=10.0.0.106:/home/davinci/dm368/dvsdk_dm368_4_02_00_06/filesystem/dm368rootfs ip=dhcp video=davincifb:vid0=OFF:vid1=OFF:osd0=720x576x16,2025K dm365_imp.oper_mode=0 vpfe_capture.interface=0 video=dm36x:output=pal

PID hash table entries: 256 (order: -2, 1024 bytes)

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory: 60MB = 60MB total

Memory: 56488KB available (3756K code, 382K data, 148K init, 0K highmem)

SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

Hierarchical RCU implementation.

NR_IRQS:245

Console: colour dummy device 80x30

Calibrating delay loop... 147.86 BogoMIPS (lpj=739328)

Mount-cache hash table entries: 512

CPU: Testing write buffer coherency: ok

DaVinci: 8 gpio irqs

NET: Registered protocol family 16

davinci_serial_init:97: failed to get UART2 clock

XB:reset imager

bio: create slab <bio-0> at 0

DM365 IPIPE initialized in Continuous mode

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

vpss vpss: dm365_vpss vpss probed

vpss vpss: dm365_vpss vpss probe success

dm365_afew_hw_init

ch0 default output "COMPOSITE", mode "NTSC"

VPBE Encoder Initialized

LogicPD encoder initialized

Switching to clocksource timer0_1

musb_hdrc: version 6.0, cppi-dma, host, debug=0

musb_hdrc: USB Host mode controller at fec64000 using DMA, IRQ 12

musb_hdrc musb_hdrc: MUSB HDRC host driver

musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

NET: Registered protocol family 1

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

RPC: Registered tcp NFSv4.1 backchannel transport module.

JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.

msgmni has been set to 110

alg: No test for stdrng (krng)

io scheduler noop registered

io scheduler anticipatory registered (default)

davincifb davincifb.0: dm_osd0_fb: Initial window configuration is invalid.

Console: switching to colour frame buffer device 90x36

davincifb davincifb.0: dm_osd0_fb: 720x576x16@0,0 with framebuffer size 2025KB

davincifb davincifb.0: dm_vid0_fb: 0x0x16@0,0 with framebuffer size 1020KB

davincifb davincifb.0: dm_osd1_fb: 720x480x4@0,0 with framebuffer size 675KB

davincifb davincifb.0: dm_vid1_fb: 0x0x16@0,0 with framebuffer size 1020KB

DM365 IPIPEIF probed

imp serializer initialized

davinci_previewer initialized

davinci_resizer initialized

Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled

serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A

console [ttyS0] enabled

brd: module loaded

NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)

2 NAND chips detected

Creating 5 MTD partitions on "davinci_nand.0":

0x000000000000-0x0000003c0000 : "bootloader"

0x0000003c0000-0x000000400000 : "params"

0x000000400000-0x000000800000 : "kernel"

0x000000800000-0x000004800000 : "filesystem1"

0x000004800000-0x000010000000 : "filesystem2"

davinci_nand davinci_nand.0: controller rev. 2.3

console [netcon0] enabled

netconsole: network logging started

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

usbcore: registered new interface driver usbtest

i2c /dev entries driver

Linux video capture interface: v2.00

ths7303 1-002c: chip found @ 0x58 (DaVinci I2C adapter)

******SiI9135 Driver*******

SiI9135: GPIO INIT!

vpfe_init

vpfe-capture: vpss clock vpss_master enabled

vpfe-capture vpfe-capture: v4l2 device registered

vpfe-capture vpfe-capture: video device registered

XB: vpfe_subdev_id = 5

******SiI9135 Driver*******

SiI9135:SII9135 I2C INIT!

sii9135 1-0030: sii9135 1-0030 decoder driver registered !!

vpfe-capture vpfe-capture: v4l2 sub device sii9135 registered

vpfe_register_ccdc_device: DM365 ISIF

DM365 ISIF is registered with vpfe.

af major#: 252, minor# 0

AF Driver initialized

aew major#: 251, minor# 0

AEW Driver initialized

Trying to register davinci display video device.

layer=c2059000,layer->video_dev=c2059170

Trying to register davinci display video device.

layer=c2059400,layer->video_dev=c2059570

davinci_init:DaVinci V4L2 Display Driver V1.0 loaded

watchdog watchdog: heartbeat 60 sec

Advanced Linux Sound Architecture Driver Version 1.0.21.

No device for DAI davinci-i2s

ALSA device list:

  No soundcards found.

TCP cubic registered

NET: Registered protocol family 17

Clocks: disable unused mmcsd0

Clocks: disable unused mmcsd1

Clocks: disable unused spi0

Clocks: disable unused spi1

Clocks: disable unused spi2

Clocks: disable unused spi3

Clocks: disable unused spi4

Clocks: disable unused pwm0

Clocks: disable unused pwm1

Clocks: disable unused pwm2

Clocks: disable unused pwm3

Clocks: disable unused timer1

Clocks: disable unused timer3

Clocks: disable unused emac

Clocks: disable unused voice_codec

Clocks: disable unused rto

Clocks: disable unused mjcp

davinci_emac_probe: using random MAC addr: 36:54:24:49:2f:2e

emac-mii: probed

eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=1:01, id=181b8a0)

Sending DHCP requests .

PHY: 1:01 - Link is Up - 100/Full

., OK

IP-Config: Got DHCP answer from 0.0.0.0, my address is 10.0.0.127

IP-Config: Complete:

     device=eth0, addr=10.0.0.127, mask=255.0.0.0, gw=10.0.0.1,

     host=10.0.0.127, domain=weizhong.com, nis-domain=(none),

     bootserver=0.0.0.0, rootserver=10.0.0.106, rootpath=

Looking up port of RPC 100003/2 on 10.0.0.106

Looking up port of RPC 100005/1 on 10.0.0.106

VFS: Mounted root (nfs filesystem) on device 0:14.

Freeing init memory: 148K

INIT: version 2.86 booting

Please wait: booting...

Starting udev

Remounting root file system...

Caching udev devnodes

Populating dev cachemv: cannot rename '/tmp/devices': No such file or directory

ALSA: Restoring mixer settings...

NOT configuring network interfaces: / is an NFS mount

/usr/sbin/alsactl: load_state:1610: No soundcards found...

hwclock: can't open '/dev/misc/rtc': No such file or directory

Thu Mar 24 19:02:00 UTC 2011

hwclock: can't open '/dev/misc/rtc': No such file or directory

INIT: Entering runlevel: 5

Starting system message bus: dbus.

Starting telnet daemon.

Starting syslogd/klogd: done

Starting thttpdNET: Registered protocol family 10

.

CMEMK module: built on Aug  6 2012 at 14:32:44

  Reference Linux version 2.6.32

  File /home/davinci/dm368/dvsdk_dm368_4_02_00_06/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c

allocated heap buffer 0xc8000000 of size 0x4400000

heap fallback enabled - will try heap if pool buffer is not available

CMEM Range Overlaps Kernel Physical - allowing overlap

CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x83c00000)

cmemk initialized

IRQK module: built on Aug  6 2012 at 14:34:35

  Reference Linux version 2.6.32

  File /home/davinci/dm368/dvsdk_dm368_4_02_00_06/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/irq/src/module/irqk.c

irqk initialized

EDMAK module: built on Aug  6 2012 at 14:34:38

  Reference Linux version 2.6.32

  File /home/davinci/dm368/dvsdk_dm368_4_02_00_06/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/edma/src/module/edmak.c

 

 _____                    _____           _         _  

|  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_

|     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|

|__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_| 

              |___|                    |___|           

 

Arago Project http://arago-project.org dm368-evm ttyS0

 

Arago 2011.02 dm368-evm ttyS0

 

dm368-evm login: root

root@dm368-evm:~# cd /usr/share/ti/dvsdk-demos/

root@dm368-evm:/usr/share/ti/dvsdk-demos# DMAI_DEBUG=2? ./encode -v t.264 -y 3 -I 3

Encode demo started.

@0x0002b7f6:[T:0x4001f070] ti.sdo.dmai - [Dmai] Dmai log level set to '2'. Note that calling CERuntime_init after this point may cause unexpected change to DMAI tracing behavior.

@0x00044357:[T:0x4001f070] ti.sdo.dmai - [Display] Found width=720 height=480, yres_virtual=480,xres_virtual=720, line_length=384

@0x00044556:[T:0x4001f070] ti.sdo.dmai - [Display] Setting width=720 height=576, yres_virtual=576, xres_virtual=720

@0x0005028e:[T:0x4001f070] ti.sdo.dmai - [Display] New width=720, height=576, yres_virtual=576,xres_virtual=720, line_length=384

@0x00050465:[T:0x4001f070] ti.sdo.dmai - [BufTab] Allocating BufTab for 1 buffers

@0x00050652:[T:0x4001f070] ti.sdo.dmai - [Buffer] Set user pointer 0x40309000 (physical 0x82500000)

@0x00050ce3:[T:0x4001f070] ti.sdo.dmai - [Display] Display buffer 0 mapped to 0x40309000 has physical address 0xc550

@0x00055cda:[T:0x40b3e490] ti.sdo.dmai - [BufTabdavinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124

] Allocating Bufdavinci_previewer davinci_previewer.2: ipipe_set_preview_config

Tab for 3 buffers

@0x00055fad:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x40b3f000 (0x83c00000 phys)

@0x0005621a:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x40c91000 (0x83d52000 phys)

@0x000564e1:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x40de3000 (0x83ea4000 phys)

@0x00056600:[T:0x40b3e490] ti.sdo.dmai - [BufTab] Allocating BufTab for 4 buffers

@0x00056856:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x40f35000 (0x83ff6000 phys)

@0x00056af1:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x41087000 (0x84148000 phys)

@0x00056d95:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x411d9000 (0x8429a000 phys)

@0x00057059:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x4132b000 (0x843ec000 phys)

@0x00057833:[T:0x41c7c490] ti.sdo.dmai - [Venc1] Creating encoder h264enc for max 1280x720 bitrate 2000000 ratectrl 4

@0x00059fbc:[T:0x40b3e490] ti.sdo.dmai - [Resize] Successfully set mode to continuous in resizer

@0x0005b9a6:[T:0x40b3e490] ti.sdo.dmai - [Resize] Resizer initialized

@0x0005bb63:[T:0x40b3e490] ti.sdo.dmai - [Resize] Operating mode changed successfully to continuous in previewer

@0x0005e08a:[T:0x40b3e490] ti.sdo.dmai - [Resize] Previewer initialized

@0x0005e446:[T:0x40b3e490] ti.sdo.dmai - [Capture] Cannot open /dev/video0 (No such device)

Error: Failed to create capture device. Is video input connected?

@0x000d5baf:[T:0x41c7c490] ti.sdo.dmai - [Venc1] Setting dynParams size 1280x720 bitrate 2000000

@0x000d5f7b:[T:0x41c7c490] ti.sdo.dmai - [Venc1] Made XDM_SETPARAMS control call

@0x000d714b:[T:0x42ad3490] ti.sdo.dmai - [BufTab] Allocating BufTab for 10 buffers

@0x000d744c:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x42ad4000 (0x84940000 phys)

@0x000d76fa:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x42c26000 (0x84a92000 phys)

@0x000d7a02:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x42d78000 (0x84be4000 phys)

@0x000d7d01:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x42eca000 (0x84d36000 phys)

@0x000d7fae:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x4301c000 (0x84e88000 phys)

@0x000d82b8:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x4316e000 (0x84fda000 phys)

@0x000d858d:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x432c0000 (0x8512c000 phys)

@0x000d8898:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x43412000 (0x8527e000 phys)

@0x000d8b72:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x43564000 (0x853d0000 phys)

@0x000d8f69:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x436b6000 (0x85522000 phys)

@0x000e1ba1:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x40b3f000 (0x83c00000 phys)

@0x000e2e14:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x40c91000 (0x83d52000 phys)

@0x000e3e0d:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x40de3000 (0x83ea4000 phys)

@0x000e4e21:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x40f35000 (0x83ff6000 phys)

@0x000e5eff:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x41087000 (0x84148000 phys)

@0x000e6eec:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x411d9000 (0x8429a000 phys)

@0x000e7faf:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x4132b000 (0x843ec000 phys)

@0x000e91a3:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x42ad4000 (0x84940000 phys)

@0x000ea24b:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x42c26000 (0x84a92000 phys)

@0x000eb232:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x42d78000 (0x84be4000 phys)

@0x000ec204:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x42eca000 (0x84d36000 phys)

@0x000ed298:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x4301c000 (0x84e88000 phys)

@0x000ee295:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x4316e000 (0x84fda000 phys)

@0x000ef320:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x432c0000 (0x8512c000 phys)

@0x000f02f0:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x43412000 (0x8527e000 phys)

@0x000f129e:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x43564000 (0x853d0000 phys)

@0x000f23ab:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x436b6000 (0x85522000 phys)

root@dm368-evm:/usr/share/ti/dvsdk-demos# 

=======================================================================

 

 我用ls命令可以看到/dev下的video0,请问系统为何会找不到/dev/video0呢?