ls1021a pcie

cancel
Showing results for 
Search instead for 
Did you mean: 

ls1021a pcie

570 Views
shunpinglin
Contributor III

hello experts,

      I have ls1021a custom board. when the kernel boot, it sometimes hangs up in pcie. The following is kernel boot log.

Booting Linux on physical CPU 0xf00
Linux version 4.1.35-rt41 (splin@splin-VirtualBox) (gcc version 4.9.3 20150311 (
prerelease) (Linaro GCC 4.9-2015.03) ) #1 SMP Fri Feb 2 10:14:17 CST 2018
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=70c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: LS1021A TWR Board
earlycon: Early serial console at MMIO 0x21c0500 (options '')
bootconsole [uart0] enabled
Booting Linux on physical CPU 0xf00
Linux version 4.1.35-rt41 (splin@splin-VirtualBox) (gcc version 4.9.3 20150311 (
prerelease) (Linaro GCC 4.9-2015.03) ) #1 SMP Fri Feb 2 10:14:17 CST 2018
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=70c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: LS1021A TWR Board
earlycon: Early serial console at MMIO 0x21c0500 (options '')
bootconsole [uart0] enabled
bootconsole [earlycon0] enabled
bootconsole [earlycon0] enabled
Forcing write-allocate cache policy for SMP
Forcing write-allocate cache policy for SMP
Memory policy: Data cache writealloc
Memory policy: Data cache writealloc
psci: probing for conduit method from DT.
psci: probing for conduit method from DT.
psci: PSCIv1.0 detected in firmware.
psci: PSCIv1.0 detected in firmware.
psci: Using standard PSCI v0.2 function IDs
psci: Using standard PSCI v0.2 function IDs
PERCPU: Embedded 12 pages/cpu @ee7c7000 s16640 r8192 d24320 u49152
PERCPU: Embedded 12 pages/cpu @ee7c7000 s16640 r8192 d24320 u49152
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 520720
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 520720
Kernel command line: root=/dev/ram rw ramdisk_size=40000000 console=ttyS0,115200
earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 earlyprintk
Kernel command line: root=/dev/ram rw ramdisk_size=40000000 console=ttyS0,115200
earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 earlyprintk
PID hash table entries: 4096 (order: 2, 16384 bytes)
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes)
Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 131072 (order: 7, 524288 bytes)
Memory: 2048228K/2097152K available (3724K kernel code, 246K rwdata, 1732K rodat
a, 252K init, 210K bss, 48924K reserved, 0K cma-reserved, 270336K highmem)
Memory: 2048228K/2097152K available (3724K kernel code, 246K rwdata, 1732K rodat
a, 252K init, 210K bss, 48924K reserved, 0K cma-reserved, 270336K highmem)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xf0000000 - 0xff000000 ( 240 MB)
lowmem : 0x80000000 - 0xef800000 (1784 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f800000 - 0x7fe00000 ( 6 MB)
.text : 0x80008000 - 0x8055c5bc (5458 kB)
.init : 0x8055d000 - 0x8059c000 ( 252 kB)
.data : 0x8059c000 - 0x805d9928 ( 247 kB)
.bss : 0x805dc000 - 0x80610864 ( 211 kB)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xf0000000 - 0xff000000 ( 240 MB)
lowmem : 0x80000000 - 0xef800000 (1784 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f800000 - 0x7fe00000 ( 6 MB)
.text : 0x80008000 - 0x8055c5bc (5458 kB)
.init : 0x8055d000 - 0x8059c000 ( 252 kB)
.data : 0x8059c000 - 0x805d9928 ( 247 kB)
.bss : 0x805dc000 - 0x80610864 ( 211 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Hierarchical RCU implementation.
Hierarchical RCU implementation.
Additional per-CPU info printed with stalls.
Additional per-CPU info printed with stalls.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
NR_IRQS:16 nr_irqs:16 16
Architected cp15 timer(s) running at 12.50MHz (phys).
Architected cp15 timer(s) running at 12.50MHz (phys).
clocksource arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049cda, ma
x_idle_ns: 440795202628 ns
clocksource arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049cda, ma
x_idle_ns: 440795202628 ns
sched_clock: 56 bits at 12MHz, resolution 80ns, wraps every 4398046511080ns
sched_clock: 56 bits at 12MHz, resolution 80ns, wraps every 4398046511080ns
Switching to timer-based delay loop, resolution 80ns
Switching to timer-based delay loop, resolution 80ns
Console: colour dummy device 80x30
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. Calib
rating delay loop (skipped), value calculated using timer frequency.. 25.00 Bogo
MIPS (lpj=125000)
25.00 BogoMIPS (lpj=125000)
pid_max: default: 32768 minimum: 301
pid_max: default: 32768 minimum: 301
Mount-cache hhsh table entries: 4096 (order: 2, 16384 bytes)
Mount-cache hash table entries: 4096 (order: 2, 16384 bytes)
Mountpoint-cache hash table entries: 4096 (order: 2, 16384 bytes)
Mountpoint-cache hash table entries: 4096 (order: 2, 16384 bytes)
CPU: Testing write buffer coherency: CPU: Testing write buffer coherency: ok
ok
CPU0: update cpu_capacity 1024
CPU0: update cpu_capacity 1024
CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00
CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00
Setting up static identity map for 0x800082c0 - 0x80008324
Setting up static identity map for 0x800082c0 - 0x80008324
CPU1: update cpu_capacity 1024
CPU1: update cpu_capacity 1024
CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01
CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01
Brought up 2 CPUs
Brought up 2 CPUs
SMP: Total of 2 processors activated (50.00 BogoMIPS).
SMP: Total of 2 processors activated (50.00 BogoMIPS).
CPU: All CPU(s) started in HYP mode.
CPU: All CPU(s) started in HYP mode.
CPU: Virtualization extensions available.
CPU: Virtualization extensions available.
devtmpfs: initialized
devtmpfs: initialized
VFP support v0.3: VFP support v0.3: implementor 41 architecture 2 part 30 varian
t 7 rev 5
implementor 41 architecture 2 part 30 variant 7 rev 5
clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112
604462750000 ns
clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112
604462750000 ns
pinctrl core: initialized pinctrl subsystem
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor ladder
cpuidle: using governor menu
cpuidle: using governor menu
Machine: LS1021A TWR Board
Machine: LS1021A TWRRBoard
SoC family: QorIQ LS1021A
SoC family: QorIQ LS1021A
SoC ID: svr:0x87080020, Revision: 2.0
SoC ID: svr:0x87080020, Revision: 2.0
irq: no irq domain found for /soc/uqe@2400000/qeic@80 !
irq: no irq domain found for /soc/uqe@2400000/qeic@80 !
irq: no irq domain found for /soc/uqe@2400000/qeic@80 !
irq: no irq domain found for /soc/uqe@2400000/qeic@80 !
hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 8 bytes.
hw-breakpoint: maximum watchpoint size is 8 bytes.
register e1000-wakeup irq error, ret = -22
register e1000-wakeup irq error, ret = -22
Serial: AMBA PL011 UART driver
Serial: AMBA PL011 UART driver
RCPM: layerscape_rcpm_init: Fail to get "fsl,#rcpm-wakeup-cells".
RCPM: layerscape_rcpm_init: Fail to get "fsl,#rcpm-wakeup-cells".
vgaarb: loaded
vgaarb: loaded
SCSI subsystem initialized
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
usbcore: registered new device driver usb
i2c i2c-0: IMX I2C adapter registered
i2c i2c-0: IMX I2C adapter registered
i2c i2c-0: can't use DMA
i2c i2c-0: can't use DMA
i2c i2c-1: IMX I2C adapter registered
i2c i2c-1: IMX I2C adapter registered
i2c i2c-1: can't use DMA
i2c i2c-1: can't use DMA
pps_core: LinuxPPS API ver. 1 registered
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@l
inux.it>
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@l
inux.it>
PTP clock support registered
PTP clock support registered
fsl-ifc 1530000.ifc: Freescale Integrated Flash Controller
fsl-ifc 1530000.ifc: Freescale Integrated Flash Controller
fsl-ifc 1530000.ifc: IFC version 1.4, 8 banks
fsl-ifc 1530000.ifc: IFC version 1.4, 8 banks
Advanced Linux Sound Architecture Driver Initialized.
Advanced Linux Sound Architecture Driver Initialized.
Switched to clocksource arch_sys_counter
Switched to clocksource arch_sys_counter
NET: Registered protocol family 2
NET: Registered protocol family 2
TCP established hash table entries: 16384 (order: 4, 65536 bytes)
TCP established hash table entries: 16384 (order: 4, 65536 bytes)
TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP: Hash tables configured (established 16384 bind 16384)
UDP hash table entries: 1024 (order: 3, 32768 bytes)
UDP hash table entries: 1024 (order: 3, 32768 bytes)
UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
NET: Registered protocol family 1
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (no cpio magic); looks like an initrd
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 22488K (88000000 - 895f6000)
Freeing initrd memory: 22488K (88000000 - 895f6000)
kvm [1]: interrupt-controller@1404000 IRQ22
kvm [1]: interrupt-controller@1404000 IRQ22
kvm [1]: timer IRQ18
kvm [1]: timer IRQ18
kvm [1]: Hyp mode initialized successfully
kvm [1]: Hyp mode initialized successfully
CPU PMU: Failed to parse /pmu/interrupt-affinity[0]
CPU PMU: Failed to parse /pmu/interrupt-affinity[0]
hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
futex hash table entries: 512 (order: 3, 32768 bytes)
HugeTLB registered 2 MB page size, pre-allocated 0 pages
HugeTLB registered 2 MB page size, pre-allocated 0 pages
NFS: Registering the id_resolver key type
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_resolver registered
Key type id_legacy registered
Key type id_legacy registered
jffs2: version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
jffs2: version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
bounce: pool size: 64 pages
bounce: pool size: 64 pages
io scheduler noop registered
io scheduler noop registered
io scheduler deadline registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler cfq registered (default)
ls-scfg-msi soc:msi-controller: ibs_shift:3 msir_irqs:32 msir_base:0x4
ls-scfg-msi soc:msi-controller: ibs_shift:3 msir_irqs:32 msir_base:0x4
Find msi-controller /soc/msi-controller
Find msi-controller /soc/msi-controller
PCI host bridge /soc/pcie@3400000 ranges:
PCI host bridge /soc/pcie@3400000 ranges:
IO 0x4000010000..0x400001ffff -> 0x00000000
IO 0x4000010000..0x400001ffff -> 0x00000000
MEM 0x4040000000..0x407fffffff -> 0x40000000
MEM 0x4040000000..0x407fffffff -> 0x40000000
layerscape-pcie 3400000.pcie: PCI host bridge to bus 0000:00
layerscape-pcie 3400000.pcie: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
pci_bus 0000:00: root bus resource [mem 0x4040000000-0x407fffffff] (bus address
[0x40000000-0x7fffffff])
pci_bus 0000:00: root bus resource [mem 0x4040000000-0x407fffffff] (bus address
[0x40000000-0x7fffffff])
PCI: bus0: Fast back to back transfers disabled
PCI: bus0: Fast back to back transfers disabled
PCI: bus1: Fast back to back transfers enabled
PCI: bus1: Fast back to back transfers enabled
pci 0000:00:00.0: BAR 6: assigned [mem 0x4040000000-0x40400007ff pref]
pci 0000:00:00.0: BAR 6: assigned [mem 0x4040000000-0x40400007ff pref]
pci 0000:00:00.0: PCI bridge to [bus 01]
pci 0000:00:00.0: PCI bridge to [bus 01]

Labels (1)
0 Kudos
1 Reply

124 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello shunping lin,

Did you use the default PCIe controller definition in arch/arm/boot/dts/ls1021a.dtsi provided in Linux SDK?

                pcie@3400000 {
                        compatible = "fsl,ls1021a-pcie", "snps,dw-pcie";
                        reg = <0x00 0x03400000 0x0 0x00010000   /* controller registers */
                               0x40 0x00000000 0x0 0x00002000>; /* configuration space */
                        reg-names = "regs", "config";
                        interrupts = <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>; /* aer interrupt */
                        interrupt-names = "pme", "aer";
                        fsl,pcie-scfg = <&scfg 0>;
                        #address-cells = <3>;
                        #size-cells = <2>;
                        device_type = "pci";
                        num-lanes = <4>;
                        bus-range = <0x0 0xff>;
                        ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000   /* downstream I/O */
                                  0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
                        msi-parent = <&msi>;
                        #interrupt-cells = <1>;
                        interrupt-map-mask = <0 0 0 7>;
                        interrupt-map = <0000 0 0 1 &gic GIC_SPI 91  IRQ_TYPE_LEVEL_HIGH>,
                                        <0000 0 0 2 &gic GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
                                        <0000 0 0 3 &gic GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
                                        <0000 0 0 4 &gic GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
                };

                pcie@3500000 {
                        compatible = "fsl,ls1021a-pcie", "snps,dw-pcie";
                        reg = <0x00 0x03500000 0x0 0x00010000   /* controller registers */
                               0x48 0x00000000 0x0 0x00002000>; /* configuration space */
                        reg-names = "regs", "config";
                        interrupts = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>; /* aer interrupt */
                        interrupt-names = "pme", "aer";
                        fsl,pcie-scfg = <&scfg 1>;
                        #address-cells = <3>;
                        #size-cells = <2>;
                        device_type = "pci";
                        num-lanes = <4>;
                        bus-range = <0x0 0xff>;
                        ranges = <0x81000000 0x0 0x00000000 0x48 0x00010000 0x0 0x00010000   /* downstream I/O */
                                  0x82000000 0x0 0x40000000 0x48 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
                        msi-parent = <&msi>;
                        #interrupt-cells = <1>;
                        interrupt-map-mask = <0 0 0 7>;
                        interrupt-map = <0000 0 0 1 &gic GIC_SPI 92  IRQ_TYPE_LEVEL_HIGH>,
                                        <0000 0 0 2 &gic GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
                                        <0000 0 0 3 &gic GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
                                        <0000 0 0 4 &gic GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>;
                };

Please enter into u-boot to check the PCIe device information.

=> pci read 00:00:00
Scanning PCI devices on bus 0
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
00.00.00   0x1957     0x0e0a     Bridge device           0x04

=> pci header 00:00:00
  vendor ID =                   0x1957
  device ID =                   0x0e0a
  command register ID =         0x0007
  status register =             0x0010
  revision ID =                 0x20
  class code =                  0x06 (Bridge device)
  sub class code =              0x04
  programming interface =       0x00
  cache line =                  0x08
  latency time =                0x00
  header type =                 0x01
  BIST =                        0x00
  base address 0 =              0xff00000f
  base address 1 =              0xfc00000f
  primary bus number =          0x00
  secondary bus number =        0x01
  subordinate bus number =      0x01
  secondary latency timer =     0x00
  IO base =                     0x10
  IO limit =                    0x10
  secondary status =            0x0000
  memory base =                 0x0900
  memory limit =                0x0900
  prefetch memory base =        0x1000
  prefetch memory limit =       0x0000
  prefetch memory base upper =  0x00000000
  prefetch memory limit upper = 0x00000000
  IO base upper 16 bits =       0x0000
  IO limit upper 16 bits =      0x0000
  expansion ROM base address =  0x08000000
  interrupt line =              0xff
  interrupt pin =               0x01
  bridge control =              0x0000

In addition, did you use Linux SDK 2.0 1703?


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos