]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
irqchip/irq-mvebu-icu: Clarify the reset operation of configured interrupts
authorMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 1 Oct 2018 14:13:48 +0000 (16:13 +0200)
committerMarc Zyngier <marc.zyngier@arm.com>
Tue, 2 Oct 2018 10:59:40 +0000 (11:59 +0100)
Rewrite a small section to clarify the reset operation of interrupts
already configured by ATF that we want to handle in the driver. This
will simplify the introduction of System Error Interrupts support.

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
drivers/irqchip/irq-mvebu-icu.c

index a2a3acd744911014cfe46389151b68d03b54504c..0f2655d7f19e9cbecd2e86345d15a50ad7503d60 100644 (file)
@@ -258,8 +258,12 @@ static int mvebu_icu_probe(struct platform_device *pdev)
         * avoid unpredictable SPI assignments done by firmware.
         */
        for (i = 0 ; i < ICU_MAX_IRQS ; i++) {
-               u32 icu_int = readl_relaxed(icu->base + ICU_INT_CFG(i));
-               if ((icu_int >> ICU_GROUP_SHIFT) == ICU_GRP_NSR)
+               u32 icu_int, icu_grp;
+
+               icu_int = readl_relaxed(icu->base + ICU_INT_CFG(i));
+               icu_grp = icu_int >> ICU_GROUP_SHIFT;
+
+               if (icu_grp == ICU_GRP_NSR)
                        writel_relaxed(0x0, icu->base + ICU_INT_CFG(i));
        }