pcie: enable pcie legacy irq.
authorYue Wang <yue.wang@amlogic.com>
Tue, 20 Mar 2018 07:40:50 +0000 (15:40 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Fri, 23 Mar 2018 02:03:56 +0000 (18:03 -0800)
PD#162549: pcie: enable pcie legacy irq.

Change-Id: I46eaf7aadec8083b97f4cab103414ea302435fd8
Signed-off-by: Yue Wang <yue.wang@amlogic.com>
arch/arm64/boot/dts/amlogic/axg_a113d_skt.dts
arch/arm64/boot/dts/amlogic/axg_pxp.dts
arch/arm64/boot/dts/amlogic/axg_s400.dts
arch/arm64/boot/dts/amlogic/axg_s400_v03.dts
arch/arm64/boot/dts/amlogic/axg_s400emmc.dts
arch/arm64/boot/dts/amlogic/axg_s400emmc_v03.dts
arch/arm64/boot/dts/amlogic/mesong12a.dtsi
drivers/amlogic/pci/pcie-amlogic-v2.c
drivers/amlogic/pci/pcie-amlogic.c

index 2dc36a8..497c02f 100644 (file)
                                0x0 PCIE_RESET_REG 0x0 PCIE_RESET_SIZE>;
                reg-names = "elbi", "cfg", "config", "phy", "reset";
                reset-gpio = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
-               interrupts = <0 177 0>, <0 179 0>;
+               interrupts = <0 177 0>;
                #interrupt-cells = <1>;
                bus-range = <0x0 0xff>;
                #address-cells = <3>;
                #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 179 IRQ_TYPE_EDGE_RISING>;
                device_type = "pci";
                ranges = <0x82000000 0 0 0x0 0xf9c00000 0 0x00300000>;
                        /* non-prefetchable memory */
                                0x0 PCIE_RESET_REG 0x0 PCIE_RESET_SIZE>;
                reg-names = "elbi", "cfg", "config", "phy", "reset";
                reset-gpio = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
-               interrupts = <0 167 0>, <0 169 0>;
+               interrupts = <0 167 0>;
                #interrupt-cells = <1>;
                bus-range = <0x0 0xff>;
                #address-cells = <3>;
                #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 169 IRQ_TYPE_EDGE_RISING>;
                device_type = "pci";
                ranges = <0x81000000 0 0 0 0xfa500000 0x0 0x10000
                        /* downstream I/O */
index dcc02fd..1a710c7 100644 (file)
                                0x0 0xf9c00000 0x0 0x100000>;
                reg-names = "elbi", "phy", "cfg", "reset", "config";
                reset-gpio = <&gpio GPIOX_19 0>;
-               interrupts = <0 177 0>, <0 179 0>;
+               interrupts = <0 177 0>;
                #interrupt-cells = <1>;
                bus-range = <0x0 0xff>;
                #address-cells = <3>;
                #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 179 IRQ_TYPE_EDGE_RISING>;
                device_type = "pci";
                ranges = <0x81000000 0 0          0 0xf9d00000  0x0 0x10000
                        /*downstream I/O */
                                0x0 0xffd01080 0x0 0x10
                                0x0 0xfa400000 0x0 0x100000>;
                reg-names = "elbi", "phy-unuse", "cfg", "reset-unuse", "config";
-               interrupts = <0 167 0>, <0 169 0>;
+               interrupts = <0 167 0>;
                #interrupt-cells = <1>;
                bus-range = <0x0 0xff>;
                #address-cells = <3>;
                #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 169 IRQ_TYPE_EDGE_RISING>;
                device_type = "pci";
                ranges = <0x81000000 0 0          0  0xfa500000 0x0 0x10000
                        /* downstream I/O */
index a5301db..9ae3c66 100644 (file)
                                0x0 PCIE_RESET_REG 0x0 PCIE_RESET_SIZE>;
                reg-names = "elbi", "cfg", "config", "phy", "reset";
                reset-gpio = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
-               interrupts = <0 177 0>, <0 179 0>;
+               interrupts = <0 177 0>;
                #interrupt-cells = <1>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 179 IRQ_TYPE_EDGE_RISING>;
                bus-range = <0x0 0xff>;
                #address-cells = <3>;
                #size-cells = <2>;
                                0x0 PCIE_RESET_REG 0x0 PCIE_RESET_SIZE>;
                reg-names = "elbi", "cfg", "config", "phy", "reset";
                reset-gpio = <&gpio GPIOZ_10 GPIO_ACTIVE_HIGH>;
-               interrupts = <0 167 0>, <0 169 0>;
+               interrupts = <0 167 0>;
                #interrupt-cells = <1>;
                bus-range = <0x0 0xff>;
                #address-cells = <3>;
                #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 169 IRQ_TYPE_EDGE_RISING>;
                device_type = "pci";
                ranges = <0x81000000 0 0 0 0xfa500000 0x0 0x10000
                        /* downstream I/O */
index 858d9b4..b024989 100644 (file)
                                0x0 PCIE_RESET_REG 0x0 PCIE_RESET_SIZE>;
                reg-names = "elbi", "cfg", "config", "phy", "reset";
                reset-gpio = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
-               interrupts = <0 177 0>, <0 179 0>;
+               interrupts = <0 177 0>;
                #interrupt-cells = <1>;
                bus-range = <0x0 0xff>;
                #address-cells = <3>;
                #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 179 IRQ_TYPE_EDGE_RISING>;
                device_type = "pci";
                ranges = <0x82000000 0 0 0x0 0xf9c00000 0 0x00300000>;
                        /* non-prefetchable memory */
                                0x0 PCIE_RESET_REG 0x0 PCIE_RESET_SIZE>;
                reg-names = "elbi", "cfg", "config", "phy", "reset";
                reset-gpio = <&gpio GPIOZ_10 GPIO_ACTIVE_HIGH>;
-               interrupts = <0 167 0>, <0 169 0>;
+               interrupts = <0 167 0>;
                #interrupt-cells = <1>;
                bus-range = <0x0 0xff>;
                #address-cells = <3>;
                #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 169 IRQ_TYPE_EDGE_RISING>;
                device_type = "pci";
                ranges = <0x81000000 0 0 0 0xfa500000 0x0 0x10000
                        /* downstream I/O */
index b14cbf0..8d4c886 100644 (file)
                                0x0 PCIE_RESET_REG 0x0 PCIE_RESET_SIZE>;
                reg-names = "elbi", "cfg", "config", "phy", "reset";
                reset-gpio = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
-               interrupts = <0 177 0>, <0 179 0>;
+               interrupts = <0 177 0>;
                #interrupt-cells = <1>;
                bus-range = <0x0 0xff>;
                #address-cells = <3>;
                #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 179 IRQ_TYPE_EDGE_RISING>;
                device_type = "pci";
                ranges = <0x82000000 0 0 0x0 0xf9c00000 0 0x00300000>;
                        /* non-prefetchable memory */
                                0x0 PCIE_RESET_REG 0x0 PCIE_RESET_SIZE>;
                reg-names = "elbi", "cfg", "config", "phy", "reset";
                reset-gpio = <&gpio GPIOZ_10 GPIO_ACTIVE_HIGH>;
-               interrupts = <0 167 0>, <0 169 0>;
+               interrupts = <0 167 0>;
                #interrupt-cells = <1>;
                bus-range = <0x0 0xff>;
                #address-cells = <3>;
                #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 169 IRQ_TYPE_EDGE_RISING>;
                device_type = "pci";
                ranges = <0x81000000 0 0 0 0xfa500000 0x0 0x10000
                        /* downstream I/O */
index 98246dd..9bf75da 100644 (file)
                                0x0 PCIE_RESET_REG 0x0 PCIE_RESET_SIZE>;
                reg-names = "elbi", "cfg", "config", "phy", "reset";
                reset-gpio = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
-               interrupts = <0 177 0>, <0 179 0>;
+               interrupts = <0 177 0>;
                #interrupt-cells = <1>;
                bus-range = <0x0 0xff>;
                #address-cells = <3>;
                #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 179 IRQ_TYPE_EDGE_RISING>;
                device_type = "pci";
                ranges = <0x82000000 0 0 0x0 0xf9c00000 0 0x00300000>;
                        /* non-prefetchable memory */
                                0x0 PCIE_RESET_REG 0x0 PCIE_RESET_SIZE>;
                reg-names = "elbi", "cfg", "config", "phy", "reset";
                reset-gpio = <&gpio GPIOZ_10 GPIO_ACTIVE_HIGH>;
-               interrupts = <0 167 0>, <0 169 0>;
+               interrupts = <0 167 0>;
                #interrupt-cells = <1>;
                bus-range = <0x0 0xff>;
                #address-cells = <3>;
                #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 169 IRQ_TYPE_EDGE_RISING>;
                device_type = "pci";
                ranges = <0x81000000 0 0 0 0xfa500000 0x0 0x10000
                        /* downstream I/O */
index 0919f81..3dde041 100644 (file)
                        0x0 0xff646000 0x0 0x2000
                        0x0 0xffd01080 0x0 0x10>;
                reg-names = "elbi", "cfg", "config", "phy", "reset";
-               interrupts = <0 221 0>, <0 223 0>;
+               interrupts = <0 221 0>;
                #interrupt-cells = <1>;
                bus-range = <0x0 0xff>;
                #address-cells = <3>;
                #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 223 IRQ_TYPE_EDGE_RISING>;
                device_type = "pci";
                ranges = <0x81000000 0 0 0 0xfc600000 0x0 0x100000
                        /* downstream I/O */
index 412fe3c..530beab 100644 (file)
@@ -477,11 +477,6 @@ static int amlogic_pcie_establish_link(struct amlogic_pcie *amlogic_pcie)
        return -ETIMEDOUT;
 }
 
-static irqreturn_t amlogic_pcie_irq_handler(int irq, void *arg)
-{
-       return IRQ_HANDLED;
-}
-
 static irqreturn_t amlogic_pcie_msi_irq_handler(int irq, void *arg)
 {
        struct amlogic_pcie *amlogic_pcie = arg;
@@ -637,18 +632,6 @@ static int __init amlogic_add_pcie_port(struct amlogic_pcie *amlogic_pcie,
        struct device *dev = pp->dev;
        int ret;
 
-       pp->irq = platform_get_irq(pdev, 1);
-       if (!pp->irq) {
-               dev_err(dev, "failed to get irq\n");
-               return -ENODEV;
-       }
-       ret = devm_request_irq(dev, pp->irq, amlogic_pcie_irq_handler,
-                               IRQF_SHARED, "amlogic-pcie", amlogic_pcie);
-       if (ret) {
-               dev_err(dev, "failed to request irq\n");
-               return ret;
-       }
-
        if (IS_ENABLED(CONFIG_PCI_MSI)) {
                pp->msi_irq = platform_get_irq(pdev, 0);
                if (!pp->msi_irq) {
index 107ec9e..2ac3b05 100644 (file)
@@ -437,11 +437,6 @@ static int amlogic_pcie_establish_link(struct amlogic_pcie *amlogic_pcie)
        return -ETIMEDOUT;
 }
 
-static irqreturn_t amlogic_pcie_irq_handler(int irq, void *arg)
-{
-       return IRQ_HANDLED;
-}
-
 static irqreturn_t amlogic_pcie_msi_irq_handler(int irq, void *arg)
 {
        struct amlogic_pcie *amlogic_pcie = arg;
@@ -597,18 +592,6 @@ static int __init amlogic_add_pcie_port(struct amlogic_pcie *amlogic_pcie,
        struct device *dev = pp->dev;
        int ret;
 
-       pp->irq = platform_get_irq(pdev, 1);
-       if (!pp->irq) {
-               dev_err(dev, "failed to get irq\n");
-               return -ENODEV;
-       }
-       ret = devm_request_irq(dev, pp->irq, amlogic_pcie_irq_handler,
-                               IRQF_SHARED, "amlogic-pcie", amlogic_pcie);
-       if (ret) {
-               dev_err(dev, "failed to request irq\n");
-               return ret;
-       }
-
        if (IS_ENABLED(CONFIG_PCI_MSI)) {
                pp->msi_irq = platform_get_irq(pdev, 0);
                if (!pp->msi_irq) {