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.

DM8168 PCIE RC driver

Other Parts Discussed in Thread: PCF8575, TVP5158

hey !

     I am use epdry_sample_apps.tar.gz demo to debug pcie RC mode . I put the printk in the soure code of  ti81xx_pcie_rcdrv.c  of ti81xx_ep_hlpr_mmap fuction , but there is no response. why the ti81xx_ep_hlpr_mmap failed to work ?

    By the way , I find in dvrdk 4.1 , ti8168_dvr_defconfig  have PCI bus select in menuconfig but no PCI surport enable in practice .

 

SEED-DVS8168_v1.0#boot
Connect speed 100M Full
Using DaVinci EMAC device
TFTP from server 192.168.253.66; our IP address is 192.168.253.183
Filename 'uImage'.
Load address: 0x81000000
Loading: T #################################################################
         #################################################################
         ######################
done
Bytes transferred = 2225968 (21f730 hex)
## Booting kernel from Legacy Image at 81000000 ...
   Image Name:   Linux-2.6.37
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2225904 Bytes = 2.1 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Linux version 2.6.37 (root@fft) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #6 Thu Sep 17 17:34:06 CST 2015
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: ti8168evm
vram size = 20971520 at 0x0
ti81xx_reserve: ### Reserved DDR region @8ff00000
reserved size = 20971520 at 0x0
FB: Reserving 20971520 bytes SDRAM for VRAM
Memory policy: ECC disabled, Data cache writeback
OMAP chip is TI8168 2.1
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 59648
Kernel command line: mem=256M console=ttyO0,115200n8 root=/dev/nfs rw nfsroot=192.168.253.142:/home/davinci/targetfs ip=192.168.253.183:192.168.253.143:192.168.253.1:255.255.255.0::eth0:off vram=20M notifyk.vpssm3_sva=0xBEE00000  ddr_mem=1024M  pcie_mem=8M
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 234MB 1MB = 235MB total
Memory: 233536k/233536k available, 28608k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xd0800000 - 0xf8000000   ( 632 MB)
    lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .init : 0xc0008000 - 0xc003d000   ( 212 kB)
      .text : 0xc003d000 - 0xc0435000   (4064 kB)
      .data : 0xc0436000 - 0xc047b940   ( 279 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:407
IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
Total of 128 interrupts on 1 active controller
GPMC revision 6.0
Trying to install interrupt handler for IRQ400
Trying to install interrupt handler for IRQ401
Trying to install interrupt handler for IRQ402
Trying to install interrupt handler for IRQ403
Trying to install interrupt handler for IRQ404
Trying to install interrupt handler for IRQ405
Trying to install interrupt handler for IRQ406
Trying to install type control for IRQ407
Trying to set irq flags for IRQ407
OMAP clockevent source: GPTIMER1 at 27000000 Hz
Console: colour dummy device 80x30
Calibrating delay loop... 986.31 BogoMIPS (lpj=4931584)
pid_max: default: 32768 minimum: 301
Security Framework initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
devtmpfs: initialized
TI81XX: Map 0x8ff00000 to 0xfe500000 for dram barrier
TI81XX: Map 0x40300000 to 0xfe600000 for sram barrier
omap_voltage_early_init: voltage driver support not added
regulator: core version 0.5
regulator: dummy:
NET: Registered protocol family 16
omap_voltage_domain_lookup: Voltage driver init not yet happened.Faulting!
omap_voltage_add_dev: VDD specified does not exist!
OMAP GPIO hardware version 0.1
OMAP GPIO hardware version 0.1
omap_mux_init: Add partition: #1: core, flags: 0
_omap_mux_get_by_name: Could not find signal i2c2_scl.i2c2_scl
_omap_mux_get_by_name: Could not find signal i2c2_sda.i2c2_sda
NOR: Can't request GPMC CS
registered ti816x_gpio_vr device
registered ti816x_sr device
Cannot clk_get ck_32
pm_dbg_init: only OMAP3 supported
registered ti81xx_vpss device
registered ti81xx on-chip HDMI device
registered ti81xx_fb device
NSS Crypto DMA hardware revision 1.9 @ IRQ 116
ti81xx_pcie: Invoking PCI BIOS...
ti81xx_pcie: Setting up Host Controller...
ti81xx_pcie: Register base mapped @0xd0830000
ti81xx_pcie: Starting PCI scan...
PCI: bus0: Fast back to back transfers disabled
PCI: bus1: Fast back to back transfers disabled
ti81xx_pcie: PCI scan done.
pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
pci 0000:00:00.0: BAR 9: assigned [mem 0x20100000-0x201fffff pref]
pci 0000:00:00.0: BAR 7: assigned [io  0x40000000-0x40000fff]
pci 0000:01:00.0: BAR 6: assigned [mem 0x20100000-0x2010ffff pref]
pci 0000:01:00.0: BAR 5: assigned [mem 0x20000000-0x200007ff]
pci 0000:01:00.0: BAR 5: set to [mem 0x20000000-0x200007ff] (PCI address [0x20000000-0x200007ff])
pci 0000:01:00.0: BAR 4: assigned [io  0x40000000-0x4000001f]
pci 0000:01:00.0: BAR 4: set to [io  0x40000000-0x4000001f] (PCI address [0x40000000-0x4000001f])
pci 0000:01:00.0: BAR 0: assigned [io  0x40000020-0x40000027]
pci 0000:01:00.0: BAR 0: set to [io  0x40000020-0x40000027] (PCI address [0x40000020-0x40000027])
pci 0000:01:00.0: BAR 2: assigned [io  0x40000028-0x4000002f]
pci 0000:01:00.0: BAR 2: set to [io  0x40000028-0x4000002f] (PCI address [0x40000028-0x4000002f])
pci 0000:01:00.0: BAR 1: assigned [io  0x40000030-0x40000033]
pci 0000:01:00.0: BAR 1: set to [io  0x40000030-0x40000033] (PCI address [0x40000030-0x40000033])
pci 0000:01:00.0: BAR 3: assigned [io  0x40000034-0x40000037]
pci 0000:01:00.0: BAR 3: set to [io  0x40000034-0x40000037] (PCI address [0x40000034-0x40000037])
pci 0000:00:00.0: PCI bridge to [bus 01-01]
pci 0000:00:00.0:   bridge window [io  0x40000000-0x40000fff]
pci 0000:00:00.0:   bridge window [mem 0x20000000-0x200fffff]
pci 0000:00:00.0:   bridge window [mem 0x20100000-0x201fffff pref]
PCI: enabling device 0000:00:00.0 (0140 -> 0143)
bio: create slab <bio-0> at 0
regulator: VFB: 800 <--> 1025 mV at 860 mV
vgaarb: loaded
SCSI subsystem initialized
omap_i2c omap_i2c.1: bus 1 rev4.0 at 100 kHz
I2C: Read failed at pcf8575_cir_enable 670 with error code: -121
I2C: Transfer failed at pcf8575_cir_enable 676 with error code: -121
omap_i2c omap_i2c.2: bus 2 rev4.0 at 100 kHz
Advanced Linux Sound Architecture Driver Version 1.0.23.
Switching to clocksource gp timer
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
PMU: registered new PMU device of type 0
omap-iommu omap-iommu.0: ducati registered
omap-iommu omap-iommu.1: sys registered
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 456
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
nss_rng nss_rng: NSS Random Number Generator ver. 2.0
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
omap_uart.0: ttyO0 at MMIO 0x48020000 (irq = 72) is a OMAP UART0
console [ttyO0] enabled
omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
brd: module loaded
loop: module loaded
omap2-nand driver initializing
ONFI param page 0 valid
ONFI flash detected
NAND device: Maf ID: 0x2c, Chip ID: 0xca (Micron, NAND 256MiB 3,3V 16-bit)
 erasesize: 0x20000, writesize: 2048, oobsize: 64
omap2-nand: detected x16 NAND flash
Creating 6 MTD partitions on "omap2-nand.0":
0x000000000000-0x000000260000 : "U-Boot"
0x000000260000-0x000000280000 : "U-Boot Env"
0x000000280000-0x000000580000 : "U-Boot Logo"
0x000000580000-0x0000009c0000 : "Kernel"
0x0000009c0000-0x00000d1e0000 : "File System"
0x00000d1e0000-0x000010000000 : "Reserved"
davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
davinci_mdio davinci_mdio.0: detected phy mask fffffff9
davinci_mdio.0: probed
davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver unknown
davinci_mdio davinci_mdio.0: phy[2]: device 0:02, driver unknown
mice: PS/2 mouse device common for all mice
omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
i2c /dev entries driver
nss_aes_mod_init: loading NSS AES driver
nss-aes nss-aes: NSS AES hw accel rev: 3.2 (context 0 @0x41140000)
nss-aes nss-aes: NSS AES hw accel rev: 3.2 (context 1 @0x41141000)
nss-aes nss-aes: NSS AES hw accel rev: 3.2 (context 2 @0x411a0000)
nss-aes nss-aes: NSS AES hw accel rev: 3.2 (context 3 @0x411a1000)
nss_aes_probe: probe() done
nss_des_mod_init: loading NSS DES driver
nss-des nss-des: NSS DES hw accel rev: 2.2 (context 0 @0x41160000)
nss-des nss-des: NSS DES hw accel rev: 2.2 (context 1 @0x41161000)
nss_des_probe: probe() done
nss_sham_mod_init: loading NSS SHA/MD5 driver
nss-sham nss-sham: NSS SHA/MD5 hw accel rev: 4.03 (context 0 @0x41100000)
nss-sham nss-sham: NSS SHA/MD5 hw accel rev: 4.03 (context 1 @0x41101000)
nss-sham nss-sham: NSS SHA/MD5 hw accel rev: 4.03 (context 2 @0x411c0000)
nss-sham nss-sham: NSS SHA/MD5 hw accel rev: 4.03 (context 3 @0x411c1000)
nss_sham_probe: probe() done
notify_init : notify drivercreated  for  remote proc id 2 at physical Address 0xbee00000
Registered tvp5158 audio codec
asoc: tvp5158-hifi <-> davinci-mcasp.0 mapping ok
asoc: tlv320aic3x-hifi <-> davinci-mcasp.2 mapping ok
asoc: HDMI-DAI-CODEC <-> hdmi-dai mapping ok
ALSA device list:
  #0: TI81XX SOUND0
  #1: TI81XX SOUND1
TCP cubic registered
NET: Registered protocol family 17
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
omap_voltage_late_init: Voltage driver support not added
Power Management for TI81XX.
smartreflex smartreflex: Driver initialized
omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
davinci_mdio davinci_mdio.0: resetting idled controller
net eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, id=282f014)
IP-Config: Complete:
     device=eth0, addr=192.168.253.183, mask=255.255.255.0, gw=192.168.253.1,
     host=192.168.253.183, domain=, nis-domain=(none),
     bootserver=192.168.253.143, rootserver=192.168.253.142, rootpath=
PHY: 0:01 - Link is Up - 100/Full
VFS: Mounted root (nfs filesystem) on device 0:14.
devtmpfs: mounted
Freeing init memory: 212K
INIT: version 2.86 booting
Error opening /dev/fb0: No such file or directory
Please wait: booting...
Starting udev
udevd (104): /proc/104/oom_adj is deprecated, please use /proc/104/oom_score_adj instead.
Root filesystem already rw, not remounting
Caching udev devnodes
Populating dev cache
ALSA: Restoring mixer settings...
NOT configuring network interfaces: / is an NFS mount
Tue Sep 15 17:20:00 UTC 2015
INIT: Entering runlevel: 5
Starting system message bus: dbus.
Starting telnet daemon.
Starting syslogd/klogd: done
Starting thttpd.
start application
 _   _ ___  _   _         _
| | | |    | ||| |___ ___| | _ ___
| |_| | |) |  ~  | . |  _| |/_|  -|
|_____|___ /____/ ___|_| |_| _|-__|

DVR_DM816x Board (2012.08)

root@dvr:~# insmod ./ti81xx_pcie_rcdrv.ko
ti81xx_ep_hlpr: TI816X device is working as EP
ti81xx_ep_hlpr: module TI81XX_EP_HLPR load successfull
ti81xx_ep_hlpr: Found TI81XX PCIe EP @0xce426c00
ti81xx_ep_hlpr: No more TI81XX PCIe EP found
root@dvr:~# ./rc_app
for test !
ti81xx_pci_info.c:200:get_devices(): vendor file name is /sys/bus/pci/devices/0000:00:00.0/vendor
ti81xx_pci_info.c:203:get_devices(): device file name is /sys/bus/pci/devices/0000:00:00.0/device
ti81xx_pci_info.c:206:get_devices(): resource file name is /sys/bus/pci/devices/0000:00:00.0/resource
ti81xx_pci_info.c:209:get_devices(): class file name is /sys/bus/pci/devices/0000:00:00.0/class
ti81xx_pci_info.c:264:get_devices(): this file is not related to EP : file 0000:00:00.0
ti81xx_pci_info.c:200:get_devices(): vendor file name is /sys/bus/pci/devices/0000:01:00.0/vendor
ti81xx_pci_info.c:203:get_devices(): device file name is /sys/bus/pci/devices/0000:01:00.0/device
ti81xx_pci_info.c:206:get_devices(): resource file name is /sys/bus/pci/devices/0000:01:00.0/resource
ti81xx_pci_info.c:209:get_devices(): class file name is /sys/bus/pci/devices/0000:01:00.0/class
ti81xx_pci_info.c:256:get_devices():
 EP has been found here vendor=0x1B4B device=0x9230
ti81xx_pci_info.c:189:get_devices(): no more pci devices in sysfs
ti81xx_rc_app.c:325:main(): no of ep in system is 1
ti81xx_rc_app.c:329:main(): start address of mgmt_area is virt--ccc00000  phy--8cc00000
temp->res_value[0][0] value is : 0
mgmt_area value is : -1
ti81xx_pci_info.c:319:propagate_system_info(): mmap bar2 of EP having ID 0 failed
ti81xx_rc_app.c:332:main(): pci subsystem info propagated
ti81xx_pci_info.c:102:print_list(): unique id is --0  BAR mapping is 0
ti81xx_pci_info.c:105:print_list(): bar address is 40000020 bar size is 8
ti81xx_pci_info.c:105:print_list(): bar address is 40000030 bar size is 4
ti81xx_pci_info.c:105:print_list(): bar address is 40000028 bar size is 8
ti81xx_pci_info.c:105:print_list(): bar address is 40000034 bar size is 4
ti81xx_pci_info.c:105:print_list(): bar address is 40000000 bar size is 20
ti81xx_pci_info.c:105:print_list(): bar address is 20000000 bar size is 800
ti81xx_rc_app.c:343:main(): bar 2 address of EP2 is 40000028 size is 8
ti81xx_rc_app.c:345:main(): bar 0 address is 40000020
ti81xx_rc_app.c:364:main(): MMAP of dedicated memory fail
root@dvr:~# lspci -v
00:00.0 Class 0604: Device 104c:b800 (rev 01)
        Flags: bus master, fast devsel, latency 0
        Memory at <ignored> (32-bit, non-prefetchable)
        Memory at <ignored> (32-bit, prefetchable)
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
        I/O behind bridge: 40000000-40000fff
        Memory behind bridge: 20000000-200fffff
        Prefetchable memory behind bridge: 20100000-201fffff
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Root Port (Slot-), MSI 00
        Capabilities: [100] Advanced Error Reporting

01:00.0 Class 0106: Device 1b4b:9230 (rev 10) (prog-if 01)
        Subsystem: Device 1b4b:9230
        Flags: fast devsel, IRQ 368
        I/O ports at 40000020 [size=8]
        I/O ports at 40000030 [size=4]
        I/O ports at 40000028 [size=8]
        I/O ports at 40000034 [size=4]
        I/O ports at 40000000 [size=32]
        Memory at 20000000 (32-bit, non-prefetchable) [size=2K]
        Expansion ROM at 20100000 [disabled] [size=64K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit-
        Capabilities: [70] Express Legacy Endpoint, MSI 00
        Capabilities: [e0] SATA HBA v0.0
        Capabilities: [100] Advanced Error Reporting