diff options
Diffstat (limited to 'drivers/pci/controller/dwc')
-rw-r--r-- | drivers/pci/controller/dwc/pci-keystone.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c index c0bba7b604fa..e9e646acc2d5 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c | |||
@@ -79,7 +79,6 @@ | |||
79 | #define ERR_SYS BIT(0) /* System (fatal, non-fatal, or correctable) */ | 79 | #define ERR_SYS BIT(0) /* System (fatal, non-fatal, or correctable) */ |
80 | #define ERR_IRQ_ALL (ERR_AER | ERR_AXI | ERR_CORR | \ | 80 | #define ERR_IRQ_ALL (ERR_AER | ERR_AXI | ERR_CORR | \ |
81 | ERR_NONFATAL | ERR_FATAL | ERR_SYS) | 81 | ERR_NONFATAL | ERR_FATAL | ERR_SYS) |
82 | #define ERR_FATAL_IRQ (ERR_FATAL | ERR_AXI) | ||
83 | #define ERR_IRQ_STATUS 0x1c4 | 82 | #define ERR_IRQ_STATUS 0x1c4 |
84 | #define ERR_IRQ_ENABLE_SET 0x1c8 | 83 | #define ERR_IRQ_ENABLE_SET 0x1c8 |
85 | #define ERR_IRQ_ENABLE_CLR 0x1cc | 84 | #define ERR_IRQ_ENABLE_CLR 0x1cc |
@@ -246,18 +245,33 @@ static void ks_pcie_enable_error_irq(struct keystone_pcie *ks_pcie) | |||
246 | 245 | ||
247 | static irqreturn_t ks_pcie_handle_error_irq(struct keystone_pcie *ks_pcie) | 246 | static irqreturn_t ks_pcie_handle_error_irq(struct keystone_pcie *ks_pcie) |
248 | { | 247 | { |
249 | u32 status; | 248 | u32 reg; |
249 | struct device *dev = ks_pcie->pci->dev; | ||
250 | 250 | ||
251 | status = ks_pcie_app_readl(ks_pcie, ERR_IRQ_STATUS); | 251 | reg = ks_pcie_app_readl(ks_pcie, ERR_IRQ_STATUS); |
252 | if (!status) | 252 | if (!reg) |
253 | return IRQ_NONE; | 253 | return IRQ_NONE; |
254 | 254 | ||
255 | if (status & ERR_FATAL_IRQ) | 255 | if (reg & ERR_SYS) |
256 | dev_err(ks_pcie->pci->dev, "fatal error (status %#010x)\n", | 256 | dev_err(dev, "System Error\n"); |
257 | status); | 257 | |
258 | if (reg & ERR_FATAL) | ||
259 | dev_err(dev, "Fatal Error\n"); | ||
260 | |||
261 | if (reg & ERR_NONFATAL) | ||
262 | dev_dbg(dev, "Non Fatal Error\n"); | ||
263 | |||
264 | if (reg & ERR_CORR) | ||
265 | dev_dbg(dev, "Correctable Error\n"); | ||
266 | |||
267 | if (reg & ERR_AXI) | ||
268 | dev_err(dev, "AXI tag lookup fatal Error\n"); | ||
269 | |||
270 | if (reg & ERR_AER) | ||
271 | dev_err(dev, "ECRC Error\n"); | ||
272 | |||
273 | ks_pcie_app_writel(ks_pcie, ERR_IRQ_STATUS, reg); | ||
258 | 274 | ||
259 | /* Ack the IRQ; status bits are RW1C */ | ||
260 | ks_pcie_app_writel(ks_pcie, ERR_IRQ_STATUS, status); | ||
261 | return IRQ_HANDLED; | 275 | return IRQ_HANDLED; |
262 | } | 276 | } |
263 | 277 | ||