pcie: host: tegra: Fix Invalid IRQ warning for RP
Jay Agarwal [Mon, 10 Feb 2014 07:11:07 +0000 (12:11 +0530)]
Initialize IRQ_LINE to non-zero before enumeration
to avoid warning for invalid IRQ.

Bug 1453145

Change-Id: Ifbed98cb15f4f57a77bdc59dff225ae7fbaa3684
Signed-off-by: Jay Agarwal <jagarwal@nvidia.com>
Reviewed-on: http://git-master/r/365334
(cherry picked from commit aa2e12682fc91a25184b4f468644e008c5047274)
Reviewed-on: http://git-master/r/369131
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Naveen Kumar S <nkumars@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

drivers/pci/host/pci-tegra.c

index 0b8bf08..ef0bec7 100644 (file)
 #define NV_PCIE2_RP_RSR                                        0x000000A0
 #define NV_PCIE2_RP_RSR_PMESTAT                                (1 << 16)
 
+#define NV_PCIE2_RP_INTR_BCR                                   0x0000003C
+#define NV_PCIE2_RP_INTR_BCR_INTR_LINE                         (0xFF << 0)
+
 #define NV_PCIE2_RP_PRIV_MISC                                  0x00000FE0
 #define PCIE2_RP_PRIV_MISC_PRSNT_MAP_EP_PRSNT                  (0xE << 0)
 #define PCIE2_RP_PRIV_MISC_PRSNT_MAP_EP_ABSNT                  (0xF << 0)
@@ -1410,6 +1413,10 @@ static void tegra_pcie_apply_sw_war(int index, bool enum_done)
                data = rp_readl(NV_PCIE2_RP_ECTL_1_R2, index);
                data |= PCIE2_RP_ECTL_1_R2_TX_DRV_CNTL_1C;
                rp_writel(data, NV_PCIE2_RP_ECTL_1_R2, index);
+               /* Avoid warning during enumeration for invalid IRQ of RP */
+               data = rp_readl(NV_PCIE2_RP_INTR_BCR, index);
+               data |= NV_PCIE2_RP_INTR_BCR_INTR_LINE;
+               rp_writel(data, NV_PCIE2_RP_INTR_BCR, index);
        }
 }