Other Parts Discussed in Thread: DRA72
Hi Team,
Base Address Register for the second unit in PCIe device is not getting enumerated in the config space. Due to this, we couldn't write to the PCIe address space for the second unit.
root~# lspci -v
01:00.0 Class 0200: Device 14e4:b340 (rev 01)
Subsystem: Device 14e4:b340
Flags: bus master, fast devsel, latency 0, IRQ 180
Memory at 20840000 (64-bit, prefetchable) [size=32K]
Memory at 20800000 (64-bit, prefetchable) [size=256K]
Memory at 21000000 (64-bit, prefetchable) [size=16M]
Capabilities: [48] Power Management version 3
Capabilities: [50] Vital Product Data
Capabilities: [58] MSI: Enable- Count=1/8 Maskable- 64bit+
Capabilities: [a0] MSI-X: Enable- Count=1 Masked-
Capabilities: [ac] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [13c] Device Serial Number 00-00-00-00-00-00-00-00
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel
Capabilities: [180] Vendor Specific Information: ID=0000 Rev=0 Len=028 <?>
Capabilities: [1b0] Latency Tolerance Reporting
Kernel driver in use: linux-kernel-bde
01:00.1 Class 0200: Device 14e4:b340 (rev 01)
Subsystem: Device 14e4:b340
Flags: bus master, fast devsel, latency 0, IRQ 188
Memory at 20848000 (64-bit, prefetchable) [size=32K]
Memory at 22000000 (64-bit, prefetchable) [size=16M]
Capabilities: [48] Power Management version 3
Capabilities: [50] Vital Product Data
Capabilities: [58] MSI: Enable- Count=1/8 Maskable- 64bit+
Capabilities: [a0] MSI-X: Enable- Count=1 Masked-
Capabilities: [ac] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [13c] Device Serial Number 00-00-00-00-00-00-00-00
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel
Capabilities: [180] Vendor Specific Information: ID=0000 Rev=0 Len=028 <?>
Kernel driver in use: linux-kernel-bde
=========================================================
For unit 1 , BAR details
01:00.0
Region 0: Memory at 20840000 (64-bit, prefetchable) [size=32K]
Region 2: Memory at 20800000 (64-bit, prefetchable) [size=256K]
Region 4: Memory at 21000000 (64-bit, prefetchable) [size=16M]
=========================================================
For unit 2 , BAR details
01:00.1
Region 0: Memory at 20848000 (64-bit, prefetchable) [size=32K]
Region 4: Memory at 22000000 (64-bit, prefetchable) [size=16M]
While checking in _probe function , it verifies that BAR (regision 2) is not available for second device.
=========================================================
dmesg logs:::
==========
[ 0.658590] dra7-pcie 51000000.pcie: Linked as a consumer to phy-4a094000.pciephy.3
[ 0.658741] dra7-pcie 51000000.pcie: WA for Errata i870 not applied
[ 0.658838] OF: PCI: host bridge /ocp/axi@0/pcie@51000000 ranges:
[ 0.751028] dra7-pcie 51000000.pcie: link up
[ 0.751169] dra7-pcie 51000000.pcie: PCI host bridge to bus 0000:00
[ 0.751180] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.751189] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 0.751197] pci_bus 0000:00: root bus resource [mem 0x20013000-0x2fffffff]
[ 0.751230] pci 0000:00:00.0: [104c:8888] type 01 class 0x060400
[ 0.751261] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[ 0.751318] pci 0000:00:00.0: supports D1
[ 0.751325] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[ 0.751659] pci 0000:01:00.0: [14e4:b340] type 00 class 0x020000
[ 0.751809] pci 0000:01:00.0: reg 0x10: [mem 0x20840000-0x20847fff 64bit pref]
[ 0.751864] pci 0000:01:00.0: reg 0x18: [mem 0x20800000-0x2083ffff 64bit pref]
[ 0.751919] pci 0000:01:00.0: reg 0x20: [mem 0x21000000-0x21ffffff 64bit pref]
[ 0.752324] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[ 0.752584] pci 0000:01:00.1: [14e4:b340] type 00 class 0x020000
[ 0.752728] pci 0000:01:00.1: reg 0x10: [mem 0x20848000-0x2084ffff 64bit pref]
[ 0.752835] pci 0000:01:00.1: reg 0x20: [mem 0x22000000-0x22ffffff 64bit pref]
[ 0.753227] pci 0000:01:00.1: PME# supported from D0 D3hot D3cold
[ 0.753521] pci 0000:00:00.0: BAR 9: assigned [mem 0x20800000-0x22ffffff pref]
[ 0.753531] pci 0000:00:00.0: BAR 0: assigned [mem 0x20100000-0x201fffff 64bit]
[ 0.753550] pci 0000:01:00.0: BAR 4: assigned [mem 0x21000000-0x21ffffff 64bit pref]
[ 0.753596] pci 0000:01:00.1: BAR 4: assigned [mem 0x22000000-0x22ffffff 64bit pref]
[ 0.753642] pci 0000:01:00.0: BAR 2: assigned [mem 0x20800000-0x2083ffff 64bit pref]
[ 0.753687] pci 0000:01:00.0: BAR 0: assigned [mem 0x20840000-0x20847fff 64bit pref]
[ 0.753732] pci 0000:01:00.1: BAR 0: assigned [mem 0x20848000-0x2084ffff 64bit pref]
[ 0.753777] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[ 0.753789] pci 0000:00:00.0: bridge window [mem 0x20800000-0x22ffffff pref]
[ 0.754088] pcieport 0000:00:00.0: Signaling PME with IRQ 146
[ 0.754209] pcieport 0000:00:00.0: AER enabled with IRQ 146
[ 0.903327] ehci-pci: EHCI PCI platform driver
=========================================================
It seems the linux kernel is not enumerating the pcie device 2 as unit and it is considering it as function from our understanding and does TI has any input to fix this BAR issue we are seeing with any patch ? We are using kernel version of 4.14.115.
Thanks,
Harivignesh GS