zynq在逻辑段加入了一个RC, 设备树如下:
axi-pcie@50000000 {
#address-cells = <0x3>;
#interrupt-cells = <0x1>;
#size-cells = <0x2>;
compatible = "xlnx,axi-pcie-host-1.00.a";
device_type = "pci";
interrupt-parent = <0x3>;
interrupts = <0x0 0x1d 0x4>;
interrupt-map = <0 0 0 1 &pcie_intc 1>,
<0 0 0 2 &pcie_intc 2>,
<0 0 0 3 &pcie_intc 3>,
<0 0 0 4 &pcie_intc 4>;
interrupt-map-mask = <0x0 0x0 0x0 0x7>;
bus-range = <0x00 0xff>;
ranges = <0x2000000 0x0 0x60000000 0x60000000 0x0 0x10000000>;
reg = <0x50000000 0x1000000>;
pcie_intc: interrupt-controller {
interrupt-controller;
#address-cells = <0>;
#interrupt-cells = <1>;
};
};
内核打印错误如下:
PCI host bridge /amba@0/axi-pcie@50000000 ranges:
MEM 0x60000000..0x6fffffff -> 0x60000000
xilinx-pcie 50000000.axi-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 [mem 0x60000000-0x6fffffff]
pci 0000:00:00.0: ignoring class 0x058000 (doesn't match header type 01)
PCI: bus0: Fast back to back transfers disabled
pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
PCI: bus1: Fast back to back transfers disabled
pci 0000:01:00.0: BAR 4: no space for [mem size 0x00200000]
pci 0000:01:00.0: BAR 4: failed to assign [mem size 0x00200000]
pci 0000:01:00.0: BAR 0: no space for [mem size 0x00002000]
pci 0000:01:00.0: BAR 0: failed to assign [mem size 0x00002000]
pci 0000:01:00.0: BAR 2: no space for [mem size 0x00002000]
pci 0000:01:00.0: BAR 2: failed to assign [mem size 0x00002000]
有一条错误如下:
pci 0000:00:00.0: ignoring class 0x058000 (doesn't match header type 01)
分析代码是设备类型设置错误。
需要在逻辑的工程中,修改class code。 (class-code = <0x60400>)