Hi,
I am unable to get MSI interrupt from android-hikey-linaro-4.9, it is working fine in branch android-hikey-linaro-4.4
checked out via kernel/hikey-linaro - Git at Google
Initially when I compared defconfigs between two, I found out CONFIG_PCI_MSI was not enabled in 4.9 kernel, so enabled the same in 4.9 (arch/arm64/hikey960_defconfig), still no luck.
In my driver I tried below both APIs
pci_alloc_irq_vectors(pdev, min_vecs, max_vecs, PCI_IRQ_MSI);
request_irq(pci_irq_vector(pdev, 0), pcie_isr, IRQF_SHARED, name, handle);
and
pci_enable_msi_range(pdev, min_vecs, max_vecs);
request_irq(pdev->irq, pcie_isr, IRQF_SHARED, name, handle);
I see significant difference in the DTS file between 4.4 and 4.9 as well
In 4.4, there is entry for MSI
its_pcie: interrupt-controller@f4000000 {
compatible = "arm,gic-v3-its";
msi-controller;
reg = <0x0 0xf7000000 0x0 0x100000>;
};
kirin_pcie_rc@0xf4000000 {
compatible = "hisilicon,kirin-pcie";
reg = <0x0 0xf4000000 0x0 0x1000>, <0x0 0xff3fe000 0x0 0x1000>, <0x0 0xf3f20000 0x0 0x40000>, <0x0 0xF5000000 0 0x2000>;
reg-names = "dbi","apb","phy", "config";
bus-range = <0x0 0x1>;
msi-parent = <&its_pcie>;
#address-cells = <3>;
#size-cells = <2>;
device_type = "pci";
ranges = <0x02000000 0x0 0x00000000 0x0 0xf4000000 0x0 0x4000000>;
num-lanes = <1>;
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 7>;
interrupt-map = <0 0 0 1 &gic 0 282 4>,
<0 0 0 2 &gic 0 283 4>,
<0 0 0 3 &gic 0 284 4>,
<0 0 0 4 &gic 0 285 4>;
clocks = <&crg_ctrl HI3660_PCIEPHY_REF>, <&crg_ctrl HI3660_CLK_GATE_PCIEAUX>,
<&crg_ctrl HI3660_PCLK_GATE_PCIE_PHY>, <&crg_ctrl HI3660_PCLK_GATE_PCIE_SYS>,
<&crg_ctrl HI3660_ACLK_GATE_PCIE>;
clock-names = "pcie_phy_ref", "pcie_aux", "pcie_apb_phy", "pcie_apb_sys", "pcie_aclk";
interrupts = <0 283 4>;
interrupt-names = "INTb";
reset-gpio = <&gpio11 1 0 >;
eye_param_ctrl2 = <0x1540AA4B>;
eye_param_ctrl3 = <0x14003FFF>;
};
which is not present in 4.9
pcie@f4000000 {
compatible = "hisilicon,kirin-pcie";
reg = <0x0 0xf4000000 0x0 0x1000>,
<0x0 0xff3fe000 0x0 0x1000>,
<0x0 0xf3f20000 0x0 0x40000>,
<0x0 0xf5000000 0x0 0x2000>;
reg-names = "dbi", "apb", "phy", "config";
bus-range = <0x0 0x1>;
#address-cells = <3>;
#size-cells = <2>;
device_type = "pci";
ranges = <0x02000000 0x0 0x00000000
0x0 0xf6000000
0x0 0x02000000>;
num-lanes = <1>;
#interrupt-cells = <1>;
interrupt-map-mask = <0xf800 0 0 7>;
interrupt-map = <0x0 0 0 1
&gic GIC_SPI 282 IRQ_TYPE_LEVEL_HIGH>,
<0x0 0 0 2
&gic GIC_SPI 283 IRQ_TYPE_LEVEL_HIGH>,
<0x0 0 0 3
&gic GIC_SPI 284 IRQ_TYPE_LEVEL_HIGH>,
<0x0 0 0 4
&gic GIC_SPI 285 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&crg_ctrl HI3660_PCIEPHY_REF>,
<&crg_ctrl HI3660_CLK_GATE_PCIEAUX>,
<&crg_ctrl HI3660_PCLK_GATE_PCIE_PHY>,
<&crg_ctrl HI3660_PCLK_GATE_PCIE_SYS>,
<&crg_ctrl HI3660_ACLK_GATE_PCIE>;
clock-names = "pcie_phy_ref", "pcie_aux",
"pcie_apb_phy", "pcie_apb_sys",
"pcie_aclk";
reset-gpio = <&gpio11 1 0 >;
};
I tried adding “its_pcie” and “msi-parent = <&its_pcie>;”, still it is not working
Why CONFIG_PCI_MSI is not enabled by default in 4.9 defconfig? and why DTS does not contain MSI entry? Is there a known issue with MSI?
Thanks,
Shankar