Skip to content

Commit e740604

Browse files
aspeedtechMarc Zyngier
authored andcommitted
irqchip/aspeed-scu-ic: Correctly initialise status and enable registers
The status and enable registers are never initialised with sensible default values. Fix those. Signed-off-by: Ryan Chen <[email protected]> [maz: commit message] Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 5dc4c99 commit e740604

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/irqchip/irq-aspeed-scu-ic.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717

1818
#define ASPEED_SCU_IC_REG 0x018
1919
#define ASPEED_SCU_IC_SHIFT 0
20-
#define ASPEED_SCU_IC_ENABLE GENMASK(6, ASPEED_SCU_IC_SHIFT)
20+
#define ASPEED_SCU_IC_ENABLE GENMASK(15, ASPEED_SCU_IC_SHIFT)
2121
#define ASPEED_SCU_IC_NUM_IRQS 7
22+
#define ASPEED_SCU_IC_STATUS GENMASK(28, 16)
2223
#define ASPEED_SCU_IC_STATUS_SHIFT 16
2324

2425
#define ASPEED_AST2600_SCU_IC0_REG 0x560
@@ -155,6 +156,8 @@ static int aspeed_scu_ic_of_init_common(struct aspeed_scu_ic *scu_ic,
155156
rc = PTR_ERR(scu_ic->scu);
156157
goto err;
157158
}
159+
regmap_write_bits(scu_ic->scu, scu_ic->reg, ASPEED_SCU_IC_STATUS, ASPEED_SCU_IC_STATUS);
160+
regmap_write_bits(scu_ic->scu, scu_ic->reg, ASPEED_SCU_IC_ENABLE, 0);
158161

159162
irq = irq_of_parse_and_map(node, 0);
160163
if (!irq) {

0 commit comments

Comments
 (0)