Skip to content

Commit 4689c09

Browse files
paliLorenzo Pieralisi
authored andcommitted
PCI: aardvark: Refactor unmasking summary MSI interrupt
Refactor the masking of ISR0/1 Sources and unmasking of summary MSI interrupt so that it corresponds to the comments: - first mask all ISR0/1 - then unmask all MSIs - then unmask summary MSI interrupt Link: https://lore.kernel.org/r/20220110015018.26359-10-kabel@kernel.org Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Marek Behún <kabel@kernel.org> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
1 parent 222af78 commit 4689c09

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

drivers/pci/controller/pci-aardvark.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -571,15 +571,17 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie)
571571
advk_writel(pcie, PCIE_IRQ_ALL_MASK, HOST_CTRL_INT_STATUS_REG);
572572

573573
/* Disable All ISR0/1 Sources */
574-
reg = PCIE_ISR0_ALL_MASK;
575-
reg &= ~PCIE_ISR0_MSI_INT_PENDING;
576-
advk_writel(pcie, reg, PCIE_ISR0_MASK_REG);
577-
574+
advk_writel(pcie, PCIE_ISR0_ALL_MASK, PCIE_ISR0_MASK_REG);
578575
advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_MASK_REG);
579576

580577
/* Unmask all MSIs */
581578
advk_writel(pcie, ~(u32)PCIE_MSI_ALL_MASK, PCIE_MSI_MASK_REG);
582579

580+
/* Unmask summary MSI interrupt */
581+
reg = advk_readl(pcie, PCIE_ISR0_MASK_REG);
582+
reg &= ~PCIE_ISR0_MSI_INT_PENDING;
583+
advk_writel(pcie, reg, PCIE_ISR0_MASK_REG);
584+
583585
/* Enable summary interrupt for GIC SPI source */
584586
reg = PCIE_IRQ_ALL_MASK & (~PCIE_IRQ_ENABLE_INTS_MASK);
585587
advk_writel(pcie, reg, HOST_CTRL_INT_MASK_REG);

0 commit comments

Comments
 (0)