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.

TDA4VM: PCIE rc to PCIE ep, RC hangup when scan the bus

Part Number: TDA4VM

Hi experts,

    connect 2 tda4 with pcie port2 , one role as ep and another as rc. the linux sdk is 07_02.

    on ep side, config pcie as :

    cd /sys/kernel/config/pci_ep/
    mkdir functions/pci_epf_test/func1
    echo 0x104c > functions/pci_epf_test/func1/vendorid
    echo 0xb500 > functions/pci_epf_test/func1/deviceid
    echo 2  > functions/pci_epf_test/func1/msi_interrupts
    echo 2 > functions/pci_epf_test/func1/msix_interrupts
    ln -s functions/pci_epf_test/func1 controllers/2910000.pcie-ep/
    echo 1 > controllers/2910000.pcie-ep/start

    on rc side , rescan pci

    echo 1 > /sys/bus/pci/rescan

    then, rc sice will hungup,  and seems the error log come from ATF:

root@j7-evm:~# echo 1 > /sys/bus/pci/rescan
[ 939.080335] pci_generic_config_write32: 17 callbacks suppressed
[ 939.080341] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
[ 939.096019] pci 0000:01:00.0: [104c:b500] type 00 class 0xff0000
[ 939.102092] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000000ff]
[ 939.108361] pci 0000:01:00.0: reg 0x14: [mem 0x00000000-0x000001ff]
[ 939.114628] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x000003ff]
[ 939.120915] pci 0000:01:00.0: reg 0x1c: [mem 0x00000000-0x00003fff]
[ 939.127193] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x0001ffff]
[ 939.133471] pci 0000:01:00.0: reg 0x24: [mem 0x00000000-0x000fffff]
[ 939.139993] pci 0000:01:00.0: supports D1
[ 939.144004] pci 0000:01:00.0: PME# supported from D0 D1 D3hot
[ 939.149776] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0xe8 may corrupt adjacent RW1C bits
ERROR: Unhandled External Abort received on 0x80000001 from S-EL1
ERROR: exception reason=0 syndrome=0xbf000000
Unhandled Exception from EL1
x0 = 0xffff800012280000
x1 = 0x0000000000000000
x2 = 0x000000000080000a
x3 = 0x0000000000000003
x4 = 0xffff800016900000
x5 = 0xffff800008bd00d8
x6 = 0xffff8000123afb54
x7 = 0x000000000000ea60
x8 = 0x0000000080b5111d
x9 = 0x00000000b00d104c
x10 = 0x0000000000000000
x11 = 0x0000000000000000
x12 = 0x0000000000000001
x13 = 0x0000000000000000
x14 = 0x0030306930306373
x15 = 0xffff00084129c928
x16 = 0x0000000000000019
x17 = 0x0000000000000001
x18 = 0x0000000000000000
x19 = 0xffff8000123afa94
x20 = 0x0000000000000004
x21 = 0x0000000000000000
x22 = 0x0000000000000004
x23 = 0xffff8000123afa94
x24 = 0x0000000000000001
x25 = 0xffff800010d37c50
x26 = 0x0000000000000001
x27 = 0x0000000000000001
x28 = 0xffff00084f312000
x29 = 0xffff8000123af9e0
x30 = 0xffff80001041a650
scr_el3 = 0x000000000000073d
sctlr_el3 = 0x0000000030cd183f
cptr_el3 = 0x0000000000000000
tcr_el3 = 0x0000000080803520
daif = 0x00000000000002c0
mair_el3 = 0x00000000004404ff
spsr_el3 = 0x0000000020000085
elr_el3 = 0xffff80001041a668
ttbr0_el3 = 0x0000000070010b00
esr_el3 = 0x00000000bf000000
far_el3 = 0x0000000000000000
spsr_el1 = 0x0000000020000005
elr_el1 = 0xffff8000107ececc
spsr_abt = 0x0000000000000000
spsr_und = 0x0000000000000000
spsr_irq = 0x0000000000000000
spsr_fiq = 0x0000000000000000
sctlr_el1 = 0x0000000034d4d91d
actlr_el1 = 0x0000000000000000
cpacr_el1 = 0x0000000000300000
csselr_el1 = 0x0000000000000000
sp_el1 = 0xffff8000123af9e0
esr_el1 = 0x0000000056000000
ttbr0_el1 = 0x00000008cb660000
ttbr1_el1 = 0x086c000082ac0000
mair_el1 = 0x0000bbff440c0400
amair_el1 = 0x0000000000000000
tcr_el1 = 0x00000034f5d07590
tpidr_el1 = 0xffff80086ef50000
tpidr_el0 = 0x0000ffff8eb43c40
tpidrro_el0 = 0x0000000000000000
par_el1 = 0x0000000000000000
mpidr_el1 = 0x0000000080000001
afsr0_el1 = 0x0000000000000000
afsr1_el1 = 0x0000000000000000
contextidr_el1 = 0x0000000000000000
vbar_el1 = 0xffff800010081800
cntp_ctl_el0 = 0x0000000000000005
cntp_cval_el0 = 0x0000002bf3c3392f
cntv_ctl_el0 = 0x0000000000000000
cntv_cval_el0 = 0x0000000000000000
cntkctl_el1 = 0x00000000000000e6
sp_el0 = 0x000000007000abd0
isr_el1 = 0x0000000000000040
dacr32_el2 = 0x0000000000000000
ifsr32_el2 = 0x0000000000000000
cpuectlr_el1 = 0x0000001b00000040
cpumerrsr_el1 = 0x0000000000000000
l2merrsr_el1 = 0x0000000000000000